Type.registerNamespace("Telerik.Web.UI.Animations");
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
a.Animations.playJQueryAnimation=function(d,e,m,o,n,g,p,j){if(!d){return;
}if(!e){e=2;
}if(!m){m=new Sys.UI.Bounds(1,1,1,1);
}if(!o){o=new Sys.UI.Bounds(1,1,1,1);
}var i=j?j:500;
if(!n){n=32;
}n+="";
var h=parseInt(n.substr(0,1));
var k=parseInt(n.substr(1,1));
if(g){g();
}b(d).stop(false,true);
if(e==2){b(d).css({left:o.x,top:o.y}).fadeIn(i,p);
return;
}if(e==8){var f=$telerik.getClientBounds();
var l=$telerik.getClientBounds();
m.x=l.width/2;
m.y=l.height;
switch(k){case 2:m.x=o.x;
break;
case 3:m.x=f.width;
break;
case 1:m.x=f.x;
}switch(h){case 2:m.y=o.y;
break;
case 1:m.y=f.y-o.height;
break;
case 3:m.y=f.height;
}}else{if(e==4){m.x=o.x;
m.y=o.y;
m.width=o.width;
m.height=1;
switch(k){case 2:m.x=o.x;
break;
case 3:m.x=o.x;
break;
case 1:var c=o.x;
if(2==h){c+=o.width;
}m.x=c;
}switch(h){case 2:m.y=o.y;
m.height=o.height;
m.width=1;
break;
case 1:m.y=o.y+o.height;
break;
case 3:m.y=o.y;
}}else{if(e==1){}}}b(d).css({width:m.width,height:m.height,left:m.x,top:m.y,opacity:0.1,filter:"alpha(opacity=10)"}).show().animate({width:o.width,height:o.height,left:o.x,top:o.y,opacity:1},i,null,p);
};
b.fx.prototype.oldstep=b.fx.prototype.step;
b.fx.prototype.step=function(e){var c=this.prop;
if(c=="left"||c=="top"||c=="telerikCarouselAngle"||c=="telerikCoverFlowIndex"){if(this.elem.getAttribute("paused")){if(!this.elem.getAttribute("elapsedTime")){var d=(+new Date)-this.startTime;
this.elem.setAttribute("elapsedTime",d);
}return true;
}if(this.elem.getAttribute("elapsedTime")){this.startTime=(+new Date)-this.elem.getAttribute("elapsedTime");
this.elem.removeAttribute("elapsedTime");
}}return this.oldstep(e);
};
a.Animations.jMoveBase=function(c,d,e,f){a.Animations.jMoveBase.initializeBase(this);
this._owner=c;
this._element=d;
this._duration=e;
this._events=null;
this._animationEndedDelegate=null;
this._isPlaying=false;
this._isPaused=false;
this._isCyclic=false;
this._easing=f;
this._isDisposed=false;
};
a.Animations.jMoveBase.prototype={initialize:function(){a.Animations.jMoveBase.callBaseMethod(this,"initialize");
this._animationEndedDelegate=Function.createDelegate(this,this._animationEnded);
},dispose:function(){if(this._isDisposed){return;
}this._getAnimationQuery().stop(true,false);
this._owner=null;
this._element=null;
this._animationEndedDelegate=null;
a.Animations.jMoveBase.callBaseMethod(this,"dispose");
this._isDisposed=true;
},get_isPlaying:function(){return this._isPlaying;
},get_isCyclic:function(){return this._isCyclic;
},set_isCyclic:function(c){this._isCyclic=c;
},get_easing:function(){return this._easing;
},set_easing:function(c){this._easing=c;
},get_duration:function(){return this._duration;
},set_duration:function(c){this._duration=c;
},get_isActive:function(){return true;
},play:function(c){var h=this._getAnimationQuery();
var d=h.attr("paused");
h.removeAttr("paused");
if(d&&h.attr("elapsedTime")){this._isPlaying=true;
this._isPaused=false;
}else{var f=this._owner;
var g=f.get_frameDuration();
if(this._isPaused&&this._isCyclic&&(g>0&&!c)&&f._setAnimationTimeout){f._setAnimationTimeout(g);
}else{var e=this._animationStarted();
if(e!=false){this._playAnimation();
this._isPlaying=true;
this._isPaused=false;
}}}},stop:function(){this._getAnimationQuery().stop(false,this._isPlaying);
this._isPlaying=false;
},pause:function(){if(this._isPlaying){this._getAnimationQuery().attr("paused",true);
}this._isPlaying=false;
this._isPaused=true;
},add_started:function(c){this.get_events().addHandler("started",c);
},remove_started:function(c){this.get_events().removeHandler("started",c);
},add_ended:function(c){this.get_events().addHandler("ended",c);
},remove_ended:function(c){this.get_events().removeHandler("ended",c);
},_getAnimationQuery:function(){return b(this._element);
},_playAnimation:function(){},_animationStarted:function(){var c=new Sys.CancelEventArgs();
this._raiseEvent("started",c);
return !c.get_cancel();
},_animationEnded:function(){this._isPlaying=false;
this._raiseEvent("ended",Sys.EventArgs.Empty);
},_raiseEvent:function(d,e){var c=this.get_events().getHandler(d);
if(c){if(!e){e=Sys.EventArgs.Empty;
}c(this,e);
}}};
a.Animations.jMoveBase.registerClass("Telerik.Web.UI.Animations.jMoveBase",Sys.Component);
a.Animations.jMove=function(f,c,e,h,g,d){a.Animations.jMove.initializeBase(this,[f,c,e,d]);
this._horizontal=(typeof(h)=="undefined"||h==null)?0:h;
this._vertical=(typeof(g)=="undefined"||g==null)?0:g;
};
a.Animations.jMove.prototype={initialize:function(){a.Animations.jMove.callBaseMethod(this,"initialize");
},dispose:function(){a.Animations.jMove.callBaseMethod(this,"dispose");
},get_vertical:function(){return this._vertical;
},set_vertical:function(c){this._vertical=c;
},get_horizontal:function(){return this._horizontal;
},set_horizontal:function(c){this._horizontal=c;
},_getFinalPosition:function(){return(isNaN(parseInt(this._vertical)))?this._horizontal:this._vertical;
},_getAnimatedProperty:function(){return(isNaN(parseInt(this._vertical)))?"left":"top";
},_getPosition:function(){return this._element.style[this._getAnimatedProperty()];
},_playAnimation:function(){var c=this._getFinalPosition();
var d=this._getAnimationQuery();
var e=this._getAnimatedProperty();
var f={queue:true};
f[e]=c;
d.stop(true,!this._isCyclic).animate(f,this._duration,this._easing,this._animationEndedDelegate);
}};
a.Animations.jMove.registerClass("Telerik.Web.UI.Animations.jMove",a.Animations.jMoveBase);
a.Animations.jCarousel=function(f,c,h,e,d,g,i){a.Animations.jCarousel.initializeBase(this,[f,c,e,i]);
this._items=h;
this._minScale=d.minScale;
this._x=d.xO;
this._y=d.yO;
this._xRadius=d.xR;
this._yRadius=d.yR;
this._customProperties=g;
this._angle=Math.PI/2;
};
a.Animations.jCarousel.prototype={initialize:function(){a.Animations.jCarousel.callBaseMethod(this,"initialize");
},dispose:function(){a.Animations.jCarousel.callBaseMethod(this,"dispose");
this._items=null;
this._customProperties=null;
},get_angle:function(){return this._angle;
},set_angle:function(c){this._angle=c;
},_getFinalPosition:function(){return this._angle;
},_getAnimatedProperty:function(){return"telerikCarouselAngle";
},_getAnimationQuery:function(){var c;
b.each(this._items,function(e,d){var f=this.element;
if(!c){c=b(f);
}else{c=c.add(f);
}});
return c;
},_playAnimation:function(){this._getAnimationQuery().stop(true,!this._isCyclic);
var e=this._items;
var f=(e.length>0)?((Math.PI*2)/e.length):0;
var d=this._angle;
var c=this;
b.each(e,function(g,h){if(d.toString().indexOf("e")>-1){d=(Math.round(d*10000)/10000);
}b(this.element).stop(true,false).animate({queue:true,telerikCarouselAngle:d},{xO:c._x,yO:c._y,xR:c._xRadius,yR:c._yRadius,minScale:c._minScale,reflection:this.reflection,width:this.width,height:this.height,outerWidth:this.outerWidth,outerHeight:this.outerHeight,customProperties:c._customProperties,duration:c._duration,easing:c._easing,complete:c._animationEndedDelegate});
d+=f;
});
}};
a.Animations.jCarousel.registerClass("Telerik.Web.UI.Animations.jCarousel",a.Animations.jMoveBase);
b.fx.step.telerikCarouselAngle=function(h){var m=h.now;
var n=h.options;
var e=Math.sin(m);
var g=n.minScale;
var i=g+(e+1)*((1-g)/2);
var c=n.xO+(((Math.cos(m+Math.PI)*n.xR)-n.outerWidth/2)*i);
var d=n.yO+((e*n.yR)*i);
h.elem.telerikCarouselAngle=h.now;
var o=b.extend({},n.customProperties);
if(n.customProperties){var k=/^([\d+-.]+)(.*)$/;
b.each(o,function(s,q){var r=k.exec(q);
if(r){o[s]=r?(r[1]*i+r[2]):q;
}});
}var l=$telerik.isIE&&(n.customProperties&&n.customProperties.opacity)&&n.reflection;
var j="px";
var f=b.extend(o,{width:n.width*i+j,height:n.height*i*(l?2:1)+j,left:c+j,top:d+j,zIndex:parseInt(i*100)});
var p=b(h.elem).css("display","none").css(f).css("display","");
};
a.Animations.jCoverFlow=function(f,c,h,e,d,g,i){a.Animations.jCoverFlow.initializeBase(this,[f,c,e,i]);
this._items=h;
this._minScale=d.minScale;
this._x=d.xO;
this._y=d.yO;
this._xRadius=d.xR;
this._yRadius=d.yR;
this._xItemSpacing=d.xItemSpacing;
this._yItemSpacing=d.yItemSpacing;
this._selectedItemOffsetX=d.selectedItemOffsetX;
this._selectedItemOffsetY=d.selectedItemOffsetY;
this._matrix=d.matrix;
this._customProperties=g;
this._index=0;
};
a.Animations.jCoverFlow.prototype={initialize:function(){a.Animations.jCoverFlow.callBaseMethod(this,"initialize");
},dispose:function(){a.Animations.jCoverFlow.callBaseMethod(this,"dispose");
this._items=null;
this._customProperties=null;
this._matrix=null;
},get_index:function(){return this._index;
},set_index:function(c){this._index=c;
},_getFinalPosition:function(){return this._index;
},_getAnimatedProperty:function(){return"telerikCoverFlowIndex";
},_getAnimationQuery:function(){var c;
b.each(this._items,function(e,d){var f=this.element;
if(!c){c=b(f);
}else{c=c.add(f);
}});
return c;
},_getTransformProperty:function(){var c="transform";
if($telerik.isIE){c="filter";
}else{if($telerik.isFirefox){c="MozTransform";
}else{if($telerik.isSafari){c="WebkitTransform";
}else{if($telerik.isOpera){c="OTransform";
}}}}return c;
},_playAnimation:function(){this._getAnimationQuery().stop(true,!this._isCyclic);
var j=this._items;
var c=j.length;
var k=this._owner.isVertical();
var e=this._index;
var d=j[e];
if(!d){return;
}var f={top:this._y-d.outerHeight/2,right:this._x+d.outerWidth/2,bottom:this._y+d.outerHeight/2,left:this._x-d.outerWidth/2};
var g=this._matrix;
if(g.m11==1&&g.m22==1&&g.m12==0&&g.m21==0){g=null;
}var h=this._getTransformProperty();
var i=this;
b.each(j,function(o,w){var I=(o-e);
var D=(I==0);
var u=D?1:i._minScale;
var r=this.element;
var G=parseInt(r.telerikCoverFlowIndex);
var s=(G==0);
var z=s?1:i._minScale;
var E=(I>0);
var B=i._x+this.outerWidth/2;
var m=k?(B-this.outerWidth*u):(f[E?"right":"left"]);
var q=k?(B-this.outerWidth*z):(f[G>0?"right":"left"]);
var t=i._y+this.outerHeight/2;
var n=k?(f[E?"bottom":"top"]):(t-this.outerHeight*u);
var A=k?(f[G>0?"bottom":"top"]):(t-this.outerHeight*z);
var H={};
var v=(s||D);
if(k||v){H.top={start:A,end:n};
}if(!k||v){H.left={start:q,end:m};
}for(var F=0;
F<2;
F++){var l=(F==0);
var C=l?I:G;
var p=l?u:z;
if(C>0){if(k){H.top[l?"end":"start"]+=i._yRadius+(--C*i._yItemSpacing);
}else{H.left[l?"end":"start"]+=i._xRadius+(--C*i._xItemSpacing);
}}else{if(C<0){if(k){H.top[l?"end":"start"]+=-(i._yRadius+this.outerHeight*p)+(++C*i._yItemSpacing);
}else{H.left[l?"end":"start"]+=-(i._xRadius+this.outerWidth*p)+(++C*i._xItemSpacing);
}}else{H.left[l?"end":"start"]+=i._selectedItemOffsetX;
H.top[l?"end":"start"]+=i._selectedItemOffsetY;
}}}b(r).stop(true,false).animate({queue:true,telerikCoverFlowIndex:I},{isVertical:k,animateSize:v,steps:H,minScale:i._minScale,width:this.width,height:this.height,outerWidth:this.outerWidth,outerHeight:this.outerHeight,matrix:g,transformProperty:h,reflection:this.reflection,itemsCount:c,customProperties:i._customProperties,duration:i._duration,easing:i._easing,complete:i._animationEndedDelegate});
});
}};
a.Animations.jCoverFlow.registerClass("Telerik.Web.UI.Animations.jCoverFlow",a.Animations.jMoveBase);
b.fx.step.telerikCoverFlowIndex=function(g){var x=g.now;
var r=g.options;
g.elem.telerikCoverFlowIndex=x;
var i=Math.abs(Math.abs(x)-Math.abs(g.start));
var k="px";
var e={zIndex:parseInt((r.itemsCount-Math.abs(x))*100)};
var o=0;
var j=0;
var t=r.isVertical;
var f=r.minScale;
var u=r.animateSize?(g.end==0?(f+(1-f)*i):(1-(1-f)*i)):f;
if(r.animateSize){if(r.customProperties){var s=b.extend({},r.customProperties);
var l=/^([\d+-.]+)(.*)$/;
b.each(s,function(A,y){var z=l.exec(y);
s[A]=z?(z[1]*u+z[2]):y;
});
e=b.extend(s,e);
}e=b.extend(e,{width:r.width*u+k,height:r.height*u+k});
}if(r.matrix){var p=b.extend({},r.matrix);
var c=r.animateSize?(g.end==0?(1-i):i):1;
var q=(x==0)?0:(x<0?-1:1);
p={m11:1-(1-p.m11)*c,m12:(p.m12*c)*q,m21:(p.m21*c)*q,m22:1-(1-p.m22)*c};
if(r.animateSize){var w="matrix("+p.m11+", "+p.m21+", "+p.m12+", "+p.m22+", 0, 0)";
if($telerik.isIE){w="progid:DXImageTransform.Microsoft.Matrix(FilterType='bilinear',M11="+p.m11+", M12="+p.m12+", M21="+p.m21+", M22="+p.m22+",sizingMethod='auto expand')";
}e[r.transformProperty]=w;
}var n=Math.abs(p.m11)+Math.abs(p.m12);
var m=Math.abs(p.m21)+Math.abs(p.m22);
if(!t){o=q*((1-n)/2);
}else{j=q*((1-m)/2);
}if($telerik.isIE){o+=(n-1)/2;
j+=(m-1)/2;
}}var d=r.animateSize;
var v=r.steps;
if((t||d)&&v.top){e.top=(v.top.start+(v.top.end-v.top.start)*i)-j*u*r.outerHeight+k;
}if((!t||d)&&v.left){e.left=(v.left.start+(v.left.end-v.left.start)*i)-o*u*r.outerWidth+k;
}if($telerik.isIE&&r.matrix&&r.reflection){e.height=2*(e.height?parseInt(e.height):(f*r.height))+k;
}var h=b(g.elem).css("display","none").css(e).css("display","");
};
})();
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
