jQuery(window).load(function() { if(jQuery('#slider') > 0) { jQuery('.nivoSlider').nivoSlider({ effect:'fade', }); } else { jQuery('#slider').nivoSlider({ effect:'fade', }); } }); // NAVIGATION CALLBACK var ww = jQuery(window).width(); jQuery(document).ready(function() { jQuery(".headnav li a").each(function() { if (jQuery(this).next().length > 0) { jQuery(this).addClass("parent"); }; }) jQuery(".toggleMenu").click(function(e) { e.preventDefault(); jQuery(this).toggleClass("active"); jQuery(".headnav").slideToggle('fast'); }); adjustMenu(); }) // navigation orientation resize callbak jQuery(window).bind('resize orientationchange', function() { ww = jQuery(window).width(); adjustMenu(); }); var adjustMenu = function() { if (ww < 981) { jQuery(".toggleMenu").css("display", "block"); if (!jQuery(".toggleMenu").hasClass("active")) { jQuery(".headnav").hide(); } else { jQuery(".headnav").show(); } jQuery(".headnav li").unbind('mouseenter mouseleave'); } else { jQuery(".toggleMenu").css("display", "none"); jQuery(".headnav").show(); jQuery(".headnav li").removeClass("hover"); jQuery(".headnav li a").unbind('click'); jQuery(".headnav li").unbind('mouseenter mouseleave').bind('mouseenter mouseleave', function() { jQuery(this).toggleClass('hover'); }); } } jQuery(document).ready(function() { jQuery('.srchicon').click(function() { jQuery('.searchtop').toggle(); jQuery('.topsocial').toggle(); }); }); jQuery(document).ready(function() { jQuery('.foot-4-cols h5').each(function(index, element) { var heading = jQuery(element); var word_array, last_word, first_part; word_array = heading.html().split(/\s+/); // split on spaces last_word = word_array.pop(); // pop the last word first_part = word_array.join(' '); // rejoin the first words together heading.html([first_part, ' ', last_word, ''].join('')); }); }); jQuery(window).bind('scroll', function() { if (jQuery(window).scrollTop() >= 80) { jQuery('.header').addClass('fixed-header'); } else { jQuery('.header').removeClass('fixed-header'); } });