(function($) {$.fn.et_switcher=function(options) {var defaults={slides:'>div',activeClass:'active',linksNav:'',findParent:true,lengthElement:'li',useArrows:false,arrowLeft:'prevlink',arrowRight:'nextlink',auto:false,autoSpeed:4000};var options=$.extend(defaults,options);return this.each(function() {var slidesContainer=jQuery(this);slidesContainer.find(options.slides).hide().end().find(options.slides).filter(':first').css('display','block');if(options.linksNav!=''){var linkSwitcher=jQuery(options.linksNav);linkSwitcher.click(function(){var targetElement;if(options.findParent)targetElement=jQuery(this).parent();else targetElement=jQuery(this);if(targetElement.hasClass('active'))return false;jQuery('div.item .active').stop(true,true).animate({marginTop:'0px'},500,function(){jQuery(this).removeClass('active');});jQuery(this).stop(true,true).animate({marginTop:'-15px'},500,function(){jQuery(this).addClass('active');});var ordernum=targetElement.prevAll(options.lengthElement).length;slidesContainer.find(options.slides).filter(':visible').hide().end().end().find(options.slides).filter(':eq('+ordernum+')').stop(true,true).fadeIn(700);jQuery('div#slides div.slide div.banner').css('top','0px');slidesContainer.find(options.slides).filter(':visible').children('div').stop(true,true).animate({top:'90px'},300);if(typeof interval!='undefined'){clearInterval(interval);auto_rotate();};return false;});};jQuery('#'+options.arrowRight+', #'+options.arrowLeft).click(function(){var slideActive=slidesContainer.find(options.slides).filter(":visible"),nextSlide=slideActive.next(),prevSlide=slideActive.prev();if(jQuery(this).attr("id")==options.arrowRight){if(nextSlide.length){var ordernum=nextSlide.prevAll().length;}else{var ordernum=0;}};if(jQuery(this).attr("id")==options.arrowLeft){if(prevSlide.length){var ordernum=prevSlide.prevAll().length;}else{var ordernum=slidesContainer.find(options.slides).length-1;}};slidesContainer.find(options.slides).filter(':visible').hide().end().end().find(options.slides).filter(':eq('+ordernum+')').stop().fadeIn(700);if(typeof interval!='undefined'){clearInterval(interval);auto_rotate();};return false;});if(options.auto){auto_rotate();};function auto_rotate(){interval=setInterval(function(){var slideActive=slidesContainer.find(options.slides).filter(":visible"),nextSlide=slideActive.next();if(nextSlide.length){var ordernum=nextSlide.prevAll().length;}else{var ordernum=0;} if(options.linksNav==='') jQuery('#'+options.arrowRight).trigger("click");else linkSwitcher.filter(':eq('+ordernum+')').trigger("click");},options.autoSpeed);};});}})(jQuery);var $featuredArea=jQuery('#featured #slides');jQuery(window).load(function(){});jQuery('div#slides div.active div.banner').css('top','90px');/*]]>*/