// Compressed with UI Compressor by Julien Lecomte, to clean whitespace and rename internal variables to shorter equivalents. Highest compression ratio, and does not use eval.
var drawer=null;var flashVideoPlayer=null;window.addEvent("domready",function(){drawer=new Drawer("drawer");flashVideoPlayer=new flashController("videoplayer");var A=new Navigation("navigation","navigation-items");drawer.addMorphToChildren("a",".classOver",".classOut");if(flashVideoPlayer.exists){if($("page").getProperty("class")!="send-to-a-friend"){drawer.addPlayerIndicator()}(function(){flashVideoPlayer.hideController()}).delay(3000)}else{$("main").addEvents({mouseenter:function(){drawer.open()}})}$("box").addEvents({mouseleave:function(){drawer.close();A.close("out")}})});var flashController=new Class({initialize:function(A){this.name=A;this.setStatus(this.name)},setStatus:function(){this.exists=($(this.name))?true:false},start:function(A){$(drawer.name).getElement(".playing div a").set("text",A)},over:function(){if(this.exists&&!$(drawer.name).hasClass("open")){drawer.open()}},complete:function(A){this.showController();drawer.open();referenceToThis=this;$(drawer.name).getElement(".playing div a").set({events:{click:function(){if(Browser.Engine.presto){location.reload(true)}else{referenceToThis.replay();return false}}},text:A})},replay:function(){$(this.name).playAgain();drawer.close()},showController:function(){if(this.exists){$(this.name).showControls()}},hideController:function(){if(this.exists){$(this.name).hideControls()}}});var Drawer=new Class({initialize:function(A){this.name=A;this.drawerOpenFx=new Fx.Slide(this.name,{mode:"vertical",duration:400,transition:Fx.Transitions.Quad.easeOut,onComplete:function(){this.element.addClass("open")}});this.drawerCloseFx=new Fx.Slide(this.name,{mode:"vertical",duration:600,transition:Fx.Transitions.Back.easeIn,onComplete:function(){this.element.removeClass("open")}});$(this.name).setStyle("display","block");this.drawerOpenFx.hide()},open:function(){this.drawerOpenFx.slideIn();if($("page").getProperty("class")!="send-to-a-friend"){flashVideoPlayer.showController()}},close:function(){this.drawerCloseFx.slideOut();if($("page").getProperty("class")!="send-to-a-friend"){flashVideoPlayer.hideController()}}});Drawer.implement({addMorphToChildren:function(B,A,C){$(this.name).getElements(B).addEvents({mouseenter:function(){this.getElement("img").morph(A)},mouseleave:function(){if(!this.getParent().hasClass("playing")){this.getElement("img").morph(C)}}})},addPlayerIndicator:function(){var D=new Element("div");var C=new Element("a",{href:"#playing"});var A=C.inject(D,"top");var B=$("drawer").getElement(".playing");D.inject(B,"top")}});var Navigation=new Class({initialize:function(A,B){this.name=A;this.targets=$(B).getElements("div");this.links=$(this.name).getElements("a");this.attachEvents();this.targets.each(function(C){C.setStyle("display","block")});this.close("hide")},attachEvents:function(){var A=this;this.links.each(function(B){B.addEvent("click",function(){A.open(this.get("href").split("#")[1]);this.addClass("active")})})},close:function(A){this.links.each(function(B){B.removeClass("active")});this.targets.each(function(B){B.slide(A)})},open:function(A){this.links.each(function(B){B.removeClass("active")});this.targets.each(function(B){if(A!=B.id){B.slide("out")}else{B.slide("in")}})}});