//element.dimensions.js
{Element.extend({"getDimensions":function(options){options=$merge({"computeSize":false},options);var dim={};function getSize(el,options){if(options.computeSize)dim=el.getComputedSize(options);else{dim.width=el.getSize().size.x;dim.height=el.getSize().size.y;}return dim;}try{dim=getSize(this,options);}catch(e){}if(this.getStyle("display")=="none"){var before={};["visibility","display","position"].each(function(style){before[style]=this.style[style]||"";},this);this.setStyles({"visibility":"hidden","display":"block","position":"absolute"});dim=getSize(this,options);this.setStyles(before);}return $merge(dim,{"x":dim.width,"y":dim.height});},"getComputedSize":function(options){options=$merge({"styles":["padding","border"],"plains":{"height":["top","bottom"],"width":["left","right"]},"mode":"both"},options);var size={"width":0,"height":0};switch(options.mode){case "vertical":delete size.width;delete options.plains.width;break;case "horizontal":delete size.height;delete options.plains.height;break;}var getStyles=[];$each(options.plains,function(plain,key){plain.each(function(edge){options.styles.each(function(style){getStyles.push((style=="border")?style+"-"+edge+"-"+"width":style+"-"+edge);});});});var styles=this.getStyles.apply(this,getStyles);var subtracted=[];$each(options.plains,function(plain,key){size["total"+key.capitalize()]=0;size["computed"+key.capitalize()]=0;plain.each(function(edge){size["computed"+edge.capitalize()]=0;getStyles.each(function(style,i){if(style.test(edge)){styles[style]=styles[style].toInt();if(isNaN(styles[style]))styles[style]=0;size["total"+key.capitalize()]=size["total"+key.capitalize()]+styles[style];size["computed"+edge.capitalize()]=size["computed"+edge.capitalize()]+styles[style];}if(style.test(edge)&&key!=style&&(style.test("border")||style.test("padding"))&&!subtracted.test(style)){subtracted.push(style);size["computed"+key.capitalize()]=size["computed"+key.capitalize()]-styles[style];}});});});if($chk(size.width)){size.width=size.width+this.offsetWidth+size.computedWidth;size.totalWidth=size.width+size.totalWidth;delete size.computedWidth;}if($chk(size.height)){size.height=size.height+this.offsetHeight+size.computedHeight;size.totalHeight=size.height+size.totalHeight;delete size.computedHeight;}return $merge(styles,size);}});}
//element.shortcuts.js
{Element.extend({"isVisible":function(){return this.getStyle("display")!="none";},"toggle":function(){return this[this.isVisible()?"hide":"show"]();},"hide":function(){this.originalDisplay=this.getStyle("display");this.setStyle("display","none");return this;},"show":function(display){this.originalDisplay=(this.originalDisplay=="none")?"block":this.originalDisplay;this.setStyle("display",(display||this.originalDisplay||"block"));return this;},"tidy":function(){try{if(this.getValue().tidy())this.value=this.getValue().tidy();}catch(e){dbug.log("element.tidy error: %o",e);}},"findParent":function(collection){return $$(collection).filter(function(el){return el.hasChild(this);},this)[0];},"fxOpacityOk":function(){if(!window.ie6)return true;var isColor=false;try{if(new Color(this.getStyle("backgroundColor")))isColor=true;}catch(e){}return isColor;}});Element.visible=Element.isVisible;if(!Element.empty){Element.extend({"empty":function(){return this.setHTML("");}});}var $S=$$;}
//tabswapper.js
{var TabSwapper=new Class({"options":{"selectedClass":"tabSelected","mouseoverClass":"tabOver","deselectedClass":"","rearrangeDOM":true,"initPanel":0,"smooth":false,"smoothSize":false,"maxSize":null,"effectOptions":{"duration":500},"cookieName":null,"cookieDays":999,"onActive":Class.empty,"onActiveAfterFx":Class.empty,"onBackground":Class.empty},"initialize":function(options){this.tabs=[];this.sections=[];this.clickers=[];this.sectionFx=[];options=this.compatability(options);this.setOptions(options);this.setup();if(this.options.cookieName&&this.recall())this.swap(this.recall().toInt());else{this.swap(this.options.initPanel);}},"compatability":function(options){if(options.tabSelector){options.tabs=$$(options.tabSelector);options.sections=$$(options.sectionSelector);options.clickers=$$(options.clickSelector);}return options;},"setup":function(){var opt=this.options;sections=$$(opt.sections);tabs=$$(opt.tabs);clickers=$$(opt.clickers);tabs.each(function(tab,index){this.addTab(tab,sections[index],clickers[index],index);},this);},"addTab":function(tab,section,clicker,index){tab=$(tab);clicker=$(clicker);section=$(section);if(this.tabs.indexOf(tab)>=0&&tab.getProperty("tabbered")&&this.tabs.indexOf(tab)!=index&&this.options.rearrangeDOM){this.moveTab(this.tabs.indexOf(tab),index);return;}if(!$defined(index))index=this.tabs.length;if(index>0&&this.tabs[index-1]&&this.options.rearrangeDOM){tab.injectAfter(this.tabs[index-1]);section.injectAfter(this.sections[index-1]);}this.tabs.splice(index,0,tab);this.sections.splice(index,0,section);clicker=clicker||tab;this.clickers.splice(index,0,clicker);tab.addEvent("mouseout",function(){tab.removeClass(this.options.mouseoverClass);}.bind(this)).addEvent("mouseover",function(){tab.addClass(this.options.mouseoverClass);}.bind(this));clicker.addEvent("click",function(){this.swap(this.clickers.indexOf(clicker));}.bind(this));tab.setProperty("tabbered",true);this.hideSection(index);return;},"removeTab":function(index){var now=this.tabs[this.now];if(this.now==index){if(index>0)this.swap(index-1);else{if(index<this.tabs.length)this.swap(index+1);}}this.sections.splice(index,1);this.tabs.splice(index,1);this.clickers.splice(index,1);this.sectionFx.splice(index,1);this.now=this.tabs.indexOf(now);},"moveTab":function(from,to){var tab=this.tabs[from];var clicker=this.clickers[from];var section=this.sections[from];var toTab=this.tabs[to];var toClicker=this.clickers[to];var toSection=this.sections[to];this.tabs.remove(tab).splice(to,0,tab);this.clickers.remove(clicker).splice(to,0,clicker);this.sections.remove(section).splice(to,0,section);tab.injectBefore(toTab);clicker.injectBefore(toClicker);section.injectBefore(toSection);},"swap":function(swapIdx){if(!$chk(this.now)){this.sections.each(function(sect,idx){if(swapIdx!=idx)this.hideSection(idx);},this);}this.showSection(swapIdx);this.save(swapIdx);},"save":function(index){if(this.options.cookieName)Cookie.set(this.options.cookieName,index,{"duration":this.options.cookieDays});},"recall":function(){return (this.options.cookieName)?$pick(Cookie.get(this.options.cookieName),false):false;},"hideSection":function(idx){if(this.sections[idx].getStyle("display")!="none"){this.lastHeight=this.sections[idx].getSize().size.y;this.sections[idx].setStyle("display","none");this.tabs[idx].removeClass(this.options.selectedClass).addClass(this.options.deselectedClass);this.fireEvent("onBackground",[idx,this.sections[idx],this.tabs[idx]]);}},"showSection":function(idx){var sect=this.sections[idx];if(!sect)return this;var smoothOk=this.options.smooth&&(!window.ie6||(window.ie6&&sect.fxOpacityOk()));if(this.now!=idx){if(!this.sectionFx[idx])this.sectionFx[idx]=this.sections[idx].effects(this.options.effectOptions);var start={"display":"block","overflow":"hidden"};if(smoothOk)start.opacity=0;var effect=false;if(smoothOk){effect={"opacity":1};}else{if(sect.getStyle("opacity")<1){this.sectionFx[idx].set({"opacity":1});if(!this.options.smoothSize)this.fireEvent("onActiveAfterFx",[idx,this.sections[idx],this.tabs[idx]]);}}if(this.options.smoothSize){var size=sect.getDimensions().height;if($chk(this.options.maxSize)&&this.options.maxSize<size)size=this.options.maxSize;if(!effect)effect={};effect.height=size;}if($chk(this.now))this.hideSection(this.now);if(this.options.smoothSize&&this.lastHeight)start.height=this.lastHeight;sect.setStyles(start);if(effect){this.sectionFx[idx].start(effect).chain(function(){this.fireEvent("onActiveAfterFx",[idx,this.sections[idx],this.tabs[idx]]);sect.setStyle("height","auto");}.bind(this));}this.now=idx;this.fireEvent("onActive",[idx,this.sections[idx],this.tabs[idx]]);}this.tabs[idx].addClass(this.options.selectedClass).removeClass(this.options.deselectedClass);return this;}});TabSwapper.implement(new Options);TabSwapper.implement(new Events);var tabSwapper=TabSwapper;}

