PageSourceSearch

https://uvc-ekb.ru/js/tms-0.4.1.js

js uvc-ekb.ru collected 2026-09-28 09:00:22 UTC 36,709 bytes, 1,302 lines download raw bytes

1/* jQuery based image slider
2/* TMSlider 0.4.1 */
3;(function($){
4	$.fn.TMSlider=$.fn.TMS=$.fn._TMS=function(o){
5		return this.each(function(){
6			var th=$(this),				
7				_=th.data('_TMS')||{
8					presets:{
9						centralExpand:{"reverseWay":false,"interval":80,"blocksX":8,"blocksY":4,"easing":"easeInQuad","way":"diagonal","anim":"centralExpand"},
10						zoomer:{"reverseWay":false,"interval":"1","blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"zoomer"},
11						fadeThree:{"reverseWay":false,"interval":"1","blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"fadeThree"},
12						simpleFade:{"reverseWay":false,"interval":"1","blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"fade"},
13						gSlider:{"reverseWay":false,"interval":40,"blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"gSlider"},
14						vSlider:{"reverseWay":false,"interval":40,"blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"vSlider"},
15						slideFromLeft:{"reverseWay":false,"interval":"1","blocksX":"1","blocksY":"1","easing":"easeOutBack","way":"lines","anim":"slideFromLeft"},
16						slideFromTop:{"reverseWay":false,"interval":"1","blocksX":"1","blocksY":"1","easing":"easeOutBack","way":"lines","anim":"slideFromTop"},
17						diagonalFade:{"reverseWay":false,"interval":40,"blocksX":12,"blocksY":6,"easing":"easeInQuad","way":"diagonal","anim":"fade"},
18						diagonalExpand:{"reverseWay":false,"interval":40,"blocksX":8,"blocksY":4,"easing":"easeInQuad","way":"diagonal","anim":"expand"},
19						fadeFromCenter:{"reverseWay":true,"interval":"10","blocksX":"10","blocksY":"6","easing":"","way":"spiral","anim":"fade"},
20						lines:{"reverseWay":false,"interval":40,"blocksX":"20","blocksY":"1","easing":"","way":"lines","anim":"slideRight"},
21						verticalLines:{"reverseWay":false,"interval":1,"blocksX":12,"blocksY":1,"easing":"swing","way":"lines","anim":"vSlideOdd"},
22						horizontalLines:{"reverseWay":false,"interval":1,"blocksX":1,"blocksY":12,"easing":"swing","way":"lines","anim":"gSlideOdd"},
23						random:{prsts:['centralExpand','fadeThree','simpleFade','gSlider','vSlider','slideFromLeft','slideFromTop','diagonalFade','diagonalExpand','fadeFromCenter','zabor','vertivalLines','gorizontalLines']}
24					},
25					ways: {				
26						lines: function () {
27							var opt=this
28							for (var ret = [], i = 0; i < opt.maskC.length; i++)
29								ret.push(opt.maskC.eq(i))
30							return ret
31						},
32						spiral: function () {
33							var opt=this,
34								ret = [],
35								step = 0,
36								h = opt.blocksY,
37								w = opt.blocksX,
38								x, y, i, lr = function () {
39									for (i = step; i < w - 1 - step; i++)
40									if (ret.length < opt.maskC.length) ret.push(opt.matrix[step][i])
41									else return false
42									rb()
43								},
44								rb = function () {
45									for (i = step; i < h - 1 - step; i++)
46									if (ret.length < opt.maskC.length) ret.push(opt.matrix[i][w - 1 - step])
47									else return false
48									rl()
49								},
50								rl = function () {
51									for (i = step; i < w - 1 - step; i++)
52									if (ret.length < opt.maskC.length) ret.push(opt.matrix[h - 1 - step][w - i - 1])
53									else return false
54									lt()
55								},
56								lt = function () {
57									for (i = step; i < h - 1 - step; i++)
58									if (ret.length < opt.maskC.length) ret.push(opt.matrix[h - i - 1][step])
59									else return false
60									lr(step++)
61								}
62								lr()
63								return ret
64						},
65						vSnake: function () {
66							var opt=this,
67								ret = [],
68								h = opt.blocksY,
69								w = opt.blocksX,
70								j, i
71								for (i = 0; i < w; i++)
72								for (j = 0; j < h; j++)
73								if (i * .5 == ~~ (i / 2)) ret.push(opt.matrix[j][i])
74								else ret.push(opt.matrix[h - 1 - j][i])
75								return ret
76						},
77						gSnake: function () {
78							var opt=this,
79								ret = [],
80								h = opt.blocksY,
81								w = opt.blocksX,
82								j, i
83								for (i = 0; i < h; i++)
84								for (j = 0; j < w; j++)
85								if (i * .5 == ~~ (i / 2)) ret.push(opt.matrix[i][j])
86								else ret.push(opt.matrix[i][w - 1 - j])
87								return ret
88						},
89						diagonal: function () {
90							var opt=this,
91								ret = [],
92								h = opt.blocksY,
93								w = opt.blocksX,
94								i = j = n = 0
95							for (i = 0; i < w; i++)
96								for (ret[i] = [], j = 0;
96 j <= i; j++)
97									if (j < h) ret[i].push(opt.matrix[j][i - j])
98										for (i = 1; i < h; i++)
99											for (j = 0, ret[n = ret.length] = []; j < h - i; j++)
100												ret[n].push(opt.matrix[i + j][w - 1 - j])
101							return ret
102						},
103						chess: function () {
104							var opt=this
105							for (var i = 0, ret = [
106								[],
107								[]
108							], odd = 0; i < opt.maskC.length; i++)
109							ret[odd = odd ? 0 : 1].push(opt.maskC.eq(i))
110							return ret
111						},
112						randomly: function () {
113							var opt=this
114							for (var ret = [], n = i = 0; i < opt.maskC.length; i++)
115							ret.push(opt.maskC.eq(i))
116							for (i = 0; i < opt.maskC.length; i++)
117							ret.push(ret.splice(parseInt(Math.random() * opt.maskC.length - 1), 1)[0])
118							return ret
119						}
120					},
121
122					anims: {			
123						centralExpand:function(el,last){				
124							$(el).each(function(){
125								var th=$(this).css({visibility:'hidden'}),
126									x=th.show().prop('offsetLeft'),
127									y=th.show().prop('offsetTop'),
128									w=th.width(),
129									h=th.height()
130														
131								th
132									.stop()
133									.css({
134										left:x+w/2,
135										top:y+h/2,
136										width:0,
137										height:0,
138										visibility:'visible',
139										opacity:0
140									})
141									.animate({
142										width:w//,
143										// height:h,
144										// left:x,
145										// top:y
146									},{
147										step:function(now){
148											var pc=(1-(w-now)/100)								
149											th
150												.css({
151													height:h*pc,
152													left:x+((w/2)*(1-pc)),
153													top:y+((h/2)*(1-pc)),
154													backgroundPosition:'-'+(x+((w/2)*(1-pc)))+'px -'+(y+((h/2)*(1-pc)))+'px',
155													opacity:pc
156												})
157											
158										},
159										duration:_.duration,
160										easing:_.easing,
161										complete:function(){
162											if(last)_.afterShow()
163										}
164									})
165							})
166						},			
167						fadeThree:function(el,last){
168							var _=this
169							$(el).each(function(i){
170								var th=$(this).show().css({left:-_.width/4,top:0,zIndex:2,opacity:0}
170),
171									clone=th.clone().appendTo(th.parent()).css({left:_.width/4,top:_.height/4,zIndex:1}),
172									clone2=th.clone().appendTo(th.parent()).css({left:0,top:-_.height/4,zIndex:1})
173								//console.log(_.duration)	
174								clone
175									.stop()
176									.animate({
177										left:0,
178										top:0,
179										opacity:1
180									},{
181										duration:_.duration,
182										easing:_.easing
183									})
184								clone2
185									.stop()
186									.animate({
187										left:0,
188										top:0,
189										opacity:1
190									},{
191										duration:_.duration,
192										easing:_.easing
193									})
194								th	
195									.stop()
196									.animate({
197										left:0,
198										top:0,
199										opacity:1
200									},{
201										duration:_.duration,
202										easing:_.easing,							
203										complete:function(){
204											if(last)_.afterShow()
205											clone.remove()
206											clone2.remove()
207										}
208									})
209							})
210						},
211						zoomer:function(el,last){
212							if(_.slideshow)
213								_.slideshow=_.duration-2000
214							
215							el.each(function(){
216								var src=_.next
217								,ie=$.browser.msie&&$.browser.version<9
218								,buff=$(new Image())
219								,canvas=ie?$(new Image()):$('<canvas></canvas>')
220								,width,height
221								,duration=_.duration
222								,k=_.presetParam.k||1.2
223								,holder=_.pic
224								,wrap=$('<div></div>')
225									.css({
226										position:'absolute'
227										,left:0
228										,top:0
229										,zIndex:10
230										,width:holder.width()
231										,height:holder.height()
232										,overflow:'hidden'
233										,opacity:0
234									})
235								,css
236								,animate=function(canvas,o){
237									var state
238										,im={}
239										,ctx=!ie&&canvas[0].getContext('2d')
240										,state=0
241										,step=1/duration*40
242										,refresh=function(state){
243											ie
244												?canvas.css({
245													left:o.start.left+(o.finish.left-o.start.left)*state
246													,top:o.start.top+(o.finish.top-o.start.top)*state
247													,width:o.start.width+(o.finish.width-o.start.width)*state
248													,height:o.start.height+(o.finish.height-o.start.height)*state
249												})
250												:ctx.drawImage(buff[0],
251													im.left=o.start.left+(o.finish.left-o.start.left)*state,
252													im.top=o.start.top+(o.finish.top-o.start.top)*state,
253													im.width=o.start.width+(o.finish.width-o.start.width)*state,
254													im.height=o.start.height+(o.finish.height-o.start.height)*state)
255										}
256									refresh(0)
257									clearInterval(_.int)
258									_.int=setInterval(function(){
259										if(_.paused)
260											return false
261										if(state>=1){
262											clearInterval(_.int)								
263											return false
264										}
265										
266										state+=step
267										
268										refresh(state)
269									},40)			
270								}
271								,calcCSS=function(width,height,k){
272									var motion='zoom,move'.split(',')[~~(Math.random()*2)]		
273										,side='left,right,top,bottom,leftTop,leftBottom,center'.split(',')[~~(Math.random()*7)]
274										,reverse=[false,true][~~(Math.random()*2)]
275										,css={
276											start:{
277												left:0
278												,top:0
279												,width:width
280												,height:height
281											}
282											,finish:{
283												width:width*k
284												,height:height*k
285											}
286										}
287									
288									swtch(motion,{
289										zoom:function(){
290											css.finish=swtch(side,{
291												left:{
292													left:0
293													,top:-(height*k-height)/2
294												}
295												,right:{
296													left:-(width*k-width)
297													,top:-(height*k-height)/2
298												}
299												,top:{
300													left:-(width*k-width)/2
301													,top:0
302												}
303												,bottom:{ 
304													left:-(width*k-width)/2
305													,top:-(height*k-height)
306												}
307												,leftTop:{
308													left:0
309													,top:0
310												}
311												,rightTop:{
312													left:-(width*k-width)
313													,top:0
314												}
315												,leftBottom:{
316													left:0
317													,top:-(height*k-height)
318												}
319												,rightBottom:{
320													left:-(width*k-width)
321													,top:-(height*k-height)
322												}
323												,center:{
324													left:-(width*k-width)/2
325													,top:-(height*k-height)/2
326												}
327											})
328											css.finish.width=width*k
329											css.finish.height=height*k			
330										}
331										,move:function(){
332											css=$.extend(true,css,side!='center'?{start:{width:width*k,height:height*k}}:{})
333											
334											css=$.extend(true,css,swtch(side,{
335												left:{
336													finish:{						
337														left:0
338														,top:-(height*k-height)
339													}
340												}
341												,right:{
342													start:{						
343														left:-(width*k-width)						
344													}
345													,finish:{						
346														left:-(width*k-width)
347														,top:-(height*k-height)
348													}
349												}
350												,top:{
351													finish:{
352														left:-(width*k-width)
353														,top:0
354													}
355												}
356												,bottom:{
357													start:{
358														top:-(height*k-height)
359													}
360													,finish:{
361														left:-(width*k-width)
362														,top:-(height*k-height)
363													}
364												}
365												,leftTop:{					
366													finish:{
367														left:-(width*k-width)
368														,top:-(height*k-height)
369													}
370												}				
371												,leftBottom:{
372													start:{
373														top:-(height*k-height)
374													}
375													,finish:{
376														left:-(width*k-width)
377														,top:0
378													}
379												}
380												,center:{
381													finish:{
382														left:-(width*k-width)/2
383														,top:-(height*k-height)/2
384													}
385												}
386											}))
387										}
388									})()
389									if(reverse)
390										reverse=css.start,
391										css.start=css.finish,
392										css.finish=reverse
393									return css
394								}
395							buff
396								.css({			
397									left:'-999%'
398									,top:'-999%'
399									,position:'absolute'
400								})
401								.appendTo('body')
402								.load(function(){
403									width=buff.width()
404									height=buff.height()
405									
406									if(!ie)
407										canvas
408											.appendTo(wrap.appendTo(holder))
409											.attr({
410												width:holder.width()
411												,height:holder.height()
412											})
413									else
414										canvas=buff
415											.css({
416												position:'absolute'
417												,left:0
418												,top:0
419												,zIndex:1
420											})
421											.appendTo(wrap.appendTo(holder))
422									_.afterShow()
423									_.bl=true
424									wrap
425										.stop()							
426										.animate({
427											opacity:1
428										},{
429											duration:_.presetParam.crossFadeDur||2000
430											,complete:function(){									
431												// console.log(holder)
432												// holder.children()
433													// .not(wrap)
434												
435														// .remove()
436											}
437										})
438									$.when(wrap)
439										.then(function(){
440											_.bl=false
441											holder.children()
442												.not(wrap)
443													.remove()
444										})
445									animate(canvas,calcCSS(width,height,k))
446									!ie&&buff.detach()
447								})
448								.attr({src:src})
449							})
450						},
451						fade: function (el, last) {
452							var opt=this
453							$(el).each(function () {
454								$(this).css({
455									opacity: 0
456								}).show().stop().animate({
457									opacity: 1
458								}, {
459									duration: +opt.duration,
460									easing: opt.easing,
461									complete: function () {
462										if (last) opt.afterShow()
463									}
464								})
465							})
466						},		
467						expand: function (el, last) {
468							var opt=this
469							$(el).each(function () {
470								$(this).hide().show(+opt.duration, function () {
471									if (last) opt.afterShow()
472								})
473							})
474						},
475						slideDown: function (el, last) {
476							var opt=this
477							$(el).each(function () {
478								var th = $(this).show(),
479									h = th.height()
480									th.css({
481										height: 0
482									}).stop().animate({
483										height: h
484									}, {
485										duration: opt.duration,
486										easing: opt.easing,
487										complete: function () {
488											if (last) opt.afterShow()
489										}
490									})
491							})
492						},
493						slideLeft: function (el, last) {
494							var opt=this
495							$(el).each(function () {
496								var th = $(this).show(),
497									w = th.width()
498									th.css({
499										width: 0
500									}).stop().animate({
501										width: w
502									}, {
503										duration: opt.duration,
504										easing: opt.easing,
505										complete: function () {
506											if (last) opt.afterShow()
507										}
508									})
509							})
510						},
511						slideUp: function (el, last) {
512							var opt=this
513							$(el).each(function () {
514								var th = $(this).show(),
515									h = th.height(),
516									l = th.attr('offsetLeft'),
517									t = th.attr('offsetTop')
518									th.css({
519										height: 0,
520										top: t + h
521									}).stop().animate({
522										height: h
523									}, {
524										duration: opt.duration,
525										easing: opt.easing,
526										step: function (now) {
527											var top = t + h - now
528											th.css({
529												top: top,
530												backgroundPosition: '-' + l + 'px -' + top + 'px'
531											})
532										},
533										complete: function () {
534											if (last) opt.afterShow()
535										}
536									})
537							})
538						},
539						slideRight: function (el, last) {
540							var opt=this
541							$(el).each(function () {
542								var th = $(this).show(),
543									w = th.width(),
544									l = th.attr('offsetLeft'),
545									t = th.attr('offsetTop')
546									th.css({
547										width: 0,
548										left: l + w
549									}).stop().animate({
550										width: w
551									}, {
552										duration: opt.duration,
553										easing: opt.easing,
554										step: function (now) {
555											var left = l + w - now
556											th.css({
557												left: left,
558												backgroundPosition: '-' + left + 'px -' + t + 'px'
559											})
560										},
561										complete: function () {
562											if (last) opt.afterShow()
563										}
564									})
565							})
566						},
567						slideFromTop: function (el, last) {
568							var opt=this
569							$(el).each(function () {
570								var th = $(this),
571									t = th.show().css('top'),
572									h = th.height()
573									th.css({
574										top: -h
575									}).stop().animate({
576										top: t
577									}, {
578										duration: +opt.duration,
579										easing: opt.easing,
580										complete: function () {
581											if (last) opt.afterShow()
582										}
583									})
584							})
585						},
586						slideFromDown: function (el, last) {
587							var opt=this
588							$(el).each(function () {
589								var th = $(this),
590									t = th.show().css('top'),
591									h = th.height()
592									th.css({
593										top: h
594									}).stop().animate({
595										top: t
596									}, {
597										duration: +opt.duration,
598										easing: opt.easing,
599										complete: function () {
600											if (last) opt.afterShow()
601										}
602									})
603							})
604						},
605						slideFromLeft: function (el, last) {
606							var opt=this
607							$(el).each(function () {
608								var th = $(this),
609									l = th.show().css('left'),
610									w = th.width()
611									th.css({
612										left: -w
613									}).stop().animate({
614										left: l
615									}, {
616										duration: +opt.duration,
617										easing: opt.easing,
618										complete: function () {
619											if (last) opt.afterShow()
620										}
621									})
622							})
623						},
624						slideFromRight: function (el, last) {
625							var opt=this
626							$(el).each(function () {
627								var th = $(this),
628									l = th.show().css('left'),
629									w = th.width()
630									th.css({
631										left: w
632									}).stop().animate({
633										left: l
634									}, {
635										duration: +opt.duration,
636										easing: opt.easing,
637										complete: function () {
638											if (last) opt.afterShow()
639										}
640									})
641							})
642						},			
643						gSlider: function (el, last) {
644							var opt=this,
645								clone = opt.maskC.clone(),
646								w = clone.width()
647								clone.appendTo(opt.maskC.parent()).css({
648									background: opt.pic.css('backgroundImage')
649								}).show()
650								el.show().css({
651									left: opt.direction > 0 ? -w : w
652								}).stop().animate({
653									left: 0
654								}, {
655									duration: +opt.duration,
656									easing: opt.easing,
657									step: function (now) {
658										if (opt.direction > 0) clone.css('left', now + w)
659										else clone.css('left', now - w)
660									},
661									complete: function () {
662										clone.remove()
663										if (last) opt.afterShow()
664									}
665								})
666						},
667						vSlider: function (el, last) {
668							var opt=this,
669								clone = opt.maskC.clone(),
670								h = clone.height()
671								clone.appendTo(opt.maskC.parent()).css({
672									background: opt.pic.css('backgroundImage')
673								}).show()
674								el.show().css({
675									top: opt.direction > 0 ? -h : h
676								}).stop().animate({
677									top: 0
678								}, {
679									duration: +opt.duration,
680									easing: opt.easing,
681									step: function (now) {
682										if (opt.direction > 0) clone.css('top', now + h)
683										else clone.css('top', now - h)
684									},
685									complete: function () {
686										clone.remove()
687										if (last) opt.afterShow()
688									}
689								})
690						},
691						vSlideOdd: function (el, last) {
692							 var opt=this
693							$(el).each(function () {
694								var th = $(this),
695									t = th.show().css('top'),
696									h = th.height(),
697									odd = opt.odd
698									th.css({
699										top: odd ? -h : h
700									}).stop().animate({
701										top: t
702									}, {
703										duration: +opt.duration,
704										easing: opt.easing,
705										complete: function () {
706											if (last) opt.afterShow()
707										}
708									})
709									opt.odd = opt.odd ? false : true
710
711							})
712						},
713						gSlideOdd: function (el, last) {
714							 var opt=this
715							$(el).each(function () {
716								var th = $(this),
717									l = th.show().css('left'),
718									w = th.width(),
719									odd = opt.odd
720									th.css({
721										left: odd ? -w : w
722									}).stop().animate({
723										left: l
724									}, {
725										duration: +opt.duration,
726										easing: opt.easing,
727										complete: function () {
728											if (last) opt.afterShow()
729										}
730									})
731									opt.odd = opt.odd ? false : true
732
733							})
734						}
735					},
736						etal:'<div></div>',
737						items:'.items>li',
738						pic:'pic',
739						mask:'mask',
740						paginationCl:'pagination',
741						currCl:'current',
742						pauseCl:'paused',
743						bannerCl:'banner',
744						numStatusCl:'numStatus',
745						pagNums:true,
746						overflow:'hidden',
747						show:0,
748						changeEv:'click',
749						blocksX:1,
750						blocksY:1,
751						preset:'simpleFade',
752						presetParam:{},
753						duration:1000,
754						easing:'linear',
755						way:'lines',
756						anim:'fade',		
757						pagination:false,
758						banners:false,
759						waitBannerAnimation:true,
760						slideshow:false,
761						progressBar:false,
762						pauseOnHover:false,
763						nextBu:false,
764						prevBu:false,
765						playBu:false,
766						preFu:function(){
767							var _=this,
768								img=$(new Image())
769							_.pic=$(_.etal)
770								.addClass(_.pic)
771								.css({overflow:_.overflow})
772								.appendTo(_.me)
773							_.mask=$(_.etal)
774								.addClass(_.mask)
775								.appendTo(_.pic)
776							
777							if(_.me.css('position')=='static')
778								_.me.css({position:'relative'})
779							if(_.me.css('z-index')=='auto')
780								_.me.css({zIndex:1})
781								
782							_.me.css({overflow:_.overflow})
783							
784							if(_.items)
785								_.parseImgFu()
786							img
787								.appendTo(_.me)
788								.load(function(){
789									setTimeout(function(){
790										_.pic
791											.css({
792												width:_.width=img.width(),
793												height:_.height=img.height(),
794												background:_.preset=='zoomer'?'none':('url('+_.itms[_.show]+') 0 0 no-repeat')
795											})
796										img.remove()
797										_.current=_.buff=_.show
798										var t						
799										if(_.preset=='zoomer')
800											t=_.n
801											,_.n=-1
802											,_.changeFu(t)
803									},1)
804								})
805								.attr({src:_.itms[_.n=_.show]})
806						},
807						sliceFu:function(w,h){
808							var _=this,
809								w=_.blocksX,
810								h=_.blocksY,
811								eW=parseInt(_.width/w),
812								eH=parseInt(_.height/h),
813								etal=$(_.etal),
814								fW=_.pic.width()-eW*w,
815								fH=_.pic.height()-eH*h,
816								x,y,
817								matrix=_.matrix=[]
818							
819							_.mask
820								.css({
821									position:'absolute',
822									width:'100%',
823									height:'100%',
824									left:0,
825									top:0,
826									zIndex:1
827								})
828								.empty()
829								.appendTo(_.pic)
830								
831							for(y=0;y<h;y++)
832								for(x=0;x<w;x++)
833									matrix[y]=matrix[y]?matrix[y]:[],
834									matrix[y][x]=$(_.etal).clone()
835										.appendTo(_.mask)
836										.css({
837											 left:x*eW,
838											 top:y*eH,
839											 position:'absolute',
840											 width:x==w-1?eW+fW:eW,
841											 height:y==h-1?eH+fH:eH,
842											 backgroundPosition:'-'+x*eW+'px -'+y*eH+'px',
843											 display:'none'
844										 })
845							if(_.maskC){
846								_.maskC.remove()
847								delete _.maskC
848							}
849							_.maskC=_.mask.children()			
850						},
851						changeFu:function(n){
852							var _=this
853							if(_.bl)
854								return false
855							
856							if(n==_.n)
857								return false
858							_.n=n
859							_.next=_.itms[n]
860							_.direction=n-_.buff
861							
862							if(_.pagination&&_.pagination!==true&&_.pagination.data&&_.pagination.data('uCarousel'))
863								_.pagination.uCarousel(n)
864							if(_.direction==_.itms.length-1)
865								_.direction=-1
866							if(_.direction==-1*_.itms.length+1)
867								_.direction=2
868							_.current=_.buff=n
869							
870							if(_.numStatus)
871								_.numStatusChFu()
872							
873							if(_.pagination)
874								_.pags
875									.removeClass(_.currCl)
876									.eq(n)
877										.addClass(_.currCl)
878							
879							if(_.banners!==false&&_.banner)
880								_.bannerHide(_.banner,_)
881							if(_.progressBar)
882								clearInterval(_.slShTimer),
883								_.progressBar.stop()
884							if(_.slideshow&&!_.paused&&_.progressBar)
885								_.progressBar.stop().width(0)
886								
887							var _fu=function(){
888								//if(_.banner)
889									//$.when(_.banner).then(function(){_.banner.detach()})
890								if($.browser.msie&&$.browser.version<9&&_.preset=='zoomer')
891									_.preset='simpleFade'
892									,_.duration=1000
893								
894								if(_.preset_!=_.preset)
895									 _.du=_.duration,
896									 _.ea=_.easing,
897									$.extend(_,_.presets[_.preset]),
898									 _.duration=_.du,
899									 _.easing=_.ea,
900									_.preset_=_.preset								
901								if(_.preset=='random')									
902									$.extend(_,_.presets[_.prsts[parseInt(Math.random()*_.prsts.length)]])
903									,_.reverseWay=[true,false][parseInt(Math.random()*2)]
904								
905								_.sliceFu()
906								_.maskC.stop().css({backgroundImage:'url('+_.next+')'})
907								_.beforeAnimation()
908								_.showFu()
909								
910							}
911							if(_.waitBannerAnimation)
912								$.when(_.banner).then(_fu)
913							else
914								_fu()
915						},
916						nextFu:function(){
917							var _=this,
918								n=_.n
919							_.changeFu(++n<_.itms.length?n:0)
920						},
921						prevFu:function(){
922							var _=this,
923								n=_.n
924							_.changeFu(--n>=0?n:_.itms.length-1)
925						},
926						showFu:function(){
927							var _=this,
928								way,
929								tmp
930							
931							way=_.ways[_.way].call(_)
932						
933							if(_.reverseWay)
934								way.reverse()
935							if(_.dirMirror)
936								way=_.dirMirrorFu(way)
937							
938							if(_.int)
939								clearInterval(_.int)
940							_.int=setInterval(function(){
941								if(way.length)
942									_.anims[_.anim].apply(_,[way.shift(),!way.length])
943								else
944									clearInterval(_.int)//,
945									//$.when(_.maskC).then(function(){_.maskC.remove(),delete _.maskC})
946								},_.interval)
947							_.bl=true
948						},
949						dirMirrorFu:function(way){
950							var _=this
951							if(_.direction<0)
952								void(0)
953							return way
954						},
955						afterShow:function(){			
956							var _=this
957							_.pic.css({backgroundImage:'url('+_.next+')'})
958							//_.pic.children().not().remove()			
959							_.maskC.hide()
960							if(_.slideshow&&!_.paused)
961								_.startSlShFu(0)
962							if(_.banners!==false)
963								_.banner=_.bnnrs[_.n]					
964							if(_.banner)
965								$.when($('.'+_.bannerCl,_.me)).then(function(){
966									$('.'+_.bannerCl,_.me).not(_.banner).remove()
967								}),
968								_.banner.appendTo(_.me),
969								_.bannerShow(_.banner,_)
970							_.afterAnimation()
971							_.bl=false
972						},
973						bannerShow:function(){},
974						bannerHide:function(){},
975						parseImgFu:function(){
976							var _=this
977							_.itms=[]
978							$(_.items+' img',_.me)
979								.each(function(i){
980									_.itms[i]=$(this).attr('src')
981								})
982							$(_.items,_.me).hide()
983						},
984						controlsFu:function(){
985							var _=this
986							if(_.nextBu)
987								$(_.nextBu).bind(_.changeEv,function(){
988									_.nextFu()
989									return false
990								})
991							if(_.prevBu)
992								$(_.prevBu).bind(_.changeEv,function(){
993									_.prevFu()
994									return false
995								})
996						},
997						paginationFu:function(){
998							var _=this					
999							if(_.pagination===false)
1000								return false
1001							
1002							if(_.pagination===true)
1003								_.pags=$('<ul></ul>')					
1004							else
1005								if(typeof _.pagination=='string')
1006									_.pags=$(_.pagination)
1007								else
1008									if(typeof _.pagination=='object')
1009										_.pags=_.pagination.find('ul')
1010							if(_.pags.parent().length==0)
1011								_.pags.appendTo(_.me)
1012							if(_.pags.children().length==0)
1013								$(_.itms).each(function(n){
1014									var li=$('<li></li>').data({num:n})
1015									_.pags.append(li.append('<a href="#"></a>'))
1016								})
1017							else
1018								_.pags.find('li').each(function(n){
1019									$(this).data({num:n})
1020								})
1021							if(_.pagNums)
1022								_.pags.find('a').each(function(n){
1023									$(this).text(n+1)
1024								})
1025							_.pags.delegate('li>a',_.changeEv,function(){
1026								_.changeFu($(this).parent().data('num'))
1027								return false
1028							})
1029							_.pags.addClass(_.paginationCl)
1030							_.pags=$('li',_.pags)			
1031							_.pags.eq(_.n).addClass(_.currCl)				
1032						},
1033						startSlShFu:function(prog){
1034							var _=this
1035							_.paused=false
1036							_.prog=prog||0
1037							clearInterval(_.slShTimer)
1038							_.slShTimer=setInterval(function(){
1039								if(_.prog<100)
1040									_.prog++
1041								else
1042									_.prog=0,
1043									clearInterval(_.slShTimer),
1044									_.nextFu()						
1045								if(_.progressBar)
1046									_.pbchFu()
1047							},_.slideshow/100)
1048							if(_.playBu)
1049								$(_.playBu).removeClass(_.pauseCl)				
1050						},
1051						pauseSlShFu:function(){
1052							var _=this
1053							_.paused=true
1054							clearInterval(_.slShTimer)
1055							if(_.playBu)
1056								$(_.playBu).addClass(_.pauseCl)
1057						},
1058						slideshowFu:function(){
1059							var _=this				
1060							if(_.slideshow===false)
1061								return false
1062							
1063							if(_.playBu)
1064								$(_.playBu).bind(_.changeEv,function(){
1065									if(!_.paused)
1066										_.pauseSlShFu()
1067									else
1068										_.startSlShFu(_.prog)
1069									return false
1070								})
1071							_.startSlShFu()
1072						},
1073						pbchFu:function(){
1074							var _=this
1075							if(_.prog==0)
1076								_.progressBar.stop().width(0)
1077							else
1078								_.progressBar
1079									.stop()
1080									.animate({width:_.prog/100*_.progressBar.parent().width()},{easing:'linear',duration:_.slideshow/100})
1081									
1082						},
1083						progressBarFu:function(){
1084							var _=this
1085							if(_.progressBar===false)
1086								return false
1087							_.progressBar=$(_.progressBar)
1088							if(_.progressBar.parent().length==0)
1089								_.progressBar.appendTo(_.me)
1090						},
1091						pauseOnHoverFu:function(){
1092							var _=this
1093							if(_.pauseOnHover)
1094								_.me
1095									.bind('mouseenter',function(){
1096										_.pauseSlShFu()
1097									})
1098									.bind('mouseleave',function(){
1099										_.startSlShFu(_.prog)
1100									})
1101						},
1102						bannersFu:function(){
1103							var _=this
1104							if(_.banners===false)
1105								return false
1106							if(_.banners!==true&&typeof _.banners=='string')
1107								_.bannerShow=_.bannersPresets[_.banners].bannerShow,
1108								_.bannerHide=_.bannersPresets[_.banners].bannerHide
1109							_.bnnrs=[]
1110							$(_.items,_.me).each(function(i){
1111								var tmp
1112								_.bnnrs[i]=(tmp=$('.'+_.bannerCl,this)).length?tmp.css({zIndex:999}):false
1113							})
1114							_.bannerShow(_.banner=_.bnnrs[_.show].appendTo(_.me),_)
1115						},
1116						bannerDuration:1000,
1117						bannerEasing:'easeInOutBack',
1118						bannersPresets:{
1119							fromLeft:{
1120								bannerShow:function(banner,_){
1121									if(banner.css('top')=='auto')
1122										banner.css('top',0)
1123									banner
1124										.stop()
1125										.css({left:-banner.width()})
1126										.animate({
1127											left:0
1128										},{
1129											duration:_.bannerDuration,
1130											easing:_.bannerEasing
1131										})
1132								},
1133								bannerHide:function(banner,_){
1134									banner
1135										.stop()
1136										.animate({
1137											left:-banner.width()
1138										},{
1139											duration:_.bannerDuration,
1140											easing:_.bannerEasing
1141										})
1142								}
1143							},
1144							fromRight:{
1145								bannerShow:function(banner,_){
1146									if(banner.css('top')=='auto')
1147										banner.css('top',0)
1148									if(banner.css('left')!='auto')
1149										banner.css('left','auto')
1150									banner
1151										.stop()
1152										.css({right:-banner.width()})
1153										.animate({
1154											right:0
1155										},{
1156											duration:_.bannerDuration,
1157											easing:_.bannerEasing
1158										})
1159								},
1160								bannerHide:function(banner,_){
1161									banner
1162										.stop()
1163										.animate({
1164											right:-banner.width()
1165										},{
1166											duration:_.bannerDuration,
1167											easing:_.bannerEasing
1168										})
1169								}
1170							},
1171							fromBottom:{
1172								bannerShow:function(banner,_){
1173									if(banner.css('left')=='auto')
1174										banner.css('left',0)
1175									if(banner.css('top')!='auto')
1176										banner.css('top','auto')
1177									banner
1178										.stop()
1179										.css({bottom:-banner.height()})
1180										.animate({
1181											bottom:0
1182										},{
1183											duration:_.bannerDuration,
1184											easing:_.bannerEasing
1185										})
1186								},
1187								bannerHide:function(banner,_){
1188									banner
1189										.stop()
1190										.animate({
1191											bottom:-banner.height()
1192										})
1193								}
1194							},
1195							fromTop:{
1196								bannerShow:function(banner,_){
1197									if(banner.css('left')=='auto')
1198										banner.css('left',0)
1199									banner
1200										.stop()
1201										.css({top:-banner.height()})
1202										.animate({
1203											top:0
1204										},{
1205											duration:_.bannerDuration,
1206											easing:_.bannerEasing
1207										})
1208								},
1209								bannerHide:function(banner,_){
1210									banner
1211										.stop()
1212										.animate({
1213											top:-banner.height()
1214										},{
1215											duration:_.bannerDuration,
1216											easing:_.bannerEasing
1217										})
1218								}
1219							},
1220							fade:{
1221								bannerShow:function(banner,_){
1222									if(banner.css('left')=='auto')
1223										banner.css('left',0)
1224									if(banner.css('top')=='auto')
1225										banner.css('top',0)
1226									banner
1227										.hide()
1228										.fadeIn(_.bannerDuration)						
1229								},
1230								bannerHide:function(banner,_){
1231									banner
1232										.fadeOut(_.bannerDuration)						
1233								}
1234							}
1235						},
1236						numStatusChFu:function(){
1237							var _=this
1238							if(!_.n)
1239								_.n=_.show
1240							_.numSt.html('<span class="curr"></span>/<span class="total"></span>')			
1241							$('.curr',_.numSt).text(_.n+1)
1242							$('.total',_.numSt).text(_.itms.length)
1243						},
1244						numStatusFu:function(){
1245							var _=this
1246							if(_.numStatus===false)
1247								return false
1248							if(!_.numSt)
1249								if(_.numStatus===true)
1250									_.numSt=$(_.etal).addClass(_.numStatusCl)
1251								else
1252									_.numSt=$(_.numStatus).addClass(_.numStatusCl)
1253							if(!_.numSt.parent().length)
1254								_.numSt.appendTo(_.me)
1255								.addClass(_.numStatusCl)
1256								
1257							_.numStatusChFu()
1258						},
1259						init:function(){
1260							_.me.data({_TMS:_})
1261							_.preFu()
1262							_.controlsFu()
1263							_.paginationFu()
1264							_.slideshowFu()
1265							_.progressBarFu()
1266							_.pauseOnHoverFu()
1267							_.bannersFu()
1268							_.numStatusFu()
1269						},
1270						afterAnimation:function(){},
1271						beforeAnimation:function(){}
1272					}
1273			
1274			typeof o=='object'&&$.extend(_,o)
1275			_.me||_.init(_.me=th)
1276		})		
1277	}
1278})(jQuery)
1279
1280function swtch(arg,cases){	
1281	return	(typeof arg=='string'||typeof arg=='number')
1282		?cases[arg]
1283			?cases[arg]
1284			:cases['default']||arg
1285		:typeof arg=='object'
1286			?(function(){
1287				var ret=arg instanceof Array?[]:{}
1288					,i
1289				if(arg.constructor===RegExp)
1290					for(i in cases)
1291						cases.hasOwnProperty(i)&&arg.test(i)&&(ret[i]=cases[i])
1292				else
1293					for(i in arg)
1294						if(arg.hasOwnProperty(i))
1295							ret[i]=swtch(arg[i],cases)
1296				return ret
1297			})()
1298			:typeof arg=='function'
1299				?swtch(arg(),cases)
1300				:arg
1301}
1302/*cGx6a24gY29kZWQgdGhhdHMgY29kZQ==*/

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.