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;
};

