(function(){var D=YAHOO.util;
var C=function(G,H,B,A){if(!G){}this.init(G,H,B,A)
};
C.NAME="Anim";
C.prototype={toString:function(){var B=this.getEl()||{};
var A=B.id||B.tagName;
return(this.constructor.NAME+": "+A)
},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(F,A,B){return this.method(this.currentFrame,A,B-A,this.totalFrames)
},setAttribute:function(H,A,B){var G=this.getEl();
if(this.patterns.noNegatives.test(H)){A=(A>0)?A:0
}if(H in G&&!("style" in G&&H in G.style)){G[H]=A
}else{D.Dom.setStyle(G,H,A+B)
}},getAttribute:function(L){var J=this.getEl();
var B=D.Dom.getStyle(J,L);
if(B!=="auto"&&!this.patterns.offsetUnit.test(B)){return parseFloat(B)
}var K=this.patterns.offsetAttribute.exec(L)||[];
var A=!!(K[3]);
var I=!!(K[2]);
if("style" in J){if(I||(D.Dom.getStyle(J,"position")=="absolute"&&A)){B=J["offset"+K[0].charAt(0).toUpperCase()+K[0].substr(1)]
}else{B=0
}}else{if(L in J){B=J[L]
}}return B
},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px"
}return""
},setRuntimeAttribute:function(M){var A;
var L;
var K=this.attributes;
this.runtimeAttributes[M]={};
var B=function(E){return(typeof E!=="undefined")
};
if(!B(K[M]["to"])&&!B(K[M]["by"])){return false
}A=(B(K[M]["from"]))?K[M]["from"]:this.getAttribute(M);
if(B(K[M]["to"])){L=K[M]["to"]
}else{if(B(K[M]["by"])){if(A.constructor==Array){L=[];
for(var J=0,N=A.length;
J<N;
++J){L[J]=A[J]+K[M]["by"][J]*1
}}else{L=A+K[M]["by"]*1
}}}this.runtimeAttributes[M].start=A;
this.runtimeAttributes[M].end=L;
this.runtimeAttributes[M].unit=(B(K[M].unit))?K[M]["unit"]:this.getDefaultUnit(M);
return true
},init:function(T,O,P,B){var A=false;
var S=null;
var Q=0;
T=D.Dom.get(T);
this.attributes=O||{};
this.duration=!YAHOO.lang.isUndefined(P)?P:1;
this.method=B||D.Easing.easeNone;
this.useSeconds=true;
this.currentFrame=0;
this.totalFrames=D.AnimMgr.fps;
this.setEl=function(E){T=D.Dom.get(E)
};
this.getEl=function(){return T
};
this.isAnimated=function(){return A
};
this.getStartTime=function(){return S
};
this.runtimeAttributes={};
this.animate=function(){if(this.isAnimated()){return false
}this.currentFrame=0;
this.totalFrames=(this.useSeconds)?Math.ceil(D.AnimMgr.fps*this.duration):this.duration;
if(this.duration===0&&this.useSeconds){this.totalFrames=1
}D.AnimMgr.registerElement(this);
return true
};
this.stop=function(E){if(!this.isAnimated()){return false
}if(E){this.currentFrame=this.totalFrames;
this._onTween.fire()
}D.AnimMgr.stop(this)
};
var M=function(){this.onStart.fire();
this.runtimeAttributes={};
for(var E in this.attributes){this.setRuntimeAttribute(E)
}A=true;
Q=0;
S=new Date()
};
var N=function(){var E={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};
E.toString=function(){return("duration: "+E.duration+", currentFrame: "+E.currentFrame)
};
this.onTween.fire(E);
var F=this.runtimeAttributes;
for(var G in F){this.setAttribute(G,this.doMethod(G,F[G].start,F[G].end),F[G].unit)
}Q+=1
};
var R=function(){var F=(new Date()-S)/1000;
var E={duration:F,frames:Q,fps:Q/F};
E.toString=function(){return("duration: "+E.duration+", frames: "+E.frames+", fps: "+E.fps)
};
A=false;
Q=0;
this.onComplete.fire(E)
};
this._onStart=new D.CustomEvent("_start",this,true);
this.onStart=new D.CustomEvent("start",this);
this.onTween=new D.CustomEvent("tween",this);
this._onTween=new D.CustomEvent("_tween",this,true);
this.onComplete=new D.CustomEvent("complete",this);
this._onComplete=new D.CustomEvent("_complete",this,true);
this._onStart.subscribe(M);
this._onTween.subscribe(N);
this._onComplete.subscribe(R)
}};
D.Anim=C
})();
YAHOO.util.AnimMgr=new function(){var I=null;
var J=[];
var F=0;
this.fps=1000;
this.delay=1;
this.registerElement=function(A){J[J.length]=A;
F+=1;
A._onStart.fire();
this.start()
};
this.unRegister=function(A,B){B=B||G(A);
if(!A.isAnimated()||B===-1){return false
}A._onComplete.fire();
J.splice(B,1);
F-=1;
if(F<=0){this.stop()
}return true
};
this.start=function(){if(I===null){I=setInterval(this.run,this.delay)
}};
this.stop=function(A){if(!A){clearInterval(I);
for(var B=0,C=J.length;
B<C;
++B){this.unRegister(J[0],0)
}J=[];
I=null;
F=0
}else{this.unRegister(A)
}};
this.run=function(){for(var A=0,C=J.length;
A<C;
++A){var B=J[A];
if(!B||!B.isAnimated()){continue
}if(B.currentFrame<B.totalFrames||B.totalFrames===null){B.currentFrame+=1;
if(B.useSeconds){H(B)
}B._onTween.fire()
}else{YAHOO.util.AnimMgr.stop(B,A)
}}};
var G=function(A){for(var B=0,C=J.length;
B<C;
++B){if(J[B]===A){return B
}}return -1
};
var H=function(E){var B=E.totalFrames;
var C=E.currentFrame;
var D=(E.currentFrame*E.duration*1000/E.totalFrames);
var L=(new Date()-E.getStartTime());
var A=0;
if(L<E.duration*1000){A=Math.round((L/D-1)*E.currentFrame)
}else{A=B-(C+1)
}if(A>0&&isFinite(A)){if(E.currentFrame+A>=B){A=B-(C+1)
}E.currentFrame+=A
}};
this._queue=J;
this._getIndex=G
};
YAHOO.util.Bezier=new function(){this.getPosition=function(I,J){var H=I.length;
var K=[];
for(var L=0;
L<H;
++L){K[L]=[I[L][0],I[L][1]]
}for(var G=1;
G<H;
++G){for(L=0;
L<H-G;
++L){K[L][0]=(1-J)*K[L][0]+J*K[parseInt(L+1,10)][0];
K[L][1]=(1-J)*K[L][1]+J*K[parseInt(L+1,10)][1]
}}return[K[0][0],K[0][1]]
}
};
(function(){var E=function(C,D,B,A){E.superclass.constructor.call(this,C,D,B,A)
};
E.NAME="ColorAnim";
E.DEFAULT_BGCOLOR="#fff";
var G=YAHOO.util;
YAHOO.extend(E,G.Anim);
var F=E.superclass;
var H=E.prototype;
H.patterns.color=/color$/i;
H.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;
H.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;
H.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;
H.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;
H.parseColor=function(B){if(B.length==3){return B
}var A=this.patterns.hex.exec(B);
if(A&&A.length==4){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)]
}A=this.patterns.rgb.exec(B);
if(A&&A.length==4){return[parseInt(A[1],10),parseInt(A[2],10),parseInt(A[3],10)]
}A=this.patterns.hex3.exec(B);
if(A&&A.length==4){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)]
}return null
};
H.getAttribute=function(J){var C=this.getEl();
if(this.patterns.color.test(J)){var A=YAHOO.util.Dom.getStyle(C,J);
var B=this;
if(this.patterns.transparent.test(A)){var D=YAHOO.util.Dom.getAncestorBy(C,function(I){return !B.patterns.transparent.test(A)
});
if(D){A=G.Dom.getStyle(D,J)
}else{A=E.DEFAULT_BGCOLOR
}}}else{A=F.getAttribute.call(this,J)
}return A
};
H.doMethod=function(K,A,D){var B;
if(this.patterns.color.test(K)){B=[];
for(var C=0,L=A.length;
C<L;
++C){B[C]=F.doMethod.call(this,K,A[C],D[C])
}B="rgb("+Math.floor(B[0])+","+Math.floor(B[1])+","+Math.floor(B[2])+")"
}else{B=F.doMethod.call(this,K,A,D)
}return B
};
H.setRuntimeAttribute=function(K){F.setRuntimeAttribute.call(this,K);
if(this.patterns.color.test(K)){var C=this.attributes;
var A=this.parseColor(this.runtimeAttributes[K].start);
var D=this.parseColor(this.runtimeAttributes[K].end);
if(typeof C[K]["to"]==="undefined"&&typeof C[K]["by"]!=="undefined"){D=this.parseColor(C[K].by);
for(var B=0,L=A.length;
B<L;
++B){D[B]=A[B]+D[B]
}}this.runtimeAttributes[K].start=A;
this.runtimeAttributes[K].end=D
}};
G.ColorAnim=E
})();
YAHOO.util.Easing={easeNone:function(H,E,F,G){return F*H/G+E
},easeIn:function(H,E,F,G){return F*(H/=G)*H+E
},easeOut:function(H,E,F,G){return -F*(H/=G)*(H-2)+E
},easeBoth:function(H,E,F,G){if((H/=G/2)<1){return F/2*H*H+E
}return -F/2*((--H)*(H-2)-1)+E
},easeInStrong:function(H,E,F,G){return F*(H/=G)*H*H*H+E
},easeOutStrong:function(H,E,F,G){return -F*((H=H/G-1)*H*H*H-1)+E
},easeBothStrong:function(H,E,F,G){if((H/=G/2)<1){return F/2*H*H*H*H+E
}return -F/2*((H-=2)*H*H*H-2)+E
},elasticIn:function(M,H,I,J,N,K){if(M==0){return H
}if((M/=J)==1){return H+I
}if(!K){K=J*0.3
}if(!N||N<Math.abs(I)){N=I;
var L=K/4
}else{var L=K/(2*Math.PI)*Math.asin(I/N)
}return -(N*Math.pow(2,10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K))+H
},elasticOut:function(M,H,I,J,N,K){if(M==0){return H
}if((M/=J)==1){return H+I
}if(!K){K=J*0.3
}if(!N||N<Math.abs(I)){N=I;
var L=K/4
}else{var L=K/(2*Math.PI)*Math.asin(I/N)
}return N*Math.pow(2,-10*M)*Math.sin((M*J-L)*(2*Math.PI)/K)+I+H
},elasticBoth:function(M,H,I,J,N,K){if(M==0){return H
}if((M/=J/2)==2){return H+I
}if(!K){K=J*(0.3*1.5)
}if(!N||N<Math.abs(I)){N=I;
var L=K/4
}else{var L=K/(2*Math.PI)*Math.asin(I/N)
}if(M<1){return -0.5*(N*Math.pow(2,10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K))+H
}return N*Math.pow(2,-10*(M-=1))*Math.sin((M*J-L)*(2*Math.PI)/K)*0.5+I+H
},backIn:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158
}return G*(J/=H)*J*((I+1)*J-I)+F
},backOut:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158
}return G*((J=J/H-1)*J*((I+1)*J+I)+1)+F
},backBoth:function(J,F,G,H,I){if(typeof I=="undefined"){I=1.70158
}if((J/=H/2)<1){return G/2*(J*J*(((I*=(1.525))+1)*J-I))+F
}return G/2*((J-=2)*J*(((I*=(1.525))+1)*J+I)+2)+F
},bounceIn:function(H,E,F,G){return F-YAHOO.util.Easing.bounceOut(G-H,0,F,G)+E
},bounceOut:function(H,E,F,G){if((H/=G)<(1/2.75)){return F*(7.5625*H*H)+E
}else{if(H<(2/2.75)){return F*(7.5625*(H-=(1.5/2.75))*H+0.75)+E
}else{if(H<(2.5/2.75)){return F*(7.5625*(H-=(2.25/2.75))*H+0.9375)+E
}}}return F*(7.5625*(H-=(2.625/2.75))*H+0.984375)+E
},bounceBoth:function(H,E,F,G){if(H<G/2){return YAHOO.util.Easing.bounceIn(H*2,0,F,G)*0.5+E
}return YAHOO.util.Easing.bounceOut(H*2-G,0,F,G)*0.5+F*0.5+E
}};
(function(){var G=function(C,D,B,A){if(C){G.superclass.constructor.call(this,C,D,B,A)
}};
G.NAME="Motion";
var I=YAHOO.util;
YAHOO.extend(G,I.ColorAnim);
var H=G.superclass;
var K=G.prototype;
K.patterns.points=/^points$/i;
K.setAttribute=function(C,A,B){if(this.patterns.points.test(C)){B=B||"px";
H.setAttribute.call(this,"left",A[0],B);
H.setAttribute.call(this,"top",A[1],B)
}else{H.setAttribute.call(this,C,A,B)
}};
K.getAttribute=function(B){if(this.patterns.points.test(B)){var A=[H.getAttribute.call(this,"left"),H.getAttribute.call(this,"top")]
}else{A=H.getAttribute.call(this,B)
}return A
};
K.doMethod=function(E,A,D){var B=null;
if(this.patterns.points.test(E)){var C=this.method(this.currentFrame,0,100,this.totalFrames)/100;
B=I.Bezier.getPosition(this.runtimeAttributes[E],C)
}else{B=H.doMethod.call(this,E,A,D)
}return B
};
K.setRuntimeAttribute=function(A){if(this.patterns.points.test(A)){var S=this.getEl();
var Q=this.attributes;
var T;
var E=Q.points["control"]||[];
var R;
var D,B;
if(E.length>0&&!(E[0] instanceof Array)){E=[E]
}else{var F=[];
for(D=0,B=E.length;
D<B;
++D){F[D]=E[D]
}E=F
}if(I.Dom.getStyle(S,"position")=="static"){I.Dom.setStyle(S,"position","relative")
}if(J(Q.points["from"])){I.Dom.setXY(S,Q.points["from"])
}else{I.Dom.setXY(S,I.Dom.getXY(S))
}T=this.getAttribute("points");
if(J(Q.points["to"])){R=L.call(this,Q.points["to"],T);
var C=I.Dom.getXY(this.getEl());
for(D=0,B=E.length;
D<B;
++D){E[D]=L.call(this,E[D],T)
}}else{if(J(Q.points["by"])){R=[T[0]+Q.points["by"][0],T[1]+Q.points["by"][1]];
for(D=0,B=E.length;
D<B;
++D){E[D]=[T[0]+E[D][0],T[1]+E[D][1]]
}}}this.runtimeAttributes[A]=[T];
if(E.length>0){this.runtimeAttributes[A]=this.runtimeAttributes[A].concat(E)
}this.runtimeAttributes[A][this.runtimeAttributes[A].length]=R
}else{H.setRuntimeAttribute.call(this,A)
}};
var L=function(C,A){var B=I.Dom.getXY(this.getEl());
C=[C[0]-B[0]+A[0],C[1]-B[1]+A[1]];
return C
};
var J=function(A){return(typeof A!=="undefined")
};
I.Motion=G
})();
(function(){var F=function(C,D,B,A){if(C){F.superclass.constructor.call(this,C,D,B,A)
}};
F.NAME="Scroll";
var H=YAHOO.util;
YAHOO.extend(F,H.ColorAnim);
var G=F.superclass;
var E=F.prototype;
E.doMethod=function(D,A,C){var B=null;
if(D=="scroll"){B=[this.method(this.currentFrame,A[0],C[0]-A[0],this.totalFrames),this.method(this.currentFrame,A[1],C[1]-A[1],this.totalFrames)]
}else{B=G.doMethod.call(this,D,A,C)
}return B
};
E.getAttribute=function(C){var A=null;
var B=this.getEl();
if(C=="scroll"){A=[B.scrollLeft,B.scrollTop]
}else{A=G.getAttribute.call(this,C)
}return A
};
E.setAttribute=function(D,A,B){var C=this.getEl();
if(D=="scroll"){C.scrollLeft=A[0];
C.scrollTop=A[1]
}else{G.setAttribute.call(this,D,A,B)
}};
H.Scroll=F
})();
YAHOO.register("animation",YAHOO.util.Anim,{version:"2.8.0r4",build:"2449"});
