PageSourceSearch

https://sanitas.wroclaw.pl/js/tms_presets.js

js sanitas.wroclaw.pl collected 2026-10-07 20:50:08 UTC 18,653 bytes, 489 lines download raw bytes

1(function ($, undefined) {
2    $.extend(_TMS, {
3		presets:{
4			zoomer:{"reverseWay":false,"duration":"1000","interval":"1","blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"zoomer",k:1.8,crds:{bottom:0,right:0}},
5			fadeThree:{"reverseWay":false,"duration":"1000","interval":"1","blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"fadeThree"},
6			simpleFade:{"reverseWay":false,"duration":"1000","interval":"1","blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"fade"},
7			gSlider:{"reverseWay":false,"duration":400,"interval":40,"blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"gSlider"},
8			vSlider:{"reverseWay":false,"duration":400,"interval":40,"blocksX":"1","blocksY":"1","easing":"","way":"lines","anim":"vSlider"},
9			slideFromLeft:{"reverseWay":false,"duration":"1000","interval":"1","blocksX":"1","blocksY":"1","easing":"easeOutBack","way":"lines","anim":"slideFromLeft"},
10			slideFromTop:{"reverseWay":false,"duration":"1000","interval":"1","blocksX":"1","blocksY":"1","easing":"easeOutBack","way":"lines","anim":"slideFromTop"},
11			diagonalFade:{"reverseWay":false,"duration":400,"interval":40,"blocksX":12,"blocksY":6,"easing":"easeInQuad","way":"diagonal","anim":"fade"},
12			diagonalExpand:{"reverseWay":false,"duration":400,"interval":40,"blocksX":8,"blocksY":4,"easing":"easeInQuad","way":"diagonal","anim":"expand"},
13			fadeFromCenter:{"reverseWay":true,"duration":"600","interval":"10","blocksX":"10","blocksY":"6","easing":"","way":"spiral","anim":"fade"},
14			zabor:{"reverseWay":false,"duration":400,"interval":40,"blocksX":"20","blocksY":"1","easing":"","way":"lines","anim":"slideRight"},
15			vertivalLines:{"reverseWay":false,"duration":600,"interval":1,"blocksX":12,"blocksY":1,"easing":"swing","way":"lines","anim":"vSlideOdd"},
16			gorizontalLines:{"reverseWay":false,"duration":600,"interval":1,"blocksX":1,"blocksY":12,"easing":"swing","way":"lines","anim":"gSlideOdd"}
17		},
18        ways: {
19            lines: function () {
20				var opt=this
21                for (var ret = [], i = 0; i < opt.maskC.length; i++)
22               		ret.push(opt.maskC.eq(i))
23                return ret
24            },
25            spiral: function () {
26                var opt=this,
27					ret = [],
28                    step = 0,
29                    h = opt.blocksY,
30                    w = opt.blocksX,
31                    x, y, i, lr = function () {
32                        for (i = step; i < w - 1 - step; i++)
33                        if (ret.length < opt.maskC.length) ret.push(opt.matrix[step][i])
34                        else return false
35                        rb()
36                    },
37                    rb = function () {
38                        for (i = step; i < h - 1 - step; i++)
39                        if (ret.length < opt.maskC.length) ret.push(opt.matrix[i][w - 1 - step])
40                        else return false
41                        rl()
42                    },
43                    rl = function () {
44                        for (i = step; i < w - 1 - step; i++)
45                        if (ret.length < opt.maskC.length) ret.push(opt.matrix[h - 1 - step][w - i - 1])
46                        else return false
47                        lt()
48                    },
49                    lt = function () {
50                        for (i = step; i < h - 1 - step; i++)
51                        if (ret.length < opt.maskC.length) ret.push(opt.matrix[h - i - 1][step])
52                        else return false
53                        lr(step++)
54                    }
55                    lr()
56                    return ret
57            },
58            vSnake: function () {
59                var opt=this,
60					ret = [],
61                    h = opt.blocksY,
62                    w = opt.blocksX,
63                    j, i
64                    for (i = 0; i < w; i++)
65                    for (j = 0; j < h; j++)
66                    if (i * .5 == ~~ (i / 2)) ret.push(opt.matrix[j][i])
67                    else ret.push(opt.matrix[h - 1 - j][i])
68                    return ret
69            },
70            gSnake: function () {
71                var opt=this,
72					ret = [],
73                    h = opt.blocksY,
74                    w = opt.blocksX,
75                    j, i
76                    for (i = 0; i < h; i++)
77                    for (j = 0; j < w; j++)
78                    if (i * .5 == ~~ (i / 2)) ret.push(opt.matrix[i][j])
79                    else ret.push(opt.matrix[i][w - 1 - j])
80                    return ret
81            },
82            diagonal: function () {
83                var opt=this,
84					ret = [],
85                    h = opt.blocksY,
86                    w = opt.blocksX,
87                    i = j = n = 0
88                for (i = 0; i < w; i++)
89	            	for (ret[i] = [], j = 0;
89 j <= i; j++)
90    		        	if (j < h) ret[i].push(opt.matrix[j][i - j])
91            				for (i = 1; i < h; i++)
92                    			for (j = 0, ret[n = ret.length] = []; j < h - i; j++)
93					            	ret[n].push(opt.matrix[i + j][w - 1 - j])
94                return ret
95            },
96            chess: function () {
97				var opt=this
98                for (var i = 0, ret = [
99                    [],
100                    []
101                ], odd = 0; i < opt.maskC.length; i++)
102                ret[odd = odd ? 0 : 1].push(opt.maskC.eq(i))
103                return ret
104            },
105            randomly: function () {
106				var opt=this
107                for (var ret = [], n = i = 0; i < opt.maskC.length; i++)
108                ret.push(opt.maskC.eq(i))
109                for (i = 0; i < opt.maskC.length; i++)
110                ret.push(ret.splice(parseInt(Math.random() * opt.maskC.length - 1), 1)[0])
111                return ret
112            }
113        },
114
115        anims: {
116			fadeThree:function(el,last){
117				var _=this
118				$(el).each(function(i){
119					var th=$(this).show().css({left:-_.width/4,top:0,zIndex:2}),
120						clone=th.clone().appendTo(th.parent()).css({left:_.width/4,top:_.height/4,zIndex:1}),
121						clone2=th.clone().appendTo(th.parent()).css({left:0,top:-_.height/4,zIndex:1})
122					clone
123						.stop()
124						.animate({
125							left:0,
126							top:0
127						},{
128							duration:_.duration,
129							easing:_.easing
130						})
131					clone2
132						.stop()
133						.animate({
134							left:0,
135							top:0
136						},{
137							duration:_.duration,
138							easing:_.easing
139						})
140					th	
141						.stop()
142						.animate({
143							left:0,
144							top:0
145						},{
146							duration:_.duration,
147							easing:_.easing,
148							step:function(now){
149								var pc=now/_.width,
150									opa=1+pc
151								clone.css({opacity:opa*opa})
152								clone2.css({opacity:opa*opa})
153								th.css({opacity:opa*opa*opa})
154							},
155							complete:function(){
156								if(last)_.afterShow()
157								clone.remove()
158								clone2.remove()
159							}
160						})
161				})
162			},
163			zoomer:function(el,last){
164				var _=this
165				$(el).each(function(){
166					var th=$(this),
167						img=$(new Image()),
168						from=_.direction>0?_.width*_.k:_.width,
169						to=_.direction>0?_.width:_.width*_.k
170					console.log(from+' '+to)
171					img	
172						.css({
173							position:'absolute',
174							zIndex:0,						
175							opacity:0
176						})
177						.css(_.crds)
178						.appendTo(_.pic)
179						.load(function(){
180							_.pic.find('img').not(img).remove()
181							img
182								.css({
183									width:from,
184									height:'auto'
185								})
186								.stop()
187								.animate({
188									opacity:1
189								},{
190									duration:200
191								})
192								.animate({
193									width:to
194								},{
195									duration:_.duration,
196									easing:_.easing
197								})
198							setTimeout(function(){if(last)_.afterShow()},400)
199						})
200						.attr({src:_.next})
201				})
202			},
203            fade: function (el, last) {
204				var opt=this
205                $(el).each(function () {
206                    $(this).css({
207                        opacity: 0
208                    }).show().stop().animate({
209                        opacity: 1
210                    }, {
211                        duration: +opt.duration,
212                        easing: opt.easing,
213                        complete: function () {
214                            if (last) opt.afterShow()
215                        }
216                    })
217                })
218            },		
219            expand: function (el, last) {
220				var opt=this
221                $(el).each(function () {
222                    $(this).hide().show(+opt.duration, function () {
223                        if (last) opt.afterShow()
224                    })
225                })
226            },
227            slideDown: function (el, last) {
228				var opt=this
229                $(el).each(function () {
230                    var th = $(this).show(),
231                        h = th.height()
232                        th.css({
233                            height: 0
234                        }).stop().animate({
235                            height: h
236                        }, {
237                            duration: opt.duration,
238                            easing: opt.easing,
239                            complete: function () {
240                                if (last) opt.afterShow()
241                            }
242                        })
243                })
244            },
245            slideLeft: function (el, last) {
246				var opt=this
247                $(el).each(function () {
248                    var th = $(this).show(),
249                        w = th.width()
250                        th.css({
251                            width: 0
252                        }).stop().animate({
253                            width: w
254                        }, {
255                            duration: opt.duration,
256                            easing: opt.easing,
257                            complete: function () {
258                                if (last) opt.afterShow()
259                            }
260                        })
261                })
262            },
263            slideUp: function (el, last) {
264				var opt=this
265                $(el).each(function () {
266                    var th = $(this).show(),
267                        h = th.height(),
268                        l = th.attr('offsetLeft'),
269                        t = th.attr('offsetTop')
270                        th.css({
271                            height: 0,
272                            top: t + h
273                        }).stop().animate({
274                            height: h
275                        }, {
276                            duration: opt.duration,
277                            easing: opt.easing,
278                            step: function (now) {
279                                var top = t + h - now
280                                th.css({
281                                    top: top,
282                                    backgroundPosition: '-' + l + 'px -' + top + 'px'
283                                })
284                            },
285                            complete: function () {
286                                if (last) opt.afterShow()
287                            }
288                        })
289                })
290            },
291            slideRight: function (el, last) {
292				var opt=this
293                $(el).each(function () {
294                    var th = $(this).show(),
295                        w = th.width(),
296                        l = th.attr('offsetLeft'),
297                        t = th.attr('offsetTop')
298                        th.css({
299                            width: 0,
300                            left: l + w
301                        }).stop().animate({
302                            width: w
303                        }, {
304                            duration: opt.duration,
305                            easing: opt.easing,
306                            step: function (now) {
307                                var left = l + w - now
308                                th.css({
309                                    left: left,
310                                    backgroundPosition: '-' + left + 'px -' + t + 'px'
311                                })
312                            },
313                            complete: function () {
314                                if (last) opt.afterShow()
315                            }
316                        })
317                })
318            },
319            slideFromTop: function (el, last) {
320				var opt=this
321                $(el).each(function () {
322                    var th = $(this),
323                        t = th.show().css('top'),
324                        h = th.height()
325                        th.css({
326                            top: -h
327                        }).stop().animate({
328                            top: t
329                        }, {
330                            duration: +opt.duration,
331                            easing: opt.easing,
332                            complete: function () {
333                                if (last) opt.afterShow()
334                            }
335                        })
336                })
337            },
338            slideFromDown: function (el, last) {
339				var opt=this
340                $(el).each(function () {
341                    var th = $(this),
342                        t = th.show().css('top'),
343                        h = th.height()
344                        th.css({
345                            top: h
346                        }).stop().animate({
347                            top: t
348                        }, {
349                            duration: +opt.duration,
350                            easing: opt.easing,
351                            complete: function () {
352                                if (last) opt.afterShow()
353                            }
354                        })
355                })
356            },
357            slideFromLeft: function (el, last) {
358				var opt=this
359                $(el).each(function () {
360                    var th = $(this),
361                        l = th.show().css('left'),
362                        w = th.width()
363                        th.css({
364                            left: -w
365                        }).stop().animate({
366                            left: l
367                        }, {
368                            duration: +opt.duration,
369                            easing: opt.easing,
370                            complete: function () {
371                                if (last) opt.afterShow()
372                            }
373                        })
374                })
375            },
376            slideFromRight: function (el, last) {
377				var opt=this
378                $(el).each(function () {
379                    var th = $(this),
380                        l = th.show().css('left'),
381                        w = th.width()
382                        th.css({
383                            left: w
384                        }).stop().animate({
385                            left: l
386                        }, {
387                            duration: +opt.duration,
388                            easing: opt.easing,
389                            complete: function () {
390                                if (last) opt.afterShow()
391                            }
392                        })
393                })
394            },			
395            gSlider: function (el, last) {
396                var opt=this,
397					clone = opt.maskC.clone(),
398                    w = clone.width()
399                    clone.appendTo(opt.maskC.parent()).css({
400                        background: opt.pic.css('backgroundImage')
401                    }).show()
402                    el.show().css({
403                        left: opt.direction > 0 ? -w : w
404                    }).stop().animate({
405                        left: 0
406                    }, {
407                        duration: +opt.duration,
408                        easing: opt.easing,
409                        step: function (now) {
410                            if (opt.direction > 0) clone.css('left', now + w)
411                            else clone.css('left', now - w)
412                        },
413                        complete: function () {
414                            clone.remove()
415                            if (last) opt.afterShow()
416                        }
417                    })
418            },
419            vSlider: function (el, last) {
420                var opt=this,
421					clone = opt.maskC.clone(),
422                    h = clone.height()
423                    clone.appendTo(opt.maskC.parent()).css({
424                        background: opt.pic.css('backgroundImage')
425                    }).show()
426                    el.show().css({
427                        top: opt.direction > 0 ? -h : h
428                    }).stop().animate({
429                        top: 0
430                    }, {
431                        duration: +opt.duration,
432                        easing: opt.easing,
433                        step: function (now) {
434                            if (opt.direction > 0) clone.css('top', now + h)
435                            else clone.css('top', now - h)
436                        },
437                        complete: function () {
438                            clone.remove()
439                            if (last) opt.afterShow()
440                        }
441                    })
442            },
443            vSlideOdd: function (el, last) {
444				 var opt=this
445                $(el).each(function () {
446                    var th = $(this),
447                        t = th.show().css('top'),
448                        h = th.height(),
449                        odd = opt.odd
450                        th.css({
451                            top: odd ? -h : h
452                        }).stop().animate({
453                            top: t
454                        }, {
455                            duration: +opt.duration,
456                            easing: opt.easing,
457                            complete: function () {
458                                if (last) opt.afterShow()
459                            }
460                        })
461                        opt.odd = opt.odd ? false : true
462
463                })
464            },
465            gSlideOdd: function (el, last) {
466				 var opt=this
467                $(el).each(function () {
468                    var th = $(this),
469                        l = th.show().css('left'),
470                        w = th.width(),
471                        odd = opt.odd
472                        th.css({
473                            left: odd ? -w : w
474                        }).stop().animate({
475                            left: l
476                        }, {
477                            duration: +opt.duration,
478                            easing: opt.easing,
479                            complete: function () {
480                                if (last) opt.afterShow()
481                            }
482                        })
483                        opt.odd = opt.odd ? false : true
484
485                })
486            }
487        }
488    })
489})(jQuery)

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.