var fx=new Object();fx.Base=function(){};fx.Base.prototype={setOptions:function(_1){this.options={duration:500,onComplete:"",transition:fx.sinoidal};Object.extend(this.options,_1||{});},step:function(){var _2=(new Date).getTime();if(_2>=this.options.duration+this.startTime){this.now=this.to;clearInterval(this.timer);this.timer=null;if(this.options.onComplete){setTimeout(this.options.onComplete,10);}}else{var _3=(_2-this.startTime)/(this.options.duration);this.now=this.options.transition(_3)*(this.to-this.from)+this.from;}this.increase();},custom:function(_4,to){if(this.timer!=null){return;}this.from=_4;this.to=to;this.startTime=(new Date).getTime();this.timer=setInterval(this.step.bind(this),13);},hide:function(){this.now=0;this.increase();},clearTimer:function(){clearInterval(this.timer);this.timer=null;}};fx.Layout=Class.create();fx.Layout.prototype=Object.extend(new fx.Base(),{initialize:function(el,_7){this.el=$(el);this.el.style.overflow="hidden";this.iniWidth=this.el.offsetWidth;this.iniHeight=this.el.offsetHeight;this.setOptions(_7);}});fx.Height=Class.create();Object.extend(Object.extend(fx.Height.prototype,fx.Layout.prototype),{increase:function(){this.now=(this.now<0)?0:this.now;this.el.style.height=this.now+"px";},toggle:function(){if(this.el.offsetHeight>0){this.custom(this.el.offsetHeight,0);}else{this.custom(0,this.el.scrollHeight);}}});fx.Width=Class.create();Object.extend(Object.extend(fx.Width.prototype,fx.Layout.prototype),{increase:function(){this.el.style.width=this.now+"px";},toggle:function(){if(this.el.offsetWidth>0){this.custom(this.el.offsetWidth,0);}else{this.custom(0,this.iniWidth);}}});fx.Opacity=Class.create();fx.Opacity.prototype=Object.extend(new fx.Base(),{initialize:function(el,_9){this.el=$(el);this.now=1;this.setOptions(_9);},increase:function(){if(this.now==1&&(/Firefox/.test(navigator.userAgent))){this.now=0.9999;}this.setOpacity(this.now);},setOpacity:function(_a){if(_a==0&&this.el.style.visibility!="hidden"){this.el.style.visibility="hidden";}else{if(this.el.style.visibility!="visible"){this.el.style.visibility="visible";}}if(window.ActiveXObject){this.el.style.filter="alpha(opacity="+_a*100+")";}this.el.style.opacity=_a;},toggle:function(){if(this.now>0){this.custom(1,0);}else{this.custom(0,1);}}});fx.sinoidal=function(_b){return ((-Math.cos(_b*Math.PI)/2)+0.5);};fx.linear=function(_c){return _c;};fx.cubic=function(_d){return Math.pow(_d,3);};fx.circ=function(_e){return Math.sqrt(_e);};
fx.Scroll=Class.create();fx.Scroll.prototype=Object.extend(new fx.Base(),{initialize:function(_1){this.setOptions(_1);},scrollTo:function(el){var _3=Position.cumulativeOffset($(el))[1];var _4=window.innerHeight||document.documentElement.clientHeight;var _5=document.documentElement.scrollHeight;var _6=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;if(_3+_4>_5){this.custom(_6,_3-_4+(_5-_3));}else{this.custom(_6,_3);}},increase:function(){window.scrollTo(0,this.now);}});fx.Text=Class.create();fx.Text.prototype=Object.extend(new fx.Base(),{initialize:function(el,_8){this.el=$(el);this.setOptions(_8);if(!this.options.unit){this.options.unit="em";}},increase:function(){this.el.style.fontSize=this.now+this.options.unit;}});fx.Combo=Class.create();fx.Combo.prototype={setOptions:function(_9){this.options={opacity:true,height:true,width:false};Object.extend(this.options,_9||{});},initialize:function(el,_b){this.el=$(el);this.setOptions(_b);if(this.options.opacity){this.o=new fx.Opacity(el,_b);_b.onComplete=null;}if(this.options.height){this.h=new fx.Height(el,_b);_b.onComplete=null;}if(this.options.width){this.w=new fx.Width(el,_b);}},toggle:function(){this.checkExec("toggle");},hide:function(){this.checkExec("hide");},clearTimer:function(){this.checkExec("clearTimer");},checkExec:function(_c){if(this.o){this.o[_c]();}if(this.h){this.h[_c]();}if(this.w){this.w[_c]();}},resizeTo:function(_d,_e){if(this.h&&this.w){this.h.custom(this.el.offsetHeight,this.el.offsetHeight+_d);this.w.custom(this.el.offsetWidth,this.el.offsetWidth+_e);}},customSize:function(_f,wto){if(this.h&&this.w){this.h.custom(this.el.offsetHeight,_f);this.w.custom(this.el.offsetWidth,wto);}}};fx.Accordion=Class.create();fx.Accordion.prototype={setOptions:function(_11){this.options={delay:100,opacity:false};Object.extend(this.options,_11||{});},initialize:function(_12,_13,_14){this.elements=_13;this.setOptions(_14);var _14=_14||"";this.fxa=[];if(_14&&_14.onComplete){_14.onFinish=_14.onComplete;}_13.each(function(el,i){_14.onComplete=function(){if(el.offsetHeight>0){el.style.height="1%";}if(_14.onFinish){_14.onFinish(el);}};this.fxa[i]=new fx.Combo(el,_14);this.fxa[i].hide();}.bind(this));_12.each(function(tog,i){if(typeof tog.onclick=="function"){var _19=tog.onclick;}tog.onclick=function(){if(_19){_19();}this.showThisHideOpen(_13[i]);}.bind(this);}.bind(this));},showThisHideOpen:function(_1a){this.elements.each(function(el,j){if(el.offsetHeight>0&&el!=_1a){this.clearAndToggle(el,j);}if(el==_1a&&_1a.offsetHeight==0){setTimeout(function(){this.clearAndToggle(_1a,j);}.bind(this),this.options.delay);}}.bind(this));},clearAndToggle:function(el,i){this.fxa[i].clearTimer();this.fxa[i].toggle();}};var Remember=new Object();Remember=function(){};Remember.prototype={initialize:function(el,_20){this.el=$(el);this.days=365;this.options=_20;this.effect();var _21=this.readCookie();if(_21){this.fx.now=_21;this.fx.increase();}},setCookie:function(_22){var _23=new Date();_23.setTime(_23.getTime()+(this.days*24*60*60*1000));var _24="; expires="+_23.toGMTString();document.cookie=this.el+this.el.id+this.prefix+"="+_22+_24+"; path=/";},readCookie:function(){var _25=this.el+this.el.id+this.prefix+"=";var ca=document.cookie.split(";");for(var i=0;c=ca[i];i++){while(c.charAt(0)==" "){c=c.substring(1,c.length);}if(c.indexOf(_25)==0){return c.substring(_25.length,c.length);}}return false;},custom:function(_28,to){if(this.fx.now!=to){this.setCookie(to);this.fx.custom(_28,to);}}};fx.RememberHeight=Class.create();fx.RememberHeight.prototype=Object.extend(new Remember(),{effect:function(){this.fx=new fx.Height(this.el,this.options);this.prefix="height";},toggle:function(){if(this.el.offsetHeight==0){this.setCookie(this.el.scrollHeight);}else{this.setCookie(0);}this.fx.toggle();},resize:function(to){this.setCookie(this.el.offsetHeight+to);this.fx.custom(this.el.offsetHeight,this.el.offsetHeight+to);},hide:function(){if(!this.readCookie()){this.fx.hide();}}});fx.RememberText=Class.create();fx.RememberText.prototype=Object.extend(new Remember(),{effect:function(){this.fx=new fx.Text(this.el,this.options);this.prefix="text";}});Array.prototype.iterate=function(_2b){for(var i=0;i<this.length;i++){_2b(this[i],i);}};if(!Array.prototype.each){Array.prototype.each=Array.prototype.iterate;}fx.expoIn=function(pos){return Math.pow(2,10*(pos-1));};fx.expoOut=function(pos){return (-Math.pow(2,-10*pos)+1);};fx.quadIn=function(pos){return Math.pow(pos,2);};fx.quadOut=function(pos){return -(pos)*(pos-2);};fx.circOut=function(pos){return Math.sqrt(1-Math.pow(pos-1,2));};fx.circIn=function(pos){return -(Math.sqrt(1-Math.pow(pos,2))-1);};fx.backIn=function(pos){return (pos)*pos*((2.7)*pos-1.7);};fx.backOut=function(pos){return ((pos-1)*(pos-1)*((2.7)*(pos-1)+1.7)+1);};fx.sineOut=function(pos){return Math.sin(pos*(Math.PI/2));};fx.sineIn=function(pos){return -Math.cos(pos*(Math.PI/2))+1;};fx.sineInOut=function(pos){return -(Math.cos(Math.PI*pos)-1)/2;};
fx.Color=Class.create();fx.Color.prototype=Object.extend(new fx.Base(),{initialize:function(el,_2){this.el=$(el);this.setOptions(_2);this.now=0;this.regex=new RegExp("#?(..)(..)(..)");if(!this.options.fromColor){this.options.fromColor="#FFFFFF";}if(!this.options.toColor){this.options.toColor="#FFFFFF";}if(!this.options.property){this.props=new Array("backgroundColor");}else{this.props=this.options.property.split(",");}},increase:function(){var _3="rgb("+(Math.round(this.cs[0]+(this.ce[0]-this.cs[0])*this.now))+","+(Math.round(this.cs[1]+(this.ce[1]-this.cs[1])*this.now))+","+(Math.round(this.cs[2]+(this.ce[2]-this.cs[2])*this.now))+")";for(i=0;i<this.props.length;i++){if(this.props[i]=="backgroundColor"){this.el.style.backgroundColor=_3;}else{if(this.props[i]=="color"){this.el.style.color=_3;}else{if(this.props[i]=="borderColor"){this.el.style.borderColor=_3;}}}}},toggle:function(){this.cs=this.regex.exec(this.options.fromColor);this.ce=this.regex.exec(this.options.toColor);for(i=1;i<this.cs.length;i++){this.cs[i-1]=parseInt(this.cs[i],16);this.ce[i-1]=parseInt(this.ce[i],16);}if(this.now>0){this.custom(1,0);}else{this.custom(0,1);}},cycle:function(){this.toggle();setTimeout(this.toggle.bind(this),this.options.duration+20);},customColor:function(_4,to){this.cs=this.regex.exec(_4);this.ce=this.regex.exec(to);for(i=1;i<this.cs.length;i++){this.cs[i-1]=parseInt(this.cs[i],16);this.ce[i-1]=parseInt(this.ce[i],16);}this.custom(0,1);}});
fx.ScrollElement=Class.create();fx.ScrollElement.prototype=Object.extend(new fx.Base(),{initialize:function(el,_2){this.el=$(el);this.setOptions(_2);},scrollTo:function(el,_4){var _5=$(el).offsetTop;if(typeof _4!="undefined"){_5-=_4;}this.custom(this.el.scrollTop,_5);},increase:function(){this.el.scrollTop=this.now;}});
fx.Shake=Class.create();fx.Shake.prototype=Object.extend(new fx.Base(),{initialize:function(el,_2){this.el=$(el);this.setOptions(Object.extend({times:1},_2));},toggle:function(_3,_4){if(this.timer!=null){return;}if(this.el.offsetLeft==0){return;}var _5;if(typeof _4=="undefined"){_4=0;this.initialOffsetWidth=this.el.offsetLeft;this.options._oldOnComplete=this.options.onComplete;this.el.style.margin="0 auto";}if(!isNaN(parseInt(this.el.style.marginLeft.replace(/px/,"")))){_5=parseInt(this.el.style.marginLeft.replace(/px/,""));}if(_4==(this.options.times*2)){if(this.options._oldOnComplete){this.options.onComplete=this.options._oldOnComplete;}else{this.options.onComplete=null;}this.custom(_5,this.initialOffsetWidth-_3);return;}this.options.onComplete=this.toggle.bind(this,_3,_4+1);if(_4==0){this.custom(this.el.offsetLeft-_3,this.el.offsetLeft-(_3*2));}else{if(_4%2==0){this.custom(_5,_5-(_3*2));}else{this.custom(_5,_5+(_3*2));}}},increase:function(){this.el.style.marginLeft=this.now+"px";}});
