PageSourceSearch

http://www.anpfiff.info/Telerik/Scripts/Rotator/RadRotator.js

js anpfiff.info collected 2026-10-02 07:20:30 UTC 73,435 bytes, 1,630 lines download raw bytes

1(function(a,D){Type.registerNamespace("Telerik.Web.UI");
2var b=Telerik.Web.UI;
3var l=b.EventType;
4var m=window;
5var j=m.document;
6var c=m.$telerik;
7var w=m.Math;
8var A=a.proxy;
9var k="";
10var z="px";
11var B=".telerikRotator";
12var g=Function.createDelegate;
13c.toRotator=function(E){return E;
14};
15c.findRotator=$find;
16a.registerEnum(b,"RotatorScrollDirection",{Left:1,Right:2,Up:4,Down:8});
17a.registerEnum(b,"RotatorAnimationType",{None:1,Fade:2,Pulse:3,CrossFade:4});
18a.registerEnum(b,"RotatorType",{AutomaticAdvance:1,ButtonsOver:2,Buttons:3,SlideShow:4,SlideShowButtons:5,FromCode:6,Carousel:7,CarouselButtons:8,CoverFlow:9,CoverFlowButtons:10});
19b.RadRotator=function(E){var F=this;
20b.RadRotator.initializeBase(F,[E]);
21F._enabled=true;
22F._postBackReference=null;
23F._webServiceSettings=new b.WebServiceSettings({});
24F._webServiceLoader=null;
25F._containerElement=null;
26F._clickDelegate=null;
27F._mouseOutDelegate=null;
28F._mouseOverDelegate=null;
29F._itemShownDelegate=null;
30F._rotatorDisposed=false;
31F._scrollDuration=500;
32F._canPause=true;
33F._domScrollSpeed=0.6;
34F._itemWidth=null;
35F._itemHeight=null;
36F._isLODEnabled=null;
37F._lastLODRequestPassed=false;
38F._firstLODRequestPassed=false;
39F._noActiveLODRequest=true;
40F._relativeWrapper=null;
41F._clipElement=null;
42F._itemsElement=null;
43F._loadingSign=null;
44F._rightButton=null;
45F._leftButton=null;
46F._downButton=null;
47F._upButton=null;
48F._firstItem=null;
49F._imageItems=[];
50F._initialAngle=(w.PI/2);
51F._carouselAnimationAngle=F._initialAngle;
52F._coverFlowAnimationIndex=-1;
53F._pendingImage=null;
54F._imageOnLoadDelegate=null;
55F._automaticAdvanceStarted=false;
56F._nextItemIndex=-1;
57F._persistedItemIndex=-1;
58F._isMouseOverClipElement=false;
59F._clientDataSourceID=k;
60F._clientTemplate=k;
61F._clientDataSource=null;
62F._dataSource=null;
63F._ieTouchActionManager=new b.Helpers.IETouchActionManager();
64F._dragHandler=A(F._onDrag,F);
65F._dragEndHandler=A(F._onDragEnd,F);
66};
67b.RadRotator.prototype={initialize:function(){b.RadRotator.callBaseMethod(this,"initialize");
68this._rotatorDisposed=false;
69this._isLODEnabled=!this.isCarousel()&&!this.isCoverFlow()&&this.get_webServiceSettings().get_method();
70this._setChildElements();
71this._createUI();
72var E=this.get_initialItemIndex();
73if(this._isLODEnabled){this._enableDisableAllButtonsUnconditionally(false);
74this._loadChildrenFromWebService(E);
75}else{this._createChildItems();
76this._initialItemSet=false;
77this._loadInitialFrame();
78this._enableDisableButtons();
79}this._attachEventHandlers(true);
80this.add_parentShown(this.get_element());
81if(c.isSafari){this._mouseWheelDelegate=g(this,this._mouseWheelHandler);
82$addHandler(this._relativeWrapper,"mousewheel",this._mouseWheelDelegate);
83}this.raiseEvent("load",Sys.EventArgs.Empty);
84if(!this._isLODEnabled){this._startAutomaticAdvance();
85}this._itemShownHandler();
86if(this._persistedItemIndex!=-1){this.set_currentItemIndex(this._persistedItemIndex);
87}if(this.get_enableDragScrolling()&&c.isTouchDevice&&Telerik.Web.Browser.scrollBarWidth==0){Sys.UI.DomElement.addCssClass(this.get_element(),"rrTouchEnabled");
88}},dispose:function(){var E=this;
89if(this._imageOnLoadDelegate&&this._pendingImage){c.removeExternalHandler(this._pendingImage,"load",this._imageOnLoadDelegate);
90this._pendingImage=null;
91this._imageOnLoadDelegate=null;
92}this._firstItem=null;
93this._previousCrossFadeItems=this._currentCrossFadeItems=null;
94this._rotatorDisposed=true;
95this._attachEventHandlers(false);
96this._containerElement=null;
97if(this._animation){if(this._animation.dispose){this._animation.dispose();
98}this._animation=null;
99}this._imageItems=null;
100b.RadRotatorAnimation._removeScrollAnimation(this.get_id());
101if(this._rightButton){$clearHandlers(this._rightButton);
102}if(this._leftButton){$clearHandlers(this._leftButton);
103}if(this._downButton){$clearHandlers(this._downButton);
104}if(this._upButton){$clearHandlers(this._upButton);
105}if(c.isSafari){if(this._mouseWheelDelegate&&this._relativeWrapper){$removeHandler(this._relativeWrapper,"mousewheel",this._mouseWheelDelegate);
106}}if(this._itemsElement){$clearHandlers(this._itemsElement);
107}E._ieTouchActionManager.dispose();
108b.RadRotator.callBaseMethod(this,"dispose");
109},saveClientState:function(){return this.get_persistCurrentItemOnPostBack()?'{"currentItemIndex":'+this.get_currentItemIndex()+"}":null;
110},get_currentItemIndex:function(){var E=this.get_currentItem();
111return E?E.get_index():-1;
112},_createChildItems:function(){var G=this;
113var E=c.getChildrenByTagName(G.get_containerElement(),"li");
114for(var F=0;
115F<E.length;
116F++){var H=$create(b.RadRotatorItem,G.get_items()[F],null,null,E[F]);
117H.get_index();
118E[F]._item=H;
119G.get_items()[F]=H;
120}G._createClientDataBoundItems();
121},_createClientDataBoundItems:function(){var E=this;
122if(E._clientDataSourceID){E._dataBindToClientDataSource();
123}else{E._dataBindToCustomDataSource();
124}},_dataBindToClientDataSource:function(){var F=this,E=F.get_clientDataSource();
125if(E){F._initializeClientDataSource(E);
126}else{this._initializeClientDataSourceDelegate=g(this,this._initializeClientDataSourceHandler);
127Sys.Application.add_load(this._initializeClientDataSourceDelegate);
128}},_initializeClientDataSourceHandler:function(){var E=this;
129E._initializeClientDataSource(E.get_clientDataSource());
130if(E._initializeClientDataSourceDelegate){Sys.Application.remove_load(E._initializeClientDataSourceDelegate);
131E._initializeClientDataSourceDelegate=null;
132}},_dataBindToCustomDataSource:function(){var F=this,E=F.get_dataSource();
133if(E){F.dataBind();
134}},_initializeClientDataSource:function(E){var F=this;
135if(E&&(E instanceof b.RadClientDataSource)){F._clientDataSource=E;
136F._bindToClientDataSourceChangeEvent();
137F._clientDataSource.fetch();
138}},_bindToClientDataSourceChangeEvent:function(){var F=this,E=F.get_clientDataSource();
139if(E&&(E instanceof b.RadClientDataSource)){if(!F._clientDataSourceChangeDelegate){F._clientDataSourceChangeDelegate=g(F,F._clientDataSourceChangeHandler);
140}E.remove_change(F._clientDataSourceChangeDelegate);
141E.add_change(F._clientDataSourceChangeDelegate);
142}},_clientDataSourceChangeHandler:function(){var G=this,E=G.get_clientDataSource();
143if(E){var F=E._kendoDataSource.view();
144G.set_dataSource(F);
145G.dataBind();
146}},dataBind:function(){var G=this,E=G.get_containerElement(),F=G.get_dataSource();
147if(!G.get_appendClientDataBoundItems()){G.clearItems();
148G.start();
149}if(F){G.repaint();
150G._createDataBoundItems(F);
151E.style.width="";
152E.style.height="";
153G.repaint();
154}},set_dataSource:function(E){var F=this;
155F._dataSource=E;
156},get_dataSource:function(){var E=this;
157return E._dataSource;
158},_createDataBoundItems:function(E){var H=this,F=E.length;
159for(var G=0;
160G<F;
161G++){H._createDataBoundItem(E[G]);
162}H._raiseDataBound();
163},_createDataBoundItem:function(F){var H=this,I=null,G=null,E=null;
164I=H._initializeRotatorDataItem(F);
165G=H._createRotatorItem(I);
166H._raiseItemDataBound(G,F);
167E=H.get_currentItemIndex();
168H.set_currentItemIndex(E);
169},_initializeRotatorDataItem:function(F){var G=this;
170var H={CssClass:F.CssClass,Visible:F.Visible};
171var E=b.TemplateRenderer.renderTemplate(F,G);
172if(E){H.Html=E;
173}return H;
174},_raiseItemDataBound:function(H,E){var G=this;
175G._itemDataBoundHandler=G.get_events().getHandler(p);
176if(H&&G._itemDataBoundHandler){var F=new b.RotatorItemDataBoundEventArgs(H,E);
177G.raiseEvent(p,F);
178}},_raiseDataBound:function(){this.raiseEvent(i,Sys.EventArgs.Empty);
179},get_clientDataSourceID:function(){return this._clientDataSourceID;
180},set_clientDataSourceID:function(E){this._clientDataSourceID=E;
181},get_clientDataSource:function(){var F=this,E=$find(F.get_clientDataSourceID());
182if(E&&(E instanceof b.RadClientDataSource)){return E;
183}return null;
184},get_clientTemplate:function(){return this._clientTemplate;
185},set_clientTemplate:function(E){this._clientTemplate=E;
186},_mouseWheelHandler:function(E){this._customSafariScroll(E.rawEvent.wheelDeltaX,E.rawEvent.wheelDeltaY);
187E.preventDefault();
188},_customSafariScroll:function(H,I){var F=H!=0?"Left":I!=0?"Top":null;
189if(!F){return;
190}var G=H||I;
191var E=this._domScrollSpeed*G;
192this._customDomScrollBy(-E,F);
193},_customDomScrollBy:function(H,E){var I="scroll"+E;
194for(var G=this._relativeWrapper;
195G&&G.tagName;
196G=G.parentNode){var F=G[I];
197G[I]+=H;
198if(G[I]!=F){return;
199}}},_getNextItemToShow:function(){var E=this._nextItemIndex;
200var G=this.getItemHtmlElements();
201var F=this.isCarousel()||(this.get_wrapFrames()&&!this.isCoverFlow());
202var H=null;
203if(E<0){E=this._getCurrentItemIndex();
204if(this.isScrollingForward()){E++;
205}else{E--;
206}if(F){if(E<0){E=G.length-1;
207}else{if(E>G.length-1){E=0;
208}}}if(E>=0&&E<G.length){H=G[E];
209}}else{if(F){E=E%G.length;
210}if(E>
210=0&&E<G.length){H=this.get_items()[E].get_element();
211}}return H;
212},_startAutomaticAdvance:function(){if(this.isAutomaticAdvance()&&!isNaN(this.get_frameDuration())){this._automaticAdvanceTimeOut=window.setTimeout(g(this,this._startAutoPlayItems),this.get_frameDuration());
213}},get_firstItem:function(){var E=this._firstItem;
214if(!E){var F=this.getItemHtmlElements();
215E=this.isScrollingForward()?F[0]:F[F.length-1];
216}return E;
217},get_currentItem:function(){var F=this.getItemHtmlElements();
218var E=this._getCurrentItemIndex();
219return((0<=E&&E<F.length)?F[E].control:null);
220},_getCurrentItemIndex:function(){var L=this.getItemHtmlElements();
221var K=L.length;
222var H=-1;
223if(K<1){return -1;
224}var I=this.isCarousel();
225if(I||this.isCoverFlow()){var F=this._animation;
226if(!F){H=this.get_initialItemIndex();
227}else{if(I){var E=F.get_angle()-this._initialAngle;
228H=w.round(w.abs(E)/((w.PI*2)/K));
229if(E>0&&H>0){H=K-H;
230}H%=K;
231}else{H=F.get_index();
232}}}else{var M=parseInt(L[0].parentNode.style.left,10),G="left";
233if(isNaN(M)||M==0){M=parseInt(L[0].parentNode.style.top,10);
234G="top";
235}while(++H<K&&M<0){var J=c.getOuterSize(L[H]);
236M=M+(G=="top"?J.height:J.width);
237}}return H;
238},set_currentItemIndex:function(L,E){var Q=this.get_items();
239if(!this.get_enabled()||L<0||L>=Q.length){return;
240}var R=Q[L];
241if(!R){return;
242}var M=this.isCarousel();
243var N=this.isCoverFlow();
244if(E&&(M||N)){var F=this._animation;
245if(F&&this.get_pauseOnMouseOver()){F._isPaused=false;
246F._isPlaying=true;
247F._getAnimationQuery().filter("[paused='true']").removeAttr("paused").removeAttr("elapsedTime");
248F.stop();
249}this._nextItemIndex=L;
250this.scrollItem();
251this._nextItemIndex=-1;
252}else{if(M){this._changeCarouselAngleByIndex(L);
253if(!this._animation){this.set_currentItemIndex(L,true);
254}}else{if(N){this._changeCoverFlowIndexByIndex(L);
255if(!this._animation){this.set_currentItemIndex(L,true);
256}}else{var S=R.get_element();
257var W=this.get_wrapFrames();
258if(W){var U=this.getItemHtmlElements();
259for(var K=0,T=U.length;
260K<T;
261K++){if(S===U[K]){L=K;
262break;
263}}}var V=this._itemsElement;
264var G=this._getCurrentItemIndex();
265var H=parseInt(V.style.left,10)||0;
266var I=parseInt(V.style.top,10)||0;
267var J=(G-L);
268var P=c.getOuterSize(S);
269var O=this.isVertical();
270if(this.get_slideShowAnimationSettings().type==b.RotatorAnimationType.CrossFade){this._resetCrossFadeAnimation();
271}if(O){V.style.top=I+J*P.height+"px";
272}else{V.style.left=H+J*P.width+"px";
273}if(W){this._fillEmptyVisibleItems(L);
274}this.raiseEvent("itemShown",new b.RotatorEventArgs(R));
275}}}if(!M){this._enableDisableButtons();
276}this.updateClientState();
277},_fillEmptyVisibleItems:function(E){var G=this.getItemHtmlElements().length,H=w.min(this._getVisibleItemsCount(),G),F=parseInt(H-G+E,10);
278if(!isNaN(F)){while(F-->0){this._shiftItemInList();
279}}},_changeCarouselAngleByIndex:function(K,I,R,J){var H=this._imageItems;
280var M=H.length;
281if(M<1){return;
282}if(K<0){K=0;
283}else{if(K>(M-1)){K%=M;
284}}var O=(w.PI*2)/M;
285var L=I?a(H[0].element).attr("telerikCarouselAngle"):null;
286var E=((typeof(L)!="undefined"&&L!=null)?L:this._initialAngle)-K*O;
287if(E.toString().indexOf("e")>-1){E=(w.round(E*10000)/10000);
288}var F=this._animation;
289if(F){F.set_angle(E);
290}else{this._carouselAnimationAngle=E;
291}var G=b.RadRotatorAnimation.get_scrollAnimationProperties(this.get_id());
292var Q=/^([\d+-.]+)(.*)$/;
293var P=!a.support.opacity&&(G&&G.opacity!=null);
294var N=this._getScrollAnimationOptions(R,J);
295a.each(H,function(U,ab){var Z=this;
296var Y=w.sin(E);
297var V=N.minScale;
298var X=V+(Y+1)*((1-V)/2);
299var ac=N.xO+(((w.cos(E+w.PI)*N.xR)-Z.outerWidth/2)*X);
300var ad=N.yO+((Y*N.yR)*X);
301var S=a.extend({},G);
302if(G){a.each(S,function(ae,ag){var af=Q.exec(ag);
303S[ae]=af?(af[1]*X+af[2]):ag;
304});
305}var T=this.element;
306T.telerikCarouselAngle=E;
307var aa="px";
308var W=a.extend(S,{width:Z.width*X+aa,height:Z.height*X*(P&&this.reflection?2:1)+aa,position:"absolute",left:ac+aa,top:ad+aa,zIndex:parseInt(X*100,10)});
309a(T).css("display","none").css(W).css("display","");
310E+=O;
311if(E.toString().indexOf("e")>-1){E=(w.round(E*10000)/10000);
312}});
313},_getTransformProperty:function(){var E="transform";
314if(c.isIE9Mode){E="msTransform";
315}else{if(c.isIE){E="filter";
316}else{if(c.isFirefox){E="MozTransform";
317}else{if(c.isSafari){E="WebkitTransform";
318}else{if(c.isOpera){E="OTransform";
319}}}}}return E;
320},_changeCoverFlowIndexByIndex:function(J,S,I){var H=this._imageItems;
321var L=H.length;
322if(L<1){return;
323}if(J<0){J=0;
324}else{if(J>(L-1)){J%=L;
325}}var E=this._animation;
326if(E){E.set_index(J);
327}else{this._coverFlowAnimationIndex=J;
328}var G=b.RadRotatorAnimation.get_scrollAnimationProperties(this.get_id());
329var R=/^([\d+-.]+)(.*)$/;
330var M=this._getScrollAnimationOptions(S,I);
331var K=this.isVertical();
332var N=H[J];
333var O={top:M.yO-N.outerHeight/2,right:M.xO+N.outerWidth/2,bottom:M.yO+N.outerHeight/2,left:M.xO-N.outerWidth/2};
334var F=M.matrix;
335if(F.m11==1&&F.m22==1&&F.m12==0&&F.m21==0){F=null;
336}var Q=this._getTransformProperty();
337var P=("filter"==Q)&&F;
338a.each(H,function(Z,am){var af=this;
339var T=(Z-J);
340var Y=(T==0);
341var ae=Y?1:M.minScale;
342var X=(T>0);
343var an=K?(M.xO+af.outerWidth/2-af.outerWidth*ae):(O[X?"right":"left"]);
344var ao=K?(O[X?"bottom":"top"]):(M.yO+af.outerHeight/2-af.outerHeight*ae);
345var ac=T;
346if(ac>0){if(K){ao+=M.yR+(--ac*M.yItemSpacing);
347}else{an+=M.xR+(--ac*M.xItemSpacing);
348}}else{if(ac<0){if(K){ao+=-(M.yR+af.outerHeight*ae)+(++ac*M.yItemSpacing);
349}else{an+=-(M.xR+af.outerWidth*ae)+(++ac*M.xItemSpacing);
350}}else{an+=M.selectedItemOffsetX;
351ao+=M.selectedItemOffsetY;
352}}var U=a.extend({},G);
353if(G&&!Y){a.each(U,function(ap,ar){var aq=R.exec(ar);
354U[ap]=aq?(aq[1]*ae+aq[2]):ar;
355});
356}var al="px";
357var ad=a.extend(U,{width:af.width*ae+al,height:af.height*ae*(P&&this.reflection?2:1)+al,position:"absolute",zIndex:((L-w.abs(T))*100)});
358var ah=0;
359var aj=0;
360if(F){var aa=a.extend({},F);
361var ab=Y?0:(T<0?-1:1);
362aa.m12*=ab;
363aa.m21*=ab;
364if(Y){aa.m11=aa.m22=1;
365}var W=("filter"==Q);
366var ag="matrix("+aa.m11+", "+aa.m21+", "+aa.m12+", "+aa.m22+", 0, 0)";
367if(W){ag="progid:DXImageTransform.Microsoft.Matrix(FilterType='bilinear',M11="+aa.m11+", M12="+aa.m12+", M21="+aa.m21+", M22="+aa.m22+",sizingMethod='auto expand')";
368}ad[Q]=ag;
369var ai=w.abs(aa.m11)+w.abs(aa.m12);
370var ak=w.abs(aa.m21)+w.abs(aa.m22);
371if(!K){ah=ab*((1-ai)/2);
372}else{aj=ab*((1-ak)/2);
373}if(W&&!Y){ah+=(ai-1)/2;
374aj+=(ak-1)/2;
375if(F.m12&&this.reflection){ah*=2;
376}}}ad.left=an-ah*ae*af.outerWidth+al;
377ad.top=ao-aj*ae*af.outerHeight+al;
378var V=this.element;
379V.telerikCoverFlowIndex=T;
380a(V).css("display","none").css(ad).css("display","");
381});
382},_needsShift:function(H){if(null==H){H=this.get_animationDirection();
383}var K=this._itemsElement;
384var N=this._clipElement;
385var L=parseInt(K.style.left,10);
386var M=parseInt(K.style.top,10);
387var J=c.getOuterSize(K);
388var O=c.getContentSize(N);
389var F=this.get_firstItem();
390if(!F){return false;
391}var G=c.getOuterSize(F);
392var E=false;
393var I=b.RotatorScrollDirection;
394switch(H){case I.Left:E=L+J.width<O.width+G.width;
395break;
396case I.Up:E=M+J.height<O.height+G.height;
397break;
398case I.Right:E=L*-1<G.width;
399break;
400case I.Down:E=M*-1<G.height;
401break;
402}return E;
403},_getMoveAnimation:function(){if(!this._animation){var F=this.isCarousel();
404var E=(this.get_frameDuration()<5?"easeLinear":null);
405var G;
406if(F||this.isCoverFlow()){G=new b.Animations[F?"jCarousel":"jCoverFlow"](this,this._itemsElement,this._imageItems,this.get_scrollDuration(),this._getScrollAnimationOptions(),b.RadRotatorAnimation.get_scrollAnimationProperties(this.get_id()),E);
407if(F){G.set_angle(this._carouselAnimationAngle);
408}else{G.set_index(this._coverFlowAnimationIndex==-1?this.get_initialItemIndex():this._coverFlowAnimationIndex);
409}}else{G=new b.Animations.jMove(this,this._itemsElement,this.get_scrollDuration(),true,false,E);
410}G.initialize();
411G.set_isCyclic(this.isAutomaticAdvance()||this._isRotatorTypeEnabled(b.RotatorType.ButtonsOver));
412this._animation=G;
413}return this._animation;
414},_initializeAnimationHandlers:function(E){this._animation.add_started(E.started);
415this._animation.add_ended(E.ended);
416if(this._isPaused){this._animation.pause();
417}},_getScrollAnimationOptions:function(F,E){var J=F;
418var I=E;
419if(!J||!I){var K=c.getContentSize(this._clipElement);
420J=J?J:K.width;
421I=I?I:K.height;
422}var H=b.RadRotatorAnimation.get_scrollAnimationOptions(this.get_id());
423H.minScale=(isNaN(H.minScale)||H.minScale<0||H.minScale>1)?0.5:H.minScale;
424H.reflectionHeight=isNaN(H.reflectionHeight)?0:H.reflectionHeight;
425H.reflectionOpacity=isNaN(H.reflectionOpacity)?1:H.reflectionOpacity;
426H.xO=isNaN(H.xO)?parseInt(J/2,10):H.xO;
427if(this.isCarousel()){H.xR=isNaN(H.xR)?parseInt(J/2.3,10):H.xR;
428H.yR=isNaN(H.yR)?parseInt(I/6,10):H.yR;
429H.yO=isNaN(H.yO)?parseInt(H.minScale*((I-(1-H.minScale)*H.yR)/2),10):H.yO;
430H.matrix=null;
431}else{if(this.isCoverFlow()){var G=this.isVertical();
432H.xR=isNaN(H.xR)?(G?0:15):H.xR;
433H.yR=isNaN(H.yR)?(G?15:0):H.yR;
434H.yO=isNaN(H.yO)?parseInt(I/2,10):H.yO;
435H.xItemSpacing=isNaN(H.xItemSpacing)?(G?0:100):H.xItemSpacing;
436H.yItemSpacing=isNaN(H.yItemSpacing)?(G?100:0):H.yItemSpacing;
437H.selectedItemOffsetX=isNaN(H.selectedItemOffsetX)?0:H.selectedItemOffsetX;
438H.selectedItemOffsetY=isNaN(H.selectedItemOffsetY)?0:H.selectedItemOffsetY;
439H.matrix.m11=isNaN(H.matrix.m11)?1:H.matrix.m11;
440H.matrix.m12=isNaN(H.matrix.m12)?0:H.matrix.m12;
441H.matrix.m21=isNaN(H.matrix.m21)?0:H.matrix.m21;
442H.matrix.m22=isNaN(H.matrix.m22)?1:H.matrix.m22;
443H.coverFlowDirection=isNaN(H.coverFlowDirection)?1:(H.coverFlowDirection<0?-1:1);
444}}return H;
445},scrollViewport:function(){if(!this.get_enabled()){return;
446}var E=this._itemsElement;
447if(!this._animation){var F=this._getMoveAnimation();
448this._initItemAnimation=g(this,function(){if(this.get_wrapFrames()&&!this._hasViewportWidth()){if(!this._isLODEnabled||this._noActiveLODRequest){var L=this.getItemHtmlElements().length;
449for(var I=0;
450I<L;
451I++){this._shiftItemInList();
452if(this._hasViewportWidth()){break;
453}}}}var K=this._getViewPortPixelsToScroll();
454var J=this.isScrollingForward();
455if(this.get_vertical()){var H=parseInt(E.style.top,10)+(J?-K:K);
456F.set_vertical(H);
457}else{var G=parseInt(E.style.left,10)+(J?-K:K);
458F.set_horizontal(G);
459}if(this.isSlideShow()){this._initCrossFadeItemAnimation();
460E.style.visibility="hidden";
461}});
462this._initializeAnimationHandlers({started:g(this,function(I,G){this.stopViewportAnimation();
463if(!this.get_wrapFrames()&&!this._canSlideMore()){if(!this._isLODEnabled||this._lastLODRequestPassed){G.set_cancel(true);
464return false;
465}}this._doLoadOnDemand(G);
466var H=this.get_currentItem();
467var J=new b.RotatorCancelEventArgs(H);
468this.raiseEvent("itemShowing",J);
469if(J.get_cancel&&J.get_cancel()){G.set_cancel(true);
470return false;
471}this._initItemAnimation();
472}),ended:g(this,function(){if(!this._isLODEnabled||this._lastLODRequestPassed){this._enableDisableButtons();
473}if(this.isSlideShow()){var G=this.get_slideShowAnimationSettings().type||b.RotatorAnimationType.None;
474if(b.RotatorAnimationType.CrossFade!=G){E.style.visibility="visible";
475}this.runSlideShowAnimation();
476}else{var H=this.get_currentItem();
477this.raiseEvent("itemShown",new b.RotatorEventArgs(H));
478}this.updateClientState();
479})});
480}this._animation.play();
481},_getVisibleItemsCount:function(){var H=this._getVarSizeAttribute();
482var G=this.getItemHtmlElements();
483var E=this._getCurrentItemIndex();
484if(E==-1||E>=G.length){return 0;
485}var F=c.getOuterSize(G[E])[H];
486if(!F&&this._isLODEnabled){F=this.get_vertical()?parseInt(this._itemHeight,10):parseInt(this._itemWidth,10);
487}var I=parseInt(c.getContentSize(this._clipElement)[H]/F,10);
488return I;
489},_initCrossFadeItemAnimation:function(){var E=this.get_slideShowAnimationSettings().type||b.RotatorAnimationType.None;
490if(b.RotatorAnimationType.CrossFade==E){var L=this._itemsElement;
491var K=(-1)*parseInt(L.style.top,10)+"px";
492var I=(-1)*parseInt(L.style.left,10)+"px";
493var M=this.getItemHtmlElements();
494var F=this._getCurrentItemIndex();
495if(F>=M.length){return;
496}var P=this._getVarSizeAttribute();
497var J=c.getOuterSize(M[F])[P];
498var Q=this._getVisibleItemsCount();
499var N=F+(this.isScrollingForward()?1:-1)*Q;
500if(N>=0&&N<M.length){var G=a(M[F]).css({left:I,top:K});
501var O=a(M[N]).css({left:I,top:K});
502var H=this.get_vertical();
503while(--Q){if(H){K=(parseInt(K,10)+J+"px");
504}else{I=(parseInt(I,10)+J+"px");
505}if(++F<M.length){G=G.add(a(M[F]).css({left:I,top:K}));
506}if(++N<M.length){O=O.add(a(M[N]).css({left:I,top:K}));
507}}G.css({position:"absolute",visibility:"visible",opacity:1});
508O.css({position:"absolute",visibility:"visible",opacity:0});
509}}},scrollItem:function(){if(!this.get_enabled()){return;
510}if(this.isCarousel()||this.isCoverFlow()){return this._scrollImageItem();
511}var E=this._itemsElement;
512if(!this._animation){var F=this._animation=this._getMoveAnimation();
513this._initItemAnimation=g(this,function(){var J=this._getNextItemToShow();
514if(!J){return;
515}this._firstItem=J;
516var I=c.getOuterSize(J);
517if(this.isScrollingForward()){I.width*=-1;
518I.height*=-1;
519}if(this.get_vertical()){var H=parseInt(E.style.top,10)+I.height;
520F.set_vertical(H);
521}else{var G=parseInt(E.style.left,10)+I.width;
522F.set_horizontal(G);
523}});
524this._initializeAnimationHandlers({started:g(this,function(I,G){var K=this.get_wrapFrames();
525if(!K&&!this._canSlideMore()){if(!this._isLODEnabled||this._lastLODRequestPassed){G.set_cancel(true);
526return false;
527}}this._doLoadOnDemand(G);
528var H=this.get_currentItem();
529var J=new b.RotatorCancelEventArgs(H);
530this.raiseEvent("itemShowing",J);
531if(J.get_cancel&&J.get_cancel()){G.set_cancel(true);
532return false;
533}if(K&&this._needsShift()){if(!this._isLODEnabled||this._noActiveLODRequest){this._shiftItemInList();
534}}if(this._stopAnimationButtonOver){return;
535}this._initItemAnimation();
536}),ended:g(this,function(){if(!this._isLODEnabled||this._lastLODRequestPassed){this._enableDisableButtons();
537}var G=this.get_currentItem();
538if(G!=null){this.raiseEvent("itemShown",new b.RotatorEventArgs(G));
539}this.updateClientState();
540if(this._stopAnimationButtonOver){return;
541}if(this.isAutomaticAdvance()||this._isRotatorTypeEnabled(b.RotatorType.ButtonsOver)){if(this.get_frameDuration()>0){this._setAnimationTimeout(this.get_frameDuration());
542}else{this._animation.play();
543}}})});
544}this._animation.stop();
545this._animation.play();
546},_scrollImageItem:function(){var E=this.isCarousel();
547var F=this.isCoverFlow();
548if(!this._animation){var G=this._imageItems.length;
549if(G<1){return;
550}this._animation=this._getMoveAnimation();
551this._initializeAnimationHandlers({started:g(this,function(J,H){var I=this._getNextItemToShow();
552if(!I){H.set_cancel(true);
553return false;
554}var K=new b.RotatorCancelEventArgs(I.control);
555this.raiseEvent("itemShowing",K);
556if(K.get_cancel&&K.get_cancel()){H.set_cancel(true);
557return false;
558}this._initItemAnimation();
559}),ended:g(this,function(){var H=this._itemsElement;
560if(!H||!H.parentNode){return;
561}if(a(H).children("li:animated").length>1){return;
562}if(F){this._enableDisableButtons();
563}var I=this.get_currentItem();
564if(I!=null){this.raiseEvent("itemShown",new b.RotatorEventArgs(I));
565}if(this.isAutomaticAdvance()){if(this.get_frameDuration()>0){this._setAnimationTimeout(this.get_frameDuration());
566}else{this._animation.play();
567}}this.updateClientState();
568})});
569this._initItemAnimation=g(this,function(){var J=this._getCurrentItemIndex(true);
570var P=this._getNextItemToShow().control.get_index();
571var H=J-P;
572if(E){H=w.abs(H);
573if(H>w.floor(G/2)){H=w.abs(G-H);
574}var L=(J+w.floor(G/2))%G;
575if(P<=L&&P<=J){P+=G;
576}if(L<J){L+=G;
577}if(L>=P&&P>=J){H*=(-1);
578}var N=this.getItemHtmlElements();
579var S=(N.length>0)?((w.PI*2)/N.length):0;
580H*=S;
581var I=this._animation.get_angle()+H;
582var M=this._initialAngle;
583var R=w.PI*2+S;
584if(w.round((I-(M+R))/S)==0||w.round((I-(M-R))/S)==0){var Q=P!=1?(P-G)*S:0;
585I=M+H+Q;
586}if(I.toString().indexOf("e")>-1){I=(w.round(I*10000)/10000);
587}var K=I-H;
588a(N).each(function(U,T){if(K.toString().indexOf("e")>-1){K=(w.round(K*10000)/10000);
589}T.telerikCarouselAngle=K;
590K+=S;
591});
592this._animation.set_angle(I);
593}else{var O=this._animation.get_index()-this._getScrollAnimationOptions().coverFlowDirection*H;
594this._animation.set_index(O);
595}});
596}this._animation.stop();
597this._animation.play();
598},_checkItemsSize:function(){var H=c.getOuterSize(this._itemsElement);
599var E=this.get_vertical();
600var F=(E)?H.height:H.width;
601var G=(E)?this.get_height():this.get_width();
602return parseInt(F,10)>parseInt(G,10);
603},_shiftItemInList:function(){var O=(this._initialItemSet&&this.get_enableRandomOrder());
604var K=this._itemsElement;
605var J=this.getItemHtmlElements();
606var H=this.get_vertical();
607var G=this.isScrollingForward();
608var E=parseInt(K.style.left,10);
609var F=parseInt(K.style.top,10);
610var L=0;
611if(O){var P=this._getVisibleItemsCount();
612var N=w.ceil(w.random()*(J.length-P))-1;
613L=G?N:N+P;
614}else{L=G?0:J.length-1;
615}var M=J[L];
616var I=c.getOuterSize(M);
617M.parentNode.removeChild(M);
618if(!G){K.insertBefore(M,K.firstChild);
619}if(H){K.style.top=(F+(G?I.height:-I.height))+"px";
620}else{K.style.left=(E+(G?I.width:-I.width))+"px";
621}if(G){K.appendChild(M);
622}return M;
623},_shuffleFrames:function(){if(!this._canShuffle()){return;
624}var E=this._getShuffledArray(a.makeArray(this.getItemHtmlElements()));
625while(E.length){this._itemsElement.appendChild(E.pop());
626}},_getShuffledArray:function(E){var F=[];
627while(E.length){F.push(this._extractRandomFromArray(E));
628}return F;
629},_extractRandomFromArray:function(E){return E.splice(w.random()*E.length,1)[0];
630},_canShuffle:function(){return !this._initialItemSet&&this.get_enableRandomOrder();
631},_loadInitialFrame:function(){var G=this.get_initialItemIndex();
632if(!this.isCarousel()&&!this.isCoverFlow()){this._shuffleFrames();
633var E=this.get_defaultAnimationDirection();
634var F=b.RotatorScrollDirection;
635var H=this.isVertical();
636var J=this._itemsElement;
637var K=c.getOuterSize(J);
638var L=c.getContentSize(this._clipElement);
639var M=0;
640var N=0;
641G=this.get_initialItemIndex();
642if(G>=0){if(H){N=(E==F.Up)?0:-K.height+L.height;
643}else{M=(E==F.Left)?0:-K.width+L.width;
644}}else{if(G==-1){if(H){N=(E==F.Down)?-K.height:L.height;
645}else{M=(E==F.Right)?-K.width:L.width;
646}}}J.style.left=M+"px";
647J.style.top=N+"px";
648if(G>0&&!this._initialItemSet){for(var I=0;
649I<G;
650I++){this._shiftItemInList();
651}J.style.left=M+"px";
652J.style.top=N+"px";
653}}if(!this._initialItemSet&&G>=0){this.raiseEvent("itemShown",new b.RotatorEventArgs(this.get_items()[G]));
654}this._initialItemSet=true;
655},_setImageItems:function(){if(this._imageItems.length>0){return;
656}var G={};
657if(this._itemWidth){G.width=parseInt(this._itemWidth,10);
658}if(this._itemHeight){G.height=parseInt(this._itemHeight,10);
659}var F=(G.width&&G.height);
660var E=[];
661a(this.getItemHtmlElements()).each(function(I,J){var N=a.extend({},G);
662if(!F){var M=a(J).css("float","left");
663N=a.extend(c.getContentSize(J),N);
664M.css("float","");
665}var H=c.getBorderBox(J);
666var L=c.getPaddingBox(J);
667var K=c.getMarginBox(J);
668H.horizontal+=L.horizontal+K.horizontal;
669H.vertical+=L.vertical+K.vertical;
670E[I]=a.extend(N,{element:J,outerWidth:(N.width+H.horizontal),outerHeight:(N.height+H.vertical)});
671});
672this._imageItems=E;
673},stop:function(){this._clearAnimationTimeout();
674this._canPause=false;
675this.pause();
676},pause:function(){if(this._isPaused){return;
677}this._isPaused=true;
678if(this._animation&&this._animation.get_isActive()){this._animation.pause();
679}},start:function(){this._canPause=true;
680this._isPaused=false;
681this.resume();
682},resume:function(){var E=this._animation;
683if(!E||!E._isPlaying){if(this._timeoutPassed||!this._isPaused){if(E){E.play(this._timeoutPassed);
684}}else{if(this._isPaused){if(E&&E.get_isActive()){E.play();
685}}}}this._isPaused=false;
686},isViewportScrollMode:function(){var E=b.RotatorType;
687if(this._isRotatorTypeEnabled(E.AutomaticAdvance)||this._isRotatorTypeEnabled(E.ButtonsOver)||this._isRotatorTypeEnabled(E.FromCode)||this._isRotatorTypeEnabled(E.Carousel)||this._isRotatorTypeEnabled(E.CarouselButtons)||this._isRotatorTypeEnabled(E.CoverFlow)||this._isRotatorTypeEnabled(E.CoverFlowButtons)){return false;
688}return true;
689},_getButtonScrollDirection:function(E){var F=b.RotatorScrollDirection;
690var G=F.Left;
691switch(E){case this._rightButton:G=F.Left;
692break;
693case this._leftButton:G=F.Right;
694break;
695case this._downButton:G=F.Up;
696break;
697case this._upButton:G=F.Down;
698break;
699}return G;
700},_buttonClicked:function(H){if(!this.get_enabled()){c.cancelRawEvent(H);
701return false;
702}this._raiseItemClickedFlags();
703var E=this._animation;
704if(E&&E.get_isPlaying()){E.stop();
705}var G=H.target;
706var I=G.parentNode;
707if(I&&Sys.UI.DomElement.containsCssClass(I,"RadButton")){G=I;
708}if(this._isButtonDisabled(G)||this.get_items().length==0){return;
709}var F=new b.RotatorButtonEventArgs(G);
710this.raiseEvent("buttonClick",F);
711if(F.get_cancel()){return;
712}var J=this._getButtonScrollDirection(G);
713this.set_animationDirection(J);
714if(this.isCarousel()||this.isCoverFlow()){this.scrollItem();
715}else{this.scrollViewport();
716}return c.cancelRawEvent(H);
717},_buttonOver:function(G){if(!this.get_enabled()){c.cancelRawEvent(G);
718return false;
719}var F=G.target;
720if(this._isButtonDisabled(F)||this.get_items().length==0){return;
721}var E=new b.RotatorButtonEventArgs(F);
722this.raiseEvent("buttonOver",E);
723if(E.get_cancel()){return;
724}var H=this._getButtonScrollDirection(F);
725this.set_animationDirection(H);
726this._stopAnimationButtonOver=false;
727this.scrollItem();
728return c.cancelRawEvent(G);
729},_buttonOut:function(G){if(!this.get_enabled()){c.cancelRawEvent(G);
730return false;
731}var F=G.target;
732if(this._isButtonDisabled(F)){return;
733}var E=new b.RotatorButtonEventArgs(F);
734this.raiseEvent("buttonOut",E);
735if(E.get_cancel()){return;
736}var H=this._getButtonScrollDirection(F);
737this.set_animationDirection(H);
738this._stopAnimationButtonOver=true;
739return c.cancelRawEvent(G);
740},_initializeButtonsRotatorType:function(){this._rightButton=c.getElementByClassName(this._rootElement,this._rotatorRightClass);
741this._leftButton=c.getElementByClassName(this._rootElement,this._rotatorLeftClass);
742this._downButton=c.getElementByClassName(this._rootElement,this._rotatorDownClass);
743this._upButton=c.getElementByClassName(this._rootElement,this._rotatorUpClass);
744var J=this.get_controlButtons(),I=this._clipElement,N=b.RotatorScrollDirection,M=[N.Right,N.Left,N.Down,N.Up],F=[this._leftButton,this._rightButton,this._upButton,this._downButton],L=[J.LeftButtonID?$get(J.LeftButtonID):null,J.RightButtonID?$get(J.RightButtonID):null,J.UpButtonID?$get(J.UpButtonID):null,J.DownButtonID?$get(J.DownButtonID):null],K=[this._rotatorLeftClass,this._rotatorRightClass,this._rotatorUpClass,this._rotatorDownClass],R=["marginLeft","marginRight","marginTop","marginBottom"],S=["width","width","height","height"];
745for(var P=0;
746P<F.length;
747P++){var E=F[P];
748var H=(null!=L[P])?L[P]:E;
749this._createButton(E,K[P]);
750if(this._isScrollDirectionEnabled(M[P])&&null==L[P]){E.style.display="block";
751var T=S[P];
752var G=parseInt(c.getBounds(E)[T],10);
753if(isNaN(G)){G=0;
754}I.style[R[P]]=G+"px";
755}if(this._isRotatorTypeEnabled(b.RotatorType.Buttons)||this._isRotatorTypeEnabled(b.RotatorType.SlideShowButtons)||this._isRotatorTypeEnabled(b.RotatorType.CarouselButtons)||this._isRotatorTypeEnabled(b.RotatorType.CoverFlowButtons)){if(!Sys.UI.DomElement.containsCssClass(H,"RadButton")){$clearHandlers(H);
756}$addHandlers(H,{click:this._buttonClicked},this);
757}else{$clearHandlers(H);
758$addHandlers(H,{mouseover:this._buttonOver,mouseout:this._buttonOut},this);
759}}this._ensureButtonsPosition();
760this._rightButton=L[1]||this._rightButton;
761this._leftButton=L[0]||this._leftButton;
762this._downButton=L[3]||this._downButton;
763this._upButton=L[2]||this._upButton;
764var O=false;
765for(var Q=0;
766Q<L.length;
767Q++){if(L[Q]){O=true;
768}break;
769}return O;
770},_ensureButtonsPosition:function(){this.set_buttonTopPosition(this._leftButton);
771this.set_buttonTopPosition(this._rightButton);
772this.set_buttonLeftPosition(this._upButton);
773this.set_buttonLeftPosition(this._downButton);
774},set_buttonTopPosition:function(E){if(!E||this._isHeightInPersent()){return;
775}var F=((this._element.offsetHeight/2)-(E.offsetHeight/2)+10)+"px";
776a(E).css({top:F});
777},set_buttonLeftPosition:function(E){if(!E||this._isWidthInPersent()){return;
778}var F=((this._element.offsetWidth/2)-(E.offsetWidth/2)+10)+"px";
779a(E).css({left:F});
780},runSlideShowAnimation:function(){var H=this._itemsElement;
781var F=this.get_slideShowAnimationSettings().duration||500;
782var E=this.get_slideShowAnimationSettings().type||b.RotatorAnimationType.None;
783var G=g(this,function(){if(!H||!H.parentNode){return;
784}var J=(E==b.RotatorAnimationType.CrossFade);
785if(J&&a(H).children("li:animated").length>1){return;
786}
786this._canPause=true;
787if(E!=b.RotatorAnimationType.None){if(J){a(this.getItemHtmlElements()).css({position:"",visibility:""});
788a(H).css("visibility","visible");
789}else{a(H).css("opacity","1");
790}}var K=this.get_currentItem();
791this.raiseEvent("itemShown",new b.RotatorEventArgs(K));
792if(!this.get_pauseOnMouseOver()||(!this._isMouseOverClipElement)){if(this.isAutomaticAdvance()){var I=this.get_frameDuration();
793if(I>=0){this._setAnimationTimeout(I);
794}}}});
795switch(E){case b.RotatorAnimationType.Fade:this._canPause=false;
796a(H).css("opacity","0").fadeTo(F,1,G);
797break;
798case b.RotatorAnimationType.Pulse:this._canPause=false;
799a(H).fadeTo(F,0).fadeTo(F,1,G);
800break;
801case b.RotatorAnimationType.CrossFade:this._canPause=false;
802this._runCrossFadeSlideShowAnimation(F,G);
803break;
804default:G();
805break;
806}},_runCrossFadeSlideShowAnimation:function(G,H){var M=this._itemsElement;
807var L=(-1)*parseInt(M.style.top,10)+"px";
808var J=(-1)*parseInt(M.style.left,10)+"px";
809var N=this.getItemHtmlElements();
810var E=this._getCurrentItemIndex();
811if(E>=N.length){return;
812}var Q=this._getVarSizeAttribute();
813var K=c.getOuterSize(N[E])[Q];
814var R=parseInt(c.getContentSize(this._clipElement)[Q]/K,10);
815var O=E-(this.isScrollingForward()?1:-1)*R;
816if(O>=0&&O<N.length){var P=a(N[O]).css({left:J,top:L});
817var F=a(N[E]).css({left:J,top:L});
818var I=this.get_vertical();
819while(--R){if(I){L=(parseInt(L,10)+K+"px");
820}else{J=(parseInt(J,10)+K+"px");
821}if(++O<N.length){P=P.add(a(N[O]).css({left:J,top:L}));
822}if(++E<N.length){F=F.add(a(N[E]).css({left:J,top:L}));
823}}P.fadeTo(G,0,H);
824F.fadeTo(G,1,H);
825this._previousCrossFadeItems=P;
826this._currentCrossFadeItems=F;
827}},_resetCrossFadeAnimation:function(){if(!this._previousCrossFadeItems||!this._currentCrossFadeItems){return;
828}this._previousCrossFadeItems.stop(true,true);
829this._currentCrossFadeItems.stop(true,true);
830a(this.getItemHtmlElements()).css({position:"",visibility:"",opacity:1});
831a(this._itemsElement).css({visibility:"visible",opacity:1});
832},_getVarSizeAttribute:function(E){return(this.get_vertical()?"height":"width");
833},_hasViewportWidth:function(F){if(null==F){F=this.get_animationDirection();
834}var I=this._itemsElement;
835var L=this._clipElement;
836var J=parseInt(I.style.left,10);
837var K=parseInt(I.style.top,10);
838var H=c.getOuterSize(I);
839var M=c.getContentSize(L);
840var E=false;
841var G=b.RotatorScrollDirection;
842switch(F){case G.Left:E=H.width+J<M.width*2;
843break;
844case G.Up:E=H.height+K<M.height*2;
845break;
846case G.Right:E=(J*-1<M.width);
847break;
848case G.Down:E=(K*-1<M.height);
849break;
850}return !E;
851},stopViewportAnimation:function(){var F=this._animation;
852if(!F){return;
853}if(F.get_isPlaying()){F.stop();
854var E=this.get_vertical();
855var G=E?F.get_vertical():F.get_horizontal();
856if(null!=G){this._itemsElement.style[E?"top":"left"]=G+"px";
857}}},_getViewPortPixelsToScroll:function(){var F=this.get_vertical();
858var G=c.getContentSize(this._clipElement);
859var E=F?G.height:G.width;
860return E;
861},showNext:function(E){this.set_animationDirection(E?E:b.RotatorScrollDirection.Left);
862if(!this._checkItemsSize()&&!this.isCarousel()&&!this.isCoverFlow()&&(!this._isLODEnabled||this._lastLODRequestPassed)){return;
863}if(this.isViewportScrollMode()){this.scrollViewport();
864}else{this.scrollItem();
865}},getItemHtmlElements:function(){var F=this._itemsElement;
866if(!this._hasCleanedList){var H=F.childNodes;
867for(var E=0;
868E<H.length;
869E++){var G=H[E];
870if(G&&G.tagName!="LI"){F.removeChild(G);
871E--;
872}}this._hasCleanedList=true;
873}return F.childNodes;
874},_setAnimationTimeout:function(E){this._clearAnimationTimeout();
875this._currentAnimationTimeout=window.setTimeout(g(this,function(){if(!this._isPaused){this.resume();
876}this._timeoutPassed=true;
877}),E);
878},_clearAnimationTimeout:function(){if(this._currentAnimationTimeout){window.clearTimeout(this._currentAnimationTimeout);
879}this._currentAnimationTimeout=0;
880this._timeoutPassed=false;
881},isAutomaticAdvance:function(){var E=b.RotatorType;
882if(this._isRotatorTypeEnabled(E.AutomaticAdvance)||this._isRotatorTypeEnabled(E.SlideShow)||this._isRotatorTypeEnabled(E.Carousel)||this._isRotatorTypeEnabled(E.CoverFlow)){return true;
883}return false;
884},isCarousel:function(){var E=b.RotatorType;
885if(this._isRotatorTypeEnabled(E.Carousel)||this._isRotatorTypeEnabled(E.CarouselButtons)){return true;
886}return false;
887},isCoverFlow:function(){var E=b.RotatorType;
888if(this._isRotatorTypeEnabled(E.CoverFlow)||this._isRotatorTypeEnabled(E.CoverFlowButtons)){return true;
889}return false;
890},isSlideShow:function(){var E=b.RotatorType;
891if(this._isRotatorTypeEnabled(E.SlideShow)||this._isRotatorTypeEnabled(E.SlideShowButtons)){return true;
892}return false;
893},isScrollingForward:function(){return this.isScrollingLeft()||this.isScrollingUp();
894},isScrollingLeft:function(){return this._isAnimationDirectionOn(b.RotatorScrollDirection.Left);
895},isScrollingUp:function(){return this._isAnimationDirectionOn(b.RotatorScrollDirection.Up);
896},_isAnimationDirectionOn:function(E){return E==this.get_animationDirection()?true:false;
897},_enableDisableButtons:function(){var I=this.get_rotatorType();
898if(I==b.RotatorType.AutomaticAdvance||I==b.RotatorType.Carousel||I==b.RotatorType.CoverFlow){return;
899}var J=this.get_wrapFrames();
900var G=this.isCarousel();
901var H=this.isCoverFlow();
902var E=(J&&!H)||G;
903var F=b.RotatorScrollDirection;
904this._enableButton(this._rightButton,E||this._canSlideMore(F.Left));
905this._enableButton(this._leftButton,E||this._canSlideMore(F.Right));
906this._enableButton(this._downButton,E||this._canSlideMore(F.Up));
907this._enableButton(this._upButton,E||this._canSlideMore(F.Down));
908},_enableDisableAllButtonsUnconditionally:function(E){this._enableButton(this._rightButton,E);
909this._enableButton(this._leftButton,E);
910this._enableButton(this._downButton,E);
911this._enableButton(this._upButton,E);
912}
912,_enableButton:function(E,F){if(!E){return;
913}if(F){Sys.UI.DomElement.removeCssClass(E,this._rotatorButtonDisabledClass);
914E.removeAttribute("disabled");
915}else{Sys.UI.DomElement.addCssClass(E,this._rotatorButtonDisabledClass);
916E.setAttribute("disabled","disabled");
917}},_canSlideMore:function(H){if(null==H){H=this.get_animationDirection();
918}var E=false;
919var I=b.RotatorScrollDirection;
920if(this.isCoverFlow()){var G=this._getCurrentItemIndex();
921var F=this._getScrollAnimationOptions().coverFlowDirection;
922var K=(H==I.Right||H==I.Down);
923var J=(H==I.Left||H==I.Up);
924if((K&&F==1)||(J&&F==-1)){E=G>0;
925}else{if((J&&F==1)||(K&&F==-1)){E=G<this.getItemHtmlElements().length-1;
926}}}else{var M=this._itemsElement;
927var P=this._clipElement;
928var N=parseInt(M.style.left,10);
929var O=parseInt(M.style.top,10);
930var L=c.getBounds(M);
931var Q=c.getBounds(P);
932if(H==I.Left){E=(L.width+N)>Q.width;
933}else{if(H==I.Up){E=(L.height+O)>Q.height;
934}else{if(H==I.Right){E=(N<0);
935}else{if(H==I.Down){E=(O<0);
936}}}}}return E;
937},_getCalculatedAnimationDirection:function(){var E=this.get_animationDirection();
938var G=b.RotatorScrollDirection;
939var F=23;
940switch(E){case G.Left:F=21;
941break;
942case G.Down:F=32;
943break;
944case G.Up:F=12;
945break;
946default:F=23;
947}return F;
948},startAutoPlay:function(){if(this._rotatorDisposed){return;
949}this._loadInitialFrame();
950this._startAutoPlayItems();
951},_startAutoPlayItems:function(){if(this._rotatorDisposed){return;
952}if((this.isCarousel()||this.isCoverFlow())&&!this._automaticAdvanceStarted){this._automaticAdvanceStarted=true;
953return;
954}this.showNext(this.get_defaultAnimationDirection());
955},get_defaultAnimationDirection:function(){var F=b.RotatorScrollDirection;
956var E=0;
957if(this._isScrollDirectionEnabled(F.Left)){E=F.Left;
958}else{if(this._isScrollDirectionEnabled(F.Up)){E=F.Up;
959}else{if(this._isScrollDirectionEnabled(F.Right)){E=F.Right;
960}else{if(this._isScrollDirectionEnabled(F.Down)){E=F.Down;
961}}}}if(!E){E=F.Left;
962}return E;
963},get_containerElement:function(){return this._itemsElement;
964},_setChildElements:function(){this._rotatorListClass="rrItemsList";
965this._rotatorListItemClass="rrItem";
966this._rotatorVerticalClass="rrVerticalList";
967this._rotatorRelativeWrapperClass=("rrRelativeWrapper");
968this._rotatorClipRegionClass="rrClipRegion";
969this._rotatorRightClass="rrButtonRight";
970this._rotatorLeftClass="rrButtonLeft";
971this._rotatorDownClass="rrButtonDown";
972this._rotatorUpClass="rrButtonUp";
973this._rotatorButtonDisabledClass="rrButtonDisabled";
974this._rootElement=this.get_element();
975this._relativeWrapper=c.getElementByClassName(this._rootElement,this._rotatorRelativeWrapperClass);
976this._clipElement=c.getElementByClassName(this._rootElement,this._rotatorClipRegionClass);
977this._itemsElement=c.getElementByClassName(this._rootElement,this._rotatorListClass);
978if(this.get_items().length==0&&this._itemsElement.children.length){this._itemsElement.removeChild(this._itemsElement.firstChild);
979}this._fixEmptyList();
980},_fixEmptyList:function(){var E=this._itemsElement.getElementsByTagName("li");
981if(this.get_items().length==0&&E.length==1){this._itemsElement.removeChild(E[0]);
982}},_createUI:function(){if(!this.isVisible()){return;
983}var P=this.get_element(),O=this._relativeWrapper,E=this._clipElement,F={top:0,bottom:0,left:0,right:0,horizontal:0,vertical:0},K=this._hasButtons();
984if(!P){return;
985}if(!this._isCreated){var L=true;
986if(K){L=this._initializeButtonsRotatorType();
987}if(L){Sys.UI.DomElement.addCssClass(P,"rrNoBorder");
988}F=c.getBorderBox(E);
989this._fixRootElementSize();
990O.style.height=P.offsetHeight+F.vertical+"px";
991O.style.width=P.offsetWidth+F.horizontal+"px";
992this._isCreated=true;
993}else{if(K){F=c.getBorderBox(E);
994}}if(this.get_vertical()){this.set_vertical(true);
995}O.style.overflow="auto";
996E.style.overflow="auto";
997var N=this._itemsElement;
998if(this._isLODEnabled){N.style.width="";
999N.style.height="";
1000}var I=10000,G;
1001try{I=1000+N.offsetWidth*c.getChildrenByTagName(N,"li").length;
1002}catch(J){I=10000;
1003}E.style.width=w.max(I,10000)+"px";
1004E.style.height="10000px";
1005var H=c.getMarginBox(E);
1006I=w.max(0,(O.offsetWidth-H.horizontal-F.horizontal))+"px";
1007G=w.max(0,(O.offsetHeight-H.vertical-F.vertical))+"px";
1008var M=this.isCarousel()||this.isCoverFlow();
1009if(M){this._setImageItemsSize(parseInt(I,10),parseInt(G,10),true);
1010}N.style.width=M?I:(this.get_vertical()?O.style.width:N.offsetWidth+"px");
1011N.style.height=M?G:(N.offsetHeight+"px");
1012O.style.overflow="";
1013E.style.width=I;
1014E.style.height=G;
1015E.style.overflow="hidden";
1016E.style.position="relative";
1017N.style.position="relative";
1018P.style.visibility="visible";
1019this._ensureWrappersPersentWidht();
1020},_hasButtons:function(){var E=this;
1021return E._isRotatorTypeEnabled(b.RotatorType.Buttons)||E._isRotatorTypeEnabled(b.RotatorType.ButtonsOver)||E._isRotatorTypeEnabled(b.RotatorType.SlideShowButtons)||E._isRotatorTypeEnabled(b.RotatorType.CarouselButtons)||E._isRotatorTypeEnabled(b.RotatorType.CoverFlowButtons);
1022},_ensureWrappersPersentWidht:function(){var E=this;
1023if(E._isWidthInPersent()){E._relativeWrapper.style.width="auto";
1024E._clipElement.style.width="auto";
1025}},_isWidthInPersent:function(){return this._element.style.width.indexOf("%")>-1;
1026},_isHeightInPersent:function(){return this._element.style.height.indexOf("%")>-1;
1027},_setImageItemsSize:function(F,E,G){if(this._shouldWaitForImagesToLoad(F,E)){this._waitForImagesToLoad(g(this,function(){this._finishSetImageItemSize(F,E,G);
1028}));
1029}else{this._finishSetImageItemSize(F,E,G);
1030}},_finishSetImageItemSize:function(F,E,H){if(H){this._shuffleFrames();
1031this._setImageItems();
1032if(this.isCarousel()){this._changeCarouselAngleByIndex(this.get_initialItemIndex(),true,F,E);
1033}else{this._changeCoverFlowIndexByIndex(this.get_initialItemIndex(),F,E);
1034}var G=this.getItemHtmlElements();
1035a(G).children("div").css({width:"100%",height:"100%"}).children("img").css({width:"100%",height:"100%"});
1036}this._createReflection(F,E);
1037if(H){this._startAutomaticAdvance();
1038}},_shouldWaitForImagesToLoad:function(F,E){var G=(this._imageItems.length>0);
1039var I=(this._itemWidth&&this._itemHeight);
1040var H=this._toCreateReflection(F,E);
1041return(!G&&!I)||H;
1042},_waitForImagesToLoad:function(E){var H=a(this._itemsElement).find("img");
1043this._imagesToLoad=H.length;
1044this._imagesLoadedDelegate=E;
1045this._imageOnLoadDelegate=g(this,this._loadedImageHandler);
1046for(var F=0,I=H.length;
1047F<I;
1048F++){var G=H[F];
1049if(this._isImageLoading(G)){c.addExternalHandler(G,"load",this._imageOnLoadDelegate);
1050G.src=G.src;
1051}else{this._imagesToLoad--;
1052}}this._checkImagesLoaded();
1053},_isImageLoading:function(E){return(E.width===D)||(E.src!=""&&(E.complete!==D)&&E.complete===false);
1054},_loadedImageHandler:function(E){c.removeExternalHandler(E.target||E.srcElement,"load",this._imageOnLoadDelegate);
1055this._imagesToLoad--;
1056this._checkImagesLoaded();
1057},_checkImagesLoaded:function(){if(this._imagesToLoad<=0){this._imagesLoadedDelegate.call(this);
1058this._imagesLoadedDelegate=Function.emptyFunction;
1059}}
1059,_fixRootElementSize:function(){var G=this.get_element();
1060if(!G){return;
1061}var E=b.RotatorScrollDirection;
1062var F=parseInt(G.style.paddingLeft,10);
1063if(F&&!isNaN(F)&&this._isScrollDirectionEnabled(E.Left)){G.style.width=(parseInt(G.style.width,10)+F)+"px";
1064G.style.paddingLeft="";
1065}F=parseInt(G.style.paddingRight,10);
1066if(F&&!isNaN(F)&&this._isScrollDirectionEnabled(E.Right)){G.style.width=(parseInt(G.style.width,1)+F)+"px";
1067G.style.paddingRight="";
1068}F=parseInt(G.style.paddingTop,10);
1069if(F&&!isNaN(F)&&this._isScrollDirectionEnabled(E.Up)){G.style.height=(parseInt(G.style.height,10)+F)+"px";
1070G.style.paddingTop="";
1071}F=parseInt(G.style.paddingBottom,10);
1072if(F&&!isNaN(F)&&this._isScrollDirectionEnabled(E.Down)){G.style.height=(parseInt(G.style.height,10)+F)+"px";
1073G.style.paddingBottom="";
1074}},_toCreateReflection:function(F,E){var G=this._getScrollAnimationOptions(F,E);
1075return(!this.isVertical()&&(this.isCoverFlow()||this.isCarousel())&&G.reflectionHeight>0&&G.reflectionOpacity>0);
1076},_createReflection:function(I,H){var K=this._imageItems;
1077if(!K||K.length==0||K[0].reflection||!this._toCreateReflection(I,H)){return;
1078}var N=this._getScrollAnimationOptions(I,H);
1079var J=N.reflectionHeight;
1080J=N.reflectionHeight=(J>1)?1:J;
1081var M=N.reflectionOpacity;
1082M=N.reflectionOpacity=(M>1)?1:M;
1083var P=J;
1084var G=(J<=0.5)?0:(J-0.5);
1085var L=N.matrix;
1086var E=b.RadRotatorAnimation.get_scrollAnimationProperties(this.get_id());
1087var O=(L!=null&&("filter"==this._getTransformProperty())&&!(L.m11==1&&L.m22==1&&L.m12==0&&L.m21==0))||(E&&E.opacity!=null&&!a.support.opacity);
1088a.each(K,function(W,Y){var T=this.element;
1089var V=T.getElementsByTagName("img");
1090V=(V&&V.length>0)?V[0]:null;
1091var X={width:"100%",height:"100%"};
1092if(V&&!this.reflection){var Q=j.createElement("canvas");
1093if(Q.getContext){Q.height=this.height;
1094Q.width=this.width;
1095T.appendChild(Q);
1096var S=Q.getContext("2d");
1097S.save();
1098S.globalAlpha=M;
1099S.translate(0,this.height);
1100S.scale(1,-1);
1101S.drawImage(V,0,0,this.width,this.height);
1102S.restore();
1103S.globalCompositeOperation="destination-in";
1104var U=S.createLinearGradient(0,0,0,this.height);
1105U.addColorStop(0,"rgba(255, 255, 255, "+P+")");
1106U.addColorStop((J>=0.5)?1:2*J,"rgba(255, 255, 255, "+G+")");
1107S.fillStyle=U;
1108S.rect(0,0,this.width,this.height);
1109S.fill();
1110this.reflection=Q;
1111}else{var R=a(V).clone(false).appendTo(T);
1112if(c.isIE){R.css({filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1) progid:DXImageTransform.Microsoft.Alpha(opacity="+P*M*100+", style=1, finishOpacity="+G*M*100+", startx=0, starty=0, finishx=0, finishy="+this.height*((J>=0.5)?1:2*J)+")"});
1113}this.reflection=R[0];
1114if(O){a(T).children("div").css({height:"50%"});
1115X.height="50%";
1116}}a(this.reflection).css(X);
1117}});
1118var F=this._animation;
1119if(O&&(!F||!F.get_isPlaying())){if(this.isCoverFlow()){this._changeCoverFlowIndexByIndex(this._getCurrentItemIndex(),I,H);
1120}else{if(this.isCarousel()){this._changeCarouselAngleByIndex(this._getCurrentItemIndex(),false,I,H);
1121}}}},_createButton:function(E,F){var G=E;
1122if(!G){G=j.createElement("div");
1123}if(!G.className){G.className=this._rotatorDownClass;
1124}return G;
1125},_isButtonDisabled:function(E){if(!E){return true;
1126}return Sys.UI.DomElement.containsCssClass(E,this._rotatorButtonDisabledClass);
1127},_isScrollDirectionEnabled:function(E){return E&this.get_scrollDirection()?true:false;
1128},_isRotatorTypeEnabled:function(E){return E==this.get_rotatorType()?true:false;
1129},get_scrollDuration:function(){if(this.isSlideShow()){return 1;
1130}else{return this._scrollDuration;
1131}},set_scrollDuration:function(E){this._scrollDuration=E;
1132if(this._animation){this._animation.set_duration(this.get_scrollDuration());
1133}},set_vertical:function(F){var E=this._itemsElement;
1134if(E){Sys.UI.DomElement.addCssClass(E,this._rotatorVerticalClass);
1135}},get_vertical:function(){var E=b.RotatorScrollDirection;
1136return(this._isScrollDirectionEnabled(E.Down)||this._isScrollDirectionEnabled(E.Up));
1137},isVertical:function(){if(this._itemsElement){return Sys.UI.DomElement.containsCssClass(this._itemsElement,this._rotatorVerticalClass);
1138}return false;
1139},get_height:function(){return this.get_element().style.height;
1140}
1140,set_height:function(E){this.get_element().style.height=this._toStyleComplientValue(E);
1141if(this.isVisible()){this._isCreated=false;
1142this.repaint();
1143}},get_width:function(){return this.get_element().style.width;
1144},set_width:function(E){this.get_element().style.width=this._toStyleComplientValue(E);
1145if(this.isVisible()){this._isCreated=false;
1146this.repaint();
1147}},_toStyleComplientValue:function(E){return isNaN(E)?E:E+"px";
1148},_attachEventHandlers:function(H){var G=this;
1149var E=this.get_containerElement();
1150if(null==E){return;
1151}var F=a(E).find("li."+this._rotatorListItemClass);
1152if(H!=false){this._clickDelegate=g(this,this._mouseClickHandler);
1153this._mouseOutDelegate=g(this,this._mouseOutHandler);
1154this._mouseOverDelegate=g(this,this._mouseOverHandler);
1155this._itemShownDelegate=g(this,this._itemShownHandler);
1156F.on({mouseenter:this._mouseOverDelegate,mouseleave:this._mouseOutDelegate});
1157$addHandler(E,"click",this._clickDelegate);
1158if(this.get_enableDragScrolling()&&!this.isCarousel()&&!this.isCoverFlow()&&!this.isSlideShow()){G._dragStartHandler=A(G._onDragStart,G);
1159a(E).onEvent(l.Down+B,G._dragStartHandler);
1160G._ieTouchActionManager.element=E;
1161G._ieTouchActionManager.allowUserTouch();
1162G._dragStartHandler=A(G._onDragStart,G);
1163G._attachImagesDragHandler();
1164}this.add_itemShown(this._itemShownDelegate);
1165if(c.isSafari){this._documentClickDelegate=g(this,this._documentClickHandler);
1166this._keyDownDelegate=g(this,this._keyDownHandler);
1167c.addHandler(j,"click",this._documentClickDelegate);
1168c.addHandler(j,"keydown",this._keyDownDelegate);
1169}}else{if(this._mouseOverDelegate){F.off({mouseenter:this._mouseOverDelegate,mouseleave:this._mouseOutDelegate});
1170}if(this._clickDelegate){$removeHandler(E,"click",this._clickDelegate);
1171}if(this._dragStartHandler){a(E).offEvent(l.Down+B,G._dragStartHandler);
1172}if(this._imgDragStartHandler){G._detachImagesDragHandler();
1173}this._clickDelegate=this._mouseOutDelegate=this._mouseOverDelegate=this._dragStartHandler=null;
1174if(this._itemShownDelegate){this.remove_itemShown(this._itemShownDelegate);
1175}if(c.isSafari){if(this._documentClickDelegate){c.removeHandler(j,"click",this._documentClickDelegate);
1176this._documentClickDelegate=null;
1177}if(this._keyDownDelegate){c.removeHandler(j,"keydown",this._keyDownDelegate);
1178this._keyDownDelegate=null;
1179}}}},_attachImagesDragHandler:function(){var E=this;
1180E._imgDragStartHandler=A(E._imgDragStart,E);
1181E._getRotatorItemImages().on("dragstart"+B,E._imgDragStartHandler);
1182},_detachImagesDragHandler:function(){var E=this;
1183E._getRotatorItemImages().off("dragstart"+B,E._imgDragStartHandler);
1184},_imgDragStart:function(E){E.preventDefault();
1185},_getRotatorItemImages:function(){return a(this.get_element()).find(".rrItemsList .rrItem img");
1186},_documentClickHandler:function(E){if(this._itemClickedChanged){this._itemClickedChanged=false;
1187}else{if(this._itemClicked){this._itemClicked=false;
1188}}},_keyDownHandler:function(E){if(this._itemClicked&&(E.keyCode>32&&E.keyCode<41)&&a(E.target).is("body")){return c.cancelRawEvent(E.rawEvent);
1189}},_itemShownHandler:function(E){if(typeof(b.RadTicker)=="undefined"){return;
1190}var G=this.get_items();
1191for(var F=0,H=G.length;
1192F<H;
1193F++){var I=G[F];
1194if(this._isItemVisible(I)){this._fireTickersForItem(I);
1195}else{this._resetTickersForItem(I);
1196}}},_mouseOverHandler:function(E){var G=this;
1197if(G._isMouseOverClipElement){return;
1198}G._isMouseOverClipElement=true;
1199if(G.isAutomaticAdvance()&&G._canPause&&G.get_pauseOnMouseOver()){if(G.get_frameDuration()<100){this._isPaused=true;
1200}else{G.pause();
1201}}var F=G._getItemFromEvent(E.currentTarget);
1202if(null!=F){G.raiseEvent("mouseOver",new b.RotatorEventArgs(F));
1203}},_mouseOutHandler:function(E){var G=this;
1204if(G._isMouseOverItemsList(E.originalEvent)){return;
1205}G._isMouseOverClipElement=false;
1206if(G.isAutomaticAdvance()&&G._canPause&&G.get_pauseOnMouseOver()){G._isPaused=false;
1207G._setAnimationTimeout(G.get_frameDuration());
1208}var F=G._getItemFromEvent(E.currentTarget);
1209if(null!=F){G.raiseEvent("mouseOut",new b.RotatorEventArgs(F));
1210}return false;
1211},_isMouseOverItemsList:function(H){var G=c.getBounds(this.get_containerElement());
1212var F=c.getBounds(this._clipElement);
1213var E=new Telerik.Web.UI.Bounds(F.x,F.y,w.min(F.width,G.width),w.min(F.height,G.height));
1214var I=c.getDocumentRelativeCursorPosition(H);
1215return c.containsPoint(E,I.x,I.y);
1216},_mouseClickHandler:function(E){this._raiseItemClickedFlags();
1217if(!this.get_enabled()){c.cancelRawEvent(E.rawEvent);
1218return false;
1219}var G=this._getItemFromEvent(E.target);
1220if(null!=G){var F=new b.RotatorCancelEventArgs(G);
1221this.raiseEvent("itemClicking",F);
1222if(F.get_cancel&&F.get_cancel()){c.cancelRawEvent(E.rawEvent);
1223return false;
1224}window.setTimeout(g(this,function(){this.raiseEvent("itemClicked",new b.RotatorEventArgs(G));
1225this._postback(G.getServerIndex());
1226}),0);
1227}},_raiseItemClickedFlags:function(){this._itemClicked=true;
1228this._itemClickedChanged=true;
1229},_startMousePos:{},_startListPos:{},_onDragStart:function(E){var G=this;
1230var F=c.getEventLocation(E);
1231this._eventDirectionName=this.isVertical()?"clientY":"clientX";
1232G._startMousePos=F[G._eventDirectionName];
1233G._finishDragStart();
1234c.cancelRawEvent(E);
1235},_finishDragStart:function(){var H=this;
1236var E=a(j);
1237if(this.isAutomaticAdvance()){this.stop();
1238}var G=this.get_containerElement();
1239this._startListPos=this.isVertical()?parseInt(G.style.top,10):parseInt(G.style.left,10);
1240this._draggingCssDirection=this._getCssDirection();
1241var F=this._getOffsetDimension();
1242this._maxDragOffset=parseInt(this._clipElement.style[this._getCssDimension()],10)-G[F];
1243E.onEvent(l.Move+B,H._dragHandler);
1244E.onEvent(l.Up+B,H._dragEndHandler);
1245},_onDrag:function(F){var H=this;
1246var G=c.getEventLocation(F);
1247var E=G[H._eventDirectionName]-H._startMousePos;
1248this._offsetListWhenDragging(E);
1249c.cancelRawEvent(F);
1250},_offsetListWhenDragging:function(E){var G=this;
1251var F=G._itemsElement;
1252var H=w.min(0,G._startListPos+E);
1253G._isDragged=true;
1254F.style[G._draggingCssDirection]=w.max(G._maxDragOffset,H)+z;
1255},_onDragEnd:function(F){var G=this;
1256var E=a(j);
1257E.offEvent(l.Move+B,G._dragHandler);
1258E.offEvent(l.Up+B,G._dragEndHandler);
1259this.snapToEdge();
1260if(this.isAutomaticAdvance()){this.start();
1261}c.cancelRawEvent(F);
1262var H=!!this._isDragged;
1263this.add_itemClicking(function(J,I){I.set_cancel(H);
1264});
1265delete this._isDragged;
1266},getItemAtEdge:function(){return this._getElementAtEdge().control;
1267},snapToEdge:function(){var I=this;
1268var G=I._getElementAtEdge();
1269var F=I._getCssDirection();
1270var H=I._getOffsetDirection();
1271var E=I.get_containerElement();
1272if(G){E.style[F]=(-1)*G[H]+z;
1273}},_getElementAtEdge:function(){var E=this._getCssDirection();
1274var G=parseInt(this.isVertical()?this._itemHeight:this._itemWidth,10);
1275var H=this.get_containerElement();
1276var I=-1*parseInt(H.style[E],10);
1277var F=I<0?0:w.round(I/G-0.15);
1278return a("li",H)[F];
1279},_getCssDirection:function(){return this.isVertical()?"top":"left";
1280},_getCssDimension:function(){return this.isVertical()?"height":"width";
1281},_getOffsetDirection:function(){return this.isVertical()?"offsetTop":"offsetLeft";
1282},_getOffsetDimension:function(){return this.isVertical()?"offsetHeight":"offsetWidth";
1283},_postback:function(E){if(!this._postBackReference){return;
1284}var F=this._postBackReference.replace("arguments",E);
1285eval(F);
1286},_isItemVisible:function(G){var J=c.getContentSize(this._clipElement);
1287var H=c.getLocation(this._clipElement);
1288J.x=H.x;
1289J.y=H.y;
1290var F=c.getOuterSize(G.get_element());
1291H=c.getLocation(G.get_element());
1292F.x=H.x;
1293F.y=H.y;
1294var E=(c.containsPoint(J,F.x,F.y)&&c.containsPoint(J,F.x+F.width,F.y+F.height));
1295var I=(c.containsPoint(F,J.x,J.y)&&c.containsPoint(F,J.x+J.width,J.y+J.height));
1296return E||I;
1297},_fireTickersForItem:function(F){var I=F.get_tickers();
1298for(var E=0,G=I.length;
1299E<G;
1300E++){if(I[E]){var H=$find(I[E]);
1301if(H){H.startTicker();
1302}}}},_resetTickersForItem:function(F){var I=F.get_tickers();
1303for(var E=0,G=I.length;
1304E<G;
1305E++){if(I[E]){var H=$find(I[E]);
1306if(H){H.resetTicker();
1307}}}},_getItemFromEvent:function(F){var E=this.get_containerElement();
1308var G=null;
1309while(null!=F&&F!=E&&F!=j){if(F.tagName.toLowerCase()=="li"&&null!=F._item&&Object.getTypeName(F._item)=="Telerik.Web.UI.RadRotatorItem"){G=F._item;
1310}F=F.parentNode;
1311}return G;
1312},_initializeWebServiceLoader:function(){this._webServiceLoader=new b.WebServiceLoader(this.get_webServiceSettings());
1313this._webServiceLoader.add_loadingStarted(g(this,this._onItemLoadingStarted));
1314this._webServiceLoader.add_loadingSuccess(g(this,this._onItemLoadingSuccess));
1315this._webServiceLoader.add_loadingError(g(this,this._onItemLoadingError));
1316},_loadChildrenFromWebService:function(F){if(!this._webServiceLoader){this._initializeWebServiceLoader();
1317}var E=new Sys.CancelEventArgs();
1318E._argument=null;
1319E.get_argument=function(){return this._argument;
1320};
1321E.set_argument=function(H){this._argument=H;
1322};
1323this.raiseEvent("itemsRequesting",E);
1324if(E.get_cancel()){return;
1325}var G={itemIndex:F,argument:E.get_argument()};
1326this._webServiceLoader.loadData(G);
1327},loadItemsFromWebService:function(F){var E=F||0,H=this;
1328if(H.get_items().length==0){H._nextItemIndex=-1;
1329}var G=function(J,I){H.set_currentItemIndex(E);
1330H.start();
1331H.remove_itemsRequested(G);
1332};
1333H.add_itemsRequested(G);
1334H._enableDisableAllButtonsUnconditionally(false);
1335H._loadChildrenFromWebService(E);
1336},showLoadingSign:function(H){if(!this._loadingSign){var E=this._clipElement;
1337var F=j.createElement("div");
1338E.appendChild(F);
1339var G=F.style;
1340G.width="16px";
1341G.height="16px";
1342G.position="absolute";
1343G.left=w.round(E.offsetWidth/2)-8+"px";
1344G.top=w.round(E.offsetHeight/2)-8+"px";
1345Sys.UI.DomElement.addCssClass(F,"rrLoadingSign");
1346this._loadingSign=F;
1347}if(H){this._loadingSign.style.display="";
1348}else{this._loadingSign.style.display="none";
1349}},_onItemLoadingStarted:function(F,E){this._enableDisableAllButtonsUnconditionally(false);
1350this.showLoadingSign(true);
1351},_onItemLoadingSuccess:function(K,E){var J=E.get_data();
1352var I=this._itemsElement;
1353var H=I.children.length;
1354if(!this._firstLODRequestPassed&&H>0){I.innerHTML="";
1355var F=I.firstChild;
1356if(F&&I.removeChild){I.removeChild(F);
1357}}if(J&&J.length>0){for(var G=0;
1358G<J.length;
1359G++){this.addRotatorItem(J[G],H);
1360if(!this.isScrollingForward()){this._shiftItemInList();
1361}}if(this._hasButtons()){this._repaintUI();
1362}else{this.repaint();
1363}if(!this._firstLODRequestPassed){this._firstLODRequestPassed=true;
1364this._loadInitialFrame();
1365this._enableDisableAllButtonsUnconditionally(true);
1366this.raiseEvent("itemsRequested",Sys.EventArgs.Empty);
1367}else{this._enableDisableButtons();
1368this.raiseEvent("itemsRequested",Sys.EventArgs.Empty);
1369}}else{this._lastLODRequestPassed=true;
1370this._enableDisableButtons();
1371}this.showLoadingSign(false);
1372this._noActiveLODRequest=true;
1373if(this._animation&&!this._isRotatorTypeEnabled(b.RotatorType.ButtonsOver)){this._animation.play();
1374}},_onItemLoadingError:function(H,G){var F=G.get_message();
1375if(!F){F="No error data available";
1376}var E=new Telerik.Web.UI.RotatorErrorEventArgs(F);
1377this.raiseEvent("itemsRequestFailed",E);
1378if(!E.get_cancelErrorAlert()){alert("RadRotator items request failed :\n Exception="+F);
1379}this.showLoadingSign(false);
1380this._lastLODRequestPassed=true;
1381this._noActiveLODRequest=true;
1382this._enableDisableButtons();
1383if(this._animation&&!this._isRotatorTypeEnabled(b.RotatorType.ButtonsOver)){this._animation.play();
1384}},addRotatorItem:function(G,F){var H=this,E=H.get_containerElement();
1385H._createRotatorItem(G,F);
1386if(!H._isLODEnabled){E.style.width="";
1387E.style.height="";
1388H.repaint();
1389}},_createRotatorItem:function(J,G){if(G<0){return;
1390}var H=this.get_items(),F=this.get_containerElement(),I=F.ownerDocument.createElement("li");
1391a(I).addClass(this._rotatorListItemClass);
1392if(this._itemWidth){I.style.width=parseInt(this._itemWidth,10)+"px";
1393}if(this._itemHeight){I.style.height=parseInt(this._itemHeight,10)+"px";
1394}if(!J){J={};
1395}if(J.Html===D){J.Html="";
1396}if(J.CssClass===D){J.CssClass="";
1397}if(J.Visible===D){J.Visible=true;
1398}I.innerHTML=J.Html;
1399var E={cssClass:J.CssClass,visible:J.Visible};
1400var K=$create(b.RadRotatorItem,E,null,null,I);
1401I._item=K;
1402if(G>=F.children.length||typeof(G)=="undefined"||G==null||this._isLODEnabled){F.appendChild(I);
1403Array.add(H,K);
1404}else{F.insertBefore(I,F.children[G]);
1405Array.insert(this.get_items(),G,K);
1406this._fixItemsIndices(H,G);
1407}return K;
1408},removeRotatorItem:function(G){var L=this.get_items();
1409var M=L.length;
1410G=parseInt(G,10);
1411G=isNaN(G)||G>=M?M-1:G;
1412if(G<0){G=0;
1413}var E=this.get_containerElement();
1414if(M){this.pause();
1415var F=this._getCurrentItemIndex();
1416var I=L.splice(G,1)[0];
1417var K=I.get_element();
1418var J=c.getOuterSize(K);
1419E.removeChild(K);
1420E.style.width="";
1421E.style.height="";
1422this._firstItem=null;
1423if(L.length<1){this.stop();
1424return;
1425}this.repaint();
1426this._fixItemsIndices(L,G);
1427var H=this.isVertical();
1428if(H){var O=w.floor(parseInt(this._itemsElement.style.top,10)/J.height);
1429if(O!=0&&F<=w.abs(O)){this._itemsElement.style.top=(-(F-1)*J.height)+"px";
1430}}else{var N=w.floor(parseInt(this._itemsElement.style.left,10)/J.width);
1431if(N!=0&&F<=w.abs(N)){this._itemsElement.style.left=(-(F-1)*J.width)+"px";
1432}}var P=this.get_rotatorType();
1433if(P==b.RotatorType.AutomaticAdvance||P==b.RotatorType.SlideShow||P==b.RotatorType.FromCode){this.resume();
1434}}},_fixItemsIndices:function(G,F){var H=G.length;
1435for(var E=F;
1436E<H;
1437E++){G[E]._index=-1;
1438}},clearItems:function(){this.stop();
1439var E=this.get_containerElement();
1440var G=this.get_items();
1441while(G.length){var F=G.pop();
1442E.removeChild(F.get_element());
1443}var H=new Telerik.Web.UI.Bounds(0,0,0,0);
1444c.setBounds(this._itemsElement,H);
1445},isEmptyItemElement:function(){return;
1446},_doLoadOnDemand:function(E){var F=this._loadNextFrame();
1447if(this._isLODEnabled&&this._noActiveLODRequest&&F){this._animation.stop();
1448E.set_cancel(true);
1449this._noActiveLODRequest=false;
1450this._enableDisableAllButtonsUnconditionally(false);
1451this._loadChildrenFromWebService(F);
1452return false;
1453}},_loadNextFrame:function(){var E=this._getCurrentItemIndex();
1454var I=this._getVisibleItemsCount()||1;
1455var G=this.get_items().length;
1456var F=null;
1457var H=this.isScrollingForward()?E+I:E-1;
1458if(this.isViewportScrollMode()){H=this.isScrollingForward()?H+I-1:H-I+1;
1459}if(this._isLODEnabled&&!this.get_items()[H]){if(!this._lastLODRequestPassed){F=G;
1460}}return F;
1461},isVisible:function(){return(c.getInvisibleParent(this.get_element())==null);
1462},repaint:function(){window.clearTimeout(this._automaticAdvanceTimeOut);
1463var E=this.get_currentItemIndex();
1464this._repaintUI();
1465if(!this._animation){this._startAutomaticAdvance();
1466}else{if(this._animation.dispose){this._animation.dispose();
1467}this._animation=null;
1468this._startAutoPlayItems();
1469}this.set_currentItemIndex(E);
1470},_repaintUI:function(){if(this._isWidthInPersent()){this._relativeWrapper.style.width=this._relativeWrapper.offsetWidth+"px";
1471this._clipElement.style.width=this._clipElement.offsetWidth+"px";
1472}this._createUI();
1473this._enableDisableButtons();
1474},get_webServiceSettings:function(){return this._webServiceSettings;
1475},set_webServiceSettings:function(F){var E=Sys.Serialization.JavaScriptSerializer.deserialize(F);
1476this._webServiceSettings=new b.WebServiceSettings(E);
1477},get_enabled:function(){return this._enabled;
1478},get_rippleZonesConfiguration:function(){return[{element:this.get_element(),rippleConfigurations:[{containerSelector:".rrButton"}]}];
1479},set_enabled:function(E){if(E!=this._enabled){this._enabled=E;
1480if(this.get_isInitialized()){if(E){this.start();
1481}else{this.stop();
1482}}}}};
1483a.registerControlProperties(b.RadRotator,{skin:"Default",pauseOnMouseOver:true,persistCurrentItemOnPostBack:false,items:null,rotatorType:b.RotatorType.AutomaticAdvance,wrapFrames:true,scrollDirection:b.RotatorScrollDirection.Left+b.RotatorScrollDirection.Right,frameDuration:2000,controlButtons:{},initialItemIndex:0,slideShowAnimationSettings:{},animationDirection:b.RotatorScrollDirection.Left,enableRandomOrder:false,enableDragScrolling:false,appendClientDataBoundItems:false});
1484var o="itemClicking",n="itemClicked",y="mouseOver",x="mouseOut",t="itemShowing",u="itemShown",v="load",f="buttonOver",e="buttonOut",d="buttonClick",r="itemsRequested",q="itemsRequestFailed",s="itemsRequesting",p="itemDataBound",i="dataBound",C="templateDataBound";
1485a.registerControlEvents(b.RadRotator,[o,n,y,x,t,u,v,f,e,d,r,q,s,p,i,C]);
1486b.RadRotator.registerClass("Telerik.Web.UI.RadRotator",b.RadWebControl);
1487var h=function(F,E){b[F]=function(){var G=Array.prototype.slice.call(arguments);
1488b[F].initializeBase(this,G);
1489};
1490b[F].registerClass("Telerik.Web.UI."+F,E);
1491};
1492b.RotatorEventArgs=function(E){b.RotatorEventArgs.initializeBase(this);
1493this._item=E;
1494};
1495b.RotatorEventArgs.prototype={get_item:function(){return this._item;
1496}};
1497b.RotatorEventArgs.registerClass("Telerik.Web.UI.RotatorEventArgs",Sys.EventArgs);
1498h("RadRotatorEventArgs",Telerik.Web.UI.RotatorEventArgs);
1499b.RotatorCancelEventArgs=function(E){b.RotatorCancelEventArgs.initializeBase(this);
1500this._item=E;
1501};
1502b.RotatorCancelEventArgs.prototype={get_item:function(){return this._item;
1503}};
1504b.RotatorCancelEventArgs.registerClass("Telerik.Web.UI.RotatorCancelEventArgs",Sys.CancelEventArgs);
1505h("RadRotatorCancelEventArgs",Telerik.Web.UI.RotatorCancelEventArgs);
1506b.RotatorButtonEventArgs=function(E){b.RotatorButtonEventArgs.initializeBase(this);
1507this._button=E;
1508};
1509b.RotatorButtonEventArgs.prototype={get_button:function(){return this._button;
1510}};
1511b.RotatorButtonEventArgs.registerClass("Telerik.Web.UI.RotatorButtonEventArgs",Sys.CancelEventArgs);
1512h("RadRotatorButtonEventArgs",Telerik.Web.UI.RotatorButtonEventArgs);
1513b.RotatorErrorEventArgs=function(E){b.RotatorErrorEventArgs.initializeBase(this);
1514this._cancelErrorAlert=false;
1515this._errorMessage=E;
1516};
1517b.RotatorErrorEventArgs.prototype={get_errorMessage:function(){return this._errorMessage;
1518},get_cancelErrorAlert:function(){return this._cancelErrorAlert;
1519},set_cancelErrorAlert:function(E){this._cancelErrorAlert=E;
1520}};
1521b.RotatorErrorEventArgs.registerClass("Telerik.Web.UI.RotatorErrorEventArgs",Sys.EventArgs);
1522h("RadRotatorErrorEventArgs",Telerik.Web.UI.RotatorErrorEventArgs);
1523b.RotatorItemDataBoundEventArgs=function(F,E){var G=this;
1524b.RotatorItemDataBoundEventArgs.initializeBase(G);
1525G._item=F;
1526G._dataItem=E;
1527};
1528b.RotatorItemDataBoundEventArgs.prototype={get_item:function(){return this._item;
1529},get_dataItem:function(){return this._dataItem;
1530}};
1531b.RotatorItemDataBoundEventArgs.registerClass("Telerik.Web.UI.RotatorItemDataBoundEventArgs",Sys.EventArgs);
1532h("RadRotatorItemDataBoundEventArgs",Telerik.Web.UI.RotatorItemDataBoundEventArgs);
1533b.RadRotatorItem=function(E){b.RadRotatorItem.initializeBase(this,[E]);
1534this._visible=null;
1535this._cssClass=null;
1536this._index=-1;
1537};
1538b.RadRotatorItem.prototype={initialize:function(){b.RadRotatorItem.callBaseMethod(this,"initialize");
1539this._tickers=null;
1540},dispose:function(){b.RadRotatorItem.callBaseMethod(this,"dispose");
1541},get_index:function(){if(this._index==-1){var F=0;
1542var E=this.get_element();
1543var G=E.parentNode;
1544if(null!=G){var H=c.getChildrenByTagName(G,"li");
1545if(null!=H){F=0;
1546while(F<H.length&&H[F]!=E){F++;
1547}if(F==H.length){F=0;
1548}}}this._index=F;
1549}return this._index;
1550},getServerIndex:function(){var F=a(this.get_element());
1551var E=F.children("div");
1552if(E.length>0){var G=E[0].id.match(/_i(\d+)$/);
1553if(G){return parseInt(G[1],10);
1554}}return this.get_index();
1555},get_visible:function(){return this._visible;
1556},set_visible:function(E){this._visible=E;
1557},get_cssClass:function(){return this._cssClass;
1558},set_cssClass:function(E){this._cssClass=E;
1559},get_tickers:function(){if(null==this._tickers&&typeof(b.RadTicker)!="undefined"){this._tickers=[];
1560for(var F=0,G=c.radControls.length;
1561F<G;
1562F++){var E=c.radControls[F];
1563if(b.RadTicker.isInstanceOfType(E)&&c.isDescendant(this.get_element(),E.get_element())){Array.add(this._tickers,E.get_id());
1564}}}return this._tickers;
1565}};
1566b.RadRotatorItem.registerClass("Telerik.Web.UI.RadRotatorItem",Sys.UI.Control);
1567b.RadRotatorAnimationClass=function(){this._scrollAnimations={};
1568};
1569b.RadRotatorAnimationClass.prototype={get_scrollAnimationProperties:function(E){if(!E||!this._scrollAnimations[E]){return null;
1570}return this._scrollAnimations[E].properties;
1571},set_scrollAnimationProperties:function(G,F){if(!G){return;
1572}var E=this._scrollAnimations;
1573if(!E[G]){E[G]={};
1574}if(typeof(F)=="undefined"||F==null){delete E[G].properties;
1575}else{E[G].properties=F;
1576}},get_scrollAnimationOptions:function(G){if(!G){return null;
1577}var E=this._scrollAnimations;
1578var F=E[G]?E[G].options:{};
1579F=a.extend({},{xR:this.get_xRadius(G),yR:this.get_yRadius(G),xO:this.get_xCenter(G),yO:this.get_yCenter(G),minScale:this.get_minimumScale(G),xItemSpacing:this.get_xItemSpacing(G),yItemSpacing:this.get_yItemSpacing(G),selectedItemOffsetX:this.get_selectedItemOffsetX(G),selectedItemOffsetY:this.get_selectedItemOffsetY(G),matrix:this.get_matrix(G),reflectionHeight:this.get_reflectionHeight(G),reflectionOpacity:this.get_reflectionOpacity(G),coverFlowDirection:this.get_coverFlowDirection(G)},F);
1580return F;
1581},set_scrollAnimationOptions:function(G,F){if(!G){return;
1582}var E=this._scrollAnimations;
1583if(!E[G]){E[G]={};
1584}if(typeof(F)=="undefined"||F==null){delete E[G].options;
1585}E[G].options=a.extend({},this.get_scrollAnimationOptions(),F);
1586},get_xRadius:function(E){return this._getScrollAnimationOption(E,"xR");
1587},set_xRadius:function(E,F){this._setScrollAnimationOption(E,"xR",F);
1588},get_yRadius:function(E){return this._getScrollAnimationOption(E,"yR");
1589},set_yRadius:function(E,F){this._setScrollAnimationOption(E,"yR",F);
1590},get_xCenter:function(E){return this._getScrollAnimationOption(E,"xO");
1591},set_xCenter:function(E,F){this._setScrollAnimationOption(E,"xO",F);
1592},get_yCenter:function(E){return this._getScrollAnimationOption(E,"yO");
1593},set_yCenter:function(E,F){this._setScrollAnimationOption(E,"yO",F);
1594},get_minimumScale:function(E){return this._getScrollAnimationOption(E,"minScale");
1595},set_minimumScale:function(F,E){this._setScrollAnimationOption(F,"minScale",E);
1596},get_xItemSpacing:function(E){return this._getScrollAnimationOption(E,"xItemSpacing");
1597},set_xItemSpacing:function(E,F){this._setScrollAnimationOption(E,"xItemSpacing",F);
1598},get_yItemSpacing:function(E){return this._getScrollAnimationOption(E,"yItemSpacing");
1599},set_yItemSpacing:function(E,F){this._setScrollAnimationOption(E,"yItemSpacing",F);
1600},get_selectedItemOffsetX:function(E){return this._getScrollAnimationOption(E,"selectedItemOffsetX");
1601},set_selectedItemOffsetX:function(E,F){this._setScrollAnimationOption(E,"selectedItemOffsetX",F);
1602},get_selectedItemOffsetY:function(E){return this._getScrollAnimationOption(E,"selectedItemOffsetY");
1603},set_selectedItemOffsetY:function(E,F){this._setScrollAnimationOption(E,"selectedItemOffsetY",F);
1604},get_matrix:function(F){var E=this._getScrollAnimationOption(F,"matrix");
1605E=a.extend({},{m11:Number.NaN,m12:Number.NaN,m21:Number.NaN,m22:Number.NaN},E);
1606return E;
1607},set_matrix:function(F,E){this._setScrollAnimationOption(F,"matrix",E);
1608},get_reflectionHeight:function(E){return this._getScrollAnimationOption(E,"reflectionHeight");
1609},set_reflectionHeight:function(F,E){this._setScrollAnimationOption(F,"reflectionHeight",E);
1610},get_reflectionOpacity:function(E){return this._getScrollAnimationOption(E,"reflectionOpacity");
1611},set_reflectionOpacity:function(F,E){this._setScrollAnimationOption(F,"reflectionOpacity",E);
1612},get_coverFlowDirection:function(E){return this._getScrollAnimationOption(E,"coverFlowDirection");
1613},set_coverFlowDirection:function(F,E){this._setScrollAnimationOption(F,"coverFlowDirection",E);
1614},_getScrollAnimationOption:function(F,E){if(!F||!this._scrollAnimations[F]||!this._scrollAnimations[F].options){return Number.NaN;
1615}return this._scrollAnimations[F].options[E];
1616},_setScrollAnimationOption:function(H,F,G){if(!H){return;
1617}var E=this._scrollAnimations;
1618if(!E[H]){E[H]={};
1619}if(!E[H].options){E[H].options={};
1620}E[H].options[F]=G;
1621},_removeScrollAnimation:function(F){var E=this._scrollAnimations[F];
1622if(E){delete E.options;
1623delete E.properties;
1624E=null;
1625}delete this._scrollAnimations[F];
1626},getInstance:function(){return this;
1627}};
1628b.RadRotatorAnimationClass.registerClass("Telerik.Web.UI.RadRotatorAnimationClass",null);
1629if(!b.RadRotatorAnimation){b.RadRotatorAnimation=new b.RadRotatorAnimationClass();
1630}})($telerik.$);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.