// Websitebox Javascript functions:
(function($){
//variable for storing the menu count when no ID is present
var menuCount = 0;
//plugin code
$.fn.mobileMenu = function(options){
//plugin's default options
var settings = {
switchWidth: 480,
topOptionText: 'Select a page..',
indentString: ' '
};
//function to check if selector matches a list
function isList($this){
return (($this.is('ul, ol')) ? true : false);
}
//function to decide if mobile or not
function isMobile(){
return (($(window).width() < settings.switchWidth) ? true : false);
}
//check if dropdown exists for the current element
function menuExists($this){
//if the list has an ID, use it to give the menu an ID
if($this.attr('id')){
return (($('#wsbx_'+$this.attr('id')).length > 0) ? true : false);
}
//otherwise, give the list and select elements a generated ID
else {
menuCount++;
$this.attr('id', 'mm'+menuCount);
return (($('#mobileMenu_mm'+menuCount).length > 0) ? true : false);
}
}
//change page on mobile menu selection
function goToPage($this){
if($this.val() !== null){document.location.href = $this.val()}
}
//show the mobile menu
function showMenu($this){
$this.hide();
$('#wsbx_'+$this.attr('id')).show();
}
//hide the mobile menu
function hideMenu($this){
$this.show();
$('#wsbx_'+$this.attr('id')).hide();
}
//create the mobile menu
function createMenu($this){
if(isList($this)){
//generate select element as a string to append via jQuery
var selectString = '';
//append select element to ul/ol's container
$this.parent().append(selectString);
//add change event handler for mobile menu
$('#wsbx_'+$this.attr('id')).change(function(){
goToPage($(this));
});
//hide current menu, show mobile menu
showMenu($this);
} else {
alert('mobileMenu will only work with UL or OL elements!');
}
}
//plugin functionality
function run($this){
//menu doesn't exist
if(isMobile() && !menuExists($this)){
createMenu($this);
}
//menu already exists
else if(isMobile() && menuExists($this)){
showMenu($this);
}
//not mobile browser
else if(!isMobile() && menuExists($this)){
hideMenu($this);
}
}
//run plugin on each matched ul/ol
//maintain chainability by returning "this"
return this.each(function() {
//override the default settings if user provides some
if(options){$.extend(settings, options);}
//cache "this"
var $this = $(this);
//bind event to browser resize
$(window).resize(function(){run($this);});
//run plugin
run($this);
});
};
})(jQuery);
/** Smooth Navigational Menu- By Dynamic Drive DHTML code library: http://www.dynamicdrive.com
//** Script Download/ instructions page: http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/
//** Menu created: Nov 12, 2008
//** Dec 12th, 08" (v1.01): Fixed Shadow issue when multiple LIs within the same UL (level)
contain sub menus: http://www.dynamicdrive.com/forums/showthread.php?t=39177&highlight=smooth**/
var ddsmoothmenu={
//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
arrowimages: {down:['downarrowclass', '', 28], right:['rightarrowclass','']},
transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds
shadow: {}, //enable shadow?
showhidedelay: {showdelay: 200, hidedelay: 25},
///////Stop configuring beyond here///////////////////////////
detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1, //detect WebKit browsers (Safari, Chrome etc)
detectie6: document.all && !window.XMLHttpRequest,
css3support: window.msPerformance || (!document.all && document.querySelector), //detect browsers that support CSS3 box shadows (ie9+ or FF3.5+, Safari3+, Chrome etc)
getajaxmenu:function($, setting){ //function to fetch external page containing the panel DIVs
var $menucontainer=$('#'+setting.contentsource[0]) //reference empty div on page that will hold menu
$menucontainer.html("Loading Menu...")
$.ajax({
url: setting.contentsource[1], //path to external menu file
async: true,
error:function(ajaxrequest){
$menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText)
},
success:function(content){
$menucontainer.html(content)
ddsmoothmenu.buildmenu($, setting)
}
})
},
buildmenu:function($, setting){
var smoothmenu=ddsmoothmenu
var $mainmenu=$("#"+setting.mainmenuid+">ul") //reference main menu UL
$mainmenu.parent().get(0).className=setting.classname || "ddsmoothmenu"
var $headers=$mainmenu.find("ul").parent()
$headers.hover(
function(e){
$(this).children('a:eq(0)').addClass('wsbx_selected')
},
function(e){
$(this).children('a:eq(0)').removeClass('wsbx_selected')
}
)
$headers.each(function(i){ //loop through each LI header
var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header
var $subul=$(this).find('ul:eq(0)').css({display:'block'})
$subul.data('timers', {})
this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
this.istopheader=$curobj.parents("ul").length==1? true : false //is top level header?
$subul.css({top:this.istopheader && setting.orientation!='v'? this._dimensions.h+"px" : 0})
$curobj.children("a:eq(0)").css(this.istopheader? {} : {}).append( /*add arrow images*/
''
)
if (smoothmenu.shadow.enable && !smoothmenu.css3support){ //if shadows enabled and browser doesn't support CSS3 box shadows
this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx : this._dimensions.w), y:(this.istopheader? $subul.offset().top+smoothmenu.shadow.offsety : $curobj.position().top)} //store this shadow's offsets
if (this.istopheader)
$parentshadow=$(document.body)
else{
var $parentLi=$curobj.parents("li:eq(0)")
$parentshadow=$parentLi.get(0).$shadow
}
this.$shadow=$('
').prependTo($parentshadow).css({left:this._shadowoffset.x+'px', top:this._shadowoffset.y+'px'}) //insert shadow DIV and set it to parent node for the next shadow div
}
$curobj.hover(
function(e){
var $targetul=$subul //reference UL to reveal
var header=$curobj.get(0) //reference header LI as DOM object
clearTimeout($targetul.data('timers').hidetimer)
$targetul.data('timers').showtimer=setTimeout(function(){
header._offsets={left:$curobj.offset().left, top:$curobj.offset().top}
var menuleft=header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w
menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent
if ($targetul.queue().length<=1){ //if 1 or less queued animations
$targetul.css({left:menuleft+"px", width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, ddsmoothmenu.transition.overtime)
if (smoothmenu.shadow.enable && !smoothmenu.css3support){
var shadowleft=header.istopheader? $targetul.offset().left+ddsmoothmenu.shadow.offsetx : menuleft
var shadowtop=header.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety : header._shadowoffset.y
if (!header.istopheader && ddsmoothmenu.detectwebkit){ //in WebKit browsers, restore shadow's opacity to full
header.$shadow.css({opacity:1})
}
header.$shadow.css({overflow:'', width:header._dimensions.subulw+'px', left:shadowleft+'px', top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'}, ddsmoothmenu.transition.overtime)
}
}
}, ddsmoothmenu.showhidedelay.showdelay)
},
function(e){
var $targetul=$subul
var header=$curobj.get(0)
clearTimeout($targetul.data('timers').showtimer)
$targetul.data('timers').hidetimer=setTimeout(function(){
$targetul.animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime)
if (smoothmenu.shadow.enable && !smoothmenu.css3support){
if (ddsmoothmenu.detectwebkit){ //in WebKit browsers, set first child shadow's opacity to 0, as "overflow:hidden" doesn't work in them
header.$shadow.children('div:eq(0)').css({opacity:0})
}
header.$shadow.css({overflow:'hidden'}).animate({height:0}, ddsmoothmenu.transition.outtime)
}
}, ddsmoothmenu.showhidedelay.hidedelay)
}
) //end hover
}) //end $headers.each()
if (smoothmenu.shadow.enable && smoothmenu.css3support){ //if shadows enabled and browser supports CSS3 shadows
var $toplevelul=$('#'+setting.mainmenuid+' ul li ul')
var css3shadow=parseInt(smoothmenu.shadow.offsetx)+"px "+parseInt(smoothmenu.shadow.offsety)+"px 5px #aaa" //construct CSS3 box-shadow value
var shadowprop=["boxShadow", "MozBoxShadow", "WebkitBoxShadow", "MsBoxShadow"] //possible vendor specific CSS3 shadow properties
for (var i=0; i\n'
+mainselector+' ul li a {background:'+setting.customtheme[0]+';}\n'
+mainmenuid+' ul li a:hover {background:'+setting.customtheme[1]+';}\n'
+'')
}
this.shadow.enable=(document.all && !window.XMLHttpRequest)? false : this.shadow.enable //in IE6, always disable shadow
jQuery(document).ready(function($){ //ajax menu?
if (typeof setting.contentsource=="object"){ //if external ajax menu
ddsmoothmenu.getajaxmenu($, setting)
}
else{ //else if markup menu
ddsmoothmenu.buildmenu($, setting)
}
})
}
}
ddsmoothmenu.init({
mainmenuid: "wsbx_primary_menu", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'wsbx_jqueryslidemenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
/* CUSTOM FORM ELEMENTS
Created by Ryan Fait
www.ryanfait.com
The only things you may need to change in this file are the following
variables: checkboxHeight, radioHeight and selectWidth (lines 24, 25, 26)
The numbers you set for checkboxHeight and radioHeight should be one quarter
of the total height of the image want to use for checkboxes and radio
buttons. Both images should contain the four stages of both inputs stacked
on top of each other in this order: unchecked, unchecked-clicked, checked,
checked-clicked.
You may need to adjust your images a bit if there is a slight vertical
movement during the different stages of the button activation.
The value of selectWidth should be the width of your select list image.
p
Visit http://ryanfait.com/ for more information.
*/
var checkboxHeight = "25";
var radioHeight = "25";
var selectWidth = "190";
/* No need to change anything after this */
document.write('');
var xCustom = {
init: function() {
var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active;
for(a = 0; a < inputs.length; a++) {
if((inputs[a].type == "checkbox" || inputs[a].type == "radio") && jQuery(inputs[a]).hasClass('wsbx_styled')) {
span[a] = document.createElement("span");
span[a].className = inputs[a].type;
if(inputs[a].checked == true) {
if(inputs[a].type == "checkbox") {
position = "0 -" + (checkboxHeight*2) + "px";
span[a].style.backgroundPosition = position;
} else {
position = "0 -" + (radioHeight*2) + "px";
span[a].style.backgroundPosition = position;
}
}
inputs[a].parentNode.insertBefore(span[a], inputs[a]);
inputs[a].onchange = Custom.clear;
if(!inputs[a].getAttribute("disabled")) {
span[a].onmousedown = Custom.pushed;
span[a].onmouseup = Custom.check;
} else {
span[a].className = span[a].className += " disabled";
}
}
}
inputs = document.getElementsByTagName("select");
for(a = 0; a < inputs.length; a++) {
if(jQuery(inputs[a]).hasClass('wsbx_styled')) {
option = inputs[a].getElementsByTagName("option");
active = option[0].childNodes[0].nodeValue;
textnode = document.createTextNode(active);
for(b = 0; b < option.length; b++) {
if(option[b].selected == true) {
textnode = document.createTextNode(option[b].childNodes[0].nodeValue);
}
}
span[a] = document.createElement("span");
span[a].className = "select";
span[a].id = "select" + inputs[a].name;
span[a].appendChild(textnode);
inputs[a].parentNode.insertBefore(span[a], inputs[a]);
if(!inputs[a].getAttribute("disabled")) {
inputs[a].onchange = Custom.choose;
} else {
inputs[a].previousSibling.className = inputs[a].previousSibling.className += " disabled";
}
}
}
document.onmouseup = Custom.clear;
},
pushed: function() {
element = this.nextSibling;
if(element.checked == true && element.type == "checkbox") {
this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px";
} else if(element.checked == true && element.type == "radio") {
this.style.backgroundPosition = "0 -" + radioHeight*3 + "px";
} else if(element.checked != true && element.type == "checkbox") {
this.style.backgroundPosition = "0 -" + checkboxHeight + "px";
} else {
this.style.backgroundPosition = "0 -" + radioHeight + "px";
}
},
check: function() {
element = this.nextSibling;
if(element.checked == true && element.type == "checkbox") {
this.style.backgroundPosition = "0 0";
element.checked = false;
} else {
if(element.type == "checkbox") {
this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
} else {
this.style.backgroundPosition = "0 -" + radioHeight*2 + "px";
group = this.nextSibling.name;
inputs = document.getElementsByTagName("input");
for(a = 0; a < inputs.length; a++) {
if(inputs[a].name == group && inputs[a] != this.nextSibling) {
inputs[a].previousSibling.style.backgroundPosition = "0 0";
}
}
}
element.checked = true;
}
},
clear: function() {
inputs = document.getElementsByTagName("input");
for(var b = 0; b < inputs.length; b++) {
if(inputs[b].type == "checkbox" && inputs[b].checked == true && jQuery(inputs[b]).hasClass('wsbx_styled')) {
inputs[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
} else if(inputs[b].type == "checkbox" && jQuery(inputs[b]).hasClass('wsbx_styled')) {
inputs[b].previousSibling.style.backgroundPosition = "0 0";
} else if(inputs[b].type == "radio" && inputs[b].checked == true && jQuery(inputs[b]).hasClass('wsbx_styled')) {
inputs[b].previousSibling.style.backgroundPosition = "0 -" + radioHeight*2 + "px";
} else if(inputs[b].type == "radio" && jQuery(inputs[b]).hasClass('wsbx_styled')) {
inputs[b].previousSibling.style.backgroundPosition = "0 0";
}
}
},
choose: function() {
option = this.getElementsByTagName("option");
for(d = 0; d < option.length; d++) {
if(option[d].selected == true) {
document.getElementById("select" + this.name).childNodes[0].nodeValue = option[d].childNodes[0].nodeValue;
}
}
}
}
//window.onload = Custom.init;
//Get upload filename and
function getfilename() {
var file;
file = document.getElementById("wsbx_file_image").value;
if (file.indexOf('/') > -1) file = file.substring(file.lastIndexOf('/') + 1);
else if (file.indexOf('\\') > -1) file = file.substring(file.lastIndexOf('\\') + 1);
//We get the filename inside the textfield.
var filename = document.getElementById("filename").value = file;
}
// Fireup the plugins
$(document).ready(function(){
//mobile select menu
$('#mobileselect').mobileMenu({
switchWidth: 720, // at what size to begin showing the select box
indentString: ' -' // how to indent the menu items in select box
});
$('.wsbx_translator_cols ul li.wsbx_other_langs span').toggle(function(){
$('.wsbx_lang').slideDown();
}, function(){
$('.wsbx_lang').slideUp();
});
/* jQuery fix for selecting individual list items using pesudo selectors. Works across browser */
//Get the last li item and give it a class
$("#wsbx_primary_menu ul > li ul > li:last-child > a").addClass("wsbx_last_sub_item");
$('.wsbx_main_config1 .wsbx_recently_tweeted_cols ul li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config1 .wsbx_rssfeeds_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config1 ul li ul.wsbx_lang li:nth-child(even)').addClass('wsbx_alt_item');
$('.wsbx_main_config1 .wsbx_lang li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config2 .wsbx_more_info_cols ul li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config2 .wsbx_recently_tweeted_cols ul li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config2 .wsbx_rssfeeds_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config2 ul li ul.wsbx_lang li:nth-child(even)').addClass('wsbx_alt_item');
$('.wsbx_main_config2 .wsbx_lang li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config3 .wsbx_more_info_cols ul li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config3 ul li ul.wsbx_lang li:nth-child(even)').addClass('wsbx_alt_item');
$('.wsbx_main_config3 .wsbx_lang li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config4 .wsbx_recently_tweeted_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config4 .wsbx_rssfeeds_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config4 ul li ul.wsbx_lang li:nth-child(even)').addClass('wsbx_alt_item');
$('.wsbx_main_config4 .wsbx_lang li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config4 .wsbx_column_one.wsbx_translator_cols ul li:nth-child(13)').addClass('wsbx_li13_item');
$('.wsbx_main_config5 .wsbx_more_info_cols ul li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config5 .wsbx_recently_tweeted_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item')
$('.wsbx_main_config5 .wsbx_rssfeeds_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config5 ul li ul.wsbx_lang li:nth-child(even)').addClass('wsbx_alt_item');
$('.wsbx_main_config5 .wsbx_lang li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config6 .wsbx_more_info_cols ul li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config6 .wsbx_recently_tweeted_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config6 .wsbx_rssfeeds_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config6 ul li ul.wsbx_lang li:nth-child(even)').addClass('wsbx_alt_item');
$('.wsbx_main_config6 .wsbx_lang li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config7 .wsbx_more_info_cols ul li:last-child').addClass('wsbx_last_item');
$('.wsbx_main_config7 .wsbx_recently_tweeted_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config7 .wsbx_rssfeeds_cols ul li:last-child .wsbx_tickerwrap').addClass('wsbx_last_item');
$('.wsbx_main_config7 ul li ul.wsbx_lang li:nth-child(even)').addClass('wsbx_alt_item');
$('.wsbx_main_config7 .wsbx_lang li:last-child').addClass('wsbx_last_item');
// Pretty Photo plugin startup & also built for responsiveness.
$('.fancybox').fancybox({
arrows: true,
padding: 12
});
$('.wsbx_comment').elastic();
$('#wsbx_datepicker_cal').Zebra_DatePicker({
always_visible: $('#wsbx_full_calendar'),
lang_clear_date: "Today"
});
});
//RSS Feeds, Testimonial, Tweet feeds
$(function(){
$('.wsbx_main_config1 .wsbx_recently_tweeted_cols .wsbx_box_wrap').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config1 .wsbx_rssfeeds_cols .wsbx_box_wrap').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config1 .wsbx_testimonial_cols .wsbx_box_wrap').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config2 .wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 3,
direction: 'up'
});
$('.wsbx_main_config2 .wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config2 .wsbx_testimonial_cols .wsbx_testimony_inner').vTicker({
speed: 1200,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config3 .wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config3 .wsbx_column_one.wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 3,
direction: 'up'
});
$('.wsbx_main_config3 .wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config3 .wsbx_column_one.wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 3,
direction: 'up'
});
$('.wsbx_main_config3 .wsbx_testimonial_cols .wsbx_testimony_inner').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config3 .wsbx_column_one.wsbx_testimonial_cols .wsbx_testimony_inner').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config4 .wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config4 .wsbx_column_three.wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config4 .wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 3,
direction: 'up'
});
$('.wsbx_main_config4 .wsbx_column_three.wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config4 .wsbx_testimonial_cols .wsbx_testimony_inner').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config5 .wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config5 .wsbx_column_one.wsbx_recently_tweeted_cols .wsbx_tweets, .wsbx_main_config5 .wsbx_column_three.wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 3,
direction: 'up'
});
$('.wsbx_main_config5 .wsbx_column_one.wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 3,
direction: 'up'
});
$('.wsbx_main_config5 .wsbx_column_two.wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config5 .wsbx_column_three.wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config5 .wsbx_testimonial_cols .wsbx_testimony_inner').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config6 .wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config6 .wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config6 .wsbx_testimonial_cols .wsbx_testimony_inner').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
$('.wsbx_main_config7 .wsbx_recently_tweeted_cols .wsbx_tweets').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config7 .wsbx_rssfeeds_cols .wsbx_rssfeeds').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 2,
direction: 'up'
});
$('.wsbx_main_config7 .wsbx_testimonial_cols .wsbx_testimony_inner').vTicker({
speed: 1500,
pause: 10000,
animation: 'fade',
mousePause: false,
showItems: 1,
direction: 'up'
});
});
$(window).load(function() {
$('.wsbx_featuredwrap').flexslider({//serve a fade transition on tablets/mobiles
animation: "fade",
slideshow: true,
directionNav: false
});
});
$(function() {
$(window).scroll(function() {
if($(this).scrollTop() != 0) {
$('#toTop').fadeIn();
} else {
$('#toTop').fadeOut();
}
});
$('#toTop').click(function() {
$('body,html').animate({scrollTop:0}, 800);
});
});