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