window.addEvent("domready",SL_init);SL_WIDTH=0;function SL_init(){$$("a.slider").each(function(C){C.onclick=SL_bind});$("colourband").set("opacity",0.8);var B=get_height();var A=(B>600)?B+"px":"600px";$("container").setStyles({height:A,overflow:"hidden"})}function get_height(){var A=0;$$("div.slide").each(function(C){var B=C.getSize().y+100;if(B>A){A=B}});return A}function SL_bind(A){var A=new Event(A);A.preventDefault();this.blur();var B=this.get("rel");SL_slide(B);this.onclick=SL_bind;return false}function SL_slide(E){var B=new Fx.Tween("grad",{duration:3000,transition:Fx.Transitions.Sine.easeOut,onComplete:function(){$$(E+" div.content").each(function(G){G.focus()})}});var D=new Fx.Tween("colourbg",{duration:3000,transition:Fx.Transitions.Sine.easeOut});var F=new Fx.Tween("colourband",{duration:3000,transition:Fx.Transitions.Sine.easeOut});var A=$("grad").getPosition();var C=$(E).getPosition();new_pos=A.x-C.x;switch(E){case"slide1":D.start("background-color","#ffffff");F.start("background-color","#007692");B.start("left",new_pos);break;case"slide2":D.start("background-color","#f14c99");F.start("background-color","#ea1e7e");B.start("left",new_pos);break;case"slide3":D.start("background-color","#63c29d");F.start("background-color","#4dad88");B.start("left",new_pos);break;case"slide4":D.start("background-color","#8ebe3f");F.start("background-color","#459400");B.start("left",new_pos);break}};