window.addEvent("domready",function(){var a=new SlideShow("featureIntros",{delay:5E3,duration:700,heightSlideSpeed:800,autoplay:true,transition:"fadeThroughBackground"});a.goingAuto=true;a.addEvent("onShowComplete",function(){if(a.goingAuto){var b=parseInt(this.current.id.substr(13),10);$$("#featureIntroIndicators span").setStyle("color","#ccc");$("featureIntroIndicator-"+b).setStyle("color","#555")}});$$("#featureIntroIndicators span").addEvent("mouseenter",function(){$clear(a.timer);a.goingAuto=
false;var b=parseInt(this.id.substr(22),10);$$("#featureIntroIndicators span").setStyle("color","#ccc");$("featureIntroIndicator-"+b).setStyle("color","#555");a.pause();a.show(b,{duration:250})});$$("#featureIntroIndicators span").addEvent("mouseleave",function(){$clear(a.timer);parseInt(this.id.substr(22),10);a.timer=function(){a.play();a.goingAuto=true}.delay(1E3)})});
var Loop=new Class({loopCount:0,isStopped:true,isLooping:false,loopMethod:$empty,setLoop:function(a,b){if(this.isLooping){this.stopLoop();var c=true}else c=false;this.loopMethod=a;this.loopDelay=b||3E3;c&&this.startLoop();return this},stopLoop:function(){this.isStopped=true;this.isLooping=false;$clear(this.periodical);return this},startLoop:function(a){if(this.isStopped){a=a?a:this.loopDelay;this.isStopped=false;this.isLooping=true;this.periodical=this.looper.periodical(a,this)}return this},resetLoop:function(){this.loopCount=
0;return this},looper:function(){this.loopCount++;this.loopMethod(this.loopCount);return this}}),SlideShow=new Class({Implements:[Options,Events,Loop],options:{delay:7E3,transition:"crossFade",duration:"500",autoplay:false},initialize:function(a,b){this.setOptions(b);this.setLoop(this.showNext,this.options.delay);this.element=$(a);this.slides=this.element.getChildren();this.current=this.slides[0];this.transitioning=false;this.setup();this.options.autoplay&&this.play()},setup:function(){this.setupElement().setupSlides(true);
return this},setupElement:function(){var a=this.element;a.getStyle("position")!="absolute"&&a!=document.body&&a.setStyle("position","relative");a.setStyle("height",this.current.offsetHeight+10+"px");return this},setupSlides:function(a){this.slides.each(function(b,c){this.storeTransition(b).reset(b);a&&c!=0&&b.setStyle("display","none")},this);return this},storeTransition:function(a){var b=a.get("class"),c=/transition:[a-zA-Z]+/,d=/duration:[0-9]+/;c=b.match(c)?b.match(c)[0].split(":")[1]:this.options.transition;
b=b.match(d)?b.match(d)[0].split(":")[1]:this.options.duration;a.store("ssTransition",c).store("ssDuration",b);return this},resetOptions:function(a){this.options=$merge(this.options,a);this.setupSlides(false);return this},getTransition:function(a){return a.retrieve("ssTransition")},getDuration:function(a){return a.retrieve("ssDuration")},show:function(a,b){a=typeof a=="number"?this.slides[a]:a;if(a!=this.current&&!this.transitioning){this.transitioning=true;var c=b&&b.transition?b.transition:this.getTransition(a),
d=b&&b.duration?b.duration:this.getDuration(a),f=this.current.setStyle("z-index",1),e=this.reset(a),g={previous:{element:f,index:this.slides.indexOf(f)},next:{element:e,index:this.slides.indexOf(e)}};if(c=="none")this.element.setStyle("height",e.offsetHeight+10+"px");else{this.element.set("tween",{duration:this.options.heightSlideSpeed});this.element.tween("height",e.offsetHeight+10+"px")}this.fireEvent("show",g);this.transitions[c](f,e,d,this);(function(){f.setStyle("display","none");this.fireEvent("showComplete",
g);this.transitioning=false}).bind(this).delay(d);this.current=e}return this},reset:function(a){return a.setStyles({position:"absolute","z-index":0,display:"block",left:0,top:0}).fade("show")},nextSlide:function(){var a=this.current.getNext();return a?a:this.slides[0]},previousSlide:function(){var a=this.current.getPrevious();return a?a:this.slides.getLast()},showNext:function(a){this.show(this.nextSlide(),a);return this},showPrevious:function(a){this.show(this.previousSlide(),a);return this},play:function(){this.startLoop();
this.fireEvent("play");return this},pause:function(){this.stopLoop();this.fireEvent("pause");return this},reverse:function(){this.setLoop(this.loopMethod==this.showNext?this.showPrevious:this.showNext,this.options.delay);this.fireEvent("reverse");return this},toElement:function(){return this.element}});
Element.Properties.slideshow={set:function(a){var b=this.retrieve("slideshow");b&&b.pause();return this.eliminate("slideshow").store("slideshow:options",a)},get:function(a){if(a||!this.retrieve("slideshow")){if(a||!this.retrieve("slideshow:options"))this.set("slideshow",a);this.store("slideshow",new SlideShow(this,this.retrieve("slideshow:options")))}return this.retrieve("slideshow")}};
Element.implement({playSlideShow:function(a){this.get("slideshow",a).play();return this},pauseSlideShow:function(a){this.get("slideshow",a).pause();return this}});SlideShow.adders={transitions:{},add:function(a,b){this.transitions[a]=b;this.implement({transitions:this.transitions})},addAllThese:function(a){$A(a).each(function(b){this.add(b[0],b[1])},this)}};$extend(SlideShow,SlideShow.adders);SlideShow.implement(SlideShow.adders);
SlideShow.addAllThese([["none",function(a){a.setStyle("display","none");return this}],["fade",function(a,b,c){a.set("tween",{duration:c}).fade("out");return this}],["crossFade",function(a,b,c){a.set("tween",{duration:c}).fade("out");b.set("tween",{duration:c}).fade("in");return this}],["fadeThroughBackground",function(a,b,c){c=c/2;b.set("tween",{duration:c}).fade("hide");a.set("tween",{duration:c,onComplete:function(){b.fade("in");try{b.style.removeAttribute("filter")}catch(d){}}}).fade("out")}]]);

