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