MooTools.More={version:"1.3.0.1",build:"6dce99bed2792dffcbbbb4ddc15a1fb9a41994b5"};Class.Mutators.Binds=function(a){return a;};Class.Mutators.initialize=function(a){return function(){Array.from(this.Binds).each(function(b){var c=this[b];if(c){this[b]=c.bind(this);}},this);return a.apply(this,arguments);};};Class.Occlude=new Class({occlude:function(a,b){b=document.id(b||this.element);var c=b.retrieve(a||this.property);if(c&&this.occluded!=null){return this.occluded=c;}this.occluded=false;b.store(a||this.property,this);return this.occluded;}});(function(){var b=function(e,c){var d=[];Object.each(c,function(f){Object.each(f,function(g){e.each(function(h){d.push(h+"-"+g+(h=="border"?"-width":""));});});});return d;};var a=function(c,e){var d=0;Object.each(e,function(g,f){if(f.test(c)){d=d+g.toInt();}});return d;};Element.implement({measure:function(i){var d=function(j){return !!(!j||j.offsetHeight||j.offsetWidth);};if(d(this)){return i.apply(this);}var h=this.getParent(),c=[],e=[];while(!d(h)&&h!=document.body){e.push(h.expose());h=h.getParent();}var g=this.expose();var f=i.apply(this);g();e.each(function(j){j();});return f;},expose:function(){if(this.getStyle("display")!="none"){return function(){};}var c=this.style.cssText;this.setStyles({display:"block",position:"absolute",visibility:"hidden"});return function(){this.style.cssText=c;}.bind(this);},getDimensions:function(g){g=Object.merge({computeSize:false},g);var c={x:0,y:0};var d=function(e,i){return(i.computeSize)?e.getComputedSize(i):e.getSize();};var f=this.getParent("body");if(f&&this.getStyle("display")=="none"){c=this.measure(function(){return d(this,g);});}else{if(f){try{c=d(this,g);}catch(h){}}}return Object.append(c,(c.x||c.x===0)?{width:c.x,height:c.y}:{x:c.width,y:c.height});},getComputedSize:function(d){if(d&&d.plains){d.planes=d.plains;}d=Object.merge({styles:["padding","border"],planes:{height:["top","bottom"],width:["left","right"]},mode:"both"},d);var e={},c={width:0,height:0};if(d.mode=="vertical"){delete c.width;delete d.planes.width;}else{if(d.mode=="horizontal"){delete c.height;delete d.planes.height;}}b(d.styles,d.planes).each(function(f){e[f]=this.getStyle(f).toInt();},this);Object.each(d.planes,function(h,g){var f=g.capitalize();e[g]=this.getStyle(g).toInt();c["total"+f]=e[g];h.each(function(j){var i=a(j,e);c["computed"+j.capitalize()]=i;c["total"+f]+=i;});},this);return Object.append(c,e);}});})();(function(){var a=Element.prototype.position;Element.implement({position:function(p){if(p&&(p.x!=null||p.y!=null)){return a?a.apply(this,arguments):this;}Object.each(p||{},function(u,t){if(u==null){delete p[t];}});p=Object.merge({relativeTo:document.body,position:{x:"center",y:"center"},offset:{x:0,y:0}},p);var s={x:0,y:0},q=false;var n=this.measure(function(){return document.id(this.getOffsetParent());});if(n&&n!=this.getDocument().body){s=n.measure(function(){return this.getPosition();});q=n!=document.id(p.relativeTo);p.offset.x=p.offset.x-s.x;p.offset.y=p.offset.y-s.y;}var l=function(u){if(typeOf(u)!="string"){return u;}u=u.toLowerCase();var t={};if(u.test("left")){t.x="left";}else{if(u.test("right")){t.x="right";}else{t.x="center";}}if(u.test("upper")||u.test("top")){t.y="top";}else{if(u.test("bottom")){t.y="bottom";}else{t.y="center";}}return t;};p.edge=l(p.edge);p.position=l(p.position);if(!p.edge){if(p.position.x=="center"&&p.position.y=="center"){p.edge={x:"center",y:"center"};}else{p.edge={x:"left",y:"top"};}}this.setStyle("position","absolute");var e=document.id(p.relativeTo)||document.body,k=e==document.body?window.getScroll():e.getPosition(),c=k.y,g=k.x;var d=this.getDimensions({computeSize:true,styles:["padding","border","margin"]});var f={},j=p.offset.y,i=p.offset.x,r=window.getSize();switch(p.position.x){case"left":f.x=g+i;break;case"right":f.x=g+i+e.offsetWidth;break;default:f.x=g+((e==document.body?r.x:e.offsetWidth)/2)+i;break;}switch(p.position.y){case"top":f.y=c+j;break;case"bottom":f.y=c+j+e.offsetHeight;break;default:f.y=c+((e==document.body?r.y:e.offsetHeight)/2)+j;break;}if(p.edge){var o={};switch(p.edge.x){case"left":o.x=0;break;case"right":o.x=-d.x-d.computedRight-d.computedLeft;break;default:o.x=-(d.totalWidth/2);break;}switch(p.edge.y){case"top":o.y=0;break;case"bottom":o.y=-d.y-d.computedTop-d.computedBottom;break;default:o.y=-(d.totalHeight/2);break;}f.x+=o.x;f.y+=o.y;}f={left:((f.x>=0||q||p.allowNegative)?f.x:0).toInt(),top:((f.y>=0||q||p.allowNegative)?f.y:0).toInt()};var m={left:"x",top:"y"};["minimum","maximum"].each(function(t){["left","top"].each(function(u){var v=p[t]?p[t][m[u]]:null;if(v!=null&&((t=="minimum")?f[u]<v:f[u]>v)){f[u]=v;}});});if(e.getStyle("position")=="fixed"||p.relFixedPosition){var h=window.getScroll();f.top+=h.y;f.left+=h.x;}if(p.ignoreScroll){var b=e.getScroll();f.top-=b.y;f.left-=b.x;}if(p.ignoreMargins){f.left+=(p.edge.x=="right"?d["margin-right"]:p.edge.x=="center"?-d["margin-left"]+((d["margin-right"]+d["margin-left"])/2):-d["margin-left"]);f.top+=(p.edge.y=="bottom"?d["margin-bottom"]:p.edge.y=="center"?-d["margin-top"]+((d["margin-bottom"]+d["margin-top"])/2):-d["margin-top"]);}f.left=Math.ceil(f.left);f.top=Math.ceil(f.top);if(p.returnPos){return f;}else{this.setStyles(f);}return this;}});})();Element.implement({isDisplayed:function(){return this.getStyle("display")!="none";},isVisible:function(){var b=this.offsetWidth,a=this.offsetHeight;return(b==0&&a==0)?false:(b>0&&a>0)?true:this.style.display!="none";},toggle:function(){return this[this.isDisplayed()?"hide":"show"]();},hide:function(){var a;try{a=this.getStyle("display");}catch(b){}if(a=="none"){return this;}return this.store("element:_originalDisplay",a||"").setStyle("display","none");},show:function(a){if(!a&&this.isDisplayed()){return this;}a=a||this.retrieve("element:_originalDisplay")||"block";return this.setStyle("display",(a=="none")?"block":a);},swapClass:function(a,b){return this.removeClass(a).addClass(b);}});Document.implement({clearSelection:function(){if(document.selection&&document.selection.empty){document.selection.empty();}else{if(window.getSelection){var a=window.getSelection();if(a&&a.removeAllRanges){a.removeAllRanges();}}}}});var OverText=new Class({Implements:[Options,Events,Class.Occlude],Binds:["reposition","assert","focus","hide"],options:{element:"label",positionOptions:{position:"upperLeft",edge:"upperLeft",offset:{x:4,y:2}},poll:false,pollInterval:250,wrap:false},property:"OverText",initialize:function(a,b){this.element=document.id(a);if(this.occlude()){return this.occluded;}this.setOptions(b);this.attach(this.element);OverText.instances.push(this);if(this.options.poll){this.poll();}return this;},toElement:function(){return this.element;},attach:function(){var a=this.options.textOverride||this.element.get("alt")||this.element.get("title");if(!a){return;}this.text=new Element(this.options.element,{"class":"overTxtLabel",styles:{lineHeight:"normal",position:"absolute",cursor:"text"},html:a,events:{click:this.hide.pass(this.options.element=="label",this)}}).inject(this.element,"after");if(this.options.element=="label"){if(!this.element.get("id")){this.element.set("id","input_"+new Date().getTime());}this.text.set("for",this.element.get("id"));}if(this.options.wrap){this.textHolder=new Element("div",{styles:{lineHeight:"normal",position:"relative"},"class":"overTxtWrapper"}).adopt(this.text).inject(this.element,"before");}return this.enable();},destroy:function(){this.element.eliminate("OverTextDiv").eliminate("OverText");this.disable();if(this.text){this.text.destroy();}if(this.textHolder){this.textHolder.destroy();}return this;},disable:function(){this.element.removeEvents({focus:this.focus,blur:this.assert,change:this.assert});window.removeEvent("resize",this.reposition);this.hide(true,true);return this;},enable:function(){this.element.addEvents({focus:this.focus,blur:this.assert,change:this.assert});window.addEvent("resize",this.reposition);this.assert(true);this.reposition();return this;},wrap:function(){if(this.options.element=="label"){if(!this.element.get("id")){this.element.set("id","input_"+new Date().getTime());}this.text.set("for",this.element.get("id"));}},startPolling:function(){this.pollingPaused=false;return this.poll();},poll:function(a){if(this.poller&&!a){return this;}var b=function(){if(!this.pollingPaused){this.assert(true);}}.bind(this);if(a){clearInterval(this.poller);}else{this.poller=b.periodical(this.options.pollInterval,this);}return this;},stopPolling:function(){this.pollingPaused=true;return this.poll(true);},focus:function(){if(this.text&&(!this.text.isDisplayed()||this.element.get("disabled"))){return;}this.hide();},hide:function(a,b){if(this.text&&(this.text.isDisplayed()&&(!this.element.get("disabled")||b))){this.text.hide();this.fireEvent("textHide",[this.text,this.element]);this.pollingPaused=true;if(!a){try{this.element.fireEvent("focus");this.element.focus();}catch(c){}}}return this;},show:function(){if(this.text&&!this.text.isDisplayed()){this.text.show();this.reposition();this.fireEvent("textShow",[this.text,this.element]);this.pollingPaused=false;}return this;},assert:function(a){this[this.test()?"show":"hide"](a);},test:function(){var a=this.element.get("value");return !a;},reposition:function(){this.assert(true);if(!this.element.isVisible()){return this.stopPolling().hide();}if(this.text&&this.test()){this.text.position(Object.merge(this.options.positionOptions,{relativeTo:this.element}));}return this;}});OverText.instances=[];Object.append(OverText,{each:function(a){return OverText.instances.map(function(c,b){if(c.element&&c.text){return a.apply(OverText,[c,b]);}return null;});},update:function(){return OverText.each(function(a){return a.reposition();});},hideAll:function(){return OverText.each(function(a){return a.hide(true,true);});},showAll:function(){return OverText.each(function(a){return a.show();});}});if(window.Fx&&Fx.Reveal){Fx.Reveal.implement({hideInputs:Browser.ie?"select, input, textarea, object, embed, .overTxtLabel":false});}Fx.Reveal=new Class({Extends:Fx.Morph,options:{link:"cancel",styles:["padding","border","margin"],transitionOpacity:!Browser.ie6,mode:"vertical",display:function(){return this.element.get("tag")!="tr"?"block":"table-row";},opacity:1,hideInputs:Browser.ie?"select, input, textarea, object, embed":null},dissolve:function(){if(!this.hiding&&!this.showing){if(this.element.getStyle("display")!="none"){this.hiding=true;this.showing=false;this.hidden=true;this.cssText=this.element.style.cssText;var a=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});if(this.options.transitionOpacity){a.opacity=this.options.opacity;}var c={};Object.each(a,function(e,d){c[d]=[e,0];});this.element.setStyles({display:Function.from(this.options.display).call(this),overflow:"hidden"});var b=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;if(b){b.setStyle("visibility","hidden");}this.$chain.unshift(function(){if(this.hidden){this.hiding=false;this.element.style.cssText=this.cssText;this.element.setStyle("display","none");if(b){b.setStyle("visibility","visible");}}this.fireEvent("hide",this.element);this.callChain();}.bind(this));this.start(c);}else{this.callChain.delay(10,this);this.fireEvent("complete",this.element);this.fireEvent("hide",this.element);}}else{if(this.options.link=="chain"){this.chain(this.dissolve.bind(this));}else{if(this.options.link=="cancel"&&!this.hiding){this.cancel();this.dissolve();}}}return this;},reveal:function(){if(!this.showing&&!this.hiding){if(this.element.getStyle("display")=="none"){this.hiding=false;this.showing=true;this.hidden=false;this.cssText=this.element.style.cssText;var a;this.element.measure(function(){a=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});}.bind(this));if(this.options.heightOverride!=null){a.height=this.options.heightOverride.toInt();}if(this.options.widthOverride!=null){a.width=this.options.widthOverride.toInt();}if(this.options.transitionOpacity){this.element.setStyle("opacity",0);a.opacity=this.options.opacity;}var c={height:0,display:Function.from(this.options.display).call(this)};Object.each(a,function(e,d){c[d]=0;});c.overflow="hidden";this.element.setStyles(c);var b=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;if(b){b.setStyle("visibility","hidden");}this.$chain.unshift(function(){this.element.style.cssText=this.cssText;this.element.setStyle("display",Function.from(this.options.display).call(this));if(!this.hidden){this.showing=false;}if(b){b.setStyle("visibility","visible");}this.callChain();this.fireEvent("show",this.element);}.bind(this));this.start(a);}else{this.callChain();this.fireEvent("complete",this.element);this.fireEvent("show",this.element);}}else{if(this.options.link=="chain"){this.chain(this.reveal.bind(this));}else{if(this.options.link=="cancel"&&!this.showing){this.cancel();this.reveal();}}}return this;},toggle:function(){if(this.element.getStyle("display")=="none"){this.reveal();}else{this.dissolve();}return this;},cancel:function(){this.parent.apply(this,arguments);this.element.style.cssText=this.cssText;this.hiding=false;this.showing=false;return this;}});Element.Properties.reveal={set:function(a){this.get("reveal").cancel().setOptions(a);return this;},get:function(){var a=this.retrieve("reveal");if(!a){a=new Fx.Reveal(this);this.store("reveal",a);}return a;}};Element.Properties.dissolve=Element.Properties.reveal;Element.implement({reveal:function(a){this.get("reveal").setOptions(a).reveal();return this;},dissolve:function(a){this.get("reveal").setOptions(a).dissolve();return this;},nix:function(a){var b=Array.link(arguments,{destroy:Type.isBoolean,options:Type.isObject});this.get("reveal").setOptions(a).dissolve().chain(function(){this[b.destroy?"destroy":"dispose"]();}.bind(this));return this;},wink:function(){var b=Array.link(arguments,{duration:Type.isNumber,options:Type.isObject});var a=this.get("reveal").setOptions(b.options);a.reveal().chain(function(){(function(){a.dissolve();}).delay(b.duration||2000);});}});Class.refactor=function(b,a){Object.each(a,function(d,e){var c=b.prototype[e];if(c&&c.$origin){c=c.$origin;}if(c&&typeof d=="function"){b.implement(e,function(){var f=this.previous;this.previous=c;var g=d.apply(this,arguments);this.previous=f;return g;});}else{b.implement(e,d);}});return b;};var IframeShim=new Class({Implements:[Options,Events,Class.Occlude],options:{className:"iframeShim",src:'javascript:false;document.write("");',display:false,zIndex:null,margin:0,offset:{x:0,y:0},browsers:((Browser.ie&&Browser.version==6)||(Browser.firefox&&Browser.version<3&&Browser.Platform.mac))},property:"IframeShim",initialize:function(a,b){this.element=document.id(a);if(this.occlude()){return this.occluded;}this.setOptions(b);this.makeShim();return this;},makeShim:function(){if(this.options.browsers){var c=this.element.getStyle("zIndex").toInt();if(!c){c=1;var a=this.element.getStyle("position");if(a=="static"||!a){this.element.setStyle("position","relative");}this.element.setStyle("zIndex",c);}c=((this.options.zIndex!=null||this.options.zIndex===0)&&c>this.options.zIndex)?this.options.zIndex:c-1;if(c<0){c=1;}this.shim=new Element("iframe",{src:this.options.src,scrolling:"no",frameborder:0,styles:{zIndex:c,position:"absolute",border:"none",filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"},"class":this.options.className}).store("IframeShim",this);var b=(function(){this.shim.inject(this.element,"after");this[this.options.display?"show":"hide"]();this.fireEvent("inject");}).bind(this);if(!IframeShim.ready){window.addEvent("load",b);}else{b();}}else{this.position=this.hide=this.show=this.dispose=Function.from(this);}},position:function(){if(!IframeShim.ready||!this.shim){return this;}var a=this.element.measure(function(){return this.getSize();});if(this.options.margin!=undefined){a.x=a.x-(this.options.margin*2);a.y=a.y-(this.options.margin*2);this.options.offset.x+=this.options.margin;this.options.offset.y+=this.options.margin;}this.shim.set({width:a.x,height:a.y}).position({relativeTo:this.element,offset:this.options.offset});return this;},hide:function(){if(this.shim){this.shim.setStyle("display","none");}return this;},show:function(){if(this.shim){this.shim.setStyle("display","block");}return this.position();},dispose:function(){if(this.shim){this.shim.dispose();}return this;},destroy:function(){if(this.shim){this.shim.destroy();}return this;}});window.addEvent("load",function(){IframeShim.ready=true;});var Mask=new Class({Implements:[Options,Events],Binds:["position"],options:{style:{},"class":"mask",maskMargins:false,useIframeShim:true,iframeShimOptions:{}},initialize:function(b,a){this.target=document.id(b)||document.id(document.body);this.target.store("mask",this);this.setOptions(a);this.render();this.inject();},render:function(){this.element=new Element("div",{"class":this.options["class"],id:this.options.id||"mask-"+String.uniqueID(),styles:Object.merge(this.options.style,{display:"none"}),events:{click:function(){this.fireEvent("click");if(this.options.hideOnClick){this.hide();}}.bind(this)}});this.hidden=true;},toElement:function(){return this.element;},inject:function(b,a){a=a||(this.options.inject?this.options.inject.where:"")||this.target==document.body?"inside":"after";b=b||(this.options.inject?this.options.inject.target:"")||this.target;this.element.inject(b,a);if(this.options.useIframeShim){this.shim=new IframeShim(this.element,this.options.iframeShimOptions);this.addEvents({show:this.shim.show.bind(this.shim),hide:this.shim.hide.bind(this.shim),destroy:this.shim.destroy.bind(this.shim)});}},position:function(){this.resize(this.options.width,this.options.height);this.element.position({relativeTo:this.target,position:"topLeft",ignoreMargins:!this.options.maskMargins,ignoreScroll:this.target==document.body});return this;},resize:function(d,e){var c={styles:["padding","border"]};if(this.options.maskMargins){c.styles.push("margin");}var b=this.target.getComputedSize(c);if(this.target==document.body){var a=window.getScrollSize();if(b.totalHeight<a.y){b.totalHeight=a.y;}if(b.totalWidth<a.x){b.totalWidth=a.x;}}this.element.setStyles({width:Array.pick([d,b.totalWidth,b.x]),height:Array.pick([e,b.totalHeight,b.y])});return this;},show:function(){if(!this.hidden){return this;}window.addEvent("resize",this.position);this.position();this.showMask.apply(this,arguments);return this;},showMask:function(){this.element.setStyle("display","block");this.hidden=false;this.fireEvent("show");},hide:function(){if(this.hidden){return this;}window.removeEvent("resize",this.position);this.hideMask.apply(this,arguments);if(this.options.destroyOnHide){return this.destroy();}return this;},hideMask:function(){this.element.setStyle("display","none");this.hidden=true;this.fireEvent("hide");},toggle:function(){this[this.hidden?"show":"hide"]();},destroy:function(){this.hide();this.element.destroy();this.fireEvent("destroy");this.target.eliminate("mask");}});Element.Properties.mask={set:function(a){var b=this.retrieve("mask");if(b){b.destroy();}return this.eliminate("mask").store("mask:options",a);},get:function(){var a=this.retrieve("mask");if(!a){a=new Mask(this,this.retrieve("mask:options"));this.store("mask",a);}return a;}};Element.implement({mask:function(a){if(a){this.set("mask",a);}this.get("mask").show();return this;},unmask:function(){this.get("mask").hide();return this;}});var Spinner=new Class({Extends:Mask,Implements:Chain,options:{"class":"spinner",containerPosition:{},content:{"class":"spinner-content"},messageContainer:{"class":"spinner-msg"},img:{"class":"spinner-img"},fxOptions:{link:"chain"}},initialize:function(a,c){this.target=document.id(a)||document.id(document.body);this.target.store("spinner",this);this.setOptions(c);this.render();this.inject();var b=function(){this.active=false;}.bind(this);this.addEvents({hide:b,show:b});},render:function(){this.parent();this.element.set("id",this.options.id||"spinner-"+String.uniqueID());this.content=document.id(this.options.content)||new Element("div",this.options.content);this.content.inject(this.element);if(this.options.message){this.msg=document.id(this.options.message)||new Element("p",this.options.messageContainer).appendText(this.options.message);this.msg.inject(this.content);}if(this.options.img){this.img=document.id(this.options.img)||new Element("div",this.options.img);this.img.inject(this.content);}this.element.set("tween",this.options.fxOptions);},show:function(a){if(this.active){return this.chain(this.show.bind(this));}if(!this.hidden){this.callChain.delay(20,this);return this;}this.active=true;return this.parent(a);},showMask:function(a){var b=function(){this.content.position(Object.merge({relativeTo:this.element},this.options.containerPosition));}.bind(this);if(a){this.parent();b();}else{if(!this.options.style.opacity){this.options.style.opacity=this.element.getStyle("opacity").toFloat();}this.element.setStyles({display:"block",opacity:0}).tween("opacity",this.options.style.opacity);b();this.hidden=false;this.fireEvent("show");this.callChain();}},hide:function(a){if(this.active){return this.chain(this.hide.bind(this));}if(this.hidden){this.callChain.delay(20,this);return this;}this.active=true;return this.parent(a);},hideMask:function(a){if(a){return this.parent();}this.element.tween("opacity",0).get("tween").chain(function(){this.element.setStyle("display","none");this.hidden=true;this.fireEvent("hide");this.callChain();}.bind(this));},destroy:function(){this.content.destroy();this.parent();this.target.eliminate("spinner");}});Request=Class.refactor(Request,{options:{useSpinner:false,spinnerOptions:{},spinnerTarget:false},initialize:function(a){this._send=this.send;this.send=function(c){var b=this.getSpinner();if(b){b.chain(this._send.pass(c,this)).show();}else{this._send(c);}return this;};this.previous(a);},getSpinner:function(){if(!this.spinner){var a=document.id(this.options.spinnerTarget)||document.id(this.options.update);if(this.options.useSpinner&&a){a.set("spinner",this.options.spinnerOptions);var b=this.spinner=a.get("spinner");["complete","exception","cancel"].each(function(c){this.addEvent(c,b.hide.bind(b));},this);}}return this.spinner;}});Element.Properties.spinner={set:function(b){var a=this.retrieve("spinner");if(a){a.destroy();}return this.eliminate("spinner").store("spinner:options",b);},get:function(){var a=this.retrieve("spinner");if(!a){a=new Spinner(this,this.retrieve("spinner:options"));this.store("spinner",a);}return a;}};Element.implement({spin:function(a){if(a){this.set("spinner",a);}this.get("spinner").show();return this;},unspin:function(){this.get("spinner").hide();return this;}});Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical",wrapper:false,hideOverflow:true,resetHeight:false},initialize:function(b,c){this.addEvent("complete",function(){this.open=(this.wrapper["offset"+this.layout.capitalize()]!=0);if(this.open&&this.options.resetHeight){this.wrapper.setStyle("height","");}},true);this.element=this.subject=document.id(b);this.parent(c);var a=this.element.retrieve("wrapper");var d=this.element.getStyles("margin","position","overflow");if(this.options.hideOverflow){d=Object.append(d,{overflow:"hidden"});}if(this.options.wrapper){a=document.id(this.options.wrapper).setStyles(d);}this.wrapper=a||new Element("div",{styles:d}).wraps(this.element);this.element.store("wrapper",this.wrapper).setStyle("margin",0);this.now=[];this.open=true;},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight;},horizontal:function(){this.margin="margin-left";this.layout="width";this.offset=this.element.offsetWidth;},set:function(a){this.element.setStyle(this.margin,a[0]);this.wrapper.setStyle(this.layout,a[1]);return this;},compute:function(c,a,b){return[0,1].map(function(d){return Fx.compute(c[d],a[d],b);});},start:function(f,g){if(!this.check(f,g)){return this;}this[g||this.options.mode]();var e=this.element.getStyle(this.margin).toInt();var d=this.wrapper.getStyle(this.layout).toInt();var a=[[e,d],[0,this.offset]];var b=[[e,d],[-this.offset,0]];var c;switch(f){case"in":c=a;break;case"out":c=b;break;case"toggle":c=(d==0)?a:b;}return this.parent(c[0],c[1]);},slideIn:function(a){return this.start("in",a);},slideOut:function(a){return this.start("out",a);},hide:function(a){this[a||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(a){this[a||this.options.mode]();this.open=true;return this.set([0,this.offset]);},toggle:function(a){return this.start("toggle",a);}});Element.Properties.slide={set:function(a){this.get("slide").cancel().setOptions(a);return this;},get:function(){var a=this.retrieve("slide");if(!a){a=new Fx.Slide(this,{link:"cancel"});this.store("slide",a);}return a;}};Element.implement({slide:function(e,c){e=e||"toggle";var a=this.get("slide"),b;switch(e){case"hide":a.hide(c);break;case"show":a.show(c);break;case"toggle":var d=this.retrieve("slide:flag",a.open);a[d?"slideOut":"slideIn"](c);this.store("slide:flag",!d);b=true;break;default:a.start(e,c);}if(!b){this.eliminate("slide:flag");}return this;}});
