//>>built define("./_base/lang ./Evented ./_base/kernel ./_base/array ./aspect ./_base/fx ./dom ./dom-style ./dom-geometry ./ready require".split(" "),function(d,t,g,h,e,k,p,r,u,l,v){g.isAsync||l(0,function(){v(["./fx/Toggler"])});g=g.fx={};l={_fire:function(a,b){this[a]&&this[a].apply(this,b||[]);return this}};var m=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;h.forEach(this._animations,function(a){a&&("undefined"!=typeof a.duration&& (this.duration+=a.duration),a.delay&&(this.duration+=a.delay))},this)};m.prototype=new t;d.extend(m,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){this._onAnimateCtx.remove();this._onEndCtx.remove();this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=e.after(this._current,"onAnimate",d.hitch(this,"_onAnimate"),!0),this._onEndCtx=e.after(this._current,"onEnd", d.hitch(this,"_onEnd"),!0),this._current.play(0,!0))},play:function(a,b){this._current||(this._current=this._animations[this._index=0]);if(!b&&"playing"==this._current.status())return this;var c=e.after(this._current,"beforeBegin",d.hitch(this,function(){this._fire("beforeBegin")}),!0),f=e.after(this._current,"onBegin",d.hitch(this,function(a){this._fire("onBegin",arguments)}),!0),n=e.after(this._current,"onPlay",d.hitch(this,function(a){this._fire("onPlay",arguments);c.remove();f.remove();n.remove()})); this._onAnimateCtx&&this._onAnimateCtx.remove();this._onAnimateCtx=e.after(this._current,"onAnimate",d.hitch(this,"_onAnimate"),!0);this._onEndCtx&&this._onEndCtx.remove();this._onEndCtx=e.after(this._current,"onEnd",d.hitch(this,"_onEnd"),!0);this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var a=e.after(this._current,"onPause",d.hitch(this,function(b){this._fire("onPause",arguments);a.remove()}),!0);this._current.pause()}return this},gotoPercent:function(a, b){this.pause();var c=this.duration*a;this._current=null;h.some(this._animations,function(a,b){if(c<=a.duration)return this._current=a,this._index=b,!0;c-=a.duration;return!1},this);this._current&&this._current.gotoPercent(c/this._current.duration);b&&this.play();return this},stop:function(a){if(this._current){if(a){for(;this._index+1this._animations.length&&this._fire("onEnd")},_call:function(a,b){var c=this._pseudoAnimation;c[a].apply(c,b)},play:function(a,b){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(a,b){var c=this.duration*a;h.forEach(this._animations,function(a){a.gotoPercent(a.duration