/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.fx.Timeline"],["require","dojo.fx.easing"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.fx.Timeline"]){_4._hasResource["dojox.fx.Timeline"]=true;_4.provide("dojox.fx.Timeline");_4.require("dojo.fx.easing");_6.fx.animateTimeline=function(_7,_8){var _9=new _6.fx._Timeline(_7.keys);var _a=_4.animateProperty({node:_4.byId(_8||_7.node),duration:_7.duration||1000,properties:_9._properties,easing:_4.fx.easing.linear,onAnimate:function(v){}});_4.connect(_a,"onEnd",function(_b){var _c=_a.curve.getValue(_a.reversed?0:1);_4.style(_b,_c);});_4.connect(_a,"beforeBegin",function(){if(_a.curve){delete _a.curve;}_a.curve=_9;_9.ani=_a;});return _a;};_6.fx._Timeline=function(_d){this.keys=_4.isArray(_d)?this.flatten(_d):_d;};_6.fx._Timeline.prototype.flatten=function(_e){var _f=function(str,idx){if(str=="from"){return 0;}if(str=="to"){return 1;}if(str===undefined){return idx==0?0:idx/(_e.length-1);}return parseInt(str,10)*0.01;};var p={},o={};_4.forEach(_e,function(k,i){var _10=_f(k.step,i);var _11=_4.fx.easing[k.ease]||_4.fx.easing.linear;for(var nm in k){if(nm=="step"||nm=="ease"||nm=="from"||nm=="to"){continue;}if(!o[nm]){o[nm]={steps:[],values:[],eases:[],ease:_11};p[nm]={};if(!/#/.test(k[nm])){p[nm].units=o[nm].units=/\D{1,}/.exec(k[nm]).join("");}else{p[nm].units=o[nm].units="isColor";}}o[nm].eases.push(_4.fx.easing[k.ease||"linear"]);o[nm].steps.push(_10);if(p[nm].units=="isColor"){o[nm].values.push(new _4.Color(k[nm]));}else{o[nm].values.push(parseInt(/\d{1,}/.exec(k[nm]).join("")));}if(p[nm].start===undefined){p[nm].start=o[nm].values[o[nm].values.length-1];}else{p[nm].end=o[nm].values[o[nm].values.length-1];}}});this._properties=p;return o;};_6.fx._Timeline.prototype.getValue=function(p){p=this.ani._reversed?1-p:p;var o={},_12=this;var _13=function(nm,i){return _12._properties[nm].units!="isColor"?_12.keys[nm].values[i]+_12._properties[nm].units:_12.keys[nm].values[i].toCss();};for(var nm in this.keys){var k=this.keys[nm];for(var i=0;i<k.steps.length;i++){var _14=k.steps[i];var ns=k.steps[i+1];var _15=i<k.steps.length?true:false;var _16=k.eases[i]||function(n){return n;};if(p==_14){o[nm]=_13(nm,i);if(!_15||(_15&&this.ani._reversed)){break;}}else{if(p>_14){if(_15&&p<k.steps[i+1]){var end=k.values[i+1];var beg=k.values[i];var seg=(1/(ns-_14))*(p-_14);seg=_16(seg);if(beg instanceof _4.Color){o[nm]=_4.blendColors(beg,end,seg).toCss(false);}else{var df=end-beg;o[nm]=beg+seg*df+this._properties[nm].units;}break;}else{o[nm]=_13(nm,i);}}else{if((_15&&!this.ani._reversed)||(!_15&&this.ani._reversed)){o[nm]=_13(nm,i);}}}}}return o;};}}};});