
Type.registerNamespace("Telerik.Web.UI.Animations");
Telerik.Web.UI.Animations.playJQueryAnimation=function(b,c,k,m,l,e,n,h){if(!b){return;}if(!c){c=2;}if(!k){k=new Sys.UI.Bounds(1,1,1,1);}if(!m){m=new Sys.UI.Bounds(1,1,1,1);}var g=h?h:500;
if(!l){l=32;}l+="";
var f=parseInt(l.substr(0,1));
var i=parseInt(l.substr(1,1));
if(e){e();}$telerik.$(b).stop(false,true);
if(c==2){$telerik.$(b).css({left:m.x,top:m.y}).fadeIn(g,n);
return;}if(c==8){var d=$telerik.getClientBounds();
var j=$telerik.getClientBounds();
k.x=j.width/2;
k.y=j.height;
switch(i){case 2:k.x=m.x;
break;
case 3:k.x=d.width;
break;
case 1:k.x=d.x;}switch(f){case 2:k.y=m.y;
break;
case 1:k.y=d.y-m.height;
break;
case 3:k.y=d.height;}}else{if(c==4){k.x=m.x;
k.y=m.y;
k.width=m.width;
k.height=1;
switch(i){case 2:k.x=m.x;
break;
case 3:k.x=m.x;
break;
case 1:var a=m.x;
if(2==f){a+=m.width;}k.x=a;}switch(f){case 2:k.y=m.y;
k.height=m.height;
k.width=1;
break;
case 1:k.y=m.y+m.height;
break;
case 3:k.y=m.y;}}else{if(c==1){}}}$telerik.$(b).css({width:k.width,height:k.height,left:k.x,top:k.y,opacity:0.1,filter:"alpha(opacity=10)"}).show().animate({width:m.width,height:m.height,left:m.x,top:m.y,opacity:1},g,null,n);};
$telerik.$.fx.prototype.oldstep=$telerik.$.fx.prototype.step;
$telerik.$.fx.prototype.step=function(b){if(this.prop=="left"||this.prop=="top"){if(this.elem.getAttribute("paused")){if(!this.elem.getAttribute("elapsedTime")){var a=(+new Date)-this.startTime;
this.elem.setAttribute("elapsedTime",a);}return true;}if(this.elem.getAttribute("elapsedTime")){this.startTime=(+new Date)-this.elem.getAttribute("elapsedTime");
this.elem.removeAttribute("elapsedTime");}}return this.oldstep(b);};
Telerik.Web.UI.Animations.jMove=function(d,a,c,f,e,b){Telerik.Web.UI.Animations.jMove.initializeBase(this);
this._owner=d;
this._element=a;
this._duration=c;
this._horizontal=(typeof(f)=="undefined"||f==null)?0:f;
this._vertical=(typeof(e)=="undefined"||e==null)?0:e;
this._events=null;
this._animationEndedDelegate=null;
this._isPlaying=false;
this._isPaused=false;
this._isCyclic=false;
this._easing=b;};
Telerik.Web.UI.Animations.jMove.prototype={initialize:function(){Telerik.Web.UI.Animations.jMove.callBaseMethod(this,"initialize");
this._animationEndedDelegate=Function.createDelegate(this,this._animationEnded);},dispose:function(){this._getAnimationQuery().stop(true,false);
this._owner=null;
this._element=null;
this._animationEndedDelegate=null;},get_vertical:function(){return this._vertical;},set_vertical:function(a){this._vertical=a;},get_horizontal:function(){return this._horizontal;},set_horizontal:function(a){this._horizontal=a;},get_isPlaying:function(){return this._isPlaying;},get_isCyclic:function(){return this._isCyclic;},set_isCyclic:function(a){this._isCyclic=a;},get_easing:function(){return this._easing;},set_easing:function(a){this._easing=a;},get_isActive:function(){return true;},play:function(a){var c=this._element;
var d=c.getAttribute("paused");
c.removeAttribute("paused");
if(!(d&&c.getAttribute("elapsedTime"))){var f=this._owner;
var g=f.get_frameDuration();
if(this._isPaused&&this._isCyclic&&(g>0&&!a)&&f._setAnimationTimeout){f._setAnimationTimeout(g);}else{var e=this._animationStarted();
if(e!=false){var b=(isNaN(parseInt(this._vertical)))?this._horizontal:this._vertical;
this._playAnimation(b);
this._isPlaying=true;
this._isPaused=false;}}}},stop:function(){this._getAnimationQuery().stop(false,true);
this._isPlaying=false;},pause:function(){if(this._isPlaying){this._element.setAttribute("paused",true);}this._isPlaying=false;
this._isPaused=true;},add_started:function(a){this.get_events().addHandler("started",a);},remove_started:function(a){this.get_events().removeHandler("started",a);},add_ended:function(a){this.get_events().addHandler("ended",a);},remove_ended:function(a){this.get_events().removeHandler("ended",a);},_getAnimationQuery:function(){return $telerik.$(this._element);},_playAnimation:function(a){var b=this._getAnimationQuery();
var c=this._getAnimatedStyleProperty();
var d={queue:true};
d[c]=a;
b.stop(true,!this._isCyclic).animate(d,this._duration,this._easing,this._animationEndedDelegate);},_getAnimatedStyleProperty:function(){return(isNaN(parseInt(this._vertical)))?"left":"top";},_getPosition:function(){var a=this._element;
var b=this._getAnimatedStyleProperty();
return a.style[b];},_animationStarted:function(){var a=new Sys.CancelEventArgs();
this._raiseEvent("started",a);
return!a.get_cancel();},_animationEnded:function(){this._isPlaying=false;
this._raiseEvent("ended",Sys.EventArgs.Empty);},_raiseEvent:function(b,c){var a=this.get_events().getHandler(b);
if(a){if(!c){c=Sys.EventArgs.Empty;}a(this,c);}}};
Telerik.Web.UI.Animations.jMove.registerClass("Telerik.Web.UI.Animations.jMove",Sys.Component);