Type.registerNamespace("Telerik.Web.UI");
(function(){$telerik.toRotator=function(c){return c;
};
$telerik.findRotator=$find;
var b=$telerik.$;
var a=Telerik.Web.UI;
b.registerEnum(a,"RotatorScrollDirection",{Left:1,Right:2,Up:4,Down:8});
b.registerEnum(a,"RotatorAnimationType",{None:1,Fade:2,Pulse:3,CrossFade:4});
b.registerEnum(a,"RotatorType",{AutomaticAdvance:1,ButtonsOver:2,Buttons:3,SlideShow:4,SlideShowButtons:5,FromCode:6,Carousel:7,CarouselButtons:8,CoverFlow:9,CoverFlowButtons:10});
a.RadRotator=function(c){a.RadRotator.initializeBase(this,[c]);
this._enabled=true;
this._postBackReference=null;
this._webServiceSettings=new a.WebServiceSettings({});
this._webServiceLoader=null;
this._containerElement=null;
this._clickDelegate=null;
this._mouseOutDelegate=null;
this._mouseOverDelegate=null;
this._itemShownDelegate=null;
this._rotatorDisposed=false;
this._scrollDuration=500;
this._canPause=true;
this._itemWidth=null;
this._itemHeight=null;
this._isLODEnabled=null;
this._lastLODRequestPassed=false;
this._firstLODRequestPassed=false;
this._noActiveLODRequest=true;
this._relativeWrapper=null;
this._clipElement=null;
this._itemsElement=null;
this._loadingSign=null;
this._rightButton=null;
this._leftButton=null;
this._downButton=null;
this._upButton=null;
this._firstItem=null;
this._imageItems=[];
this._initialAngle=(Math.PI/2);
this._carouselAnimationAngle=this._initialAngle;
this._coverFlowAnimationIndex=-1;
this._pendingImage=null;
this._imageOnLoadDelegate=null;
this._automaticAdvanceStarted=false;
this._isMouseOverClipElement=false;
};
a.RadRotator.prototype={initialize:function(){a.RadRotator.callBaseMethod(this,"initialize");
this._rotatorDisposed=false;
this._isLODEnabled=!this.isCarousel()&&!this.isCoverFlow()&&this.get_webServiceSettings().get_method();
this._setChildElements();
this._createUI();
var c=this.get_initialItemIndex();
if(this._isLODEnabled){this._enableDisableAllButtonsUnconditionally(false);
this._loadChildrenFromWebService(c);
}else{this._createChildItems();
this._initialItemSet=false;
this._loadInitialFrame();
this._enableDisableButtons();
}this._attachEvents(true);
this._fixVisibilityProblems(true);
if($telerik.isSafari){$addHandler(this._relativeWrapper,"mousewheel",this._mouseWheelHandler);
}this.raiseEvent("load",Sys.EventArgs.Empty);
if(!this._isLODEnabled){this._startAutomaticAdvance();
}},dispose:function(){if(this._imageOnLoadDelegate&&this._pendingImage){$telerik.removeExternalHandler(this._pendingImage,"load",this._imageOnLoadDelegate);
this._pendingImage=null;
this._imageOnLoadDelegate=null;
}this._firstItem=null;
this._rotatorDisposed=true;
this._fixVisibilityProblems(false);
this._attachEvents(false);
this._containerElement=null;
if(this._animation){this._animation.dispose();
this._animation=null;
}this._imageItems=null;
a.RadRotatorAnimation._removeScrollAnimation(this.get_id());
if(this._rightButton){$clearHandlers(this._rightButton);
}if(this._leftButton){$clearHandlers(this._leftButton);
}if(this._downButton){$clearHandlers(this._downButton);
}if(this._upButton){$clearHandlers(this._upButton);
}if($telerik.isSafari){$removeHandler(this._relativeWrapper,"mousewheel",this._mouseWheelHandler);
}if(this._itemsElement){$clearHandlers(this._itemsElement);
}a.RadRotator.callBaseMethod(this,"dispose");
},_createChildItems:function(){var f=$telerik.getChildrenByTagName(this.get_containerElement(),"li");
for(var c=0;
c<f.length;
c++){var d=$create(a.RadRotatorItem,this.get_items()[c],null,null,f[c]);
var e=d.get_index();
f[c]._item=d;
this.get_items()[c]=d;
}},_mouseWheelHandler:function(c){c.preventDefault();
},_getNextItemToShow:function(){var c=this.getItemHtmlElements();
var f=this.isScrollingForward();
if(this._nextItemIndex==null){var d=f?0:c.length-1;
this._nextItemIndex=d;
}if(this._nextItemIndex<0){return null;
}var e=c[this._nextItemIndex];
if(f){this._nextItemIndex++;
}else{this._nextItemIndex--;
}if(this._nextItemIndex>c.length-1||this._nextItemIndex<0){this._nextItemIndex=null;
}return e;
},_startAutomaticAdvance:function(){if(this.isAutomaticAdvance()){var c=this.get_frameDuration();
if(c>0){window.setTimeout(Function.createDelegate(this,this.startAutoPlay),c);
}else{this.startAutoPlay();
}}},get_firstItem:function(){var d=this._firstItem;
if(!d){var c=this.getItemHtmlElements();
d=this.isScrollingForward()?c[0]:c[c.length-1];
}return d;
},get_currentItem:function(){var c=this.getItemHtmlElements();
var d=this._getCurrentItemIndex();
return((0<=d&&d<c.length)?c[d].control:null);
},_getCurrentItemIndex:function(){var k=this.getItemHtmlElements();
var g=k.length;
var d=-1;
if(g<1){return -1;
}var c=this.isCarousel();
if(c||this.isCoverFlow()){var j=this._animation;
if(!j){d=this.get_initialItemIndex();
}else{if(c){var e=j.get_angle()-this._initialAngle;
d=Math.round(Math.abs(e)/((Math.PI*2)/g));
if(e>0&&d>0){d=g-d;
}d%=g;
}else{d=j.get_index();
}}}else{var f=parseInt(k[0].parentNode.style.left),h="left";
if(isNaN(f)||f==0){f=parseInt(k[0].parentNode.style.top);
h="top";
}while(++d<g&&f<0){var l=$telerik.getOuterSize(k[d]);
f=f+(h=="top"?l.height:l.width);
}}return d;
},set_currentItemIndex:function(k){if(!this.get_enabled()||k<0){return;
}var e=this.get_items()[k];
if(!e){return;
}var m=this._itemsElement;
if(this.isCarousel()){this._changeCarouselAngleByIndex(k);
}else{if(this.isCoverFlow()){this._changeCoverFlowIndexByIndex(k);
}else{var g=e.get_element();
if(this.get_wrapFrames()){var n=this.getItemHtmlElements();
for(var h=0,f=n.length;
h<f;
h++){if(g===n[h]){k=h;
break;
}}}var o=this._getCurrentItemIndex();
var d=parseInt(m.style.left);
var l=parseInt(m.style.top);
var j=(o-k);
var c=$telerik.getOuterSize(g);
var p=this.isVertical();
if(p){m.style.top=l+j*c.height+"px";
}else{m.style.left=d+j*c.width+"px";
}}this._enableDisableButtons();
}},_changeCarouselAngleByIndex:function(k,i,p,e){var d=this._imageItems;
var o=d.length;
if(o<1){return;
}if(k<0){k=0;
}else{if(k>(o-1)){k%=o;
}}var f=(Math.PI*2)/o;
var j=i?b(d[0].element).attr("telerikCarouselAngle"):null;
var g=((typeof(j)!="undefined"&&j!=null)?j:this._initialAngle)-k*f;
if(g.toString().indexOf("e")>-1){g=(Math.round(g*10000)/10000);
}var c=this._animation;
if(c){c.set_angle(g);
}else{this._carouselAnimationAngle=g;
}var l=a.RadRotatorAnimation.get_scrollAnimationProperties(this.get_id());
var h=/^([\d+-.]+)(.*)$/;
var n=$telerik.isIE&&(l&&l.opacity!=null);
var m=this._getScrollAnimationOptions(p,e);
b.each(d,function(C,w){var q=this;
var t=Math.sin(g);
var z=m.minScale;
var s=z+(t+1)*((1-z)/2);
var r=m.xO+(((Math.cos(g+Math.PI)*m.xR)-q.outerWidth/2)*s);
var u=m.yO+((t*m.yR)*s);
var A=b.extend({},l);
if(l){b.each(A,function(E,x){var y=h.exec(x);
A[E]=y?(y[1]*s+y[2]):x;
});
}var v=this.element;
v.telerikCarouselAngle=g;
var D="px";
var B=b.extend(A,{width:q.width*s+D,height:q.height*s*(n&&this.reflection?2:1)+D,position:"absolute",left:r+D,top:u+D,zIndex:parseInt(s*100)});
b(v).css("display","none").css(B).css("display","");
g+=f;
if(g.toString().indexOf("e")>-1){g=(Math.round(g*10000)/10000);
}});
},_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;
},_changeCoverFlowIndexByIndex:function(k,q,d){var f=this._imageItems;
var o=f.length;
if(o<1){return;
}if(k<0){k=0;
}else{if(k>(o-1)){k%=o;
}}var c=this._animation;
if(c){c.set_index(k);
}else{this._coverFlowAnimationIndex=k;
}var l=a.RadRotatorAnimation.get_scrollAnimationProperties(this.get_id());
var h=/^([\d+-.]+)(.*)$/;
var i=this._getScrollAnimationOptions(q,d);
var p=this.isVertical();
var n=f[k];
var g={top:i.yO-n.outerHeight/2,right:i.xO+n.outerWidth/2,bottom:i.yO+n.outerHeight/2,left:i.xO-n.outerWidth/2};
var e=i.matrix;
if(e.m11==1&&e.m22==1&&e.m12==0&&e.m21==0){e=null;
}var j=$telerik.isIE&&e;
var m=this._getTransformProperty();
b.each(f,function(t,E){var H=this;
var O=(t-k);
var K=(O==0);
var A=K?1:i.minScale;
var w=(O>0);
var r=p?(i.xO+H.outerWidth/2-H.outerWidth*A):(g[w?"right":"left"]);
var s=p?(g[w?"bottom":"top"]):(i.yO+H.outerHeight/2-H.outerHeight*A);
var M=O;
if(M>0){if(p){s+=i.yR+(--M*i.yItemSpacing);
}else{r+=i.xR+(--M*i.xItemSpacing);
}}else{if(M<0){if(p){s+=-(i.yR+H.outerHeight*A)+(++M*i.yItemSpacing);
}else{r+=-(i.xR+H.outerWidth*A)+(++M*i.xItemSpacing);
}}else{r+=i.selectedItemOffsetX;
s+=i.selectedItemOffsetY;
}}var D=b.extend({},l);
if(l&&!K){b.each(D,function(P,x){var y=h.exec(x);
D[P]=y?(y[1]*A+y[2]):x;
});
}var C="px";
var u=b.extend(D,{width:H.width*A+C,height:H.height*A*(j&&this.reflection?2:1)+C,position:"absolute",zIndex:((o-Math.abs(O))*100)});
var F=0;
var B=0;
if(e){var G=b.extend({},e);
var I=K?0:(O<0?-1:1);
G.m12*=I;
G.m21*=I;
if(K){G.m11=G.m22=1;
}var N="matrix("+G.m11+", "+G.m21+", "+G.m12+", "+G.m22+", 0, 0)";
if($telerik.isIE){N="progid:DXImageTransform.Microsoft.Matrix(FilterType='bilinear',M11="+G.m11+", M12="+G.m12+", M21="+G.m21+", M22="+G.m22+",sizingMethod='auto expand')";
}u[m]=N;
var J=Math.abs(G.m11)+Math.abs(G.m12);
var L=Math.abs(G.m21)+Math.abs(G.m22);
if(!p){F=I*((1-J)/2);
}else{B=I*((1-L)/2);
}if($telerik.isIE&&!K){F+=(J-1)/2;
B+=(L-1)/2;
}}u.left=r-F*A*H.outerWidth+C;
u.top=s-B*A*H.outerHeight+C;
var v=this.element;
v.telerikCoverFlowIndex=O;
var z=b(v).css("display","none").css(u).css("display","");
});
},_needsShift:function(i){if(null==i){i=this.get_animationDirection();
}var e=this._itemsElement;
var h=this._clipElement;
var f=parseInt(e.style.left);
var k=parseInt(e.style.top);
var j=$telerik.getOuterSize(e);
var c=$telerik.getContentSize(h);
var g=this.get_firstItem();
if(!g){return false;
}var l=$telerik.getOuterSize(g);
var d=false;
var m=a.RotatorScrollDirection;
switch(i){case m.Left:d=f+j.width<c.width+l.width;
break;
case m.Up:d=k+j.height<c.height+l.height;
break;
case m.Right:d=f*-1<l.width;
break;
case m.Down:d=k*-1<c.height;
break;
}return d;
},_getMoveAnimation:function(){if(!this._animation){var c=this.isCarousel();
var d=(this.get_frameDuration()<5?"easeLinear":null);
var e;
if(c||this.isCoverFlow()){e=new a.Animations[c?"jCarousel":"jCoverFlow"](this,this._itemsElement,this._imageItems,this.get_scrollDuration(),this._getScrollAnimationOptions(),a.RadRotatorAnimation.get_scrollAnimationProperties(this.get_id()),d);
if(c){e.set_angle(this._carouselAnimationAngle);
}else{e.set_index(this._coverFlowAnimationIndex==-1?this.get_initialItemIndex():this._coverFlowAnimationIndex);
}}else{e=new a.Animations.jMove(this,this._itemsElement,this.get_scrollDuration(),true,false,d);
}e.initialize();
e.set_isCyclic(this.isAutomaticAdvance()||this._isRotatorTypeEnabled(a.RotatorType.ButtonsOver));
this._animation=e;
}return this._animation;
},_getScrollAnimationOptions:function(h,i){var g=h;
var e=i;
if(!g||!e){var c=$telerik.getContentSize(this._clipElement);
g=g?g:c.width;
e=e?e:c.height;
}var d=a.RadRotatorAnimation.get_scrollAnimationOptions(this.get_id());
d.minScale=(isNaN(d.minScale)||d.minScale<0||d.minScale>1)?0.5:d.minScale;
d.reflectionHeight=isNaN(d.reflectionHeight)?0:d.reflectionHeight;
d.reflectionOpacity=isNaN(d.reflectionOpacity)?1:d.reflectionOpacity;
d.xO=isNaN(d.xO)?parseInt(g/2):d.xO;
if(this.isCarousel()){d.xR=isNaN(d.xR)?parseInt(g/2.3):d.xR;
d.yR=isNaN(d.yR)?parseInt(e/6):d.yR;
d.yO=isNaN(d.yO)?parseInt(d.minScale*((e-(1-d.minScale)*d.yR)/2)):d.yO;
d.matrix=null;
}else{if(this.isCoverFlow()){var f=this.isVertical();
d.xR=isNaN(d.xR)?(f?0:15):d.xR;
d.yR=isNaN(d.yR)?(f?15:0):d.yR;
d.yO=isNaN(d.yO)?parseInt(e/2):d.yO;
d.xItemSpacing=isNaN(d.xItemSpacing)?(f?0:100):d.xItemSpacing;
d.yItemSpacing=isNaN(d.yItemSpacing)?(f?100:0):d.yItemSpacing;
d.selectedItemOffsetX=isNaN(d.selectedItemOffsetX)?0:d.selectedItemOffsetX;
d.selectedItemOffsetY=isNaN(d.selectedItemOffsetY)?0:d.selectedItemOffsetY;
d.matrix.m11=isNaN(d.matrix.m11)?1:d.matrix.m11;
d.matrix.m12=isNaN(d.matrix.m12)?0:d.matrix.m12;
d.matrix.m21=isNaN(d.matrix.m21)?0:d.matrix.m21;
d.matrix.m22=isNaN(d.matrix.m22)?1:d.matrix.m22;
d.coverFlowDirection=isNaN(d.coverFlowDirection)?1:(d.coverFlowDirection<0?-1:1);
}}return d;
},scrollViewport:function(){if(!this.get_enabled()){return;
}var c=this._itemsElement;
if(!this._animation){var d=this._getMoveAnimation();
var e=Function.createDelegate(this,function(){if(this.get_wrapFrames()&&!this._hasViewportWidth()){if(!this._isLODEnabled||this._noActiveLODRequest){var k=this.getItemHtmlElements().length;
for(var f=0;
f<k;
f++){this._shiftItemInList();
if(this._hasViewportWidth()){break;
}}}}var l=this._getViewPortPixelsToScroll();
var g=this.isScrollingForward();
if(this.get_vertical()){var h=parseInt(c.style.top)+(g?-l:l);
d.set_vertical(h);
}else{var j=parseInt(c.style.left)+(g?-l:l);
d.set_horizontal(j);
}if(this.isSlideShow()){this._initCrossFadeItemAnimation();
c.style.visibility="hidden";
}});
d.add_started(Function.createDelegate(this,function(h,g){this.stopViewportAnimation();
if(!this.get_wrapFrames()&&!this._canSlideMore()){if(!this._isLODEnabled||this._lastLODRequestPassed){g.set_cancel(true);
return false;
}}this._doLoadOnDemand(g);
var f=this.get_currentItem();
var i=new a.RadRotatorCancelEventArgs(f);
this.raiseEvent("itemShowing",i);
if(i.get_cancel&&i.get_cancel()){g.set_cancel(true);
return false;
}e();
}));
d.add_ended(Function.createDelegate(this,function(){if(!this._isLODEnabled||this._lastLODRequestPassed){this._enableDisableButtons();
}if(this.isSlideShow()){var g=this.get_slideShowAnimationSettings().type||a.RotatorAnimationType.None;
if(a.RotatorAnimationType.CrossFade!=g){c.style.visibility="visible";
}this.runSlideShowAnimation();
}else{var f=this.get_currentItem();
this.raiseEvent("itemShown",new a.RadRotatorEventArgs(f));
}}));
}this._animation.play();
},_getVisibleItemsCount:function(){var c=this._getVarSizeAttribute();
var g=this.getItemHtmlElements();
var f=this._getCurrentItemIndex();
if(f>=g.length){return 0;
}var d=$telerik.getOuterSize(g[f])[c];
if(!d&&this._isLODEnabled){d=this.get_vertical()?parseInt(this._itemHeight):parseInt(this._itemWidth);
}var e=parseInt($telerik.getContentSize(this._clipElement)[c]/d);
return e;
},_initCrossFadeItemAnimation:function(){var c=this.get_slideShowAnimationSettings().type||a.RotatorAnimationType.None;
if(a.RotatorAnimationType.CrossFade==c){var l=this._itemsElement;
var k=(-1)*parseInt(l.style.top)+"px";
var n=(-1)*parseInt(l.style.left)+"px";
var g=this.getItemHtmlElements();
var i=this._getCurrentItemIndex();
if(i>=g.length){return;
}var m=this._getVarSizeAttribute();
var h=$telerik.getOuterSize(g[i])[m];
var o=this._getVisibleItemsCount();
var j=i+(this.isScrollingForward()?1:-1)*o;
if(j>=0&&j<g.length){var d=b(g[i]).css({left:n,top:k});
var e=b(g[j]).css({left:n,top:k});
var f=this.get_vertical();
while(--o){if(f){k=(parseInt(k)+h+"px");
}else{n=(parseInt(n)+h+"px");
}if(++i<g.length){d=d.add(b(g[i]).css({left:n,top:k}));
}if(++j<g.length){e=e.add(b(g[j]).css({left:n,top:k}));
}}d.css({position:"absolute",visibility:"visible",opacity:1});
e.css({position:"absolute",visibility:"visible",opacity:0});
}}},scrollItem:function(){if(!this.get_enabled()){return;
}if(this.isCarousel()||this.isCoverFlow()){return this._scrollImageItem();
}var d=this._clipElement;
var c=this._itemsElement;
if(!this._animation){var e=this._animation=this._getMoveAnimation();
var f=Function.createDelegate(this,function(){var i=this._getNextItemToShow();
if(!i){return;
}this._firstItem=i;
var h=$telerik.getOuterSize(i);
if(this.isScrollingForward()){h.width*=-1;
h.height*=-1;
}if(this.get_vertical()){var j=parseInt(c.style.top)+h.height;
e.set_vertical(j);
}else{var g=parseInt(c.style.left)+h.width;
e.set_horizontal(g);
}});
e.add_started(Function.createDelegate(this,function(j,i){var h=this.get_wrapFrames();
if(!h&&!this._canSlideMore()){if(!this._isLODEnabled||this._lastLODRequestPassed){i.set_cancel(true);
return false;
}}this._doLoadOnDemand(i);
var k=this.get_currentItem();
var g=new a.RadRotatorCancelEventArgs(k);
this.raiseEvent("itemShowing",g);
if(g.get_cancel&&g.get_cancel()){i.set_cancel(true);
return false;
}if(h&&this._needsShift()){if(!this._isLODEnabled||this._noActiveLODRequest){this._shiftItemInList();
}}if(this._stopAnimationButtonOver){return;
}f();
}));
e.add_ended(Function.createDelegate(this,function(){if(!this._isLODEnabled||this._lastLODRequestPassed){this._enableDisableButtons();
}var g=this.get_currentItem();
if(g!=null){this.raiseEvent("itemShown",new a.RadRotatorEventArgs(g));
}if(this._stopAnimationButtonOver){return;
}if(this.isAutomaticAdvance()||this._isRotatorTypeEnabled(a.RotatorType.ButtonsOver)){if(this.get_frameDuration()>0){this._setAnimationTimeout(this.get_frameDuration());
}else{this._animation.play();
}}}));
}this._animation.stop();
this._animation.play();
},_scrollImageItem:function(){var d=this.isCarousel();
var c=this.isCoverFlow();
if(!this._animation){if(this._imageItems.length<1){return;
}var e=this._animation=this._getMoveAnimation();
e.add_started(Function.createDelegate(this,function(k,j){if(c&&!this._canSlideMore()){j.set_cancel(true);
return false;
}var g=this.get_currentItem();
var l=new a.RadRotatorCancelEventArgs(g);
this.raiseEvent("itemShowing",l);
if(l.get_cancel&&l.get_cancel()){j.set_cancel(true);
return false;
}var q=this._getNextItemToShow();
if(!q){return;
}this._firstItem=q;
var h=this.getItemHtmlElements();
var i=this.isScrollingForward()?-1:1;
if(d){var f=(h.length>0)?((Math.PI*2)/h.length):0;
i*=f;
var o=this._animation.get_angle()+i;
var n=this._initialAngle;
var r=Math.PI*2+f;
if(Math.round((o-(n+r))/f)==0||Math.round((o-(n-r))/f)==0){o=n+i;
}if(o.toString().indexOf("e")>-1){o=(Math.round(o*10000)/10000);
}var p=o-i;
b(h).each(function(t,s){if(p.toString().indexOf("e")>-1){p=(Math.round(p*10000)/10000);
}s.telerikCarouselAngle=p;
p+=f;
});
this._animation.set_angle(o);
}else{var m=this._animation.get_index()-this._getScrollAnimationOptions().coverFlowDirection*i;
this._animation.set_index(m);
}}));
e.add_ended(Function.createDelegate(this,function(){var f=this._itemsElement;
if(!f||!f.parentNode){return;
}if(b(f).children("li:animated").length>1){return;
}if(c){this._enableDisableButtons();
}var g=this.get_currentItem();
if(g!=null){this.raiseEvent("itemShown",new a.RadRotatorEventArgs(g));
}if(this.isAutomaticAdvance()){if(this.get_frameDuration()>0){this._setAnimationTimeout(this.get_frameDuration());
}else{this._animation.play();
}}}));
}this._animation.stop();
this._animation.play();
},_checkItemsSize:function(){var e=$telerik.getOuterSize(this._itemsElement);
var d=this.get_vertical();
var c=(d)?e.height:e.width;
var f=(d)?this.get_height():this.get_width();
return parseInt(c)>parseInt(f);
},_shiftItemInList:function(){var d=(this._initialItemSet&&this.get_enableRandomOrder());
var k=this._itemsElement;
var g=this.getItemHtmlElements();
var l=this.get_vertical();
var h=this.isScrollingForward();
var n=parseInt(k.style.left);
var i=parseInt(k.style.top);
var m=0;
if(d){var e=this._getVisibleItemsCount();
var f=Math.ceil(Math.random()*(g.length-e))-1;
m=h?f:f+e;
}else{m=h?0:g.length-1;
}var j=g[m];
var c=$telerik.getOuterSize(j);
j.parentNode.removeChild(j);
if(!h){k.insertBefore(j,k.firstChild);
}if(l){k.style.top=(i+(h?c.height:-c.height))+"px";
}else{k.style.left=(n+(h?c.width:-c.width))+"px";
}if(h){k.appendChild(j);
}this._nextItemIndex=h?g.length-1:0;
return j;
},_shuffleFrames:function(){if(!this._initialItemSet&&this.get_enableRandomOrder()){var d=this._itemsElement;
var c=this.getItemHtmlElements();
for(var g=0,e=c.length;
g<e;
g++){var f=Math.ceil(Math.random()*e)-1;
d.appendChild(c[f]);
}}},_loadInitialFrame:function(){var e=this.get_initialItemIndex();
if(!this.isCarousel()&&!this.isCoverFlow()){this._shuffleFrames();
var k=this.get_defaultAnimationDirection();
var i=a.RotatorScrollDirection;
var m=this.isVertical();
var g=this._itemsElement;
var c=$telerik.getOuterSize(g);
var l=$telerik.getContentSize(this._clipElement);
var d=0;
var f=0;
var e=this.get_initialItemIndex();
if(e>=0){if(m){f=(k==i.Up)?0:-c.height+l.height;
}else{d=(k==i.Left)?0:-c.width+l.width;
}}else{if(e==-1){if(m){f=(k==i.Down)?-c.height:l.height;
}else{d=(k==i.Right)?-c.width:l.width;
}}}g.style.left=d+"px";
g.style.top=f+"px";
if(e>0&&!this._initialItemSet){for(var h=0;
h<e;
h++){this._shiftItemInList();
}g.style.left=d+"px";
g.style.top=f+"px";
}}if(!this._initialItemSet&&e>=0){this.raiseEvent("itemShown",new a.RadRotatorEventArgs(this.get_items()[e]));
}this._initialItemSet=true;
},_setImageItems:function(){if(this._imageItems.length>0){return;
}var c={};
if(this._itemWidth){c.width=parseInt(this._itemWidth);
}if(this._itemHeight){c.height=parseInt(this._itemHeight);
}var e=(c.width&&c.height);
var d=[];
b(this.getItemHtmlElements()).each(function(i,l){var f=b.extend({},c);
if(!e){var k=b(l).css("float","left");
f=b.extend($telerik.getContentSize(l),f);
k.css("float","");
}var g=$telerik.getBorderBox(l);
var h=$telerik.getPaddingBox(l);
var j=$telerik.getMarginBox(l);
g.horizontal+=h.horizontal+j.horizontal;
g.vertical+=h.vertical+j.vertical;
d[i]=b.extend(f,{element:l,outerWidth:(f.width+g.horizontal),outerHeight:(f.height+g.vertical)});
});
this._imageItems=d;
},pause:function(){if(this._isPaused){return;
}this._isPaused=true;
if(this._animation&&this._animation.get_isActive()){this._animation.pause();
}},resume:function(){if(this._timeoutPassed||!this._isPaused){if(this._animation){this._animation.play(this._timeoutPassed);
}}else{if(this._isPaused){if(this._animation&&this._animation.get_isActive()){this._animation.play();
}}}this._isPaused=false;
},stop:function(){this._clearAnimationTimeout();
this._canPause=false;
this.pause();
},start:function(){this._canPause=true;
this._isPaused=false;
this.resume();
},isViewportScrollMode:function(){var c=a.RotatorType;
if(this._isRotatorTypeEnabled(c.AutomaticAdvance)||this._isRotatorTypeEnabled(c.ButtonsOver)||this._isRotatorTypeEnabled(c.FromCode)||this._isRotatorTypeEnabled(c.Carousel)||this._isRotatorTypeEnabled(c.CarouselButtons)||this._isRotatorTypeEnabled(c.CoverFlow)||this._isRotatorTypeEnabled(c.CoverFlowButtons)){return false;
}return true;
},_getButtonScrollDirection:function(e){var c=a.RotatorScrollDirection;
var d=c.Left;
switch(e){case this._rightButton:d=c.Left;
break;
case this._leftButton:d=c.Right;
break;
case this._downButton:d=c.Up;
break;
case this._upButton:d=c.Down;
break;
}return d;
},_buttonClicked:function(h){if(!this.get_enabled()){$telerik.cancelRawEvent(h);
return false;
}var c=this._animation;
if(c&&c.get_isPlaying()){c.stop();
}var g=h.target;
if(this._isButtonDisabled(g)||this.get_items().length==0){return;
}var f=new a.RadRotatorButtonEventArgs(g);
this.raiseEvent("buttonClick",f);
if(f.get_cancel()){return;
}var d=this._getButtonScrollDirection(g);
this.set_animationDirection(d);
if(this.isCarousel()||this.isCoverFlow()){this.scrollItem();
}else{this.scrollViewport();
}return $telerik.cancelRawEvent(h);
},_buttonOver:function(g){if(!this.get_enabled()){$telerik.cancelRawEvent(g);
return false;
}var c=g.target;
if(this._isButtonDisabled(c)||this.get_items().length==0){return;
}var f=new a.RadRotatorButtonEventArgs(c);
this.raiseEvent("buttonOver",f);
if(f.get_cancel()){return;
}var d=this._getButtonScrollDirection(c);
this.set_animationDirection(d);
this._stopAnimationButtonOver=false;
this.scrollItem();
return $telerik.cancelRawEvent(g);
},_buttonOut:function(g){if(!this.get_enabled()){$telerik.cancelRawEvent(g);
return false;
}var c=g.target;
if(this._isButtonDisabled(c)){return;
}var f=new a.RadRotatorButtonEventArgs(c);
this.raiseEvent("buttonOut",f);
if(f.get_cancel()){return;
}var d=this._getButtonScrollDirection(c);
this.set_animationDirection(d);
this._stopAnimationButtonOver=true;
return $telerik.cancelRawEvent(g);
},_initializeButtonsRotatorType:function(){var r=this.get_controlButtons();
this._rightButton=$telerik.getElementByClassName(this._rootElement,this._rotatorRightClass);
this._leftButton=$telerik.getElementByClassName(this._rootElement,this._rotatorLeftClass);
this._downButton=$telerik.getElementByClassName(this._rootElement,this._rotatorDownClass);
this._upButton=$telerik.getElementByClassName(this._rootElement,this._rotatorUpClass);
var v=a.RotatorScrollDirection;
var q=[v.Right,v.Left,v.Down,v.Up];
var t=[this._leftButton,this._rightButton,this._upButton,this._downButton];
var k=[r.LeftButtonID?$get(r.LeftButtonID):null,r.RightButtonID?$get(r.RightButtonID):null,r.UpButtonID?$get(r.UpButtonID):null,r.DownButtonID?$get(r.DownButtonID):null];
var l=[this._rotatorLeftClass,this._rotatorRightClass,this._rotatorUpClass,this._rotatorDownClass];
var e=["marginLeft","marginRight","marginTop","marginBottom"];
var d=["paddingLeft","paddingRight","paddingTop","paddingBottom"];
var m=["width","width","height","height"];
var c=this._relativeWrapper;
var f=this.get_element();
for(var n=0;
n<t.length;
n++){var u=t[n];
var h=(null!=k[n])?k[n]:u;
this._createButton(u,l[n]);
if(this._isScrollDirectionEnabled(q[n])&&null==k[n]){u.style.display="block";
var p=m[n];
var s=parseInt($telerik.getCurrentStyle(u,p));
if(isNaN(s)){s=0;
}c.style[p]=(parseInt(c.style[p])-s)+"px";
f.style[p]=(parseInt(f.style[p])-s)+"px";
f.style[d[n]]=s+"px";
}if(this._isRotatorTypeEnabled(a.RotatorType.Buttons)||this._isRotatorTypeEnabled(a.RotatorType.SlideShowButtons)||this._isRotatorTypeEnabled(a.RotatorType.CarouselButtons)||this._isRotatorTypeEnabled(a.RotatorType.CoverFlowButtons)){$clearHandlers(h);
$addHandlers(h,{click:this._buttonClicked},this);
}else{$clearHandlers(h);
$addHandlers(h,{mouseover:this._buttonOver,mouseout:this._buttonOut},this);
}}this._rightButton=k[1]||this._rightButton;
this._leftButton=k[0]||this._leftButton;
this._downButton=k[3]||this._downButton;
this._upButton=k[2]||this._upButton;
var g=false;
for(var o=0;
o<k.length;
o++){if(k[o]){g=true;
}break;
}return g;
},runSlideShowAnimation:function(){var d=this._itemsElement;
var f=this.get_slideShowAnimationSettings().duration||500;
var e=this.get_slideShowAnimationSettings().type||a.RotatorAnimationType.None;
var c=Function.createDelegate(this,function(){if(!d||!d.parentNode){return;
}var i=(e==a.RotatorAnimationType.CrossFade);
if(i&&b(d).children("li:animated").length>1){return;
}this._canPause=true;
if(e!=a.RotatorAnimationType.None){if(i){b(this.getItemHtmlElements()).css({position:"",visibility:""});
b(d).css("visibility","visible");
}else{b(d).css("opacity","1");
}}var g=this.get_currentItem();
this.raiseEvent("itemShown",new a.RadRotatorEventArgs(g));
if(!this.get_pauseOnMouseOver()||(!this._isMouseOverClipElement)){if(this.isAutomaticAdvance()){var h=this.get_frameDuration();
if(h>=0){this._setAnimationTimeout(h);
}}}});
switch(e){case a.RotatorAnimationType.Fade:this._canPause=false;
b(d).css("opacity","0").fadeTo(f,1,c);
break;
case a.RotatorAnimationType.Pulse:this._canPause=false;
b(d).fadeTo(f,0).fadeTo(f,1,c);
break;
case a.RotatorAnimationType.CrossFade:this._canPause=false;
this._runCrossFadeSlideShowAnimation(f,c);
break;
default:c();
break;
}},_runCrossFadeSlideShowAnimation:function(c,p){var l=this._itemsElement;
var j=(-1)*parseInt(l.style.top)+"px";
var n=(-1)*parseInt(l.style.left)+"px";
var g=this.getItemHtmlElements();
var i=this._getCurrentItemIndex();
if(i>=g.length){return;
}var m=this._getVarSizeAttribute();
var h=$telerik.getOuterSize(g[i])[m];
var o=parseInt($telerik.getContentSize(this._clipElement)[m]/h);
var k=i-(this.isScrollingForward()?1:-1)*o;
if(k>=0&&k<g.length){var d=b(g[k]).css({left:n,top:j});
var e=b(g[i]).css({left:n,top:j});
var f=this.get_vertical();
while(--o){if(f){j=(parseInt(j)+h+"px");
}else{n=(parseInt(n)+h+"px");
}if(++k<g.length){d=d.add(b(g[k]).css({left:n,top:j}));
}if(++i<g.length){e=e.add(b(g[i]).css({left:n,top:j}));
}}d.fadeTo(c,0,p);
e.fadeTo(c,1,p);
}},_getVarSizeAttribute:function(c){return(this.get_vertical()?"height":"width");
},_hasViewportWidth:function(h){if(null==h){h=this.get_animationDirection();
}var e=this._itemsElement;
var g=this._clipElement;
var f=parseInt(e.style.left);
var j=parseInt(e.style.top);
var i=$telerik.getOuterSize(e);
var c=$telerik.getContentSize(g);
var d=false;
var k=a.RotatorScrollDirection;
switch(h){case k.Left:d=i.width+f<c.width*2;
break;
case k.Up:d=i.height+j<c.height*2;
break;
case k.Right:d=(f*-1<c.width);
break;
case k.Down:d=(j*-1<c.height);
break;
}return !d;
},stopViewportAnimation:function(){var e=this._animation;
if(!e){return;
}if(e.get_isPlaying()){e.stop();
var d=this.get_vertical();
var c=d?e.get_vertical():e.get_horizontal();
if(null!=c){this._itemsElement.style[d?"top":"left"]=c+"px";
}}},_getViewPortPixelsToScroll:function(){var c=this.get_vertical();
var e=$telerik.getContentSize(this._clipElement);
var d=c?e.height:e.width;
return d;
},showNext:function(c){this.set_animationDirection(c?c:a.RotatorScrollDirection.Left);
if(!this._checkItemsSize()&&!this.isCarousel()&&!this.isCoverFlow()&&(!this._isLODEnabled||this._lastLODRequestPassed)){return;
}if(this.isViewportScrollMode()){this.scrollViewport();
}else{this.scrollItem();
}},getItemHtmlElements:function(){var d=this._itemsElement;
if(!this._hasCleanedList){var f=d.childNodes;
for(var c=0;
c<f.length;
c++){var e=f[c];
if(e&&e.tagName!="LI"){d.removeChild(e);
c--;
}}this._hasCleanedList=true;
}return d.childNodes;
},_setAnimationTimeout:function(c){this._clearAnimationTimeout();
this._currentAnimationTimeout=window.setTimeout(Function.createDelegate(this,function(){if(!this._isPaused){this.resume();
}this._timeoutPassed=true;
}),c);
},_clearAnimationTimeout:function(){if(this._currentAnimationTimeout){window.clearTimeout(this._currentAnimationTimeout);
}this._currentAnimationTimeout=0;
this._timeoutPassed=false;
},isAutomaticAdvance:function(){var c=a.RotatorType;
if(this._isRotatorTypeEnabled(c.AutomaticAdvance)||this._isRotatorTypeEnabled(c.SlideShow)||this._isRotatorTypeEnabled(c.Carousel)||this._isRotatorTypeEnabled(c.CoverFlow)){return true;
}return false;
},isCarousel:function(){var c=a.RotatorType;
if(this._isRotatorTypeEnabled(c.Carousel)||this._isRotatorTypeEnabled(c.CarouselButtons)){return true;
}return false;
},isCoverFlow:function(){var c=a.RotatorType;
if(this._isRotatorTypeEnabled(c.CoverFlow)||this._isRotatorTypeEnabled(c.CoverFlowButtons)){return true;
}return false;
},isSlideShow:function(){var c=a.RotatorType;
if(this._isRotatorTypeEnabled(c.SlideShow)||this._isRotatorTypeEnabled(c.SlideShowButtons)){return true;
}return false;
},isScrollingForward:function(){return this.isScrollingLeft()||this.isScrollingUp();
},isScrollingLeft:function(){return this._isAnimationDirectionOn(a.RotatorScrollDirection.Left);
},isScrollingUp:function(){return this._isAnimationDirectionOn(a.RotatorScrollDirection.Up);
},_isAnimationDirectionOn:function(c){return c==this.get_animationDirection()?true:false;
},_enableDisableButtons:function(){var f=this.get_rotatorType();
if(f==a.RotatorType.AutomaticAdvance||f==a.RotatorType.Carousel||f==a.RotatorType.CoverFlow){return;
}var e=this.get_wrapFrames();
var c=this.isCarousel();
var d=this.isCoverFlow();
var g=(e&&!d)||c;
var h=a.RotatorScrollDirection;
this._enableButton(this._rightButton,g||this._canSlideMore(h.Left));
this._enableButton(this._leftButton,g||this._canSlideMore(h.Right));
this._enableButton(this._downButton,g||this._canSlideMore(h.Up));
this._enableButton(this._upButton,g||this._canSlideMore(h.Down));
},_enableDisableAllButtonsUnconditionally:function(c){this._enableButton(this._rightButton,c);
this._enableButton(this._leftButton,c);
this._enableButton(this._downButton,c);
this._enableButton(this._upButton,c);
},_enableButton:function(c,d){if(!c){return;
}if(d){Sys.UI.DomElement.removeCssClass(c,this._rotatorButtonDisabledClass);
c.removeAttribute("disabled");
}else{Sys.UI.DomElement.addCssClass(c,this._rotatorButtonDisabledClass);
c.setAttribute("disabled","disabled");
}},_canSlideMore:function(e){if(null==e){e=this.get_animationDirection();
}var j=false;
var n=a.RotatorScrollDirection;
if(this.isCoverFlow()){var l=this._getCurrentItemIndex();
var k=this._getScrollAnimationOptions().coverFlowDirection;
var c=(e==n.Right||e==n.Down);
var i=(e==n.Left||e==n.Up);
if((c&&k==1)||(i&&k==-1)){j=l>0;
}else{if((i&&k==1)||(c&&k==-1)){j=l<this.getItemHtmlElements().length-1;
}}}else{var h=this._itemsElement;
var o=this._clipElement;
var g=parseInt(h.style.left);
var m=parseInt(h.style.top);
var d=$telerik.getBounds(h);
var f=$telerik.getBounds(o);
if(e==n.Left){j=(d.width+g)>f.width;
}else{if(e==n.Up){j=(d.height+m)>f.height;
}else{if(e==n.Right){j=(g<0);
}else{if(e==n.Down){j=(m<0);
}}}}}return j;
},_getCalculatedAnimationDirection:function(){var d=this.get_animationDirection();
var c=a.RotatorScrollDirection;
var e=23;
switch(d){case c.Left:e=21;
break;
case c.Down:e=32;
break;
case c.Up:e=12;
break;
default:e=23;
}return e;
},startAutoPlay:function(){if(this._rotatorDisposed){return;
}this._loadInitialFrame();
if((this.isCarousel()||this.isCoverFlow())&&!this._automaticAdvanceStarted){this._automaticAdvanceStarted=true;
return;
}this.showNext(this.get_defaultAnimationDirection());
},get_defaultAnimationDirection:function(){var d=a.RotatorScrollDirection;
var c=0;
if(this._isScrollDirectionEnabled(d.Left)){c=d.Left;
}else{if(this._isScrollDirectionEnabled(d.Up)){c=d.Up;
}else{if(this._isScrollDirectionEnabled(d.Right)){c=d.Right;
}else{if(this._isScrollDirectionEnabled(d.Down)){c=d.Down;
}}}}if(!c){c=d.Left;
}return c;
},get_containerElement:function(){return this._itemsElement;
},_setChildElements:function(){this._rotatorListClass="rrItemsList";
this._rotatorVerticalClass="rrVerticalList";
this._rotatorRelativeWrapperClass="rrRelativeWrapper";
this._rotatorClipRegionClass="rrClipRegion";
this._rotatorRightClass="rrButtonRight";
this._rotatorLeftClass="rrButtonLeft";
this._rotatorDownClass="rrButtonDown";
this._rotatorUpClass="rrButtonUp";
this._rotatorButtonDisabledClass="rrButtonDisabled";
this._rootElement=this.get_element();
this._relativeWrapper=$telerik.getElementByClassName(this._rootElement,this._rotatorRelativeWrapperClass);
this._clipElement=$telerik.getElementByClassName(this._rootElement,this._rotatorClipRegionClass);
this._itemsElement=$telerik.getElementByClassName(this._rootElement,this._rotatorListClass);
},_createUI:function(){if(!this.isVisible()){return;
}var i=this.get_element();
var h=this._relativeWrapper;
if(!i){return;
}if(!this._isCreated){this._fixRootElementSize();
h.style.height=i.offsetHeight+"px";
h.style.width=i.offsetWidth+"px";
var l=true;
if(this._isRotatorTypeEnabled(a.RotatorType.Buttons)||this._isRotatorTypeEnabled(a.RotatorType.ButtonsOver)||this._isRotatorTypeEnabled(a.RotatorType.SlideShowButtons)||this._isRotatorTypeEnabled(a.RotatorType.CarouselButtons)||this._isRotatorTypeEnabled(a.RotatorType.CoverFlowButtons)){l=this._initializeButtonsRotatorType();
}if(l){Sys.UI.DomElement.addCssClass(i,"rrNoBorder");
}this._isCreated=true;
}if(this.get_vertical()){this.set_vertical(true);
}h.style.overflow="auto";
var d=this._clipElement;
d.style.overflow="auto";
var g=this._itemsElement;
if(this._isLODEnabled){g.style.width="";
g.style.height="";
}var j=10000;
try{j=1000+g.offsetWidth*$telerik.getChildrenByTagName(g,"li").length;
}catch(k){j=10000;
}d.style.width=Math.max(j,10000)+"px";
d.style.height="10000px";
var j=h.style.width;
var c=h.style.height;
var f=this.isCarousel()||this.isCoverFlow();
if(f){this._setImageItemsSize(parseInt(j),parseInt(c),true);
}g.style.width=f?j:(this.get_vertical()?h.style.width:g.offsetWidth+"px");
g.style.height=f?c:(g.offsetHeight+"px");
h.style.overflow="";
d.style.width=j;
d.style.height=c;
d.style.overflow="hidden";
d.style.position="relative";
g.style.position="relative";
i.style.visibility="visible";
},_setImageItemsSize:function(m,n,l){var o=(this._imageItems.length>0);
var h=this._itemsElement;
var c=(this._itemWidth&&this._itemHeight);
var f=this._toCreateReflection(m,n);
if((!o&&!c)||f){var k=b(h).find("img");
if(!c&&k.length==0){return;
}for(var d=0,e=k.length;
d<e;
d++){var j=k[d];
if(this._pendingImage&&this._pendingImage===j&&this._imageOnLoadDelegate){$telerik.removeExternalHandler(j,"load",this._imageOnLoadDelegate);
this._pendingImage=null;
this._imageOnLoadDelegate=null;
}else{if((j.width===undefined)||((j.complete!==undefined)&&!j.complete)){this._pendingImage=j;
this._imageOnLoadDelegate=Function.createDelegate(this,function(){this._setImageItemsSize(m,n,!c);
});
$telerik.addExternalHandler(j,"load",this._imageOnLoadDelegate);
if(!c||!l){return;
}else{break;
}}}}}if(!o&&l){this._shuffleFrames();
this._setImageItems();
if(this.isCarousel()){this._changeCarouselAngleByIndex(this.get_initialItemIndex(),true,m,n);
}else{this._changeCoverFlowIndexByIndex(this.get_initialItemIndex(),m,n);
}var g=this.getItemHtmlElements();
b(g).children("div").css({width:"100%",height:"100%"}).children("img").css({width:"100%",height:"100%"});
}if(!this._pendingImage){this._createReflection(m,n);
}if(!o&&l){this._startAutomaticAdvance();
}},_fixRootElementSize:function(){var e=this.get_element();
if(!e){return;
}var d=a.RotatorScrollDirection;
var c=parseInt(e.style.paddingLeft);
if(c&&!isNaN(c)&&this._isScrollDirectionEnabled(d.Left)){e.style.width=(parseInt(e.style.width)+c)+"px";
e.style.paddingLeft="";
}c=parseInt(e.style.paddingRight);
if(c&&!isNaN(c)&&this._isScrollDirectionEnabled(d.Right)){e.style.width=(parseInt(e.style.width)+c)+"px";
e.style.paddingRight="";
}c=parseInt(e.style.paddingTop);
if(c&&!isNaN(c)&&this._isScrollDirectionEnabled(d.Up)){e.style.height=(parseInt(e.style.height)+c)+"px";
e.style.paddingTop="";
}c=parseInt(e.style.paddingBottom);
if(c&&!isNaN(c)&&this._isScrollDirectionEnabled(d.Down)){e.style.height=(parseInt(e.style.height)+c)+"px";
e.style.paddingBottom="";
}},_toCreateReflection:function(e,c){var d=this._getScrollAnimationOptions(e,c);
return(!this.isVertical()&&(this.isCoverFlow()||this.isCarousel())&&d.reflectionHeight>0&&d.reflectionOpacity>0);
},_createReflection:function(l,k){var j=this._imageItems;
if(!j||j.length==0||j[0].reflection||!this._toCreateReflection(l,k)){return;
}var d=this._getScrollAnimationOptions(l,k);
var f=d.reflectionHeight;
f=d.reflectionHeight=(f>1)?1:f;
var m=d.reflectionOpacity;
m=d.reflectionOpacity=(m>1)?1:m;
var e=f;
var n=(f<=0.5)?0:(f-0.5);
var h=d.matrix;
var c=a.RadRotatorAnimation.get_scrollAnimationProperties(this.get_id());
var g=$telerik.isIE&&((h!=null&&!(h.m11==1&&h.m22==1&&h.m12==0&&h.m21==0))||(c&&c.opacity!=null));
b.each(j,function(v,o){var p=this.element;
var u=p.getElementsByTagName("img");
u=(u&&u.length>0)?u[0]:null;
var s={width:"100%",height:"100%"};
if(u&&!this.reflection){var q=document.createElement("canvas");
if(q.getContext){q.height=this.height;
q.width=this.width;
p.appendChild(q);
var r=q.getContext("2d");
r.save();
r.globalAlpha=m;
r.translate(0,this.height);
r.scale(1,-1);
r.drawImage(u,0,0,this.width,this.height);
r.restore();
r.globalCompositeOperation="destination-in";
var w=r.createLinearGradient(0,0,0,this.height);
w.addColorStop(0,"rgba(255, 255, 255, "+e+")");
w.addColorStop((f>=0.5)?1:2*f,"rgba(255, 255, 255, "+n+")");
r.fillStyle=w;
r.rect(0,0,this.width,this.height);
r.fill();
this.reflection=q;
}else{var t=b(u).clone(false).appendTo(p);
if($telerik.isIE){t.css({filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1) progid:DXImageTransform.Microsoft.Alpha(opacity="+e*m*100+", style=1, finishOpacity="+n*m*100+", startx=0, starty=0, finishx=0, finishy="+this.height*((f>=0.5)?1:2*f)+")"});
}this.reflection=t[0];
if(g){b(p).children("div").css({height:"50%"});
s.height="50%";
}}b(this.reflection).css(s);
}});
var i=this._animation;
if(g&&(!i||!i.get_isPlaying())){if(this.isCoverFlow()){this._changeCoverFlowIndexByIndex(this._getCurrentItemIndex(),l,k);
}else{if(this.isCarousel()){this._changeCarouselAngleByIndex(this._getCurrentItemIndex(),false,l,k);
}}}},_createButton:function(c,d){var e=c;
if(!e){e=document.createElement("div");
}if(!e.className){e.className=this._rotatorDownClass;
}return e;
},_isButtonDisabled:function(c){if(!c){return true;
}return Sys.UI.DomElement.containsCssClass(c,this._rotatorButtonDisabledClass);
},_isScrollDirectionEnabled:function(c){return c&this.get_scrollDirection()?true:false;
},_isRotatorTypeEnabled:function(c){return c==this.get_rotatorType()?true:false;
},get_scrollDuration:function(){if(this.isSlideShow()){return 1;
}else{return this._scrollDuration;
}},set_scrollDuration:function(c){this._scrollDuration=c;
if(this._animation){this._animation.set_duration(this.get_scrollDuration());
}},set_vertical:function(d){var c=this._itemsElement;
if(c){Sys.UI.DomElement.addCssClass(c,this._rotatorVerticalClass);
}},get_vertical:function(){var c=a.RotatorScrollDirection;
return(this._isScrollDirectionEnabled(c.Down)||this._isScrollDirectionEnabled(c.Up));
},isVertical:function(){if(this._itemsElement){return Sys.UI.DomElement.containsCssClass(this._itemsElement,this._rotatorVerticalClass);
}return false;
},get_height:function(){return this.get_element().style.height;
},set_height:function(c){this.get_element().style.height=c;
if(this.isVisible()){this.repaint();
}},get_width:function(){return this.get_element().style.width;
},set_width:function(c){this.get_element().style.width=c;
if(this.isVisible()){this.repaint();
}},_attachEvents:function(c){var d=this.get_containerElement();
if(null==d){return;
}if(c!=false){this._clickDelegate=Function.createDelegate(this,this._mouseClickHandler);
this._mouseOutDelegate=Function.createDelegate(this,this._mouseOutHandler);
this._mouseOverDelegate=Function.createDelegate(this,this._mouseOverHandler);
this._itemShownDelegate=Function.createDelegate(this,this._itemShownHandler);
$addHandler(d,"mouseover",this._mouseOverDelegate);
$addHandler(d,"mouseout",this._mouseOutDelegate);
$addHandler(d,"click",this._clickDelegate);
this.add_itemShown(this._itemShownDelegate);
}else{$removeHandler(d,"mouseover",this._mouseOverDelegate);
$removeHandler(d,"mouseout",this._mouseOutDelegate);
$removeHandler(d,"click",this._clickDelegate);
this._clickDelegate=null;
this._mouseOutDelegate=null;
this._mouseOverDelegate=null;
this.remove_itemShown(this._itemShownDelegate);
}},_itemShownHandler:function(d){if(typeof(a.RadTicker)=="undefined"){return;
}var f=this.get_items();
for(var c=0,g=f.length;
c<g;
c++){var e=f[c];
if(this._isItemVisible(e)){this._fireTickersForItem(e);
}else{this._resetTickersForItem(e);
}}},_mouseOverHandler:function(d){if(this._isMouseOverClipElement){return;
}this._isMouseOverClipElement=true;
if(this.isAutomaticAdvance()&&this._canPause&&this.get_pauseOnMouseOver()){this.pause();
}var c=this._getItemFromEvent(d.target);
if(null!=c){this.raiseEvent("mouseOver",new a.RadRotatorEventArgs(c));
}},_mouseOutHandler:function(d){if($telerik.isMouseOverElementEx(this._clipElement,d.rawEvent)){return;
}this._isMouseOverClipElement=false;
if(this.isAutomaticAdvance()&&this._canPause&&this.get_pauseOnMouseOver()){this.resume();
}var c=this._getItemFromEvent(d.target);
if(null!=c){this.raiseEvent("mouseOut",new a.RadRotatorEventArgs(c));
}return false;
},_mouseClickHandler:function(d){if(!this.get_enabled()){$telerik.cancelRawEvent(d.rawEvent);
return false;
}var c=this._getItemFromEvent(d.target);
if(null!=c){var e=new a.RadRotatorCancelEventArgs(c);
this.raiseEvent("itemClicking",e);
if(e.get_cancel&&e.get_cancel()){$telerik.cancelRawEvent(d.rawEvent);
return false;
}window.setTimeout(Function.createDelegate(this,function(){this.raiseEvent("itemClicked",new a.RadRotatorEventArgs(c));
this._postback(c.get_index());
}),0);
}},_postback:function(c){if(!this._postBackReference){return;
}var d=this._postBackReference.replace("arguments",c);
eval(d);
},_isItemVisible:function(h){var f=$telerik.getContentSize(this._clipElement);
var c=$telerik.getLocation(this._clipElement);
f.x=c.x;
f.y=c.y;
var g=$telerik.getOuterSize(h.get_element());
c=$telerik.getLocation(h.get_element());
g.x=c.x;
g.y=c.y;
var e=($telerik.containsPoint(f,g.x,g.y)&&$telerik.containsPoint(f,g.x+g.width,g.y+g.height));
var d=($telerik.containsPoint(g,f.x,f.y)&&$telerik.containsPoint(g,f.x+f.width,f.y+f.height));
return e||d;
},_fireTickersForItem:function(f){var e=f.get_tickers();
for(var c=0,g=e.length;
c<g;
c++){if(e[c]){var d=$find(e[c]);
if(d){d.startTicker();
}}}},_resetTickersForItem:function(f){var e=f.get_tickers();
for(var c=0,g=e.length;
c<g;
c++){if(e[c]){var d=$find(e[c]);
if(d){d.resetTicker();
}}}},_getItemFromEvent:function(c){var e=this.get_containerElement();
var d=null;
while(null!=c&&c!=e&&c!=document){if(c.tagName.toLowerCase()=="li"&&null!=c._item&&Object.getTypeName(c._item)=="Telerik.Web.UI.RadRotatorItem"){d=c._item;
}c=c.parentNode;
}return d;
},_initializeWebServiceLoader:function(){this._webServiceLoader=new a.WebServiceLoader(this.get_webServiceSettings());
this._webServiceLoader.add_loadingStarted(Function.createDelegate(this,this._onItemLoadingStarted));
this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onItemLoadingSuccess));
this._webServiceLoader.add_loadingError(Function.createDelegate(this,this._onItemLoadingError));
},_loadChildrenFromWebService:function(d){if(!this._webServiceLoader){this._initializeWebServiceLoader();
}var c=new Sys.CancelEventArgs();
c._argument=null;
c.get_argument=function(){return this._argument;
};
c.set_argument=function(f){this._argument=f;
};
this.raiseEvent("itemsRequesting",c);
if(c.get_cancel()){return;
}var e={itemIndex:d,argument:c.get_argument()};
this._webServiceLoader.loadData(e);
},showLoadingSign:function(c){if(!this._loadingSign){var e=this._clipElement;
var f=document.createElement("div");
e.appendChild(f);
var d=f.style;
d.width="16px";
d.height="16px";
d.position="absolute";
d.left=Math.round(e.offsetWidth/2)-8+"px";
d.top=Math.round(e.offsetHeight/2)-8+"px";
Sys.UI.DomElement.addCssClass(f,"rrLoadingSign");
this._loadingSign=f;
}if(c){this._loadingSign.style.display="";
}else{this._loadingSign.style.display="none";
}},_onItemLoadingStarted:function(c,d){this._enableDisableAllButtonsUnconditionally(false);
this.showLoadingSign(true);
},_onItemLoadingSuccess:function(e,f){var h=f.get_data();
var g=this._itemsElement;
var c=g.children.length;
if(!this._firstLODRequestPassed&&c>0){g.innerHTML="";
var j=g.firstChild;
if(j&&g.removeChild){g.removeChild(j);
}}if(h&&h.length>0){for(var d=0;
d<h.length;
d++){this.addRotatorItem(h[d],c);
if(!this.isScrollingForward()){this._shiftItemInList();
}}this.repaint();
if(!this._firstLODRequestPassed){this._firstLODRequestPassed=true;
this._loadInitialFrame();
this._enableDisableAllButtonsUnconditionally(true);
this.raiseEvent("itemsRequested",Sys.EventArgs.Empty);
this._startAutomaticAdvance();
}else{this._enableDisableButtons();
this.raiseEvent("itemsRequested",Sys.EventArgs.Empty);
}}else{this._lastLODRequestPassed=true;
this._enableDisableButtons();
}this.showLoadingSign(false);
this._noActiveLODRequest=true;
if(this._animation&&!this._isRotatorTypeEnabled(a.RotatorType.ButtonsOver)){this._animation.play();
}},_onItemLoadingError:function(c,f){var d=f.get_message();
if(!d){d="No error data available";
}var e=new Telerik.Web.UI.RadRotatorErrorEventArgs(d);
this.raiseEvent("itemsRequestFailed",e);
if(!e.get_cancelErrorAlert()){alert("RadRotator items request failed :\n Exception="+d);
}this.showLoadingSign(false);
this._lastLODRequestPassed=true;
this._noActiveLODRequest=true;
this._enableDisableButtons();
if(this._animation&&!this._isRotatorTypeEnabled(a.RotatorType.ButtonsOver)){this._animation.play();
}},addRotatorItem:function(c,d){if(d<0){return;
}var g=this.get_containerElement();
var f=g.ownerDocument.createElement("li");
if(this._itemWidth){f.style.width=parseInt(this._itemWidth)+"px";
}if(this._itemHeight){f.style.height=parseInt(this._itemHeight)+"px";
}f.innerHTML=c.Html;
var h={cssClass:c.CssClass,visible:c.Visible};
var e=$create(a.RadRotatorItem,h,null,null,f);
f._item=e;
if(d>=g.children.length||d==null||this._isLODEnabled){g.appendChild(f);
Array.add(this.get_items(),e);
}else{g.insertBefore(f,g.childNodes[d]);
Array.insert(this.get_items(),d,e);
}if(!this._isLODEnabled){g.style.width="";
g.style.height="";
this.repaint();
}},_doLoadOnDemand:function(d){var c=this._loadNextFrame();
if(this._isLODEnabled&&this._noActiveLODRequest&&c){this._animation.stop();
d.set_cancel(true);
this._noActiveLODRequest=false;
this._enableDisableAllButtonsUnconditionally(false);
this._loadChildrenFromWebService(c);
return false;
}},_loadNextFrame:function(){var d=this._getCurrentItemIndex();
var c=this._getVisibleItemsCount();
var f=this.get_items().length;
var g=null;
var e=this.isScrollingForward()?d+c:d-1;
if(this.isViewportScrollMode()){e=this.isScrollingForward()?e+c-1:e-c+1;
}if(this._isLODEnabled&&!this.get_items()[e]){if(!this._lastLODRequestPassed){g=f;
}}return g;
},_getInvisibleParent:function(){var c=this.get_element();
while(c&&c!=document){if("none"==$telerik.getCurrentStyle(c,"display","")){return c;
}c=c.parentNode;
}return null;
},isVisible:function(){return(this._getInvisibleParent()==null);
},_fixVisibilityProblems:function(c){if(c){var d=this._getInvisibleParent();
if(d){this._onParentVisibilityChangeDelegate=Function.createDelegate(this,this._onParentVisibilityChange);
this._invisibleParent=d;
if($telerik.isIE){$addHandler(this._invisibleParent,"propertychange",this._onParentVisibilityChangeDelegate);
}else{this._invisibleParent.addEventListener("DOMAttrModified",this._onParentVisibilityChangeDelegate,false);
}}}else{if(this._invisibleParent&&this._onParentVisibilityChangeDelegate){if($telerik.isIE){$removeHandler(this._invisibleParent,"propertychange",this._onParentVisibilityChangeDelegate);
}else{this._invisibleParent.removeEventListener("DOMAttrModified",this._onParentVisibilityChangeDelegate,false);
}this._onParentVisibilityChangeDelegate=null;
this._invisibleParent=null;
}}},_onParentVisibilityChange:function(f){if($telerik.isIE){f=f.rawEvent;
if(!f){return;
}if(f.propertyName=="style.display"||f.propertyName=="className"){var c=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(c!="none"){this.repaint();
}}}else{if(f.attrName=="style"||f.attrName=="class"){var d=f.target;
if((f.currentTarget==f.originalTarget)&&"none"!=$telerik.getCurrentStyle(d,"display")){window.setTimeout(Function.createDelegate(this,function(){this.repaint();
}),0);
}}}this._fixVisibilityProblems(false);
},repaint:function(){this._createUI();
this._enableDisableButtons();
},get_webServiceSettings:function(){return this._webServiceSettings;
},set_webServiceSettings:function(d){var c=Sys.Serialization.JavaScriptSerializer.deserialize(d);
this._webServiceSettings=new a.WebServiceSettings(c);
},get_enabled:function(){return this._enabled;
},set_enabled:function(c){if(c!=this._enabled){this._enabled=c;
if(this.get_isInitialized()){if(c){this.start();
}else{this.stop();
}}}}};
b.registerControlProperties(a.RadRotator,{skin:"Default",pauseOnMouseOver:true,items:null,rotatorType:a.RotatorType.AutomaticAdvance,wrapFrames:true,scrollDirection:a.RotatorScrollDirection.Left+a.RotatorScrollDirection.Right,frameDuration:2000,controlButtons:{},initialItemIndex:0,slideShowAnimationSettings:{},animationDirection:a.RotatorScrollDirection.Left,enableRandomOrder:false});
b.registerControlEvents(a.RadRotator,["itemClicking","itemClicked","mouseOver","mouseOut","itemShowing","itemShown","load","buttonOver","buttonOut","buttonClick","itemsRequested","itemsRequestFailed","itemsRequesting"]);
a.RadRotator.registerClass("Telerik.Web.UI.RadRotator",a.RadWebControl);
a.RadRotatorEventArgs=function(c){a.RadRotatorEventArgs.initializeBase(this);
this._item=c;
};
a.RadRotatorEventArgs.prototype={get_item:function(){return this._item;
}};
a.RadRotatorEventArgs.registerClass("Telerik.Web.UI.RadRotatorEventArgs",Sys.EventArgs);
a.RadRotatorCancelEventArgs=function(c){a.RadRotatorCancelEventArgs.initializeBase(this);
this._item=c;
};
a.RadRotatorCancelEventArgs.prototype={get_item:function(){return this._item;
}};
a.RadRotatorCancelEventArgs.registerClass("Telerik.Web.UI.RadRotatorCancelEventArgs",Sys.CancelEventArgs);
a.RadRotatorButtonEventArgs=function(c){a.RadRotatorButtonEventArgs.initializeBase(this);
this._button=c;
};
a.RadRotatorButtonEventArgs.prototype={get_button:function(){return this._button;
}};
a.RadRotatorButtonEventArgs.registerClass("Telerik.Web.UI.RadRotatorButtonEventArgs",Sys.CancelEventArgs);
a.RadRotatorErrorEventArgs=function(c){a.RadRotatorErrorEventArgs.initializeBase(this);
this._cancelErrorAlert=false;
this._errorMessage=c;
};
a.RadRotatorErrorEventArgs.prototype={get_errorMessage:function(){return this._errorMessage;
},get_cancelErrorAlert:function(){return this._cancelErrorAlert;
},set_cancelErrorAlert:function(c){this._cancelErrorAlert=c;
}};
a.RadRotatorErrorEventArgs.registerClass("Telerik.Web.UI.RadRotatorErrorEventArgs",Sys.EventArgs);
a.RadRotatorItem=function(c){a.RadRotatorItem.initializeBase(this,[c]);
this._visible=null;
this._cssClass=null;
this._index=-1;
};
a.RadRotatorItem.prototype={initialize:function(){a.RadRotatorItem.callBaseMethod(this,"initialize");
this._tickers=null;
},dispose:function(){a.RadRotatorItem.callBaseMethod(this,"dispose");
},get_index:function(){if(this._index==-1){var d=0;
var e=this.get_element();
var c=e.parentNode;
if(null!=c){var f=$telerik.getChildrenByTagName(c,"li");
if(null!=f){for(d=0;
d<f.length&&f[d]!=e;
d++){}if(d==f.length){d=0;
}}}this._index=d;
}return this._index;
},get_visible:function(){return this._visible;
},set_visible:function(c){this._visible=c;
},get_cssClass:function(){return this._cssClass;
},set_cssClass:function(c){this._cssClass=c;
},get_tickers:function(){if(null==this._tickers&&typeof(a.RadTicker)!="undefined"){this._tickers=[];
for(var c=0,d=$telerik.radControls.length;
c<d;
c++){var e=$telerik.radControls[c];
if(a.RadTicker.isInstanceOfType(e)&&$telerik.isDescendant(this.get_element(),e.get_element())){Array.add(this._tickers,e.get_id());
}}}return this._tickers;
}};
a.RadRotatorItem.registerClass("Telerik.Web.UI.RadRotatorItem",Sys.UI.Control);
a.RadRotatorAnimationClass=function(){this._scrollAnimations={};
};
a.RadRotatorAnimationClass.prototype={get_scrollAnimationProperties:function(c){if(!c||!this._scrollAnimations[c]){return null;
}return this._scrollAnimations[c].properties;
},set_scrollAnimationProperties:function(d,c){if(!d){return;
}var e=this._scrollAnimations;
if(!e[d]){e[d]={};
}if(typeof(c)=="undefined"||c==null){delete e[d].properties;
}else{e[d].properties=c;
}},get_scrollAnimationOptions:function(c){if(!c){return null;
}var d=this._scrollAnimations;
var e=d[c]?d[c].options:{};
e=b.extend({},{xR:this.get_xRadius(c),yR:this.get_yRadius(c),xO:this.get_xCenter(c),yO:this.get_yCenter(c),minScale:this.get_minimumScale(c),xItemSpacing:this.get_xItemSpacing(c),yItemSpacing:this.get_yItemSpacing(c),selectedItemOffsetX:this.get_selectedItemOffsetX(c),selectedItemOffsetY:this.get_selectedItemOffsetY(c),matrix:this.get_matrix(c),reflectionHeight:this.get_reflectionHeight(c),reflectionOpacity:this.get_reflectionOpacity(c),coverFlowDirection:this.get_coverFlowDirection(c)},e);
return e;
},set_scrollAnimationOptions:function(c,e){if(!c){return;
}var d=this._scrollAnimations;
if(!d[c]){d[c]={};
}if(typeof(e)=="undefined"||e==null){delete d[c].options;
}var e=b.extend({},this.get_scrollAnimationOptions(),e);
d[c].options=e;
},get_xRadius:function(c){return this._getScrollAnimationOption(c,"xR");
},set_xRadius:function(c,d){this._setScrollAnimationOption(c,"xR",d);
},get_yRadius:function(c){return this._getScrollAnimationOption(c,"yR");
},set_yRadius:function(c,d){this._setScrollAnimationOption(c,"yR",d);
},get_xCenter:function(c){return this._getScrollAnimationOption(c,"xO");
},set_xCenter:function(d,c){this._setScrollAnimationOption(d,"xO",c);
},get_yCenter:function(c){return this._getScrollAnimationOption(c,"yO");
},set_yCenter:function(d,c){this._setScrollAnimationOption(d,"yO",c);
},get_minimumScale:function(c){return this._getScrollAnimationOption(c,"minScale");
},set_minimumScale:function(c,d){this._setScrollAnimationOption(c,"minScale",d);
},get_xItemSpacing:function(c){return this._getScrollAnimationOption(c,"xItemSpacing");
},set_xItemSpacing:function(d,c){this._setScrollAnimationOption(d,"xItemSpacing",c);
},get_yItemSpacing:function(c){return this._getScrollAnimationOption(c,"yItemSpacing");
},set_yItemSpacing:function(d,c){this._setScrollAnimationOption(d,"yItemSpacing",c);
},get_selectedItemOffsetX:function(c){return this._getScrollAnimationOption(c,"selectedItemOffsetX");
},set_selectedItemOffsetX:function(d,c){this._setScrollAnimationOption(d,"selectedItemOffsetX",c);
},get_selectedItemOffsetY:function(c){return this._getScrollAnimationOption(c,"selectedItemOffsetY");
},set_selectedItemOffsetY:function(d,c){this._setScrollAnimationOption(d,"selectedItemOffsetY",c);
},get_matrix:function(d){var c=this._getScrollAnimationOption(d,"matrix");
c=b.extend({},{m11:Number.NaN,m12:Number.NaN,m21:Number.NaN,m22:Number.NaN},c);
return c;
},set_matrix:function(d,c){this._setScrollAnimationOption(d,"matrix",c);
},get_reflectionHeight:function(c){return this._getScrollAnimationOption(c,"reflectionHeight");
},set_reflectionHeight:function(c,d){this._setScrollAnimationOption(c,"reflectionHeight",d);
},get_reflectionOpacity:function(c){return this._getScrollAnimationOption(c,"reflectionOpacity");
},set_reflectionOpacity:function(d,c){this._setScrollAnimationOption(d,"reflectionOpacity",c);
},get_coverFlowDirection:function(c){return this._getScrollAnimationOption(c,"coverFlowDirection");
},set_coverFlowDirection:function(d,c){this._setScrollAnimationOption(d,"coverFlowDirection",c);
},_getScrollAnimationOption:function(c,d){if(!c||!this._scrollAnimations[c]||!this._scrollAnimations[c].options){return Number.NaN;
}return this._scrollAnimations[c].options[d];
},_setScrollAnimationOption:function(c,d,f){if(!c){return;
}var e=this._scrollAnimations;
if(!e[c]){e[c]={};
}if(!e[c].options){e[c].options={};
}e[c].options[d]=f;
},_removeScrollAnimation:function(d){var c=this._scrollAnimations[d];
if(c){delete c.options;
delete c.properties;
c=null;
}delete this._scrollAnimations[d];
},getInstance:function(){return this;
}};
a.RadRotatorAnimationClass.registerClass("Telerik.Web.UI.RadRotatorAnimationClass",null);
if(!a.RadRotatorAnimation){a.RadRotatorAnimation=new a.RadRotatorAnimationClass();
}})();
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
