function BitsMooMenu(){this.CreateMenu=function(B){var A=document.getElementById(B.targetId);if(A){A.id+="-bits_moo_menu";A.className=A.className?(A.className+" bits_moo_menu"):"bits_moo_menu";B.targetNode=A;this.CreateMenuComponents(B)}};this.CreateMenuComponents=function(C){var B=C.targetNode.getElementsByTagName("*");for(var A=0;A<B.length;A++){this.CreateComponent(B[A],C)}};this.CreateComponent=function(A,B){A=$(A);switch(A.nodeName){case"UL":A.ulComponent=new ULComponent(A,this.CreateULFX(A,B));break;case"LI":A.liComponent=new LIComponent(A);break}};this.CreateULFX=function(A,B){switch(B.ulFx.fxName){case"SlideX":return new FXSlideX(A,B.ulFx.fxParams);case"SlideY":return new FXSlideY(A,B.ulFx.fxParams);case"SlideXY":return new FXSlideXY(A,B.ulFx.fxParams);case"Opacity":return new FXOpacity(A,B.ulFx.fxParams);case"SlideXO":return new FXSlideXO(A,B.ulFx.fxParams);case"SlideYO":return new FXSlideYO(A,B.ulFx.fxParams);case"SlideXYO":return new FXSlideXYO(A,B.ulFx.fxParams)}}}var bitsMooMenu=new BitsMooMenu();function ULComponent(B,A){this.node=B;this.nodeFx=A;this.Show=function(){this.nodeFx.ExecIn()};this.Hide=function(){this.nodeFx.ExecOut()};this.node.ulComponent=this}function LIComponent(A){this.node=A;this.ulChild;this.OnMouseEnter=function(){if(this.ulChild){this.ulChild.ulComponent.Show()}};this.OnMouseLeave=function(){if(this.ulChild){this.ulChild.ulComponent.Hide()}};this.BindEvents=function(){this.node.addEvent("mouseenter",(function(){this.OnMouseEnter()}).bind(this));this.node.addEvent("mouseleave",(function(){this.OnMouseLeave()}).bind(this))};this.GetULChild=function(){var C=null;for(var B=0;B<this.node.childNodes.length;B++){if(this.node.childNodes[B].nodeName=="UL"){C=this.node.childNodes[B];break}}return C};this.ulChild=this.GetULChild();this.BindEvents()}function FXOpacity(B,A){this.node=B;this.fxParams=A;this.nodeFx;this.ExecIn=function(){this.node.setStyles({opacity:0,display:"block"});this.nodeFx.start(1)};this.ExecOut=function(){this.node.setStyle("display","")};this.fxParams.wait=false;this.nodeFx=new Fx.Style(this.node,"opacity",this.fxParams)}function FXSlideX(B,A){this.node=B;this.fxParams=A;this.nodeFx;this.ExecIn=function(){this.node.setStyles({overflow:"hidden",width:0,display:"block"});this.nodeFx.start(this.node.getSize().scrollSize.x).chain((function(){this.node.setStyle("overflow","")}).bind(this))};this.ExecOut=function(){this.node.setStyle("display","")};this.fxParams.wait=false;this.nodeFx=new Fx.Style(this.node,"width",this.fxParams)}function FXSlideY(B,A){this.node=B;this.fxParams=A;this.nodeFx;this.ExecIn=function(){this.node.setStyles({overflow:"hidden",height:0,display:"block"});this.nodeFx.start(this.node.getSize().scrollSize.y).chain((function(){this.node.setStyle("overflow","")}).bind(this))};this.ExecOut=function(){this.node.setStyle("display","")};this.fxParams.wait=false;this.nodeFx=new Fx.Style(this.node,"height",this.fxParams)}function FXSlideXY(B,A){this.node=B;this.fxParams=A;this.nodeFx;this.ExecIn=function(){this.node.setStyles({overflow:"hidden",width:0,height:0,display:"block"});this.nodeFx.start({width:this.node.getSize().scrollSize.x,height:this.node.getSize().scrollSize.y}).chain((function(){this.node.setStyle("overflow","")}).bind(this))};this.ExecOut=function(){this.node.setStyle("display","")};this.fxParams.wait=false;this.nodeFx=new Fx.Styles(this.node,this.fxParams)}function FXSlideXO(B,A){this.node=B;this.fxParams=A;this.nodeFx;this.ExecIn=function(){this.node.setStyles({overflow:"hidden",width:0,opacity:0,display:"block"});this.nodeFx.start({width:this.node.getSize().scrollSize.x,opacity:1}).chain((function(){this.node.setStyle("overflow","")}).bind(this))};this.ExecOut=function(){this.node.setStyle("display","")};this.fxParams.wait=false;this.nodeFx=new Fx.Styles(this.node,this.fxParams)}function FXSlideYO(B,A){this.node=B;this.fxParams=A;this.nodeFx;this.ExecIn=function(){this.node.setStyles({overflow:"hidden",height:0,opacity:0,display:"block"});this.nodeFx.start({height:this.node.getSize().scrollSize.y,opacity:1}).chain((function(){this.node.setStyle("overflow","")}).bind(this))};this.ExecOut=function(){this.node.setStyle("display","")};this.fxParams.wait=false;this.nodeFx=new Fx.Styles(this.node,this.fxParams)}function FXSlideXYO(B,A){this.node=B;this.fxParams=A;this.nodeFx;this.ExecIn=function(){this.node.setStyles({overflow:"hidden",width:0,height:0,opacity:0,display:"block"});this.nodeFx.start({width:this.node.getSize().scrollSize.x,height:this.node.getSize().scrollSize.y,opacity:1}).chain((function(){this.node.setStyle("overflow","")}).bind(this))};this.ExecOut=function(){this.node.setStyle("display","")};this.fxParams.wait=false;this.nodeFx=new Fx.Styles(this.node,this.fxParams)};
