MooTools.More={version:"1.2.3.1"};Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(c,d){this.elements=this.subject=$$(c);this.parent(d)},compute:function(l,k,i){var p={};for(var o in l){var r=l[o],n=k[o],m=p[o]={};for(var q in r){m[q]=this.parent(r[q],n[q],i)}}return p},set:function(e){for(var h in e){var f=e[h];for(var g in f){this.render(this.elements[h],g,f[g],this.options.unit)}}return this},start:function(p){if(!this.check(p)){return this}var k={},i={};for(var o in p){var m=p[o],r=k[o]={},l=i[o]={};for(var q in m){var n=this.prepare(this.elements[o],q,m[q]);r[q]=n.from;l[q]=n.to}}return this.parent(k,i)}});var Accordion=Fx.Accordion=new Class({Extends:Fx.Elements,options:{display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false,trigger:"click",initialDisplayFx:true},initialize:function(){var f=Array.link(arguments,{container:Element.type,options:Object.type,togglers:$defined,elements:$defined});this.parent(f.elements,f.options);this.togglers=$$(f.togglers);this.container=document.id(f.container);this.previous=-1;if(this.options.alwaysHide){this.options.wait=true}if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show}if(this.options.start){this.options.display=false;this.options.show=false}this.effects={};if(this.options.opacity){this.effects.opacity="fullOpacity"}if(this.options.width){this.effects.width=this.options.fixedWidth?"fullWidth":"offsetWidth"}if(this.options.height){this.effects.height=this.options.fixedHeight?"fullHeight":"scrollHeight"}for(var d=0,e=this.togglers.length;d<e;d++){this.addSection(this.togglers[d],this.elements[d])}this.elements.each(function(b,c){if(this.options.show===c){this.fireEvent("active",[this.togglers[c],b])}else{for(var a in this.effects){b.setStyle(a,0)}}},this);if($chk(this.options.display)){this.display(this.options.display,this.options.initialDisplayFx)}},addSection:function(i,f){i=document.id(i);f=document.id(f);var h=this.togglers.contains(i);this.togglers.include(i);this.elements.include(f);var g=this.togglers.indexOf(i);i.addEvent(this.options.trigger,this.display.bind(this,g));if(this.options.height){f.setStyles({"padding-top":0,"border-top":"none","padding-bottom":0,"border-bottom":"none"})}if(this.options.width){f.setStyles({"padding-left":0,"border-left":"none","padding-right":0,"border-right":"none"})}f.fullOpacity=1;if(this.options.fixedWidth){f.fullWidth=this.options.fixedWidth}if(this.options.fixedHeight){f.fullHeight=this.options.fixedHeight}f.setStyle("overflow","hidden");if(!h){for(var j in this.effects){f.setStyle(j,0)}}return this},display:function(e,d){d=$pick(d,true);e=($type(e)=="element")?this.elements.indexOf(e):e;if((this.timer&&this.options.wait)||(e===this.previous&&!this.options.alwaysHide)){return this}this.previous=e;var f={};this.elements.each(function(b,c){f[c]={};var h=(c!=e)||(this.options.alwaysHide&&(b.offsetHeight>0));this.fireEvent(h?"background":"active",[this.togglers[c],b]);for(var a in this.effects){f[c][a]=h?0:b[this.effects[a]]}},this);return d?this.start(f):this.set(f)}});
