var jsfilename;



jsfilename = "yui/animation/animation.js";

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