$(document).ready(function(){heroCarousel.init()});var heroCarousel={content:[],isLoaded:false,currentIndex:0,domNode:"#heroCarousel",contentContainer:null,titleContainer:null,init:function(){$(".heroCarouselNavs .carourselLeft").click(function(){heroCarousel.go(-1)});$(".heroCarouselNavs .carourselRight").click(function(){heroCarousel.go(1)});this.contentContainer=$(".heroWrapper",this.domNode);this.titleContainer=$(".heroHead h1 .slideTitle",this.domNode);this.isLoaded=true},go:function(A){if(A==1){heroCarousel.currentIndex=(heroCarousel.currentIndex==heroCarousel.content.length-1)?0:heroCarousel.currentIndex+1}else{heroCarousel.currentIndex=(heroCarousel.currentIndex==0)?heroCarousel.content.length-1:heroCarousel.currentIndex-1}this.loadSlide()},loadSlide:function(){var A=this;heroCarousel.contentContainer.children("div").fadeOut("fast",function(){$.get(A.content[A.currentIndex].src,{},heroCarousel.postLoad)})},postLoad:function(A){heroCarousel.contentContainer.html(A).fadeIn("fast");heroCarousel.titleContainer.html(heroCarousel.content[heroCarousel.currentIndex].title)}};
