/*
	Copyright (c) 2004-2008, 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[(typeof (djConfig)!="undefined"&&djConfig.scopeMap&&djConfig.scopeMap[0][1])||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojo.fx"],["provide","dojo.fx.Toggler"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojo.fx"]){_4._hasResource["dojo.fx"]=true;_4.provide("dojo.fx");_4.provide("dojo.fx.Toggler");(function(){var _7={_fire:function(_8,_9){if(this[_8]){this[_8].apply(this,_9||[]);}return this;}};var _a=function(_b){this._index=-1;this._animations=_b||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;_4.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay;}},this);};_4.extend(_a,{_onAnimate:function(){this._fire("onAnimate",arguments);},_onEnd:function(){_4.disconnect(this._onAnimateCtx);_4.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd");}else{this._current=this._animations[++this._index];this._onAnimateCtx=_4.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=_4.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true);}},play:function(_d,_e){if(!this._current){this._current=this._animations[this._index=0];}if(!_e&&this._current.status()=="playing"){return this;}var _f=_4.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_10=_4.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_12=_4.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);_4.disconnect(_f);_4.disconnect(_10);_4.disconnect(_12);});if(this._onAnimateCtx){_4.disconnect(this._onAnimateCtx);}this._onAnimateCtx=_4.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){_4.disconnect(this._onEndCtx);}this._onEndCtx=_4.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this;},pause:function(){if(this._current){var e=_4.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);_4.disconnect(e);});this._current.pause();}return this;},gotoPercent:function(_16,_17){this.pause();var _18=this.duration*_16;this._current=null;_4.some(this._animations,function(a){if(a.duration<=_18){this._current=a;return true;}_18-=a.duration;return false;});if(this._current){this._current.gotoPercent(_18/this._current.duration,_17);}return this;},stop:function(_1a){if(this._current){if(_1a){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true);}this._current=this._animations[this._index];}var e=_4.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);_4.disconnect(e);});this._current.stop();}return this;},status:function(){return this._current?this._current.status():"stopped";},destroy:function(){if(this._onAnimateCtx){_4.disconnect(this._onAnimateCtx);}if(this._onEndCtx){_4.disconnect(this._onEndCtx);}}});_4.extend(_a,_7);_4.fx.chain=function(_1d){return new _a(_1d);};var _1e=function(_1f){this._animations=_1f||[];this._connects=[];this._finished=0;this.duration=0;_4.forEach(_1f,function(a){var _21=a.duration;if(a.delay){_21+=a.delay;}if(this.duration<_21){this.duration=_21;}this._connects.push(_4.connect(a,"onEnd",this,"_onEnd"));},this);this._pseudoAnimation=new _4._Animation({curve:[0,1],duration:this.duration});_4.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){this._connects.push(_4.connect(this._pseudoAnimation,evt,_4.hitch(this,"_fire",evt)));},this);};_4.extend(_1e,{_doAction:function(_23,_24){_4.forEach(this._animations,function(a){a[_23].apply(a,_24);});return this;},_onEnd:function(){if(++this._finished==this._animations.length){this._fire("onEnd");}},_call:function(_26,_27){var t=this._pseudoAnimation;t[_26].apply(t,_27);},play:function(_29,_2a){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(_2b,_2c){var ms=this.duration*_2b;_4.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_2c);});this._call("gotoPercent",arguments);return this;},stop:function(_2f){this._doAction("stop",arguments);this._call("stop",arguments);return this;},status:function(){return this._pseudoAnimation.status();},destroy:function(){_4.forEach(this._connects,_4.disconnect);}});_4.extend(_1e,_7);_4.fx.combine=function(_30){return new _1e(_30);};})();_4.declare("dojo.fx.Toggler",null,{constructor:function(_31){var _t=this;_4.mixin(_t,_31);_t.node=_31.node;_t._showArgs=_4.mixin({},_31);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=_4.mixin({},_31);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);_4.connect(_t.showAnim,"beforeBegin",_4.hitch(_t.hideAnim,"stop",true));_4.connect(_t.hideAnim,"beforeBegin",_4.hitch(_t.showAnim,"stop",true));},node:null,showFunc:_4.fadeIn,hideFunc:_4.fadeOut,showDuration:200,hideDuration:200,show:function(_33){return this.showAnim.play(_33||0);},hide:function(_34){return this.hideAnim.play(_34||0);}});_4.fx.wipeIn=function(_35){_35.node=_4.byId(_35.node);var _36=_35.node,s=_36.style,o;var _39=_4.animateProperty(_4.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _3a=_4.style(_36,"height");return Math.max(_3a,1);}},end:function(){return _36.scrollHeight;}}}},_35));_4.connect(_39,"onEnd",function(){s.height="auto";s.overflow=o;});return _39;};_4.fx.wipeOut=function(_3b){var _3c=_3b.node=_4.byId(_3b.node);var s=_3c.style;var o;var _3f=_4.animateProperty(_4.mixin({properties:{height:{end:1}}},_3b));_4.connect(_3f,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display="";});_4.connect(_3f,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none";});return _3f;};_4.fx.slideTo=function(_40){var _41=(_40.node=_4.byId(_40.node));var top=null;var _43=null;var _44=(function(n){return function(){var cs=_4.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);_43=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=_4.coords(n,true);top=ret.y;_43=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=_43+"px";}};})(_41);_44();var _49=_4.animateProperty(_4.mixin({properties:{top:{end:_40.top||0},left:{end:_40.left||0}}},_40));_4.connect(_49,"beforeBegin",_49,_44);return _49;};}}};});
