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});
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._currentItemIndex=0;
this._carouselItems=[];
this._initialAngle=(Math.PI/2);
this._carouselAnimationAngle=this._initialAngle;
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.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.get_containerElement(),"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._carouselItems=null;
a.RadRotatorAnimation.set_scrollAnimationOptions(this.get_id(),null);
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.get_containerElement(),"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 g=this.getItemHtmlElements();
var e=g.length;
var d=-1;
if(this.isCarousel()){if(e<1){return d;
}return this._currentItemIndex;
}else{var c=parseInt(g[0].parentNode.style.left),f="left";
if(isNaN(c)||c==0){c=parseInt(g[0].parentNode.style.top);
f="top";
}while(++d<e&&c<0){var h=$telerik.getOuterSize(g[d]);
c=c+(f=="top"?h.height:h.width);
}}return d;
},set_currentItemIndex:function(d){if(!this.get_enabled()||d<0){return;
}var j=this.get_items()[d];
if(!j){return;
}var i=this._itemsElement;
if(this.isCarousel()){this._changeCarouselAngleByIndex(d);
}else{var e=this._getCurrentItemIndex();
var k=parseInt(i.style.left);
var f=parseInt(i.style.top);
var g=(e-d);
var c=$telerik.getOuterSize(j.get_element());
var h=this.isVertical();
if(h){i.style.top=f+g*c.height+"px";
}else{i.style.left=k+g*c.width+"px";
}this._enableDisableButtons();
}},_changeCarouselAngleByIndex:function(l,c,g,e){var i=this._carouselItems;
var d=i.length;
if(d<1){return;
}if(l<0){l=0;
}else{if(l>(d-1)){l%=d;
}}this._currentItemIndex=l;
var h=(Math.PI*2)/d;
var j=c?b(i[0].element).attr("telerikCarouselAngle"):null;
var f=((typeof(j)!="undefined"&&j!=null)?j:this._initialAngle)-l*h;
var k=this._animation;
if(k){k.set_angle(f);
}else{this._carouselAnimationAngle=f;
}var m=this._getScrollAnimationOptions(g,e);
b.each(i,function(v,t){var n=this;
var q=Math.sin(f);
var u=m.minScale;
var p=u+(q+1)*((1-u)/2);
var o=m.xO+(((Math.cos(f+Math.PI)*m.xR)-n.width/2)*p);
var r=m.yO+((q*m.yR)*p);
var s=this.element;
s.telerikCarouselAngle=f;
var w="px";
b(s).css({width:n.width*p+w,height:n.height*p+w,position:"absolute",left:o+w,top:r+w,zIndex:parseInt(p*100)});
f+=h;
});
},_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 e=(this.get_frameDuration()<5?"easeLinear":null);
var d;
var c=this.isCarousel();
if(c){d=new a.Animations.jCarousel(this,this._itemsElement,this._carouselItems,this.get_scrollDuration(),this._getScrollAnimationOptions(),e);
d.set_angle(this._carouselAnimationAngle);
}else{d=new a.Animations.jMove(this,this._itemsElement,this.get_scrollDuration(),true,false,e);
}d.initialize();
d.set_isCyclic(this.isAutomaticAdvance()||this._isRotatorTypeEnabled(a.RotatorType.ButtonsOver));
this._animation=d;
}return this._animation;
},_getScrollAnimationOptions:function(g,h){var f=g;
var e=h;
if(!f||!e){var c=$telerik.getContentSize(this._clipElement);
f=f?f: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.xR=isNaN(d.xR)?parseInt(f/2.3):d.xR;
d.yR=isNaN(d.yR)?parseInt(e/6):d.yR;
d.xO=isNaN(d.xO)?parseInt(f/2):d.xO;
d.yO=isNaN(d.yO)?parseInt(d.minScale*((e-(1-d.minScale)*d.yR)/2)):d.yO;
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()){return this._scrollCarouselItem();
}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();
},_scrollCarouselItem:function(){if(!this._animation){var c=this._animation=this._getMoveAnimation();
c.add_started(Function.createDelegate(this,function(i,n){var f=this.get_currentItem();
var l=new a.RadRotatorCancelEventArgs(f);
this.raiseEvent("itemShowing",l);
if(l.get_cancel&&l.get_cancel()){n.set_cancel(true);
return false;
}var j=this._getNextItemToShow();
if(!j){return;
}this._firstItem=j;
var m=this.getItemHtmlElements();
var h=(m.length>0)?((Math.PI*2)/m.length):0;
var d=(this.isScrollingForward()?-1:1)*h;
var g=this._animation.get_angle()+d;
var e=this._initialAngle;
if(g>=e+Math.PI*2+h||g<=e-Math.PI*2-h){g=e+d;
}var k=g-d;
b(m).each(function(p,o){o.telerikCarouselAngle=k;
k+=h;
});
this._animation.set_angle(g);
}));
c.add_ended(Function.createDelegate(this,function(){var e=this._itemsElement;
if(!e||!e.parentNode){return;
}if(b(e).children("li:animated").length>1){return;
}var d=this._currentItemIndex+(this.isScrollingForward()?1:(-1));
var f=this.getItemHtmlElements().length-1;
if(d<0){d=f;
}else{if(d>f){d=0;
}}this._currentItemIndex=d;
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]);
}}},_loadCarouselFrames:function(){var c=this.get_initialItemIndex();
if(c>=0&&!this._initialItemSet){this.raiseEvent("itemShown",new a.RadRotatorEventArgs(this.get_items()[c]));
}this._initialItemSet=true;
},_loadInitialFrame:function(){if(this.isCarousel()){return this._loadCarouselFrames();
}this._shuffleFrames();
var i=this.get_defaultAnimationDirection();
var h=a.RotatorScrollDirection;
var l=this.isVertical();
var g=this._itemsElement;
var c=$telerik.getOuterSize(g);
var k=$telerik.getContentSize(this._clipElement);
var d=0;
var e=0;
var m=this.get_initialItemIndex();
if(m>=0){if(l){e=(i==h.Up)?0:-c.height+k.height;
}else{d=(i==h.Left)?0:-c.width+k.width;
}}else{if(m==-1){if(l){e=(i==h.Down)?-c.height:k.height;
}else{d=(i==h.Right)?-c.width:k.width;
}}}g.style.left=d+"px";
g.style.top=e+"px";
if(m>0&&!this._initialItemSet){for(var f=0;
f<m;
f++){this._shiftItemInList();
}g.style.left=d+"px";
g.style.top=e+"px";
}if(!this._initialItemSet&&m>=0){this.raiseEvent("itemShown",new a.RadRotatorEventArgs(this.get_items()[m]));
}this._initialItemSet=true;
},_setCarouselItems:function(){if(this._carouselItems.length>0){return;
}var l=this.getItemHtmlElements();
var c=this._itemWidth;
var k=this._itemHeight;
var m=c&&k;
var f=[];
for(var d=0,g=l.length;
d<g;
d++){var n=l[d];
var j=parseInt(c);
var e=parseInt(k);
if(!m){n.style.cssFloat="left";
var h=$telerik.getOuterSize(n);
n.style.cssFloat="";
j=j?j:h.width;
e=e?e:h.height;
}f[d]={element:n,width:j,height:e};
}this._carouselItems=f;
},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)){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.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));
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)){$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._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)){return true;
}return false;
},isCarousel:function(){var c=a.RotatorType;
if(this._isRotatorTypeEnabled(c.Carousel)||this._isRotatorTypeEnabled(c.CarouselButtons)){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 c=this.get_rotatorType();
if(c==a.RotatorType.AutomaticAdvance||c==a.RotatorType.Carousel){return;
}var d=this.get_wrapFrames();
var e=this.isCarousel();
var f=a.RotatorScrollDirection;
this._enableButton(this._rightButton,d||e||this._canSlideMore(f.Left));
this._enableButton(this._leftButton,d||e||this._canSlideMore(f.Right));
this._enableButton(this._downButton,d||e||this._canSlideMore(f.Up));
this._enableButton(this._upButton,d||e||this._canSlideMore(f.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(h){if(null==h){h=this.get_animationDirection();
}var i=false;
var e=this._itemsElement;
var f=this._clipElement;
var k=a.RotatorScrollDirection;
var j=parseInt(e.style.left);
var g=parseInt(e.style.top);
var c=$telerik.getBounds(e);
var d=$telerik.getBounds(f);
if(h==k.Left){i=(c.width+j)>d.width;
}else{if(h==k.Up){i=(c.height+g)>d.height;
}else{if(h==k.Right){i=(j<0);
}else{if(h==k.Down){i=(g<0);
}}}}return i;
},_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._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 k=this.get_element();
var j=this._relativeWrapper;
if(!k){return;
}if(!this._isCreated){this._fixRootElementSize();
j.style.height=k.offsetHeight+"px";
j.style.width=k.offsetWidth+"px";
var n=true;
if(this._isRotatorTypeEnabled(a.RotatorType.Buttons)||this._isRotatorTypeEnabled(a.RotatorType.ButtonsOver)||this._isRotatorTypeEnabled(a.RotatorType.SlideShowButtons)||this._isRotatorTypeEnabled(a.RotatorType.CarouselButtons)){n=this._initializeButtonsRotatorType();
}if(n){Sys.UI.DomElement.addCssClass(k,"rrNoBorder");
}this._isCreated=true;
}if(this.get_vertical()){this.set_vertical(true);
}j.style.overflow="auto";
var d=this._clipElement;
d.style.overflow="auto";
var h=this._itemsElement;
if(this._isLODEnabled){h.style.width="";
h.style.height="";
}var l=10000;
try{l=1000+h.offsetWidth*$telerik.getChildrenByTagName(h,"li").length;
}catch(m){l=10000;
}d.style.width=Math.max(l,10000)+"px";
d.style.height="10000px";
var l=j.style.width;
var c=j.style.height;
var g=this.get_vertical()?j.style.width:h.offsetWidth+"px";
var f=h.offsetHeight+"px";
var i=this.isCarousel();
if(i){g=l;
f=c;
this._setCarouselItemsSize(l,c);
}h.style.width=g;
h.style.height=f;
j.style.overflow="";
d.style.width=l;
d.style.height=c;
d.style.overflow="hidden";
d.style.position="relative";
h.style.position="relative";
k.style.visibility="visible";
},_setCarouselItemsSize:function(l,m){this._shuffleFrames();
var g=this._itemsElement;
var f=this._carouselItems;
var k=(f.length>0);
var c=(this._itemWidth&&this._itemHeight);
if(!c&&!k){var j=b(g).find("img");
if(!c&&j.length<=0){return;
}for(var d=0,n=j.length;
d<n;
d++){var h=j[d];
if((h.width===undefined)||((h.complete!==undefined)&&!h.complete)){this._pendingImage=h;
this._imageOnLoadDelegate=Function.createDelegate(this,function(){this._setCarouselItemsSize(l,m);
});
$telerik.addExternalHandler(h,"load",this._imageOnLoadDelegate);
return;
}else{if(this._pendingImage&&this._pendingImage===h&&this._imageOnLoadDelegate){$telerik.removeExternalHandler(h,"load",this._imageOnLoadDelegate);
this._pendingImage=null;
this._imageOnLoadDelegate=null;
}}}}this._setCarouselItems();
this._changeCarouselAngleByIndex(this.get_initialItemIndex(),true,parseInt(l),parseInt(m));
var e=this.getItemHtmlElements();
b(e).children("div").css({width:"100%",height:"100%"}).children("img").css({width:"100%",height:"100%"});
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="";
}},_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;
},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(c){if(!this._webServiceLoader){this._initializeWebServiceLoader();
}var d={itemIndex:c};
this._webServiceLoader.loadData(d);
},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();
},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"]);
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_scrollAnimationOptions:function(d){if(!d){return null;
}var c=this._scrollAnimations[d];
c=b.extend({},{xR:this.get_xRadius(d),yR:this.get_yRadius(d),xO:this.get_xCenter(d),yO:this.get_yCenter(d),minScale:this.get_minimumScale(d)},c);
if(!this._scrollAnimations[d]){this._scrollAnimations[d]=c;
}return c;
},set_scrollAnimationOptions:function(c,d){if(!c){return null;
}if(typeof(d)=="undefined"||d==null){delete this._scrollAnimations[c];
}var d=b.extend({},this.get_scrollAnimationOptions(),d);
this._scrollAnimations[c]=d;
},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);
},_getScrollAnimationOption:function(c,d){if(!this._scrollAnimations[c]){return Number.NaN;
}return this._scrollAnimations[c][d];
},_setScrollAnimationOption:function(c,d,e){if(!c){return;
}if(!this._scrollAnimations[c]){this._scrollAnimations[c]={};
}this._scrollAnimations[c][d]=e;
},_removeScrollAnimation:function(c){delete this._scrollAnimations[c];
},getInstance:function(){return this;
}};
a.RadRotatorAnimationClass.registerClass("Telerik.Web.UI.RadRotatorAnimationClass",null);
if(!a.RadRotatorAnimation){a.RadRotatorAnimation=new a.RadRotatorAnimationClass();
}})();
