PageSourceSearch

https://www.ohmyzip.com/js/jquery.slides.min.js

js ohmyzip.com collected 2026-10-06 01:58:59 UTC 15,655 bytes, 623 lines download raw bytes

1/*
2  SlidesJS 3.0.4 http://slidesjs.com
3  (c) 2013 by Nathan Searles http://nathansearles.com
4  Updated: June 26th, 2013
5  Apache License: http://www.apache.org/licenses/LICENSE-2.0
6*/
7(function ()
8{
9	(function (e, t, n)
10	{
11		var r, i, s;
12		s = "slidesjs";
13		i =
14		{
15			width: 940,
16			height: 528,
17			start: 1,
18			navigation: {
19				active: !0,
20				effect: "slide"
21			},
22			pagination: {
23				active: !0,
24				effect: "slide"
25			},
26			play: {
27				active: !1,
28				effect: "slide",
29				interval: 5e3,
30				auto: !1,
31				swap: !0,
32				pauseOnHover: !1,
33				restartDelay: 2500
34			},
35			effect: {
36				slide: {
37					speed: 3000
38				},
39				fade: {
40					speed: 300,
41					crossfade: !0
42				}
43			},
44			callback: {
45				loaded: function ()
46				{
47				},
48				start: function ()
49				{
50					
51				},
52				complete: function ()
53				{
54				}
55			}
56		};
57		r = function ()
58		{
59			function t(t, n)
60			{
61				this.element = t;
62				this.options = e.extend(!0, {
63				}, i, n);
64				this._defaults = i;
65				this._name = s;
66				this.init()
67			}
68			return t
69		}();
70		r.prototype.init = function ()
71		{
72			var n, r, i, s, o, u, a = this;
73			n = e(this.element);
74			this.data = e.data(this);
75			e.data(this, "animating", !1);
76			e.data(this, "total", n.children().not(".slidesjs-navigation", n).length);
77			e.data(this, "current", this.options.start - 1);
78			e.data(this, "vendorPrefix", this._getVendorPrefix());
79			if (typeof TouchEvent != "undefined")
80			{
81				e.data(this, "touch", !0);
82				this.options.effect.slide.speed = this.options.effect.slide.speed / 2
83			}
84			n.css(
85			{
86				overflow: "hidden"
87			});
88			n.slidesContainer = n.children().not(".slidesjs-navigation", n).wrapAll("<div class='slidesjs-container'>", n).parent().css(
89			{
90				overflow: "hidden",
91				position: "relative"
92			});
93			e(".slidesjs-container", n).wrapInner("<div class='slidesjs-control'>", n).children();
94			e(".slidesjs-control", n).css(
95			{
96				position: "relative",
97				left: 0
98			});
99			e(".slidesjs-control", n).children().addClass("slidesjs-slide").css(
100			{
101				position: "absolute",
102				top: 0,
103				left: 0,
104				width: "100%",
105				zIndex: 0,
106				display: "none",
107				webkitBackfaceVisibility: "hidden"
108			});
109			e.each(e(".slidesjs-control", n).children(), function (t)
110			{
111				var n;
112				n = e(this);
113				return n.attr("slidesjs-index", t)
114			});
115			if (this.data.touch)
116			{
117				e(".slidesjs-control", n).on("touchstart", function (e)
118				{
119					return a._touchstart(e)
120				});
121				e(".slidesjs-control", n).on("touchmove", function (e)
122				{
123					return a._touchmove(e)
124				});
125				e(".slidesjs-control", n).on("touchend", function (e)
126				{
127					return a._touchend(e)
128				})
129			}
130			n.fadeIn(0);
131			this.update();
132			this.data.touch && this._setuptouch();
133			e(".slidesjs-control", n).children(":eq(" + this.data.current + ")").eq(0).fadeIn(0, function ()
134			{
135				return e(this).css(
136				{
137					zIndex: 10
138				})
139			});
140			/*
141			if (this.options.navigation.active)
142			{
143				o = e("<a>", {
144					"class": "slidesjs-previous slidesjs-navigation",
145					href: "#",
146					title: "Previous",
147					text: "Previous"
148				}).appendTo(n);
149				r = e("<a>", {
150					"class": "slidesjs-next slidesjs-navigation",
151					href: "#",
152					title: "Next",
153					text: "Next"
154				}).appendTo(n)
155			}
156			*/
157			e(".slidesjs-next", n).click(function (e)
158			{
159				move = 2;
160				e.preventDefault();
161				a.stop(!0);
162				return a.next(a.options.navigation.effect)
163			});
164			e(".slidesjs-previous", n).click(function (e)
165			{
166				move = 1;
167				e.preventDefault();
168				a.stop(!0);
169				return a.previous(a.options.navigation.effect)
170			});
171			if (this.options.play.active)
172			{
173				s = e("<a>", {
174					"class": "slidesjs-play slidesjs-navigation",
175					href: "#",
176					title: "Play",
177					text: "Play"
178				}).appendTo(n);
179				u = e("<a>", {
180					"class": "slidesjs-stop slidesjs-navigation",
181					href: "#",
182					title: "Stop",
183					text: "Stop"
184				}).appendTo(n);
185				s.click(function (e)
186				{
187					e.preventDefault();
188					return a.play(!0)
189				});
190				u.click(function (e)
191				{
192					e.preventDefault();
193					return a.stop(!0)
194				});
195				this.options.play.swap && u.css(
196				{
197					display: "none"
198				})
199			}
200			if (this.options.pagination.active)
201			{
202				i = e("<ul>", {
203					"class": "slidesjs-pagination"
204				}).appendTo(n);
205				e.each(new Array(this.data.total), function (t)
206				{
207					var n, r;
208					n = e("<li>", {
209						"class": "slidesjs-pagination-item"
210					}).appendTo(i);
211					r = e("<a>", {
212						href: "#",
213						"data-slidesjs-item": t,
214						html: t + 1
215					}).appendTo(n);
216					return r.click(function (t)
217					{
218						t.preventDefault();
219						//a.stop(!0);
220						return a.goto(e(t.currentTarget).attr("data-slidesjs-item") * 1 + 1);
221					})
222				})
223			}
224			e(t).bind("resize", function ()
225			{
226				return a.update()
227			});
228			this._setActive();
229			this.options.play.auto && this.play();
230			return this.options.callback.loaded(this.options.start)
231		};
232		r.prototype._setActive = function (t)
233		{
234			var n, r;
235			n = e(this.element);
236			this.data = e.data(this);
237			r = t > -1 ? t : this.data.current;
238			e(".active", n).removeClass("active");
239			return e(".slidesjs-pagination li:eq(" + r + ") a", n).addClass("active")
240		};
241		r.prototype.update = function ()
242		{
243			var t, n, r;
244			t = e(this.element);
245			this.data = e.data(this);
246			e(".slidesjs-control", t).children(":not(:eq(" + this.data.current + "))").css(
247			{
248				display: "none",
249				left: 0,
250				zIndex: 0
251			});
252			r = t.width();
253			n = this.options.height / this.options.width * r;
254			this.options.width = r;
255			this.options.height = n;
256			return e(".slidesjs-control, .slidesjs-container", t).css(
257			{
258				width: r,
259				height: 339
260			})
261		};
262		r.prototype.next = function (t)
263		{
264			var n;
265			n = e(this.element);
266			this.data = e.data(this);
267			e.data(this, "direction", "next");
268			t === void 0 && (t = this.options.navigation.effect);
269			return t === "fade" ? this._fade() : this._slide()
270		};
271		r.prototype.previous = function (t)
272		{
273			var n;
274			n = e(this.element);
275			this.data = e.data(this);
276			e.data(this, "direction", "previous");
277			t === void 0 && (t = this.options.navigation.effect);
278			return t === "fade" ? this._fade() : this._slide()
279		};
280		r.prototype.goto = function (t)
281		{
282			var n, r;
283			n = e(this.element);
284			this.data = e.data(this);
285			r === void 0 && (r = this.options.pagination.effect);
286			t > this.data.total ? t = this.data.total : t < 1 && (t = 1);
287			if (typeof t == "number") return r === "fade" ? this._fade(t) : this._slide(t);
288			if (typeof t == "string")
289			{
290				if (t === "first") return r === "fade" ? this._fade(0) : this._slide(0);
291				if (t === "last") return r === "fade" ? this._fade(this.data.total) : this._slide(this.data.total)
292			}
293		};
294		r.prototype._setuptouch = function ()
295		{
296			var t, n, r, i;
297			t = e(this.element);
298			this.data = e.data(this);
299			i = e(".slidesjs-control", t);
300			n = this.data.current + 1;
301			r = this.data.current - 1;
302			r < 0 && (r = this.data.total - 1);
303			n > this.data.total - 1 && (n = 0);
304			i.children(":eq(" + n + ")").css(
305			{
306				display: "block",
307				left: this.options.width
308			});
309			return i.children(":eq(" + r + ")").css(
310			{
311				display: "block",
312				left: -this.options.width
313			})
314		};
315		r.prototype._touchstart = function (t)
316		{
317			var n, r;
318			n = e(this.element);
319			this.data = e.data(this);
320			r = t.originalEvent.touches[0];
321			this._setuptouch();
322			e.data(this, "touchtimer", Number(new Date));
323			e.data(this, "touchstartx", r.pageX);
324			e.data(this, "touchstarty", r.pageY);
325			return t.stopPropagation()
326		};
327		r.prototype._touchend = function (t)
328		{
329			var n, r, i, s, o, u, a, f = this;
330			n = e(this.element);
331			this.data = e.data(this);
332			u = t.originalEvent.touches[0];
333			s = e(".slidesjs-control", n);
334			if (s.position().left > this.options.width * .5 || s.position().left > this.options.width * .1 && Number(new Date) - this.data.touchtimer < 250)
335			{
336				e.data(this, "direction", "previous");
337				this._slide()
338			}
339			else if (s.position().left < -(this.options.width * .5) || s.position().left < -(this.options.width * .1) && Number(new Date) - this.data.touchtimer < 250)
340			{
341				e.data(this, "direction", "next");
342				this._slide()
343			}
344			else
345			{
346				i = this.data.vendorPrefix;
347				a = i + "Transform";
348				r = i + "TransitionDuration";
349				o = i + "TransitionTimingFunction";
350				s[0].style[a] = "translateX(0px)";
351				s[0].style[r] = this.options.effect.slide.speed * .85 + "ms"
352			}
353			s.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", function ()
354			{
355				i = f.data.vendorPrefix;
356				a = i + "Transform";
357				r = i + "TransitionDuration";
358				o = i + "TransitionTimingFunction";
359				s[0].style[a] = "";
360				s[0].style[r] = "";
361				return s[0].style[o] = ""
362			});
363			return t.stopPropagation()
364		};
365		r.prototype._touchmove = function (t)
366		{
367			var n, r, i, s, o;
368			n = e(this.element);
369			this.data = e.data(this);
370			s = t.originalEvent.touches[0];
371			r = this.data.vendorPrefix;
372			i = e(".slidesjs-control", n);
373			o = r + "Transform";
374			e.data(this, "scrolling", Math.abs(s.pageX - this.data.touchstartx) < Math.abs(s.pageY - this.data.touchstarty));
375			if (!this.data.animating && !this.data.scrolling)
376			{
377				t.preventDefault();
378				this._setuptouch();
379				i[0].style[o] = "translateX(" + (s.pageX - this.data.touchstartx) + "px)";
380			}
381			return t.stopPropagation();
382		};
383		r.prototype.play = function (t)
384		{
385			var n, r, i, s = this;
386			n = e(this.element);
387			this.data = e.data(this);
388			if (!this.data.playInterval)
389			{
390				if (t)
391				{
392					r = this.data.current;
393					this.data.direction = "next";
394					this.options.play.effect === "fade" ? this._fade() : this._slide();
395				}
396				e.data(this, "playInterval", setInterval(function ()
397				{
398					r = s.data.current;
399					s.data.direction = "next";
400					return s.options.play.effect === "fade" ? s._fade() : s._slide();
401				}, this.options.play.interval));
402				i = e(".slidesjs-container", n);
403				if (this.options.play.pauseOnHover)
404				{
405					i.unbind();
406					i.bind("mouseenter", function ()
407					{
408						return s.stop();
409					});
410					i.bind("mouseleave", function ()
411					{
412						return s.options.play.restartDelay ? e.data(s, "restartDelay", setTimeout(function ()
413						{
414							return s.play(!0)
415						}, s.options.play.restartDelay)) : s.play();
416					});
417				}
418				e.data(this, "playing", !0);
419				e(".slidesjs-play", n).addClass("slidesjs-playing");
420				if (this.options.play.swap)
421				{
422					e(".slidesjs-play", n).hide();
423					return e(".slidesjs-stop", n).show()
424				}
425			}
426		};
427		r.prototype.stop = function (t)
428		{
429			var n;
430			n = e(this.element);
431			this.data = e.data(this);
432			clearInterval(this.data.playInterval);
433			this.options.play.pauseOnHover && t && e(".slidesjs-container", n).unbind();
434			e.data(this, "playInterval", null);
435			e.data(this, "playing", !1);
436			e(".slidesjs-play", n).removeClass("slidesjs-playing");
437			if (this.options.play.swap)
438			{
439				e(".slidesjs-stop", n).hide();
440				return e(".slidesjs-play", n).show()
441			}
442		};
443		r.prototype._slide = function (t)
444		{
445			var n, r, i, s, o, u, a, f, l, c, h = this;
446			n = e(this.element);
447			this.data = e.data(this);
448			if (!this.data.animating && t !== this.data.current + 1)
449			{
450				e.data(this, "animating", !0);
451				r = this.data.current;
452				if (t > -1)
453				{
454					t -= 1;
455					c = t > r ? 1 : -1;
456					i = t > r ? -this.options.width : this.options.width;
457					o = t
458				}
459				else
460				{
461					c = this.data.direction === "next" ? 1 : -1;
462					i = this.data.direction === "next" ? -this.options.width : this.options.width;
463					o = r + c
464				}
465				o === -1 && (o = this.data.total - 1);
466				o === this.data.total && (o = 0);
467				this._setActive(o);
468				a = e(".slidesjs-control", n);
469				t > -1 && a.children(":not(:eq(" + r + "))").css(
470				{
471					display: "none",
472					left: 0,
473					zIndex: 0
474				});
475				a.children(":eq(" + o + ")").css(
476				{
477					display: "block",
478					left: c * this.options.width,
479					zIndex: 10
480				});
481				this.options.callback.start(r + 1);
482				if (this.data.vendorPrefix)
483				{
484					u = this.data.vendorPrefix;
485					l = u + "Transform";
486					s = u + "TransitionDuration";
487					f = u + "TransitionTimingFunction";
488					a[0].style[l] = "translateX(" + i + "px)";
489					a[0].style[s] = this.options.effect.slide.speed + "ms";
490					return a.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", function ()
491					{
492						a[0].style[l] = "";
493						a[0].style[s] = "";
494						a.children(":eq(" + o + ")").css(
495						{
496							left: 0
497						});
498						a.children(":eq(" + r + ")").css(
499						{
500							display: "none",
501							left: 0,
502							zIndex: 0
503						});
504						e.data(h, "current", o);
505						e.data(h, "animating", !1);
506						a.unbind("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd");
507						a.children(":not(:eq(" + o + "))").css(
508						{
509							display: "none",
510							left: 0,
511							zIndex: 0
512						});
513						h.data.touch && h._setuptouch();
514						return h.options.callback.complete(o + 1)
515					})
516				}
517				return a.stop().animate(
518				{
519					left: i
520				}, this.options.effect.slide.speed, function ()
521				{
522					a.css(
523					{
524						left: 0
525					});
526					a.children(":eq(" + o + ")").css(
527					{
528						left: 0
529					});
530					return a.children(":eq(" + r + ")").css(
531					{
532						display: "none",
533						left: 0,
534						zIndex: 0
535					}, e.data(h, "current", o), e.data(h, "animating", !1), h.options.callback.complete(o + 1))
536				})
537			}
538		};
539		r.prototype._fade = function (t)
540		{
541			var n, r, i, s, o, u = this;
542			n = e(this.element);
543			this.data = e.data(this);
544			if (!this.data.animating && t !== this.data.current + 1)
545			{
546				e.data(this, "animating", !0);
547				r = this.data.current;
548				if (t)
549				{
550					t -= 1;
551					o = t > r ? 1 : -1;
552					i = t
553				}
554				else
555				{
556					o = this.data.direction === "next" ? 1 : -1;
557					i = r + o
558				}
559				i === -1 && (i = this.data.total - 1);
560				i === this.data.total && (i = 0);
561				this._setActive(i);
562				s = e(".slidesjs-control", n);
563				s.children(":eq(" + i + ")").css(
564				{
565					display: "none",
566					left: 0,
567					zIndex: 10
568				});
569				this.options.callback.start(r + 1);
570				if (this.options.effect.fade.crossfade)
571				{
572					s.children(":eq(" + this.data.current + ")").stop().fadeOut(this.options.effect.fade.speed);
573					return s.children(":eq(" + i + ")").stop().fadeIn(this.options.effect.fade.speed, function ()
574					{
575						s.children(":eq(" + i + ")").css(
576						{
577							zIndex: 0
578						});
579						e.data(u, "animating", !1);
580						e.data(u, "current", i);
581						return u.options.callback.complete(i + 1)
582					})
583				}
584				return s.children(":eq(" + r + ")").stop().fadeOut(this.options.effect.fade.speed, function ()
585				{
586					s.children(":eq(" + i + ")").stop().fadeIn(u.options.effect.fade.speed, function ()
587					{
588						return s.children(":eq(" + i + ")").css(
589						{
590							zIndex: 10
591						})
592					});
593					e.data(u, "animating", !1);
594					e.data(u, "current", i);
595					return u.options.callback.complete(i + 1)
596				})
597			}
598		};
599		r.prototype._getVendorPrefix = function ()
600		{
601			var e, t, r, i, s;
602			e = n.body || n.documentElement;
603			r = e.style;
604			i = "transition";
605			s = ["Moz", "Webkit", "Khtml", "O", "ms"];
606			i = i.charAt(0).toUpperCase() + i.substr(1);
607			t = 0;
608			while (t < s.length)
609			{
610				if (typeof r[s[t] + i] == "string") return s[t];
611				t++
612			}
613			return !1
614		};
615		return e.fn[s] = function (t)
616		{
617			return this.each(function ()
618			{
619				if (!e.data(this, "plugin_" + s)) return e.data(this, "plugin_" + s, new r(this, t))
620			});
621		}
622	})(jQuery, window, document)
623}).call(this);

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.