jQuery(document).ready(function(){ jQuery("body").removeClass('no-js'); jQuery(".colorbox").colorbox({ rel: jQuery(this).attr('rel'), maxwidth: "90%", maxheight: "90%", scalePhotos: true }); jQuery(".colorbox-inline").colorbox({ inline:true, width: "775px", rel: jQuery(this).attr('href') }); jQuery(".colorbox-iframe").colorbox({ iframe:true, width: "550px", height: "400x" }); // animate the nav links jQuery('ul#nav > li').hover(function() { jQuery(this).find("> ul").stop(true,true).slideDown('500'); }, function () { jQuery(this).find("> ul").stop(true,true).slideUp('500'); }); // hover function jQuery('.fade').fadeTo("fast", 0.8); jQuery('.fade').hover(function() { jQuery(this).filter(':not(:animated)').fadeTo("slow", 1); }, function() { jQuery(this).fadeTo("slow", 0.8); }); // add target=_blank to external links jQuery('a[rel="external"]').attr('target','_blank'); var $scrollingDiv = jQuery(".postauthor"); jQuery(window).scroll(function(){ $scrollingDiv.stop().animate({"marginTop": (jQuery(window).scrollTop()) + "px"},"slow"); }); // animate the nav links jQuery('.wp-content-slide-content-container span').fadeTo("fast", 0.8); jQuery('.wp-content-slide-content-container span').hover(function() { jQuery(this).filter(':not(:animated)').fadeTo("fast", 1); }, function () { jQuery(this).fadeTo("slow", 0.8); }); jQuery('.slider-blog').cycle({ fx: 'fade', speed: 'fast', timeout: 3000, pause: 1, next: '#next', prev: '#prev' }); // animate the blog slider jQuery('.slider-blog .slider-blog-slide-content').css("bottom","-77px"); jQuery('.slider-blog .slider-blog-slide').hover(function() { jQuery(this).find('.slider-blog-slide-content').stop(true, false).animate({ bottom: '0' }, 1000); }, function () { jQuery(this).find('.slider-blog-slide-content').stop(true, false).animate({ bottom: '-77px' }, 1000); }); // animate the page children UL jQuery('.wpsc_second_level_categories').hide(); jQuery('.wpsc_top_level_categories > li > a').click(function() { jQuery('.wpsc_top_level_categories li').removeClass('wpsc-current-cat'); jQuery('.wpsc_top_level_categories li').removeClass('wpsc-cat-ancestor'); jQuery(this).parent().addClass('wpsc-current-cat'); jQuery('.wpsc_second_level_categories').slideUp(); jQuery(this).next('.wpsc_second_level_categories').stop(true, true).slideToggle(); return false; }); jQuery('.wpsc-current-cat .wpsc_second_level_categories').slideDown(); jQuery('.wpsc-cat-ancestor .wpsc_second_level_categories').slideDown(); }); // End Doc Ready