//>>built define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(r,x,e,y,k,m,z,t,n){var l=e.mixin,c={},u=c._Line=function(a,b){this.start=a;this.end=b};u.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var g=c.Animation=function(a){l(this,a);e.isArray(this.curve)&&(this.curve=new u(this.curve[0],this.curve[1]))};g.prototype=new y;e.extend(g,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var a= this._percent,b=this.easing;return b?b(a):a},_fire:function(a,b){b=b||[];if(this[a])if(x.debugAtAllCosts)this[a].apply(this,b);else try{this[a].apply(this,b)}catch(A){console.error("exception in animation handler for:",a),console.error(A)}return this},play:function(a,b){this._delayTimer&&this._clearTimer();if(b)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);a=a||this.delay;b=e.hitch(this,"_play", b);if(0this._percent?this._startTimer():(this._active=!1,0=p&&(clearInterval(q),q=null, p=0)}});var B=z("ie")?function(a){var b=a.style;b.width.length||"auto"!=n.get(a,"width")||(b.width="auto")}:function(){};c._fade=function(a){a.node=t.byId(a.node);var b=l({properties:{}},a);a=b.properties.opacity={};a.start="start"in b?b.start:function(){return+n.get(b.node,"opacity")||0};a.end=b.end;a=c.animateProperty(b);m.after(a,"beforeBegin",e.partial(B,b.node),!0);return a};c.fadeIn=function(a){return c._fade(l({end:1},a))};c.fadeOut=function(a){return c._fade(l({end:0},a))};c._defaultEasing= function(a){return.5+Math.sin((a+1.5)*Math.PI)/2};var w=function(a){this._properties=a;for(var b in a){var e=a[b];e.start instanceof k&&(e.tempColor=new k)}};w.prototype.getValue=function(a){var b={},c;for(c in this._properties){var h=this._properties[c],f=h.start;f instanceof k?b[c]=k.blendColors(f,h.end,a,h.tempColor).toCss():e.isArray(f)||(b[c]=(h.end-f)*a+f+("opacity"!=c?h.units||"px":0))}return b};c.animateProperty=function(a){var b=a.node=t.byId(a.node);a.easing||(a.easing=r._defaultEasing); a=new g(a);m.after(a,"beforeBegin",e.hitch(a,function(){var a={},c;for(c in this.properties){var f=function(a,b){var c={height:a.offsetHeight,width:a.offsetWidth}[b];if(void 0!==c)return c;c=n.get(a,b);return"opacity"==b?+c:g?c:parseFloat(c)};if("width"==c||"height"==c)this.node.display="block";var d=this.properties[c];e.isFunction(d)&&(d=d(b));d=a[c]=l({},e.isObject(d)?d:{end:d});e.isFunction(d.start)&&(d.start=d.start(b));e.isFunction(d.end)&&(d.end=d.end(b));var g=0<=c.toLowerCase().indexOf("color"); "end"in d?"start"in d||(d.start=f(b,c)):d.end=f(b,c);g?(d.start=new k(d.start),d.end=new k(d.end)):d.start="opacity"==c?+d.start:parseFloat(d.start)}this.curve=new w(a)}),!0);m.after(a,"onAnimate",e.hitch(n,"set",a.node),!0);return a};c.anim=function(a,b,e,h,f,d){return c.animateProperty({node:a,duration:e||g.prototype.duration,properties:b,easing:h,onEnd:f}).play(d||0)};l(r,c);r._Animation=g;return c});