PageSourceSearch

https://animal.org.pt/wp-content/themes/philanthropy-parent/js/html5gallery.js?ver=6.0.11

js animal.org.pt collected 2026-10-02 12:45:30 UTC 173,775 bytes, 2,723 lines download raw bytes

1/** HTML5 Gallery - jQuery Image and Video Gallery Plugin
2 * Copyright 2014 Magic Hills Pty Ltd All Rights Reserved
3 * Website: http://html5box.com
4 * Version 4.9
5 */
6(function() {
7	for (var n = document.getElementsByTagName("script"), p = "", l = 0; l < n.length; l++) n[l].src && n[l].src.match(/html5gallery\.js/i) && (p = n[l].src.substr(0, n[l].src.lastIndexOf("/") + 1));
8	n = !1;
9	if ("undefined" == typeof jQuery) n = !0;
10	else if (l = jQuery.fn.jquery.split("."), 1 > l[0] || 1 == l[0] && 6 > l[1]) n = !0;
11	if (n) {
12		var n = document.getElementsByTagName("head")[0],
13			r = document.createElement("script");
14		r.setAttribute("type", "text/javascript");
15		r.readyState ? r.onreadystatechange = function() {
16			if ("loaded" == r.readyState || "complete" == r.readyState) r.onreadystatechange = null, loadHtml5Gallery(p)
17		} : r.onload = function() {
18			loadHtml5Gallery(p)
19		};
20		r.setAttribute("src", p + "jquery.js");
21		n.appendChild(r)
22	} else loadHtml5Gallery(p)
23})();
24
25function loadHtml5Gallery(n) {
26	jQuery.easing.jswing = jQuery.easing.swing;
27	jQuery.extend(jQuery.easing, {
28		def: "easeOutQuad",
29		swing: function(c, e, a, d, b) {
30			return jQuery.easing[jQuery.easing.def](c, e, a, d, b)
31		},
32		easeInQuad: function(c, e, a, d, b) {
33			return d * (e /= b) * e + a
34		},
35		easeOutQuad: function(c, e, a, d, b) {
36			return -d * (e /= b) * (e - 2) + a
37		},
38		easeInOutQuad: function(c, e, a, d, b) {
39			return 1 > (e /= b / 2) ? d / 2 * e * e + a : -d / 2 * (--e * (e - 2) - 1) + a
40		},
41		easeInCubic: function(c, e, a, d, b) {
42			return d * (e /= b) * e * e + a
43		},
44		easeOutCubic: function(c, e, a, d, b) {
45			return d * ((e = e / b - 1) * e * e + 1) + a
46		},
47		easeInOutCubic: function(c, e, a, d, b) {
48			return 1 > (e /= b / 2) ? d / 2 * e * e * e + a : d / 2 * ((e -= 2) * e * e + 2) + a
49		},
50		easeInQuart: function(c, e, a, d, b) {
51			return d * (e /= b) * e * e * e + a
52		},
53		easeOutQuart: function(c, e, a, d, b) {
54			return -d * ((e = e / b - 1) * e * e * e - 1) + a
55		},
56		easeInOutQuart: function(c, e, a, d, b) {
57			return 1 > (e /= b / 2) ? d / 2 * e * e * e * e + a : -d / 2 * ((e -= 2) * e * e * e - 2) + a
58		},
59		easeInQuint: function(c, e, a, d, b) {
60			return d * (e /= b) * e * e * e * e + a
61		},
62		easeOutQuint: function(c, e, a, d, b) {
63			return d * ((e = e / b - 1) * e * e * e * e + 1) + a
64		},
65		easeInOutQuint: function(c, e, a, d, b) {
66			return 1 > (e /= b / 2) ? d / 2 * e * e * e * e * e + a : d / 2 * ((e -= 2) * e * e * e * e + 2) + a
67		},
68		easeInSine: function(c, e, a, d, b) {
69			return -d * Math.cos(e / b * (Math.PI / 2)) + d + a
70		},
71		easeOutSine: function(c, e, a, d, b) {
72			return d * Math.sin(e / b * (Math.PI / 2)) + a
73		},
74		easeInOutSine: function(c, e, a, d, b) {
75			return -d / 2 * (Math.cos(Math.PI * e / b) - 1) + a
76		},
77		easeInExpo: function(c, e, a, d, b) {
78			return 0 == e ? a : d * Math.pow(2, 10 * (e / b - 1)) + a
79		},
80		easeOutExpo: function(c, e, a, d, b) {
81			return e == b ? a + d : d * (-Math.pow(2, -10 * e / b) + 1) + a
82		},
83		easeInOutExpo: function(c, e, a, d, b) {
84			return 0 == e ? a : e == b ? a + d : 1 > (e /= b / 2) ? d / 2 * Math.pow(2, 10 * (e - 1)) + a : d / 2 * (-Math.pow(2, -10 * --e) + 2) + a
85		},
86		easeInCirc: function(c, e, a, d, b) {
87			return -d * (Math.sqrt(1 - (e /= b) * e) - 1) + a
88		},
89		easeOutCirc: function(c, e, a, d, b) {
90			return d * Math.sqrt(1 - (e = e / b - 1) * e) + a
91		},
92		easeInOutCirc: function(c, e, a, d, b) {
93			return 1 > (e /= b / 2) ? -d / 2 * (Math.sqrt(1 - e * e) - 1) + a : d / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + a
94		},
95		easeInElastic: function(c, e, a, d, b) {
96			c = 1.70158;
97			var m = 0,
98				g = d;
99			if (0 == e) return a;
100			if (1 == (e /= b)) return a + d;
101			m || (m = 0.3 * b);
102			g < Math.abs(d) ? (g = d, c = m / 4) : c = m / (2 * Math.PI) * Math.asin(d / g);
103			return -(g * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * b - c) * 2 * Math.PI / m)) + a
104		},
105		easeOutElastic: function(c, e, a, d, b) {
106			c = 1.70158;
107			var m = 0,
108				g = d;
109			if (0 == e) return a;
110			if (1 == (e /= b)) return a + d;
111			m || (m = 0.3 * b);
112			g < Math.abs(d) ? (g = d, c = m / 4) : c = m / (2 * Math.PI) * Math.asin(d / g);
113			return g * Math.pow(2, -10 * e) * Math.sin((e * b - c) * 2 * Math.PI / m) + d + a
114		},
115		easeInOutElastic: function(c, e, a, d, b) {
116			c = 1.70158;
117			var m = 0,
118				g = d;
119			if (0 == e) return a;
120			if (2 == (e /= b / 2)) return a + d;
121			m || (m = b * 0.3 * 1.5);
122			g < Math.abs(d) ? (g = d, c = m / 4) : c = m / (2 * Math.PI) * Math.asin(d / g);
123			return 1 > e ? -0.5 * g * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * b - c) * 2 * Math.PI / m) + a : 0.5 * g * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * b - c) * 2 * Math.PI / m) + d + a
124		},
125		easeInBack: function(c, e, a, d, b, m) {
126			void 0 == m && (m = 1.70158);
127			return d * (e /= b) * e * ((m + 1) * e - m) + a
128		},
129		easeOutBack: function(c, e, a, d, b, m) {
130			void 0 == m && (m = 1.70158);
131			return d * ((e = e / b - 1) * e * ((m + 1) * e + m) + 1) + a
132		},
133		easeInOutBack: function(c, e, a, d, b, m) {
134			void 0 == m && (m = 1.70158);
135			return 1 > (e /= b / 2) ? d / 2 * e * e * (((m *= 1.525) + 1) * e - m) + a : d / 2 * ((e -= 2) * e * (((m *= 1.525) + 1) * e + m) + 2) + a
136		},
137		easeInBounce: function(c, e, a, d, b) {
138			return d - jQuery.easing.easeOutBounce(c, b - e, 0, d, b) + a
139		},
140		easeOutBounce: function(c, e, a, d, b) {
141			return (e /= b) < 1 / 2.75 ? d * 7.5625 * e * e + a : e < 2 / 2.75 ? d * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + a : e < 2.5 / 2.75 ? d * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + a : d * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + a
142		},
143		easeInOutBounce: function(c, e, a, d, b) {
144			return e < b / 2 ? 0.5 * jQuery.easing.easeInBounce(c, 2 * e, 0, d, b) + a : 0.5 * jQuery.easing.easeOutBounce(c, 2 * e - b, 0, d, b) + 0.5 * d + a
145		}
146	});
147	var p = jQuery;
148	p.fn.touchSwipe = function(c) {
149		var e = {
150			preventWebBrowser: !1,
151			swipeLeft: null,
152			swipeRight: null,
153			swipeTop: null,
154			swipeBottom: null
155		};
156		c && p.extend(e, c);
157		return this.each(function() {
158			function a(a) {
159				var b = a.originalEvent;
160				1 <= b.targetTouches.length ? (g = b.targetTouches[0].pageX, q = b.targetTouches[0].pageY) : c(a)
161			}
162			function d(a) {
163				e.preventWebBrowser && a.preventDefault();
164				var b = a.originalEvent;
165				1 <= b.targetTouches.length ? (f = b.targetTouches[0].pageX, x = b.targetTouches[0].pageY) : c(a)
166			}
167			function b(a) {
168				if (0 < f || 0 < x) 100 < Math.abs(f - g) && (f > g ? e.swipeRight && e.swipeRight.call() : e.swipeLeft && e.swipeLeft.call()), 100 < Math.abs(x - q) && (x > q ? e.swipeBottom && e.swipeBottom.call() : e.swipeTop && e.swipeTop.call());
169				c(a)
170			}
171			function c() {
172				x = f = q = g = -1
173			}
174			var g = -1,
175				q = -1,
176				f = -1,
177				x = -1;
178			try {
179				p(this).bind("touchstart", a), p(this).bind("touchmove", d), p(this).bind("touchend", b), p(this).bind("touchcancel", c)
180			} catch (h) {}
181		})
182	};
183	var l = jQuery;
184	l.fn.drag = function(c, e, a) {
185		var d = "string" == typeof c ? c : "",
186			b = l.isFunction(c) ? c : l.isFunction(e) ? e : null;
187		0 !== d.indexOf("drag") && (d = "drag" + d);
188		a = (c == b ? e : a) || {};
189		return b ? this.bind(d, a, b) : this.trigger(d)
190	};
191	var r = l.event,
192		u = r.special,
193		j = null,
194		j = u.drag = {
195			defaults: {
196				which: 1,
197				distance: 0,
198				not: ":input",
199				handle: null,
200				relative: !1,
201				drop: !0,
202				click: !1
203			},
204			datakey: "dragdata",
205			livekey: "livedrag",
206			add: function(c) {
207				var e = l.data(this, j.datakey),
208					a = c.data || {};
209				e.related += 1;
210				!e.live && c.selector && (e.live = !0, r.add(this, "draginit." + j.livekey, j.delegate));
211				l.each(j.defaults, function(d) {
212					void 0 !== a[d] && (e[d] = a[d])
213				})
214			},
215			remove: function() {
216				l.data(this, j.datakey).related -= 1
217			},
218			setup: function() {
219				if (!l.data(this, j.datakey)) {
220					var c = l.extend({
221						related: 0
222					}, j.defaults);
223					l.data(this, j.datakey, c);
224					r.add(this, "mousedown", j.init, c);
225					this.attachEvent && this.attachEvent("ondragstart", j.dontstart)
226				}
227			},
228			teardown: function() {
229				l.data(this, j.datakey).related || (l.removeData(this, j.datakey), r.remove(this, "mousedown", j.init), r.remove(this, "draginit", j.delegate), j.textselect(!0), this.detachEvent && this.detachEvent("ondragstart", j.dontstart))
230			},
231			init: function(c) {
232				var e = c.data,
233					a;
234				if (!(0 < e.which && c.which != e.which) && !l(c.target).is(e.not) && (!e.handle || l(c.target).closest(e.handle, c.currentTarget).length)) if (e.propagates = 1, e.interactions = [j.interaction(this, e)], e.target = c.target, e.pageX = c.pageX, e.pageY = c.pageY, e.dragging = null, a = j.hijack(c, "draginit", e), e.propagates) {
235					if ((a = j.flatten(a)) && a.length) e.interactions = [], l.each(a, function() {
236						e.interactions.push(j.interaction(this, e))
237					});
238					e.propagates = e.interactions.length;
239					!1 !== e.drop && u.drop && u.drop.handler(c, e);
240					j.textselect(!1);
241					r.add(document, "mousemove mouseup", j.handler, e);
242					return !1
243				}
244			},
245			interaction: function(c, e) {
246				return {
247					drag: c,
248					callback: new j.callback,
249					droppable: [],
250					offset: l(c)[e.relative ? "position" : "offset"]() || {
251						top: 0,
252						left: 0
253					}
254				}
255			},
256			handler: function(c) {
257				var e = c.data;
258				switch (c.type) {
259					case !e.dragging && "mousemove":
260						if (Math.pow(c.pageX - e.pageX, 2) + Math.pow(c.pageY - e.pageY, 2) < Math.pow(e.distance, 2)) break;
261						c.target = e.target;
262						j.hijack(c, "dragstart", e);
263						e.propagates && (e.dragging = !0);
264					case "mousemove":
265						if (e.dragging) {
266							j.hijack(c, "drag", e);
267							if (e.propagates) {
268								!1 !== e.drop && u.drop && u.drop.handler(c, e);
269								break
270							}
271							c.type = "mouseup"
272						}
273					case "mouseup":
274						r.remove(document, "mousemove mouseup", j.handler), e.dragging && (!1 !== e.drop && u.drop && u.drop.handler(c, e), j.hijack(c, "dragend", e)), j.textselect(!0), !1 === e.click && e.dragging && (jQuery.event.triggered = !0, setTimeout(function() {
275							jQuery.event.triggered = !1
276						}, 20), e.dragging = !1)
277				}
278			},
279			delegate: function(c) {
280				var e = [],
281					a, d = l.data(this, "events") || {};
282				l.each(d.live || [], function(b, d) {
283					if (0 === d.preType.indexOf("drag") && (a = l(c.target).closest(d.selector, c.currentTarget)[0])) r.add(a, d.origType + "." + j.livekey, d.origHandler, d.data), 0 > l.inArray(a, e) && e.push(a)
284				});
285				return !e.length ? !1 : l(e).bind("dragend." + j.livekey, function() {
286					r.remove(this, "." + j.livekey)
287				})
288			},
289			hijack: function(c, e, a, d, b) {
290				if (a) {
291					var m = c.originalEvent,
292						g = c.type,
293						q = e.indexOf("drop") ? "drag" : "drop",
294						f, h = d || 0,
295						s, C;
296					d = !isNaN(d) ? d : a.interactions.length;
297					c.type = e;
298					c.originalEvent = null;
299					a.results = [];
300					do
301						if ((s = a.interactions[h]) && !("dragend" !== e && s.cancelled)) C = j.properties(c, a, s), s.results = [], l(b || s[q] || a.droppable).each(function(b, d) {
302							f = (C.target = d) ? r.handle.call(d, c, C) : null;
303							!1 === f ? ("drag" == q && (s.cancelled = !0, a.propagates -= 1), "drop" == e && (s[q][b] = null)) : "dropinit" == e && s.droppable.push(j.element(f) || d);
304							"dragstart" == e && (s.proxy = l(j.element(f) || s.drag)[0]);
305							s.results.push(f);
306							delete c.result;
307							if ("dropinit" !== e) return f
308						}), a.results[h] = j.flatten(s.results), "dropinit" == e && (s.droppable = j.flatten(s.droppable)), "dragstart" == e && !s.cancelled && C.update();
309					while (++h < d);
310					c.type = g;
311					c.originalEvent = m;
312					return j.flatten(a.results)
313				}
314			},
315			properties: function(c, e, a) {
316				var d = a.callback;
317				d.drag = a.drag;
318				d.proxy = a.proxy || a.drag;
319				d.startX = e.pageX;
320				d.startY = e.pageY;
321				d.deltaX = c.pageX - e.pageX;
322				d.deltaY = c.pageY - e.pageY;
323				d.originalX = a.offset.left;
324				d.originalY = a.offset.top;
325				d.offsetX = c.pageX - (e.pageX - d.originalX);
326				d.offsetY = c.pageY - (e.pageY - d.originalY);
327				d.drop = j.flatten((a.drop || []).slice());
328				d.available = j.flatten((a.droppable || []).slice());
329				return d
330			},
331			element: function(c) {
332				if (c && (c.jquery || 1 == c.nodeType)) return c
333			},
334			flatten: function(c) {
335				return l.map(c, function(c) {
336					return c && c.jquery ? l.makeArray(c) : c && c.length ? j.flatten(c) : c
337				})
338			},
339			textselect: function(c) {
340				l(document)[c ? "unbind" : "bind"]("selectstart", j.dontstart).attr("unselectable", c ? "off" : "on").css("MozUserSelect", c ? "" : "none")
341			},
342			dontstart: function() {
343				return !1
344			},
345			callback: function() {}
346		};
347	j.callback.prototype = {
348		update: function() {
349			u.drop && this.available.length && l.each(this.available, function(c) {
350				u.drop.locate(this, c)
351			})
352		}
353	};
354	u.draginit = u.dragstart = u.dragend = j;
355	var y = jQuery;
356	y.fn.html5boxTransition = function(c, e, a, d, b) {
357		$parent = this;
358		c = d.effect;
359		var m = d.easing,
360			g = d.duration,
361			q = d.direction,
362			f = null;
363		c && (c = c.split(","), f = c[Math.floor(Math.random() * c.length)], f = y.trim(f.toLowerCase()));
364		f && d[f] && (d[f].duration && (g = d[f].duration), d[f].easing && (m = d[f].easing));
365		"fade" == f ? (a.show(), e.fadeOut(g, m, function() {
366			e.remove();
367			b()
368		})) : "crossfade" == f || "fadeout" == f ? (a.hide(), e.fadeOut(g / 2, m, function() {
369			a.fadeIn(g / 2, m, function() {
370				e.remove();
371				b()
372			})
373		})) : "slide" == f ? ($parent.css({
374			overflow: "hidden"
375		}), q ? (a.css({
376			left: "100%"
377		}), a.animate({
378			left: "0%"
379		}, g, m), e.animate({
380			left: "-100%"
381		}, g, m, function() {
382			e.remove();
383			b()
384		})) : (a.css({
385			left: "-100%"
386		}), a.animate({
387			left: "0%"
388		}, g, m), e.animate({
389			left: "100%"
390		}, g, m, function() {
391			e.remove();
392			b()
393		}))) : (a.show(), e.remove(), b())
394	};
395	var h = jQuery;
396	h.fn.addHTML5VideoControls = function(c, e) {
397		var a = "ontouchstart" in window,
398			d = a ? "touchstart" : "mousedown",
399			b = a ? "touchmove" : "mousemove",
400			m = a ? "touchcancel" : "mouseup",
401			g = a ? "touchstart" : "click",
402			q = a ? 48 : 36,
403			f = null,
404			G = null,
405			s = !1,
406			j = !0,
407			l = null != navigator.userAgent.match(/iPod/i) || null != navigator.userAgent.match(/iPhone/i),
408			n = h(this).data("ishd"),
409			r = h(this).data("hd"),
410			p = h(this).data("src"),
411			k = h(this);
412		k.get(0).removeAttribute("controls");
413		if (l) {
414			var u = k.height() - q;
415			k.css({
416				height: u
417			})
418		}
419		var D = h("<div class='html5boxVideoPlay'></div>");
420		l || (k.after(D), D.css({
421			position: "absolute",
422			top: "50%",
423			left: "50%",
424			display: "block",
425			cursor: "pointer",
426			width: 64,
427			height: 64,
428			"margin-left": -32,
429			"margin-top": -32,
430			"background-image": "url('" + c + "html5boxplayer_playvideo.png')",
431			"background-position": "center center",
432			"background-repeat": "no-repeat"
433		}).bind(g, function() {
434				k.get(0).play()
435			}));
436		var H = h("<div class='html5boxVideoFullscreenBg'></div>"),
437			t = h("<div class='html5boxVideoControls'><div class='html5boxVideoControlsBg'></div><div class='html5boxPlayPause'><div class='html5boxPlay'></div><div class='html5boxPause'></div></div><div class='html5boxTimeCurrent'>--:--</div><div class='html5boxFullscreen'></div><div class='html5boxHD'></div><div class='html5boxVolume'><div class='html5boxVolumeButton'></div><div class='html5boxVolumeBar'><div class='html5boxVolumeBarBg'><div class='html5boxVolumeBarActive'></div></div></div></div><div class='html5boxTimeTotal'>--:--</div><div class='html5boxSeeker'><div class='html5boxSeekerBuffer'></div><div class='html5boxSeekerPlay'></div><div class='html5boxSeekerHandler'></div></div><div style='clear:both;'></div></div>");
438		k.after(t);
439		k.after(H);
440		H.css({
441			display: "none",
442			position: "fixed",
443			left: 0,
444			top: 0,
445			bottom: 0,
446			right: 0,
447			"z-index": 2147483647
448		});
449		t.css({
450			display: "block",
451			position: "absolute",
452			width: "100%",
453			height: q,
454			left: 0,
455			bottom: 0
456		});
457		var y = function() {
458			j = !0
459		};
460		k.bind(g, function() {
461			j = !0
462		}).hover(function() {
463				j = !0
464			}, function() {
465				j = !1
466			});
467		setInterval(function() {
468			j && (t.show(), j = !1, clearTimeout(f), f = setTimeout(function() {
469				k.get(0).paused || t.fadeOut()
470			}, 5E3))
471		}, 250);
472		h(".html5boxVideoControlsBg", t).css({
473			display: "block",
474			position: "absolute",
475			width: "100%",
476			height: "100%",
477			left: 0,
478			top: 0,
479			"background-color": "#000000",
480			opacity: 0.7,
481			filter: "alpha(opacity=70)"
482		});
483		h(".html5boxPlayPause", t).css({
484			display: "block",
485			position: "relative",
486			width: "32px",
487			height: "32px",
488			margin: Math.floor((q - 32) / 2),
489			"float": "left"
490		});
491		var I = h(".html5boxPlay", t),
492			J = h(".html5boxPause", t);
493		I.css({
494			display: "block",
495			position: "absolute",
496			top: 0,
497			left: 0,
498			width: "32px",
499			height: "32px",
500			cursor: "pointer",
501			"background-image": "url('" + c + "html5boxplayer_playpause.png')",
502			"background-position": "top left"
503		}).hover(function() {
504				h(this).css({
505					"background-position": "bottom left"
506				})
507			}, function() {
508				h(this).css({
509					"background-position": "top left"
510				})
511			}).bind(g, function() {
512				k.get(0).play()
513			});
514		J.css({
515			display: "none",
516			position: "absolute",
517			top: 0,
518			left: 0,
519			width: "32px",
520			height: "32px",
521			cursor: "pointer",
522			"background-image": "url('" + c + "html5boxplayer_playpause.png')",
523			"background-position": "top right"
524		}).hover(function() {
525				h(this).css({
526					"background-position": "bottom right"
527				})
528			}, function() {
529				h(this).css({
530					"background-position": "top right"
531				})
532			}).bind(g, function() {
533				k.get(0).pause()
534			});
535		var B = h(".html5boxTimeCurrent", t),
536			M = h(".html5boxTimeTotal", t),
537			v = h(".html5boxSeeker", t),
538			E = h(".html5boxSeekerPlay", t),
539			N = h(".html5boxSeekerBuffer", t),
540			P = h(".html5boxSeekerHandler", t);
541		B.css({
542			display: "block",
543			position: "relative",
544			"float": "left",
545			"line-height": q + "px",
546			"font-weight": "normal",
547			"font-size": "12px",
548			margin: "0 8px",
549			"font-family": "Arial, Helvetica, sans-serif",
550			color: "#fff"
551		});
552		M.css({
553			display: "block",
554			position: "relative",
555			"float": "right",
556			"line-height": q + "px",
557			"font-weight": "normal",
558			"font-size": "12px",
559			margin: "0 8px",
560			"font-family": "Arial, Helvetica, sans-serif",
561			color: "#fff"
562		});
563		v.css({
564			display: "block",
565			cursor: "pointer",
566			overflow: "hidden",
567			position: "relative",
568			height: "10px",
569			"background-color": "#222",
570			margin: Math.floor((q - 10) / 2) + "px 4px"
571		}).bind(d, function(c) {
572				c = (a ? c.originalEvent.touches[0] : c).pageX - v.offset().left;
573				E.css({
574					width: c
575				});
576				k.get(0).currentTime = c * k.get(0).duration / v.width();
577				v.bind(b, function(b) {
578					b = (a ? b.originalEvent.touches[0] : b).pageX - v.offset().left;
579					E.css({
580						width: b
581					});
582					k.get(0).currentTime = b * k.get(0).duration / v.width()
583				})
584			}).bind(m, function() {
585				v.unbind(b)
586			});
587		N.css({
588			display: "block",
589			position: "absolute",
590			left: 0,
591			top: 0,
592			height: "100%",
593			"background-color": "#444"
594		});
595		E.css({
596			display: "block",
597			position: "absolute",
598			left: 0,
599			top: 0,
600			height: "100%",
601			"background-color": "#fcc500"
602		});
603		if (!l && (k.get(0).requestFullscreen || k.get(0).webkitRequestFullScreen || k.get(0).mozRequestFullScreen || k.get(0).webkitEnterFullScreen || k.get(0).msRequestFullscreen)) {
604			var K = function(a) {
605				t.css({
606					position: a ? "fixed" : "absolute"
607				});
608				var b = z.css("background-position") ? z.css("background-position").split(" ")[1] : z.css("background-position-y");
609				z.css({
610					"background-position": (a ? "right" : "left") + " " + b
611				});
612				H.css({
613					display: a ? "block" : "none"
614				});
615				a ? (h(document).bind("mousemove", y), t.css({
616					"z-index": 2147483647
617				})) : (h(document).unbind("mousemove", y), t.css({
618					"z-index": ""
619				}))
620			};
621			document.addEventListener("fullscreenchange", function() {
622				s = document.fullscreen;
623				K(document.fullscreen)
624			}, !1);
625			document.addEventListener("mozfullscreenchange", function() {
626				s = document.mozFullScreen;
627				K(document.mozFullScreen)
628			}, !1);
629			document.addEventListener("webkitfullscreenchange", function() {
630				s = document.webkitIsFullScreen;
631				K(document.webkitIsFullScreen)
632			}, !1);
633			k.get(0).addEventListener("webkitbeginfullscreen", function() {
634				s = !0
635			}, !1);
636			k.get(0).addEventListener("webkitendfullscreen", function() {
637				s = !1
638			}, !1);
639			h("head").append("<style type='text/css'>video::-webkit-media-controls { display:none !important; }</style>");
640			var z = h(".html5boxFullscreen", t);
641			z.css({
642				display: "block",
643				position: "relative",
644				"float": "right",
645				width: "32px",
646				height: "32px",
647				margin: Math.floor((q - 32) / 2),
648				cursor: "pointer",
649				"background-image": "url('" + c + "html5boxplayer_fullscreen.png')",
650				"background-position": "left top"
651			}).hover(function() {
652					var a = h(this).css("background-position") ? h(this).css("background-position").split(" ")[0] : h(this).css("background-position-x");
653					h(this).css({
654						"background-position": a + " bottom"
655					})
656				}, function() {
657					var a = h(this).css("background-position") ? h(this).css("background-position").split(" ")[0] : h(this).css("background-position-x");
658					h(this).css({
659						"background-position": a + " top"
660					})
661				}).bind(g, function() {
662					(s = !s) ? (k.get(0).requestFullscreen ? k.get(0).requestFullscreen() : k.get(0).webkitRequestFullScreen ? k.get(0).webkitRequestFullScreen() : k.get(0).mozRequestFullScreen ? k.get(0).mozRequestFullScreen() : k.get(0).webkitEnterFullScreen && k.get(0).webkitEnterFullScreen(), k.get(0).msRequestFullscreen && k.get(0).msRequestFullscreen()) : document.cancelFullScreen ? document.cancelFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen()
663				})
664		}
665		r && h(".html5boxHD", t).css({
666			display: "block",
667			position: "relative",
668			"float": "right",
669			width: "32px",
670			height: "32px",
671			margin: Math.floor((q - 32) / 2),
672			cursor: "pointer",
673			"background-image": "url('" + c + "html5boxplayer_hd.png')",
674			"background-position": (n ? "right" : "left") + " center"
675		}).bind(g, function() {
676				n = !n;
677				h(this).css({
678					"background-position": (n ? "right" : "left") + " center"
679				});
680				e.isHd = n;
681				var a = k.get(0).isPaused;
682				k.get(0).setAttribute("src", (n ? r : p) + "#t=" + k.get(0).currentTime);
683				a ? l || k.get(0).pause() : k.get(0).play()
684			});
685		u = k.get(0).volume;
686		k.get(0).volume = u / 2 + 0.1;
687		if (k.get(0).volume === u / 2 + 0.1) {
688			k.get(0).volume = u;
689			var u = h(".html5boxVolume", t),
690				F = h(".html5boxVolumeButton", t),
691				L = h(".html5boxVolumeBar", t),
692				w = h(".html5boxVolumeBarBg", t),
693				A = h(".html5boxVolumeBarActive", t);
694			u.css({
695				display: "block",
696				position: "relative",
697				"float": "right",
698				width: "32px",
699				height: "32px",
700				margin: Math.floor((q - 32) / 2)
701			}).hover(function() {
702					clearTimeout(G);
703					var a = k.get(0).volume;
704					A.css({
705						height: Math.round(100 * a) + "%"
706					});
707					L.show()
708				}, function() {
709					clearTimeout(G);
710					G = setTimeout(function() {
711						L.hide()
712					}, 1E3)
713				});
714			F.css({
715				display: "block",
716				position: "absolute",
717				top: 0,
718				left: 0,
719				width: "32px",
720				height: "32px",
721				cursor: "pointer",
722				"background-image": "url('" + c + "html5boxplayer_volume.png')",
723				"background-position": "top left"
724			}).hover(function() {
725					var a = h(this).css("background-position") ? h(this).css("background-position").split(" ")[0] : h(this).css("background-position-x");
726					h(this).css({
727						"background-position": a + " bottom"
728					})
729				}, function() {
730					var a = h(this).css("background-position") ? h(this).css("background-position").split(" ")[0] : h(this).css("background-position-x");
731					h(this).css({
732						"background-position": a + " top"
733					})
734				}).bind(g, function() {
735					var a = k.get(0).volume;
736					0 < a ? (volumeSaved = a, a = 0) : a = volumeSaved;
737					var b = h(this).css("background-position") ? h(this).css("background-position").split(" ")[1] : h(this).css("background-position-y");
738					F.css({
739						"background-position": (0 < a ? "left" : "right") + " " + b
740					});
741					k.get(0).volume = a;
742					A.css({
743						height: Math.round(100 * a) + "%"
744					})
745				});
746			L.css({
747				display: "none",
748				position: "absolute",
749				left: 4,
750				bottom: "100%",
751				width: 24,
752				height: 80,
753				"margin-bottom": Math.floor((q - 32) / 2),
754				"background-color": "#000000",
755				opacity: 0.7,
756				filter: "alpha(opacity=70)"
757			});
758			w.css({
759				display: "block",
760				position: "relative",
761				width: 10,
762				height: 68,
763				margin: 7,
764				cursor: "pointer",
765				"background-color": "#222"
766			});
767			A.css({
768				display: "block",
769				position: "absolute",
770				bottom: 0,
771				left: 0,
772				width: "100%",
773				height: "100%",
774				"background-color": "#fcc500"
775			});
776			w.bind(d, function(c) {
777				c = 1 - ((a ? c.originalEvent.touches[0] : c).pageY - w.offset().top) / w.height();
778				c = 1 < c ? 1 : 0 > c ? 0 : c;
779				A.css({
780					height: Math.round(100 * c) + "%"
781				});
782				F.css({
783					"background-position": "left " + (0 < c ? "top" : "bottom")
784				});
785				k.get(0).volume = c;
786				w.bind(b, function(b) {
787					b = 1 - ((a ? b.originalEvent.touches[0] : b).pageY - w.offset().top) / w.height();
788					b = 1 < b ? 1 : 0 > b ? 0 : b;
789					A.css({
790						height: Math.round(100 * b) + "%"
791					});
792					F.css({
793						"background-position": "left " + (0 < b ? "top" : "bottom")
794					});
795					k.get(0).volume = b
796				})
797			}).bind(m, function() {
798					w.unbind(b)
799				})
800		}
801		var O = function(a) {
802				var b = Math.floor(a / 3600),
803					c = Math.floor((a - 60 * b) / 60);
804				a = Math.floor(a - (3600 * b + 60 * c));
805				c = (10 > c ? "0" + c : c) + ":" + (10 > a ? "0" + a : a);
806				0 < b && (c = (10 > b ? "0" + b : b) + ":" + c);
807				return c
808			},
809			d = function() {
810				t.show();
811				clearTimeout(f);
812				D.show();
813				I.show();
814				J.hide()
815			},
816			m = function() {
817				var a = k.get(0).currentTime;
818				if (a) {
819					B.text(O(a));
820					var b = k.get(0).duration;
821					if (b) {
822						M.text(O(b));
823						var c = v.width(),
824							a = Math.round(c * a / b);
825						E.css({
826							width: a
827						});
828						P.css({
829							left: a
830						})
831					}
832				}
833			},
834			g = function() {
835				if (k.get(0).buffered && 0 < k.get(0).buffered.length && !isNaN(k.get(0).buffered.end(0)) && !isNaN(k.get(0).duration)) {
836					var a = v.width();
837					N.css({
838						width: Math.round(a * k.get(0).buffered.end(0) / k.get(0).duration)
839					})
840				}
841			};
842		try {
843			k.bind("play", function() {
844				D.hide();
845				I.hide();
846				J.show()
847			}), k.bind("pause", d), k.bind("ended", d), k.bind("timeupdate", m), k.bind("progress", g)
848		} catch (Q) {}
849	};
850	var c = jQuery,
851		B = 0;
852	c.fn.html5gallery = function(h) {
853		var e = function(a, c, b) {
854			this.container = a;
855			this.options = c;
856			this.id = b;
857			this.options.googlefonts && 0 < this.options.googlefonts.length && (a = ("https:" == document.location.protocol ? "https" : "http") + "://fonts.googleapis.com/css?family=" + this.options.googlefonts, c = document.createElement("link"), c.setAttribute("rel", "stylesheet"), c.setAttribute("type", "text/css"), c.setAttribute("href", a), document.getElementsByTagName("head")[0].appendChild(c));
858			this.options.flashInstalled = !1;
859			try {
860				new ActiveXObject("ShockwaveFlash.ShockwaveFlash") && (this.options.flashInstalled = !0)
861			} catch (e) {
862				navigator.mimeTypes["application/x-shockwave-flash"] && (this.options.flashInstalled = !0)
863			}
864			this.options.html5VideoSupported = !! document.createElement("video").canPlayType;
865			this.options.isChrome = null != navigator.userAgent.match(/Chrome/i);
866			this.options.isFirefox = null != navigator.userAgent.match(/Firefox/i);
867			this.options.isOpera = null != navigator.userAgent.match(/Opera/i) || null != navigator.userAgent.match(/OPR\//i);
868			this.options.isSafari = null != navigator.userAgent.match(/Safari/i);
869			this.options.isIE11 = null != navigator.userAgent.match(/Trident\/7/) && null != navigator.userAgent.match(/rv:11/);
870			this.options.isIE = null != navigator.userAgent.match(/MSIE/i) && !this.options.isOpera;
871			this.options.isIE10 = null != navigator.userAgent.match(/MSIE 10/i) && !this.options.isOpera;
872			this.options.isIE9 = null != navigator.userAgent.match(/MSIE 9/i) && !this.options.isOpera;
873			this.options.isIE8 = null != navigator.userAgent.match(/MSIE 8/i) && !this.options.isOpera;
874			this.options.isIE7 = null != navigator.userAgent.match(/MSIE 7/i) && !this.options.isOpera;
875			this.options.isIE6 = null != navigator.userAgent.match(/MSIE 6/i) && !this.options.isOpera;
876			this.options.isIE678 = this.options.isIE6 || this.options.isIE7 || this.options.isIE8;
877			this.options.isIE6789 = this.options.isIE6 || this.options.isIE7 || this.options.isIE8 || this.options.isIE9;
878			this.options.isAndroid = null != navigator.userAgent.match(/Android/i);
879			this.options.isIPad = null != navigator.userAgent.match(/iPad/i);
880			this.options.isIPhone = null != navigator.userAgent.match(/iPod/i) || null != navigator.userAgent.match(/iPhone/i);
881			this.options.isIOS = this.options.isIPad || this.options.isIPhone;
882			this.options.isMobile = this.options.isAndroid || this.options.isIPad || this.options.isIPhone;
883			this.options.isIOSLess5 = this.options.isIPad && this.options.isIPhone && (null != navigator.userAgent.match(/OS 4/i) || null != navigator.userAgent.match(/OS 3/i));
884			this.options.supportCSSPositionFixed = !this.options.isIE6 && !this.options.isIOSLess5;
885			this.eStart = (this.isTouch = "ontouchstart" in window) ? "touchstart" : "mousedown";
886			this.eMove = this.isTouch ? "touchmove" : "mousemove";
887			this.eCancel = this.isTouch ? "touchcancel" : "mouseup";
888			this.eClick = this.isTouch ? "touchstart" : "click";
889			this.slideTimer = this.slideshowTimeout = null;
890			this.looptimes = this.slideTimerCount = 0;
891			this.updateCarouselTimeout = null;
892			this.disableupdatecarousel = !1;
893			this.isHd = this.options.hddefault;
894			this.isHTML5 = !1;
895			this.elemArray = [];
896			this.container.children().hide();
897			this.container.css({
898				display: "block",
899				position: "relative"
900			});
901			this.initData(this.init)
902		};
903		e.prototype = {
904			getParams: function() {
905				for (var a = {}, c = window.location.search.substring(1).split("&"), b = 0; b < c.length; b++) {
906					var e = c[b].split("=");
907					e && 2 == e.length && (a[e[0].toLowerCase()] = unescape(e[1]))
908				}
909				return a
910			},
911			init: function(a) {
912				if (a.options.random) for (var d = a.elemArray.length - 1; 0 < d; d--) {
913					var b = Math.floor(Math.random() * d),
914						e = a.elemArray[d];
915					a.elemArray[d] = a.elemArray[b];
916					a.elemArray[b] = e
917				}
918				a.initYoutubeApi();
919				a.options.showcarousel = 1 < a.elemArray.length && a.options.showcarousel;
920				a.options.watermarkcode = "";
921				a.options.fv ? a.options.watermarkcode = "<a style='text-decoration:none;' target='_blank' href='" + a.options.freelink + "' >" : 0 < a.options.watermarklink.length && (a.options.watermarkcode = "<a style='text-decoration:none;' target='_blank' href='" + a.options.watermarklink + "' >");
922				a.options.watermarkcode += "<div " + (a.options.fv ? "" : "class='html5gallery-watermark-" + a.id + "' ") + "style='" + (a.options.fv ? "display:none;position:absolute;top:10px;left:10px;width:120px;height:18px;line-height:18px;text-align:center;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;color:#333;font-size:12px;font-family:Armata,sans-serif,Arial;" : 0 < a.options.watermark.length ? "display:block;position:absolute;top:0px;left:0px;" : "display:none;") + "' >";
923				a.options.fv ? a.options.watermarkcode += a.options.fvm : 0 < a.options.watermark.length && (a.options.watermarkcode += "<img src='" + a.options.watermark + "' />");
924				a.options.watermarkcode += "</div>";
925				if (a.options.fv || 0 < a.options.watermarklink.length) a.options.watermarkcode += "</a>";
926				a.createStyle();
927				a.createMarkup();
928				a.createImageToolbox();
929				0 >
929= a.elemArray.length || (a.createEvents(), a.loadCarousel(), a.savedElem = -1, a.curElem = -1, a.nextElem = -1, a.prevElem = -1, a.isPaused = !a.options.autoslide, a.isFullscreen = !1, a.showingPoster = !1, a.disableTouchSwipe = !1, d = a.getParams(), a.slideRun(d.html5galleryid && d.html5galleryid in a.elemArray ? d.html5galleryid : 0), a.options.responsive && (a.resizeGallery(), c(window).resize(function() {
930					a.resizeGallery()
931				})))
932			},
933			resizeGallery: function() {
934				switch (this.options.skin) {
935					case "vertical":
936					case "showcase":
937						this.resizeStyleVertical();
938						break;
939					default:
940						this.resizeStyleDefault()
941				}
942				this.resizeImageToolbox()
943			},
944			initData: function(a) {
945				this.elemArray = [];
946				if (this.options.src && 0 < this.options.src.length) {
947					var d = this.options.mediatype ? this.options.mediatype : this.checkType(this.options.src);
948					this.elemArray.push([0, "", this.options.src, this.options.webm, this.options.ogg, "", "", this.options.title ? this.options.title : "", this.options.title ? this.options.title : "", d, this.options.width, this.options.height, this.options.poster, this.options.hd, this.options.hdogg, this.options.hdwebm]);
949					this.readTags();
950					a(this)
951				} else if (this.options.xml && 0 < this.options.xml.length) {
952					this.options.xmlnocache && (this.options.xml += 0 > this.options.xml.indexOf("?") ? "?" : "&", this.options.xml += Math.random());
953					var b = this;
954					c.ajax({
955						type: "GET",
956						url: this.options.xml,
957						dataType: "xml",
958						success: function(d) {
959							c(d).find("slide").each(function(a) {
960								var d = c(this).find("title").text(),
961									e = c(this).find("description").text() ? c(this).find("description").text() : c(this).find("information").text();
962								d || (d = "");
963								e || (e = "");
964								var m = c(this).find("mediatype").text() ? c(this).find("mediatype").text() : b.checkType(c(this).find("file").text());
965								b.elemArray.push([c(this).find("id").length ? c(this).find("id").text() : a, c(this).find("thumbnail").text(), c(this).find("file").text(), c(this).find("file-ogg").text(), c(this).find("file-webm").text(), c(this).find("link").text(), c(this).find("linktarget").text(), d, e, m, c(this).find("width").length && !isNaN(parseInt(c(this).find("width").text())) ? parseInt(c(this).find("width").text()) : b.options.width, c(this).find("height").length && !isNaN(parseInt(c(this).find("height").text())) ? parseInt(c(this).find("height").text()) : b.options.height, c(this).find("poster").text(), c(this).find("hd").text(), c(this).find("hdogg").text(), c(this).find("hdwebm").text()])
966							});
967							b.readTags();
968							a(b)
969						}
970					})
971				} else this.options.remote && 0 < this.options.remote.length ? (b = this, c.getJSON(this.options.remote, function(c) {
972					for (var d = 0; d < c.length; d++) {
973						var e = c[d].mediatype ? c[d].mediatype : b.checkType(c[d].file);
974						b.elemArray.push([d, c[d].thumbnail, c[d].file, c[d].fileogg, c[d].filewebm, c[d].link, c[d].linktarget, c[d].title, c[d].description, e, c[d].width && !isNaN(parseInt(c[d].width)) ? parseInt(c[d].width) : b.options.width, c[d].height && !isNaN(parseInt(c[d].height)) ? parseInt(c[d].height) : b.options.height, c[d].poster, c[d].hd, c[d].hdogg, c[d].hdwebm])
975					}
976					b.readTags();
977					a(b)
978				})) : this.options.youtubechannel ? (d = {
979					alt: "json",
980					v: 2,
981					orderby: this.options.youtubechannel.orderby ? this.options.youtubechannel.orderby : "published",
982					"start-index": this.options.youtubechannel["start-index"] ? this.options.youtubechannel["start-index"] : 1,
983					"max-results": this.options.youtubechannel["max-results"] ? this.options.youtubechannel["max-results"] : 10
984				}, this.options.youtubechannel.author ? d.author = this.options.youtubechannel.author : this.options.youtubechannel.q && (d.q = this.options.youtubechannel.q), d = "https://gdata.youtube.com/feeds/api/videos?" + c.param(d), b = this, c.getJSON(d, function(c) {
985					if (c && c.feed && c.feed.entry) for (var d = 0; d < c.feed.entry.length; d++) b.elemArray.push([d, "http://img.youtube.com/vi/" + c.feed.entry[d].media$group.yt$videoid.$t + "/0.jpg", c.feed.entry[d].media$group.media$player.url, null, null, null, null, c.feed.entry[d].media$group.media$title.$t, c.feed.entry[d].media$group.media$description.$t, 9, 640, 480, "http://img.youtube.com/vi/" + c.feed.entry[d].media$group.yt$videoid.$t + "/0.jpg", null, null, null]);
986					b.readTags();
987					a(b)
988				})) : (this.readTags(), a(this))
989			},
990			readTags: function() {
991				var a = this;
992				c("img", this.container).each(function() {
993					var d = c(this).attr("src"),
994						b = c(this).attr("alt"),
995						e = c(this).data("description") ? c(this).data("description") : c(this).data("information");
996					b || (b = "");
997					e || (e = "");
998					var g = a.options.width,
999						q = a.options.height,
1000						f = null,
1001						h = null,
1002						j = null,
1003						l = null,
1004						n = null,
1005						r = null,
1006						p = null,
1007						u = null;
1008					c(this).parent().is("a") && (d = c(this).parent().attr("href"), f = c(this).parent().data("ogg"), h = c(this).parent().data("webm"), j = c(this).parent().data("link"), l = c(this).parent().data("linktarget"), n = c(this).parent().data("poster"), isNaN(c(this).parent().data("width")) || (g = c(this).parent().data("width")), isNaN(c(this).parent().data("height")) || (q = c(this).parent().data("height")), r = c(this).parent().data("hd"), p = c(this).parent().data("hdogg"), u = c(this).parent().data("hdwebm"));
1009					var k = c(this).parent().data("mediatype") ? c(this).parent().data("mediatype") : a.checkType(d);
1010					a.elemArray.push([a.elemArray.length, c(this).attr("src"), d, f, h, j, l, b, e, k, g, q, n, r, p, u])
1011				})
1012			},
1013			createMarkup: function() {
1014				this.$gallery = jQuery("<div class='html5gallery-container-" + this.id + "'>" +
1015					"<div class='html5gallery-box-" + this.id + "'><div class='html5gallery-elem-" + this.id + "'></div>" +
1016					"<div class='html5gallery-title-" + this.id + "'></div>" +
1017					"<div class='html5gallery-timer-" + this.id + "'></div>" +
1018					"<div class='html5gallery-viral-" + this.id + "'></div>" +
1019					"<div class='html5gallery-toolbox-" + this.id + "'><div class='html5gallery-toolbox-bg-" + this.id + "'></div>" +
1020					"<div class='html5gallery-toolbox-buttons-" + this.id + "'><div class='html5gallery-play-" + this.id + "'></div><div class='html5gallery-pause-" + this.id + "'></div>" +
1021					"<div class='html5gallery-left-" + this.id + "'></div><div class='html5gallery-right-" + this.id + "'></div>" +
1022					"<div class='html5gallery-lightbox-" + this.id + "'></div></div></div></div><div class='html5gallery-car-" + this.id + "'><div class='html5gallery-car-list-" + this.id + "'>" +
1023					"<div class='html5gallery-car-mask-" + this.id + "'><div class='html5gallery-thumbs-" + this.id + "'></div></div><div class='html5gallery-car-slider-bar-" + this.id + "'>" +
1024					"<div class='html5gallery-car-slider-bar-top-" + this.id + "'></div><div class='html5gallery-car-slider-bar-middle-" + this.id + "'></div>" +
1025					"<div class='html5gallery-car-slider-bar-bottom-" + this.id + "'></div></div><div class='html5gallery-car-left-" + this.id + "'></div>" +
1026					"<div class='html5gallery-car-right-" + this.id + "'></div><div class='html5gallery-car-slider-" + this.id + "'></div></div></div></div>");
1027				this.$gallery.appendTo(this.container);
1028				this.options.socialurlforeach || this.createSocialMedia();
1029				this.options.googleanalyticsaccount && !window._gaq && (window._gaq = window._gaq || [], window._gaq.pu
1029sh(["_setAccount", this.options.googleanalyticsaccount]), window._gaq.push(["_trackPageview"]), c.getScript(("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js"))
1030			},
1031			createSocialMedia: function() {
1032				c(".html5gallery-viral-" + this.id, this.$gallery).empty();
1033				var a = window.location.href;
1034				this.options.socialurlforeach && (a += (0 > window.location.href.indexOf("?") ? "?" : "&") + "html5galleryid=" + this.elemArray[this.curElem][0]);
1035				if (this.options.showsocialmedia && this.options.showfacebooklike) {
1036					var d = "<div style='display:block; float:left; width:110px; height:21px;'><iframe src='http://www.facebook.com/plugins/like.php?href=",
1037						d = this.options.facebooklikeurl && 0 < this.options.facebooklikeurl.length ? d + encodeURIComponent(this.options.facebooklikeurl) : d + a;
1038					c(".html5gallery-viral-" + this.id, this.$gallery).append(d + "&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21' scrolling='no' frameborder='0' style='border:none;;overflow:hidden; width:110px; height:21px;' allowTransparency='true'></iframe></div>")
1039				}
1040				this.options.showsocialmedia && this.options.showtwitter && (d = "<div style='display:block; float:left; width:110px; height:21px;'><a href='https://twitter.com/share' class='twitter-share-button'", d = this.options.twitterurl && 0 < this.options.twitterurl.length ? d + (" data-url='" + this.options.twitterurl + "'") : d + (" data-url='" + a + "'"), this.options.twitterusername && 0 < this.options.twitterusername.length && (d += " data-via='" + this.options.twittervia + "' data-related='" + this.options.twitterusername + "'"), c(".html5gallery-viral-" + this.id, this.$gallery).append(d + ">Tweet</a></div>"), c.getScript("http://platform.twitter.com/widgets.js"));
1041				this.options.showsocialmedia && this.options.showgoogleplus && (d = "<div style='display:block; float:left; width:100px; height:21px;'><div class='g-plusone' data-size='medium'", d = this.options.googleplusurl && 0 < this.options.googleplusurl.length ? d + (" data-href='" + this.options.googleplusurl + "'") : d + (" data-href='" + a + "'"), c(".html5gallery-viral-" + this.id, this.$gallery).append(d + "></div></div>"), c.getScript("https://apis.google.com/js/plusone.js"))
1042			},
1043			playGallery: function() {
1044				var a = this;
1045				c(".html5gallery-play-" + a.id, a.$gallery).hide();
1046				c(".html5gallery-pause-" + a.id, a.$gallery).show();
1047				a.isPaused = !1;
1048				a.slideshowTimeout = setTimeout(function() {
1049					a.slideRun(-1)
1050				}, a.options.slideshowinterval);
1051				c(".html5gallery-timer-" + a.id, a.$gallery).css({
1052					width: 0
1053				});
1054				a.slideTimerCount = 0;
1055				a.options.showtimer && (a.slideTimer = setInterval(function() {
1056					a.showSlideTimer()
1057				}, 50))
1058			},
1059			pauseGallery: function() {
1060				c(".html5gallery-play-" + this.id, this.$gallery).show();
1061				c(".html5gallery-pause-" + this.id, this.$gallery).hide();
1062				this.isPaused = !0;
1063				clearTimeout(this.slideshowTimeout);
1064				c(".html5gallery-timer-" + this.id, this.$gallery).css({
1065					width: 0
1066				});
1067				clearInterval(this.slideTimer);
1068				this.slideTimerCount = 0
1069			},
1070			createEvents: function() {
1071				var a = this;
1072				c(".html5gallery-play-" + this.id, this.$gallery).click(function() {
1073					a.playGallery()
1074				});
1075				c(".html5gallery-pause-" + this.id, this.$gallery).click(function() {
1076					a.pauseGallery()
1077				});
1078				c(".html5gallery-lightbox-" + this.id, this.$gallery).click(function() {
1079					a.goFullscreen()
1080				});
1081				c(".html5gallery-left-" + this.id, this.$gallery).click(function() {
1082					a.slideRun(-2, !0)
1083				});
1084				c(".html5gallery-right-" + this.id, this.$gallery).click(function() {
1085					a.slideRun(-1, !0)
1086				});
1087				if (a.options.enabletouchswipe) {
1088					var d = a.options.isAndroid && a.options.enabletouchswipeonandroid ? !0 : !1;
1089					c(".html5gallery-box-" + this.id, this.$gallery).touchSwipe({
1090						preventWebBrowser: d,
1091						swipeLeft: function() {
1092							a.disableTouchSwipe || a.slideRun(-1, !0)
1093						},
1094						swipeRight: function() {
1095							a.disableTouchSwipe || a.slideRun(-2, !0)
1096						}
1097					})
1098				}
1099				c(".html5gallery-box-" + this.id, this.$gallery).hover(function() {
1100					a.onSlideshowOver();
1101					if ("mouseover" == a.options.imagetoolboxmode) {
1102						var c = a.elemArray[a.curElem][9];
1103						("always" == a.options.showimagetoolbox || "image" == a.options.showimagetoolbox && 1 == c) && a.showimagetoolbox(c)
1104					}
1105				}, function() {
1106					"mouseover" == a.options.imagetoolboxmode && a.hideimagetoolbox()
1107				});
1108				c(".html5gallery-container-" + this.id).hover(function() {
1109					a.options.titleoverlay && a.options.titleautohide && c(".html5gallery-title-" + a.id, a.$gallery).fadeIn()
1110				}, function() {
1111					a.options.titleoverlay && a.options.titleautohide && c(".html5gallery-title-" + a.id, a.$gallery).fadeOut()
1112				});
1113				c(".html5gallery-car-left-" + this.id, this.$gallery).css({
1114					"background-position": "-64px 0px",
1115					cursor: ""
1116				});
1117				c(".html5gallery-car-left-" + this.id, this.$gallery).data("disabled", !0);
1118				c(".html5gallery-car-right-" + this.id, this.$gallery).css({
1119					"background-position": "0px 0px"
1120				});
1121				c(".html5gallery-car-left-" + this.id, this.$gallery).click(function() {
1122					c(this).data("disabled") || (a.disableupdatecarousel = !0, a.updateCarouselTimeout = setTimeout(function() {
1123						a.enableUpdateCarousel()
1124					}, a.options.updatecarouselinterval), a.carouselPrev())
1125				});
1126				c(".html5gallery-car-right-" + this.id, this.$gallery).click(function() {
1127					c(this).data("disabled") || (a.disableupdatecarousel = !0, a.updateCarouselTimeout = setTimeout(function() {
1128						a.enableUpdateCarousel()
1129					}, a.options.updatecarouselinterval), a.carouselNext())
1130				});
1131				c(".html5gallery-car-slider-" + this.id, this.$gallery).bind("drag", function(c, d) {
1132					a.disableupdatecarousel = !0;
1133					a.updateCarouselTimeout = setTimeout(function() {
1134						a.enableUpdateCarousel()
1135					}, a.options.updatecarouselinterval);
1136					a.carouselSliderDrag(c, d)
1137				});
1138				c(".html5gallery-car-slider-bar-" + this.id, this.$gallery).click(function(c) {
1139					a.disableupdatecarousel = !0;
1140					a.updateCarouselTimeout = setTimeout(function() {
1141						a.enableUpdateCarousel()
1142					}, a.options.updatecarouselinterval);
1143					a.carouselBarClicked(c)
1144				});
1145				c(".html5gallery-car-left-" + this.id, this.$gallery).hover(function() {
1146					c(this).data("disabled") || c(this).css({
1147						"background-position": "-32px 0px"
1148					})
1149				}, function() {
1150					c(this).data("disabled") || c(this).css({
1151						"background-position": "0px 0px"
1152					})
1153				});
1154				c(".html5gallery-car-right-" + this.id, this.$gallery).hover(function() {
1155					c(this).data("disabled") || c(this).css({
1156						"background-position": "-32px 0px"
1157					})
1158				}, function() {
1159					c(this).data("disabled") || c(this).css({
1160						"background-position": "0px 0px"
1161					})
1162				})
1163			},
1164			createStyle: function() {
1165				switch (this.options.skin) {
1166					case "vertical":
1167					case "showcase":
1168						this.createStyleVertical();
1169						break;
1170					default:
1171						this.createStyleDefault()
1172				}
1173			},
1174			resizeStyleVertical: function() {
1175				if (this.container.parent() && this.container.parent().width()) {
1176					this.options.containerWidth = this.container.parent().width();
1177					this.options.totalWidth = this.options.containerWidth;
1178					this.options.showcarousel && (this.options.carouselWidth = "bottom" == this.options.carouselposition ? this.options.width : this.options.thumbwidth);
1179					"bottom" == this.options.carouselposition ? this.options.width = this.options.totalWidth - 2 * this.options.padding : (this.options.width = this.options.totalWidth - 2 * this.options.padding, 0 < this.options.carouselWidth + this.options.carouselmargin && (this.options.width -= this.options.carouselWidth + this.options.carouselmargin));
1180					this.options.responsivefullscreen && 0 < this.container.parent().height() ? (this.options.containerHeight = this.container.parent().height(), this.options.totalHeight = this.options.containerHeight, this.options.height = "bottom" == this.options.carouselposition ? this.options.totalHeight - (this.options.headerHeight + 2 * this.options.padding + this.options.carouselheight) : this.options.totalHeight - (this.options.headerHeight + 2 * this.options.padding)) : (this.options.height = Math.round(this.options.width * this.options.originalHeight / this.options.originalWidth), this.options.totalHeight = "bottom" == this.options.carouselposition ? this.options.height + this.options.headerHeight + 2 * this.options.padding + this.options.carouselmargin + this.options.carouselHeight : this.options.height + this.options.headerHeight + 2 * this.options.padding, this.options.containerHeight = this.options.totalHeight);
1181					this.container.css({
1182						width: this.options.containerWidth,
1183						height: this.options.containerHeight
1184					});
1185					this.options.boxWidth = this.options.width;
1186					this.options.boxHeight = this.options.height + this.options.headerHeight;
1187					if (this.options.showcarousel) if ("bottom" == this.options.carouselposition) {
1188						this.options.carouselWidth = this.options.width;
1189						this.options.carouselHeight = this.options.carouselheight;
1190						this.options.carouselLeft = this.options.padding;
1191						this.options.carouselTop = this.options.height + this.options.headerHeight + 2 * this.options.padding;
1192						this.options.carAreaLength = this.options.carouselHeight;
1193						this.options.carouselSlider = Math.floor(this.options.carAreaLength / (this.options.thumbheight + this.options.thumbgap)) < this.elemArray.length;
1194						this.options.thumbwidth = this.options.width;
1195						this.options.carouselSlider && (this.options.thumbwidth -= 20);
1196						c(".html5gallery-car-mask-" + this.id).css({
1197							width: this.options.thumbwidth + "px"
1198						});
1199						c(".html5gallery-tn-" + this.id).css({
1200							width: this.options.thumbwidth + "px"
1201						});
1202						c(".html5gallery-tn-selected-" + this.id).css({
1203							width: this.options.thumbwidth + "px"
1204						});
1205						c(".html5gallery-car-slider-bar-" + this.id).css({
1206							left: String(this.options.thumbwidth + 6) + "px"
1207						});
1208						this.options.isMobile ? (c(".html5gallery-car-left-" + this.id).css({
1209							left: String(this.options.thumbwidth + 5) + "px"
1210						}), c(".html5gallery-car-right-" + this.id).css({
1211							left: String(this.options.thumbwidth + 5) + "px"
1212						})) : c(".html5gallery-car-slider-" + this.id).css({
1213							left: String(this.options.thumbwidth + 5) + "px"
1214						});
1215						var a = this.options.thumbwidth - 3 * this.options.thumbmargin;
1216						this.options.thumbshowimage && (a -= this.options.thumbimagewidth + 2 * this.options.thumbimageborder);
1217						this.options.thumbshowtitle && c("head").append("<style type='text/css' data-creator='html5gallery'>.html5gallery-tn-title-" + this.id + " {width: " + a + "px;}</style>")
1218					} else this.options.carouselWidth = this.options.thumbwidth, this.options.carouselHeight = this.options.height + this.options.headerHeight, this.options.carTop = 0, this.options.carBottom = 0, this.options.carAreaLength = this.options.carouselHeight - this.options.carTop - this.options.carBottom, this.options.carouselSlider = Math.floor(this.options.carAreaLength / (this.options.thumbheight + this.options.thumbgap)) < this.elemArray.length, this.options.carouselSlider && (this.options.carouselWidth += 20, this.options.width -= 20, this.options.boxWidth = this.options.width), "left" == this.options.carouselposition ? (this.options.boxLeft = this.options.padding + this.options.carouselWidth + this.options.carouselmargin, this.options.carouselLeft = this.options.padding) : this.options.carouselLeft = this.options.padding + this.options.width + this.options.carouselmargin, this.options.carouselTop = this.options.padding;
1219					c(".html5gallery-container-" + this.id).css({
1220						width: this.options.totalWidth + "px",
1221						height: this.options.totalHeight + "px"
1222					});
1223					c(".html5gallery-box-" + this.id).css({
1224						width: this.options.boxWidth + "px",
1225						height: this.options.boxHeight + "px"
1226					});
1227					a = this.elemArray[this.curElem][9];
1228					if (1 == a || this.showingPoster) {
1229						var d = this.elemArray[this.curElem][10],
1230							a = this.elemArray[this.curElem][11],
1231							b;
1232						this.isFullscreen ? (b = Math.min(this.fullscreenWidth / d, this.fullscreenHeight / a), b = 1 < b ? 1 : b) : b = "fill" == this.options.resizemode ? Math.max(this.options.width / d, this.options.height / a) : Math.min(this.options.width / d, this.options.height / a);
1233						var d = Math.round(b * d),
1234							e = Math.round(b * a),
1235							a = this.isFullscreen ? d : this.options.width;
1236						b = this.isFullscreen ? e : this.options.height;
1237						var g = Math.round(a / 2 - d / 2),
1238							q = Math.round(b / 2 - e / 2);
1239						this.isFullscreen && this.adjustFullscreen(a, b, !0);
1240						c(".html5gallery-elem-" + this.id).css({
1241							width: a + "px",
1242							height: b + "px"
1243						});
1244						c(".html5gallery-elem-img-" + this.id).css({
1245							width: a + "px",
1246							height: b + "px"
1247						});
1248						c(".html5gallery-elem-image-" + this.id).css({
1249							width: d + "px",
1250							height: e + "px",
1251							top: q + "px",
1252							left: g + "px"
1253						})
1254					} else if (5 == a || 6 == a || 7 == a || 8 == a || 9 == a || 10 == a) a = this.elemArray[this.curElem][10], d = this.elemArray[this.curElem][11], this.isFullscreen ? (b = Math.min(this.fullscreenWidth / a, this.fullscreenHeight / d), b = 1 < b ? 1 : b, a = Math.round(b * a), b = Math.round(b * d), this.adjustFullscreen(a, b, !0)) : (a = this.options.width, b = this.options.height), c(".html5gallery-elem-" + this.id).css({
1255						width: a + "px",
1256						height: b + "px"
1257					}), c(".html5gallery-elem-video-" + this.id).css({
1258						width: a + "px",
1259						height: b + "px"
1260					}), c(".html5gallery-elem-video-container-" + this.id).css({
1261						width: a + "px",
1262						height: b + "px"
1263					}), d = this.options.isIPhone ? b - 48 : b, c(".html5gallery-elem-video-container-" + this.id).find("video").css({
1264						width: a + "px",
1265						height: d + "px"
1266					}), c("#html5gallery-elem-video-" + this.id).css({
1267						width: a + "px",
1268						height: b + "px"
1269					});
1270					d = a = 0;
1271					"bottom" == this.options.headerpos && (a = this.options.titleoverlay ? this.options.height - this.options.titleheight : this.options.height, d = this.options.titleoverlay ? this.options.height : this.options.height + this.options.titleheight);
1272					c(".html5gallery-title-" + this.id).css({
1273						width: this.options.boxWidth + "px"
1274					});
1275					this.options.titleoverlay || c(".html5gallery-title-" + this.id).css({
1276						top: a + "px"
1277					});
1278					c(".html5gallery-viral-" + this.id).css({
1279						top: d + "px"
1280					});
1281					c(".html5gallery-timer-" + this.id).css({
1282						top: String(this.options.elemTop + this.options.height - 2) + "px"
1283					});
1284					this.options.showcarousel && (c(".html5gallery-car-" + this.id).css({
1285						width: this.options.carouselWidth + "px",
1286						height: this.options.carouselHeight + "px",
1287						top: this.options.carouselTop + "px",
1288						left: this.options.carouselLeft + "px",
1289						top: this.options.carouselTop + "px"
1290					}), c(".html5gallery-car-list-" + this.id).css({
1291						top: this.options.carTop + "px",
1292						height: String(this.options.carAreaLength) + "px",
1293						width: this.options.carouselWidth + "px"
1294					}), this.options.thumbShowNum = Math.floor(this.options.carAreaLength / (this.options.thumbheight + this.options.thumbgap)), this.options.thumbMaskHeight = this.options.thumbShowNum * this.options.thumbheight + (this.options.thumbShowNum - 1) * this.options.thumbgap, this.options.thumbTotalHeight = this.elemArray.length * this.options.thumbheight + (this.elemArray.length - 1) * this.options.thumbgap, this.options.carouselSlider && (this.options.carouselSliderMin = 0, this.options.carouselSliderMax = this.options.thumbMaskHeight - 54, c(".html5gallery-car-slider-bar-" + this.id).css({
1295						height: this.options.thumbMaskHeight + "px"
1296					}), c(".html5gallery-car-slider-bar-middle-" + this.id).css({
1297						height: String(this.options.thumbMaskHeight - 32) + "px"
1298					}), this.options.isMobile && c(".html5gallery-car-right-" + this.id).css({
1299						top: String(this.options.thumbMaskHeight - 35) + "px"
1300					}), c(".html5gallery-car-slider-bar-" + this.id).css({
1301						display: "block"
1302					}), c(".html5gallery-car-left-" + this.id).css({
1303						display: "block"
1304					}), c(".html5gallery-car-right-" + this.id).css({
1305						display: "block"
1306					}), c(".html5gallery-car-slider-" + this.id).css({
1307						display: "block"
1308					})), a = 0, this.options.carouselNavButton && (a = Math.round(this.options.carAreaLength / 2 - this.options.thumbMaskHeight / 2)), c(".html5gallery-car-mask-" + this.id).css({
1309						top: a + "px",
1310						height: this.options.thumbMaskHeight + "px"
1311					}), this.carouselHighlight(this.curElem))
1312				}
1313			},
1314			createStyleVertical: function() {
1315				this.options.thumbimagewidth = this.options.thumbshowtitle ? this.options.thumbheight - 2 * this.options.thumbimageborder - 4 : this.options.thumbwidth - 2 * this.options.thumbimageborder - 4;
1316				this.options.thumbimageheight = this.options.thumbheight - 2 * this.options.thumbimageborder - 4;
1317				this.options.showtitle || (this.options.titleheight = 0);
1318				if (!this.options.showsocialmedia || !this.options.showfacebooklike && !this.options.showtwitter && !this.options.showgoogleplus) this.options.socialheight = 0;
1319				this.options.headerHeight = this.options.titleoverlay ? this.options.socialheight : this.options.titleheight + this.options.socialheight;
1320				this.options.boxWidth = this.options.width;
1321				this.options.boxHeight = this.options.height + this.options.headerHeight;
1322				this.options.boxLeft = this.options.padding;
1323				this.options.boxTop = this.options.padding;
1324				this.options.showcarousel ? "bottom" == this.options.carouselposition ? (this.options.carouselWidth = this.options.width, this.options.carouselHeight = this.options.carouselheight, this.options.carouselLeft = this.options.padding, this.options.carouselTop = this.options.height + this.options.headerHeight + 2 * this.options.padding, this.options.carAreaLength = this.options.carouselHeight, this.options.carouselSlider = Math.floor(this.options.carAreaLength / (this.options.thumbheight + this.options.thumbgap)) < this.elemArray.length, this.options.thumbwidth = this.options.width, this.options.carouselSlider && (this.options.thumbwidth -= 20)) : (this.options.carouselWidth = this.options.thumbwidth, this.options.carouselHeight = this.options.height + this.options.headerHeight, this.options.carTop = 0, this.options.carBottom = 0, this.options.carAreaLength = this.options.carouselHeight - this.options.carTop - this.options.carBottom, this.options.carouselSlider = Math.floor(this.options.carAreaLength / (this.options.thumbheight + this.options.thumbgap)) < this.elemArray.length, this.options.carouselSlider && (this.options.carouselWidth += 20), "left" == this.options.carouselposition ? (this.options.boxLeft = this.options.padding + this.options.carouselWidth + this.options.carouselmargin, this.options.carouselLeft = this.options.padding) : this.options.carouselLeft = this.options.padding + this.options.width + this.options.carouselmargin, this.options.carouselTop = this.options.padding) : (this.options.carouselWidth = 0, this.options.carouselHeight = 0, this.options.carouselLeft = 0, this.options.carouselTop = 0, this.options.carouselmargin = 0);
1325				"bottom" == this.options.carouselposition ? (this.options.totalWidth = this.options.width + 2 * this.options.padding, this.options.totalHeight = this.options.height + this.options.headerHeight + 2 * this.options.padding + this.options.carouselmargin + this.options.carouselHeight) : (this.options.totalWidth = this.options.width + this.options.carouselWidth + this.options.carouselmargin + 2 * this.options.padding, this.options.totalHeight = this.options.height + this.options.headerHeight + 2 * this.options.padding);
1326				this.options.containerWidth = this.options.totalWidth;
1327				this.options.containerHeight = this.options.totalHeight;
1328				this.options.responsive ? (this.options.originalWidth = this.options.width, this.options.originalHeight = this.options.height, this.container.css({
1329					"max-width": "100%"
1330				})) : this.container.css({
1331					width: this.options.containerWidth,
1332					height: this.options.containerHeight
1333				});
1334				var a = 0,
1335					d = 0;
1336				this.options.elemTop = 0;
1337				"top" == this.options.headerpos ? (d = 0, a = this.options.socialheight, this.options.elemTop = this.options.headerHeight) : "bottom" == this.options.headerpos && (this.options.elemTop = 0, a = this.options.titleoverlay ? this.options.height - this.options.titleheight : this.options.height, d = this.options.titleoverlay ? this.options.height : this.options.height + this.options.titleheight);
1338				var b = " .html5gallery-container-" + this.id + " { display:block; position:absolute; left:0px; top:0px;
1338 width:" + this.options.totalWidth + "px; height:" + this.options.totalHeight + "px; background:url('" + this.options.skinfolder + this.options.bgimage + "') center top; background-color:" + this.options.bgcolor + ";}";
1339				this.options.galleryshadow && (b += " .html5gallery-container-" + this.id + " { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}");
1340				var b = b + (" .html5gallery-box-" + this.id + " {display:block; position:absolute; text-align:center; left:" + this.options.boxLeft + "px; top:" + this.options.boxTop + "px; width:" + this.options.boxWidth + "px; height:" + this.options.boxHeight + "px; }"),
1341					e = Math.round(this.options.socialheight / 2 - 12),
1342					b = b + (" .html5gallery-title-text-" + this.id + " " + this.options.titlecss + " .html5gallery-title-text-" + this.id + " " + this.options.titlecsslink + " .html5gallery-error-" + this.id + " " + this.options.errorcss),
1343					b = b + (" .html5gallery-description-text-" + this.id + " " + this.options.descriptioncss + " .html5gallery-description-text-" + this.id + " " + this.options.descriptioncsslink),
1344					b = b + (" .html5gallery-fullscreen-title-" + this.id + "" + this.options.titlefullscreencss + " .html5gallery-fullscreen-title-" + this.id + "" + this.options.titlefullscreencsslink),
1345					b = b + (" .html5gallery-viral-" + this.id + " {display:block; overflow:hidden; position:absolute; text-align:left; top:" + d + "px; left:0px; width:" + this.options.boxWidth + "px; height:" + this.options.socialheight + "px; padding-top:" + e + "px;}"),
1346					b = b + (" .html5gallery-title-" + this.id + " {display:" + (this.options.titleoverlay && this.options.titleautohide ? "none" : "block") + "; overflow:hidden; position:absolute; left:0px; width:" + this.options.boxWidth + "px; "),
1347					b = this.options.titleoverlay ? "top" == this.options.headerpos ? b + "top:0px; height:auto; }" : b + "bottom:0px; height:auto; }" : b + ("top:" + a + "px; height:" + this.options.titleheight + "px; }"),
1348					b = b + (" .html5gallery-timer-" + this.id + " {display:block; position:absolute; top:" + String(this.options.elemTop + this.options.height - 2) + "px; left:0px; width:0px; height:2px; background-color:#ccc; filter:alpha(opacity=60); opacity:0.6; }"),
1349					b = b + (" .html5gallery-elem-" + this.id + " {display:block; overflow:hidden; position:absolute; top:" + this.options.elemTop + "px; left:0px; width:" + this.options.boxWidth + "px; height:" + this.options.height + "px;}");
1350				this.options.isIE7 || this.options.isIE6 ? (b += " .html5gallery-loading-" + this.id + " {display:none; }", b += " .html5gallery-loading-center-" + this.id + " {display:none; }") : (b += " .html5gallery-loading-" + this.id + " {display:block; position:absolute; top:4px; right:4px; width:100%; height:100%; background:url('" + this.options.skinfolder + "loading.gif') no-repeat top right;}",
1351					b += " .html5gallery-loading-center-" + this.id + " {display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background:url('" + this.options.skinfolder + "loading_center.gif') no-repeat center center;}");
1352				0 < this.options.borderradius && (b += " .html5gallery-elem-" + this.id + " { overflow:hidden; border-radius:" + this.options.borderradius + "px; -moz-border-radius:" + this.options.borderradius + "px; -webkit-border-radius:" + this.options.borderradius + "px;}");
1353				this.options.slideshadow && (b += " .html5gallery-title-" + this.id + " { padding:4px;}", b += " .html5gallery-timer-" + this.id + " { margin:4px;}", b += " .html5gallery-elem-" + this.id + " { overflow:hidden; padding:4px; -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}");
1354				this.options.showcarousel ? (b += " .html5gallery-car-" + this.id + " { position:absolute; display:block; overflow:hidden; width:" + this.options.carouselWidth + "px; height:" + this.options.carouselHeight + "px; left:" + this.options.carouselLeft + "px; top:" + this.options.carouselTop + "px; }",
1355					b += " .html5gallery-car-list-" + this.id + " { position:absolute; display:block; overflow:hidden; top:" + this.options.carTop + "px; height:" + String(this.options.carAreaLength) + "px; left:0px;
1355 width:" + this.options.carouselWidth + "px; }",
1356					b += ".html5gallery-thumbs-" + this.id + " {margin-top:0px; height:" + String(this.elemArray.length * (this.options.thumbheight + this.options.thumbgap)) + "px;}", this.options.thumbShowNum = Math.floor(this.options.carAreaLength / (this.options.thumbheight + this.options.thumbgap)), this.options.thumbMaskHeight = this.options.thumbShowNum * this.options.thumbheight + (this.options.thumbShowNum - 1) * this.options.thumbgap, this.options.thumbTotalHeight = this.elemArray.length * this.options.thumbheight + (this.elemArray.length - 1) * this.options.thumbgap, this.options.carouselSliderMin = 0, this.options.carouselSliderMax = this.options.thumbMaskHeight - 54,
1357					b += " .html5gallery-car-slider-bar-" + this.id + " { position:absolute; display:" + (this.options.carouselSlider ? "block" : "none") + "; overflow:hidden; top:0px; height:" + this.options.thumbMaskHeight + "px; left:" + String(this.options.thumbwidth + 6) + "px; width:14px;}",
1358					b += " .html5gallery-car-slider-bar-top-" + this.id + " { position:absolute; display:block; top:0px; left:0px; width:14px; height:16px; background:url('" + this.options.skinfolder + "bartop.png')}",
1359					b += " .html5gallery-car-slider-bar-middle-" + this.id + " { position:absolute; display:block; top:16px; left:0px; width:14px; height:" + String(this.options.thumbMaskHeight - 32) + "px; background:url('" + this.options.skinfolder + "bar.png')}",
1360					b += " .html5gallery-car-slider-bar-bottom-" + this.id + " { position:absolute; display:block; bottom:0px; left:0px; width:14px; height:16px; background:url('" + this.options.skinfolder + "barbottom.png')}",
1361					b = this.options.isMobile ? b + (" .html5gallery-car-left-" + this.id + " { position:absolute; display:" + (this.options.carouselSlider ? "block" : "none") + "; cursor:pointer; overflow:hidden; width:16px; height:35px; left:" + String(this.options.thumbwidth + 5) + "px; top:0px; background:url('" + this.options.skinfolder + "slidertop.png')}  .html5gallery-car-right-" + this.id + " { position:absolute; display:" + (this.options.carouselSlider ? "block" : "none") + "; cursor:pointer; overflow:hidden; width:16px; height:35px; left:" + String(this.options.thumbwidth + 5) + "px; top:" + String(this.options.thumbMaskHeight - 35) + "px; background:url('" + this.options.skinfolder + "sliderbottom.png')} ") : b + (" .html5gallery-car-slider-" + this.id + " { position:absolute; display:" + (this.options.carouselSlider ? "block" : "none") + "; overflow:hidden; cursor:pointer; top:0px; height:54px; left:" + String(this.options.thumbwidth + 5) + "px; width:16px; background:url('" + this.options.skinfolder + "slider.png');}"), a = 0, this.options.carouselNavButton && (a = Math.round(this.options.carAreaLength / 2 - this.options.thumbMaskHeight / 2)),
1362					b += " .html5gallery-car-mask-" + this.id + " { position:absolute; display:block; overflow:hidden; top:" + a + "px; height:" + this.options.thumbMaskHeight + "px; left:0px; width:" + this.options.thumbwidth + "px;} ", a = this.options.thumbheight, this.options.isIE || (a = this.options.thumbheight - 2), b += " .html5gallery-tn-" + this.id + " { display:block; margin-bottom:" + this.options.thumbgap + "px; text-align:center; cursor:pointer; width:" + this.options.thumbwidth + "px;height:" + a + "px;overflow:hidden;", this.options.carouselbgtransparent ? b += "background-color:transparent;" : (this.options.isIE || (b += "border-top:1px solid " + this.options.carouseltopborder + "; border-bottom:1px solid " + this.options.carouselbottomborder + ";"),
1363					b += "background-color: " + this.options.carouselbgcolorend + "; background: " + this.options.carouselbgcolorend + " -webkit-gradient(linear, left top, left bottom, from(" + this.options.carouselbgcolorstart + "), to(" + this.options.carouselbgcolorend + ")) no-repeat; background: " + this.options.carouselbgcolorend + " -moz-linear-gradient(top, " + this.options.carouselbgcolorstart + ", " + this.options.carouselbgcolorend + ") no-repeat; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=" + this.options.carouselbgcolorstart + ", endColorstr=" + this.options.carouselbgcolorend + ") 
1363no-repeat; -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=" + this.options.carouselbgcolorstart + ", endColorstr=" + this.options.carouselbgcolorend + ")' no-repeat;"), this.options.carouselbgimage && (b += "background:url('" + this.options.skinfolder + this.options.carouselbgimage + "') center top;"),
1364					b = b + "}" + (" .html5gallery-tn-selected-" + this.id + " { display:block; margin-bottom:" + this.options.thumbgap + "px;text-align:center; cursor:pointer; width:" + this.options.thumbwidth + "px;height:" + a + "px;overflow:hidden;"), this.options.carouselbgtransparent ? b += "background-color:transparent;" : (this.options.isIE || (b += "border-top:1px solid " + this.options.carouselhighlighttopborder + "; border-bottom:1px solid " + this.options.carouselhighlightbottomborder + ";"),
1365					b += "background-color: " + this.options.carouselhighlightbgcolorend + "; background: " + this.options.carouselhighlightbgcolorend + " -webkit-gradient(linear, left top, left bottom, from(" + this.options.carouselhighlightbgcolorstart + "), to(" + this.options.carouselhighlightbgcolorend + ")) no-repeat; background: " + this.options.carouselhighlightbgcolorend + " -moz-linear-gradient(top, " + this.options.carouselhighlightbgcolorstart + ", " + this.options.carouselhighlightbgcolorend + ") no-repeat; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=" + this.options.carouselhighlightbgcolorstart + ", endColorstr=" + this.options.carouselhighlightbgcolorend + ") no-repeat; -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=" + this.options.carouselhighlightbgcolorstart + ", endColorstr=" + this.options.carouselhighlightbgcolorend + ")' no-repeat;"), this.options.carouselbgimage && (b += "background:url('" + this.options.skinfolder + this.options.carouselbgimage + "') center top;"), b += "}", b += " .html5gallery-tn-selected-" + this.id + " .html5gallery-tn-img-" + this.id + " {background-color:" + this.options.thumbimagebordercolor + ";} .html5gallery-tn-" + this.id + " { filter:alpha(opacity=" + Math.round(100 * this.options.thumbopacity) + "); opacity:" + this.options.thumbopacity + "; }  .html5gallery-tn-selected-" + this.id + " { filter:alpha(opacity=100); opacity:1; } ",
1366					a = this.options.thumbwidth - 3 * this.options.thumbmargin, this.options.thumbshowimage ? (a -= this.options.thumbimagewidth + 2 * this.options.thumbimageborder,
1367					d = this.options.thumbshowtitle ? this.options.thumbmargin : this.options.thumbwidth / 2 - (this.options.thumbimagewidth + 2 * this.options.thumbimageborder) / 2,
1368					e = Math.round((this.options.thumbheight - 2) / 2 - (this.options.thumbimageheight + 2 * this.options.thumbimageborder) / 2),
1369					b += " .html5gallery-tn-img-" + this.id + " {display:block; overflow:hidden; float:left; margin-top:" + e + "px; margin-left:" + d + "px; width:" + String(this.options.thumbimagewidth + 2 * this.options.thumbimageborder) + "px;height:" + String(this.options.thumbimageheight + 2 * this.options.thumbimageborder) + "px;}") : b += " .html5gallery-tn-img-" + this.id + " {display:none;}", this.options.thumbshowtitle ? (b += " .html5gallery-tn-title-" + this.id + " {display:block; overflow:hidden; float:left; margin-top:0px; margin-left:" + this.options.thumbmargin + "px; width:" + a + "px;height:" + String(this.options.thumbheight - 2) + "px;" + (this.options.thumbshowdescription ? "" : "line-height:" + String(this.options.thumbheight - 2) + "px;") + "}",
1370					b += " .html5gallery-tn-title-" + this.id + this.options.thumbtitlecss,
1371					b += " .html5gallery-tn-description-" + this.id + this.options.thumbdescriptioncss) : (b += " .html5gallery-tn-title-" + this.id + " {display:none;}",
1372					b += " .html5gallery-tn-description-" + this.id + " {display:none;}"), this.carouselHighlight = function(a) {
1373
1374
1375
1376
1377					c("#html5gallery-tn-" + this.id + "-" + a, this.$gallery).removeClass("html5gallery-tn-" + this.id).addClass("html5gallery-tn-selected-" + this.id);
1378					if (!(this.options.thumbShowNum >= this.elemArray.length)) {
1379						a = Math.floor(a / this.options.thumbShowNum) * this.options.thumbShowNum * (this.options.thumbheight + this.options.thumbgap);
1380						a >= this.options.thumbTotalHeight - this.options.thumbMaskHeight && (a = this.options.thumbTotalHeight - this.options.thumbMaskHeight);
1381						var b = a / (this.elemArray.length * (this.options.thumbheight + this.options.thumbgap) - this.options.thumbMaskHeight),
1382							b = b * (this.options.carouselSliderMax - this.options.carouselSliderMin);
1383						c(".html5gallery-car-slider-" + this.id, this.$gallery).stop(!0).animate({
1384							top: b
1385						}, 300);
1386						c(".html5gallery-thumbs-" + this.id, this.$gallery).stop(!0).animate({
1387							marginTop: -1 * a
1388						}, 300);
1389						this.updateCarouseButtons(-a)
1390					}
1391				}, this.carouselBarClicked = function(a) {
1392					var b = c(".html5gallery-thumbs-" + this.id, this.$gallery);
1393					a.pageY > c(".html5gallery-car-slider-" + this.id, this.$gallery).offset().top ? (a = -1 * parseInt(b.css("margin-top")) + this.options.thumbShowNum * (this.options.thumbheight + this.options.thumbgap), a >= this.options.thumbTotalHeight - this.options.thumbMaskHeight && (a = this.options.thumbTotalHeight - this.options.thumbMaskHeight)) : (a = -1 * parseInt(b.css("margin-top")) - this.options.thumbShowNum * (this.options.thumbheight + this.options.thumbgap), 0 > a && (a = 0));
1394					b.stop(!0).animate({
1395						marginTop: -a
1396					}, 500);
1397					this.updateCarouseButtons(-a);
1398					a = a * (this.options.carouselSliderMax - this.options.carouselSliderMin) / (this.elemArray.length * (this.options.thumbheight + this.options.thumbgap) - this.options.thumbMaskHeight);
1399					a < this.options.carouselSliderMin && (a = this.options.carouselSliderMin);
1400					a > this.options.carouselSliderMax && (a = this.options.carouselSliderMax);
1401					c(".html5gallery-car-slider-" + this.id, this.$gallery).stop(!0).animate({
1402						top: a
1403					}, 500)
1404				}, this.carouselSliderDrag = function(a, b) {
1405					var d = b.offsetY - c(".html5gallery-car-slider-bar-" + this.id, this.$gallery).offset().top;
1406					d < this.options.carouselSliderMin && (d = this.options.carouselSliderMin);
1407					d > this.options.carouselSliderMax && (d = this.options.carouselSliderMax);
1408					c(".html5gallery-car-slider-" + this.id, this.$gallery).css({
1409						top: d
1410					});
1411					var e = this.elemArray.length * (this.options.thumbheight + this.options.thumbgap) - this.options.thumbMaskHeight,
1412						e = e * d / (this.options.carouselSliderMax - this.options.carouselSliderMin),
1413						e = Math.round(e / (this.options.thumbheight + this.options.thumbgap)),
1414						e = -1 * e * (this.options.thumbheight + this.options.thumbgap);
1415					c(".html5gallery-thumbs-" + this.id, this.$gallery).stop(!0).animate({
1416						marginTop: e
1417					}, 300)
1418				}, this.carouselPrev = function() {
1419					var a = c(".html5gallery-thumbs-" + this.id, this.$gallery);
1420					if (0 != parseInt(a.css("margin-top"))) {
1421						var b = -1 * parseInt(a.css("margin-top")) - this.options.thumbShowNum * (this.options.thumbheight + this.options.thumbgap);
1422						0 > b && (b = 0);
1423						a.animate({
1424							marginTop: -b
1425						}, 500, this.options.carouseleasing);
1426						this.updateCarouseButtons(-b)
1427					}
1428				}, this.carouselNext = function() {
1429					var a = c(".html5gallery-thumbs-" + this.id, this.$gallery);
1430					if (parseInt(a.css("margin-top")) != -(this.options.thumbTotalHeight - this.options.thumbMaskHeight)) {
1431						var b = -1 * parseInt(a.css("margin-top")) + this.options.thumbShowNum * (this.options.thumbheight + this.options.thumbgap);
1432						b >= this.options.thumbTotalHeight - this.options.thumbMaskHeight && (b = this.options.thumbTotalHeight - this.options.thumbMaskHeight);
1433						a.animate({
1434							marginTop: -b
1435						}, 500, this.options.carouseleasing);
1436						this.updateCarouseButtons(-b)
1437					}
1438				}, this.updateCarouseButtons = function(a) {
1439					var b = c(".html5gallery-car-left-" + this.id, this.$gallery),
1440						d = c(".html5gallery-car-right-" + this.id, this.$gallery),
1441						e = -1 * (this.options.thumbTotalHeight - this.options.thumbMaskHeight);
1442					0 == a ? (b.css({
1443						"background-position": "-64px 0px",
1444						cursor: ""
1445					}), b.data("disabled", !0)) : b.data("disabled") && (b.css({
1446						"background-position": "0px 0px",
1447						cursor: "pointer"
1448					}), b.data("disabled", !1));
1449					a == e ? (d.css({
1450						"background-position": "-64px 0px",
1451						cursor: ""
1452					}), d.data("disabled", !0)) : d.data("disabled") && (d.css({
1453						"background-position": "0px 0px",
1454						cursor: "pointer"
1455					}), d.data("disabled", !1))
1456				}) : b += " .html5gallery-car-" + this.id + " { display:none; }";
1457				b += ".html5gallery-container-" + this.id + " div {box-sizing:content-box;}";
1458				c("head").append("<style type='text/css' data-creator='html5gallery'>" + b + "</style>")
1459			},
1460			resizeImageToolbox: function() {
1461				if ("center" != this.options.imagetoolboxstyle) {
1462					var a = Math.round(("bottom" == this.options.headerpos ? 0 : this.options.headerHeight) + this.options.height / 2 - 24),
1463						d = a + Math.round(this.options.height / 2) - 32,
1464						b = this.options.width - 54,
1465						e = this.options.showfullscreenbutton ? b - 48 : b;
1466					c(".html5gallery-play-" + this.id).css({
1467						top: d + "px",
1468						left: e + "px"
1469					});
1470					c(".html5gallery-pause-" + this.id).css({
1471						top: d + "px",
1472						left: e + "px"
1473					});
1474					c(".html5gallery-left-" + this.id).css({
1475						top: a + "px"
1476					});
1477					c(".html5gallery-right-" + this.id).css({
1478						top: a + "px",
1479						left: b + "px"
1480					});
1481					c(".html5gallery-lightbox-" + this.id).css({
1482						top: d + "px",
1483						left: b + "px"
1484					})
1485				}
1486			},
1487			createImageToolbox: function() {
1488				1 >= this.elemArray.length && (this.options.showplaybutton = this.options.showprevbutton = this.options.shownextbutton = !1);
1489				if ("never" != this.options.showimagetoolbox) {
1490					var a;
1491					if ("center" == this.options.imagetoolboxstyle) a = " .html5gallery-toolbox-" + this.id + " {display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; overflow:hidden; position:relative; margin:0px auto; text-align:center; height:40px;}", a += " .html5gallery-toolbox-bg-" + this.id + " {display:block; left:0px; top:0px; width:100%; height:100%; position:absolute; filter:alpha(opacity=60); opacity:0.6; background-color:#222222; }", a += " .html5gallery-toolbox-buttons-" + this.id + " {display:block; margin:0px auto; height:100%;}", a += " .html5gallery-play-" + this.id + " { position:relative; float:left; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:" + Math.round(4) + "px; background:url('" + this.options.skinfolder + "play.png') no-repeat top left; } ", a += " .html5gallery-pause-" + this.id + " { position:relative; float:left; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:" + Math.round(4) + "px; background:url('" + this.options.skinfolder + "pause.png') no-repeat top left; } ", a += " .html5gallery-left-" + this.id + " { position:relative; float:left; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:" + Math.round(4) + "px; background:url('" + this.options.skinfolder + "prev.png') no-repeat top left; } ", a += " .html5gallery-right-" + this.id + " { position:relative; float:left; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:" + Math.round(4) + "px; background:url('" + this.options.skinfolder + "next.png') no-repeat top left; } ", a += " .html5gallery-lightbox-" + this.id + " {position:relative; float:left; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; overflow:hidden; width:32px; height:32px; margin-left:2px; margin-right:2px; margin-top:" + Math.round(4) + "px; background:url('" + this.options.skinfolder + "lightbox.png') no-repeat top left; } ";
1492					else {
1493						var d = Math.round(("bottom" == this.options.headerpos ? 0 : this.options.headerHeight) + this.options.height / 2 - 24),
1494							b = d + Math.round(this.options.height / 2) - 32,
1495							e = this.options.width - 54,
1496							g = this.options.showfullscreenbutton ? e - 48 : e;
1497						a = " .html5gallery-toolbox-" + this.id + " {display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + ";}";
1498						a += " .html5gallery-toolbox-bg-" + this.id + " {display:none;}";
1499						a += " .html5gallery-toolbox-buttons-" + this.id + " {display:block;}";
1500						a += " .html5gallery-play-" + this.id + " { position:absolute; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; top:" + b + "px; left:" + g + "px; width:48px; height:48px; background:url('" + this.options.skinfolder + "side_play.png') no-repeat top left;} ";
1501						a += " .html5gallery-pause-" + this.id + " { position:absolute; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; top:" + b + "px; left:" + g + "px; width:48px; height:48px; background:url('" + this.options.skinfolder + "side_pause.png') no-repeat top left;} ";
1502						a += " .html5gallery-left-" + this.id + " { position:absolute; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; top:" + d + "px; left:0px; width:48px; height:48px; background:url('" + this.options.skinfolder + "side_prev.png') no-repeat center center;} ";
1503						a += " .html5gallery-right-" + this.id + " { position:absolute; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; top:" + d + "px; left:" + e + "px; width:48px; height:48px; background:url('" + this.options.skinfolder + "side_next.png')  no-repeat center center;} ";
1504						a += " .html5gallery-lightbox-" + this.id + " {position:absolute; display:" + ("show" == this.options.imagetoolboxmode ? "block" : "none") + "; cursor:pointer; top:" + b + "px; left:" + e + "px; width:48px; height:48px; background:url('" + this.options.skinfolder + "side_lightbox.png') no-repeat top left;} "
1505					}
1506					c(".html5gallery-play-" + this.id, this.$gallery).hover(function() {
1507						c(this).css({
1508							"background-position": "right top"
1509						})
1510					}, function() {
1511						c(this).css({
1512							"background-position": "left top"
1513						})
1514					});
1515					c(".html5gallery-pause-" + this.id, this.$gallery).hover(function() {
1516						c(this).css({
1517							"background-position": "right top"
1518						})
1519					}, function() {
1520						c(this).css({
1521							"background-position": "left top"
1522						})
1523					});
1524					c(".html5gallery-left-" + this.id, this.$gallery).hover(function() {
1525						c(this).css({
1526							"background-position": "right top"
1527						})
1528					}, function() {
1529						c(this).css({
1530							"background-position": "left top"
1531						})
1532					});
1533					c(".html5gallery-right-" + this.id, this.$gallery).hover(function() {
1534						c(this).css({
1535							"background-position": "right top"
1536						})
1537					}, function() {
1538						c(this).css({
1539							"background-position": "left top"
1540						})
1541					});
1542					c(".html5gallery-lightbox-" + this.id, this.$gallery).hover(function() {
1543						c(this).css({
1544							"background-position": "right top"
1545						})
1546					}, function() {
1547						c(this).css({
1548							"background-position": "left top"
1549						})
1550					});
1551					c("head").append("<style type='text/css' data-creator='html5gallery'>" + a + "</style>")
1552				}
1553				this.showimagetoolbox = function(a) {
1554					if (this.options.showplaybutton || this.options.showprevbutton || this.options.shownextbutton || this.options.showfullscreenbutton) {
1555						if ("center" == this.options.imagetoolboxstyle) {
1556							var b = Math.round(("bottom" == this.options.headerpos ? 0 : this.options.headerHeight) + this.options.height / 2);
1557							if (6 == a || 7 == a || 8 == a || 9 == a || 10 == a) b += 45;
1558							c(".html5gallery-toolbox-" + this.id, this.$gallery).css({
1559								top: b
1560							});
1561							b = 0;
1562							this.options.showplaybutton && 1 == a ? (b += 36, this.isPaused ? (c(".html5gallery-play-" + this.id, this.$gallery).show(), c(".html5gallery-pause-" + this.id, this.$gallery).hide()) : (c(".html5gallery-play-" + this.id, this.$gallery).hide(), c(".html5gallery-pause-" + this.id, this.$gallery).show())) : (c(".html5gallery-play-" + this.id, this.$gallery).hide(), c(".html5gallery-pause-" + this.id, this.$gallery).hide());
1563							this.options.showprevbutton ? (b += 36, c(".html5gallery-left-" + this.id, this.$gallery).show()) : c(".html5gallery-left-" + this.id, this.$gallery).hide();
1564							this.options.shownextbutton ? (b += 36, c(".html5gallery-right-" + this.id, this.$gallery).show()) : c(".html5gallery-right-" + this.id, this.$gallery).hide();
1565							this.options.showfullscreenbutton && 1 == a ? (b += 36, c(".html5gallery-lightbox-" + this.id, this.$gallery).show()) : c(".html5gallery-lightbox-" + this.id, this.$gallery).hide();
1566							c(".html5gallery-toolbox-" + this.id, this.$gallery).css({
1567								width: b + 16
1568							});
1569							c(".html5gallery-toolbox-buttons-" + this.id, this.$gallery).css({
1570								width: b
1571							})
1572						} else this.options.showplaybutton && 1 == a ? this.isPaused ? (c(".html5gallery-play-" + this.id, this.$gallery).show(), c(".html5gallery-pause-" + this.id, this.$gallery).hide()) : (c(".html5gallery-play-" + this.id, this.$gallery).hide(), c(".html5gallery-pause-" + this.id, this.$gallery).show()) : (c(".html5gallery-play-" + this.id, this.$gallery).hide(), c(".html5gallery-pause-" + this.id, this.$gallery).hide()), this.options.showprevbutton ? c(".html5gallery-left-" + this.id, this.$gallery).show() : c(".html5gallery-left-" + this.id, this.$gallery).hide(), this.options.shownextbutton ? c(".html5gallery-right-" + this.id, this.$gallery).show() : c(".html5gallery-right-" + this.id, this.$gallery).hide(), this.options.showfullscreenbutton && 1 == a ? c(".html5gallery-lightbox-" + this.id, this.$gallery).show() : c(".html5gallery-lightbox-" + this.id, this.$gallery).hide();
1573						this.options.isIE678 ? c(".html5gallery-toolbox-" + this.id, this.$gallery).show() : c(".html5gallery-toolbox-" + this.id, this.$gallery).fadeIn()
1574					}
1575				};
1576				this.hideimagetoolbox = function() {
1577					this.options.isIE678 ? c(".html5gallery-toolbox-" + this.id, this.$gallery).hide() : c(".html5gallery-toolbox-" + this.id, this.$gallery).fadeOut()
1578				}
1579			},
1580			resizeStyleDefault: function() {
1581				if (this.container.parent() && this.container.parent().width()) {
1582					this.options.containerWidth = this.container.parent().width();
1583					this.options.totalWidth = this.options.containerWidth;
1584					this.options.width = this.options.totalWidth - 2 * this.options.padding;
1585					this.options.showcarousel && (this.options.carouselHeight = this.options.thumbheight + 2 * this.options.thumbmargin, this.options.carouselmultirows && (this.options.carouselHeight = Math.
1585ceil(this.elemArray.length / Math.floor(this.options.width / (this.options.thumbwidth + this.options.thumbgap))) * (this.options.thumbheight + this.options.thumbrowgap)));
1586					this.options.responsivefullscreen && 0 < this.container.parent().height() ? (this.options.containerHeight = this.container.parent().height(), this.options.totalHeight = this.options.containerHeight, this.options.height = this.options.totalHeight - (this.options.headerHeight + 2 * this.options.padding), 0 < this.options.carouselHeight + this.options.carouselmargin && (this.options.height -= this.options.carouselHeight + this.options.carouselmargin)) : (this.options.height = Math.round(this.options.width * this.options.originalHeight / this.options.originalWidth), this.options.totalHeight = this.options.height + this.options.carouselHeight + this.options.carouselmargin + this.options.headerHeight + 2 * this.options.padding, this.options.containerHeight = this.options.totalHeight);
1587					this.container.css({
1588						width: this.options.containerWidth,
1589						height: this.options.containerHeight
1590					});
1591					this.options.boxWidth = this.options.width;
1592					this.options.boxHeight = this.options.height + this.options.headerHeight;
1593					this.options.showcarousel && (this.options.carouselWidth = this.options.width, this.options.carouselLeft = this.options.padding, this.options.carouselTop = this.options.padding + this.options.boxHeight + this.options.carouselmargin);
1594					c(".html5gallery-container-" + this.id).css({
1595						width: this.options.totalWidth + "px",
1596						height: this.options.totalHeight + "px"
1597					});
1598					c(".html5gallery-box-" + this.id).css({
1599						width: this.options.boxWidth + "px",
1600						height: this.options.boxHeight + "px"
1601					});
1602					var a = this.elemArray[this.curElem][9];
1603					if (1 == a || this.showingPoster) {
1604						var d = this.elemArray[this.curElem][10],
1605							a = this.elemArray[this.curElem][11],
1606							b;
1607						this.isFullscreen ? (b = Math.min(this.fullscreenWidth / d, this.fullscreenHeight / a), b = 1 < b ? 1 : b) : b = "fill" == this.options.resizemode ? Math.max(this.options.width / d, this.options.height / a) : Math.min(this.options.width / d, this.options.height / a);
1608						var d = Math.round(b * d),
1609							e = Math.round(b * a),
1610							a = this.isFullscreen ? d : this.options.width;
1611						b = this.isFullscreen ? e : this.options.height;
1612						var g = Math.round(a / 2 - d / 2),
1613							q = Math.round(b / 2 - e / 2);
1614						this.isFullscreen && this.adjustFullscreen(a, b, !0);
1615						c(".html5gallery-elem-" + this.id).css({
1616							width: a + "px",
1617							height: b + "px"
1618						});
1619						c(".html5gallery-elem-img-" + this.id).css({
1620							width: a + "px",
1621							height: b + "px"
1622						});
1623						c(".html5gallery-elem-image-" + this.id).css({
1624							width: d + "px",
1625							height: e + "px",
1626							top: q + "px",
1627							left: g + "px"
1628						})
1629					} else if (5 == a || 6 == a || 7 == a || 8 == a || 9 == a || 10 == a) a = this.elemArray[this.curElem][10], d = this.elemArray[this.curElem][11], this.isFullscreen ? (b = Math.min(this.fullscreenWidth / a, this.fullscreenHeight / d), b = 1 < b ? 1 : b, a = Math.round(b * a), b = Math.round(b * d), this.adjustFullscreen(a, b, !0)) : (a = this.options.width, b = this.options.height), c(".html5gallery-elem-" + this.id).css({
1630						width: a + "px",
1631						height: b + "px"
1632					}), c(".html5gallery-elem-video-" + this.id).css({
1633						width: a + "px",
1634						height: b + "px"
1635					}), c(".html5gallery-elem-video-container-" + this.id).css({
1636						width: a + "px",
1637						height: b + "px"
1638					}), d = this.options.isIPhone ? b - 48 : b, c(".html5gallery-elem-video-container-" + this.id).find("video").css({
1639						width: a + "px",
1640						height: d + "px"
1641					}), c("#html5gallery-elem-video-" + this.id).css({
1642						width: a + "px",
1643						height: b + "px"
1644					});
1645					d = a = 0;
1646					"bottom" == this.options.headerpos && (a = this.options.titleoverlay ? this.options.height - this.options.titleheight : this.options.height, d = this.options.titleoverlay ? this.options.height : this.options.height + this.options.titleheight);
1647					c(".html5gallery-title-" + this.id).css({
1648						width: this.options.boxWidth + "px"
1649					});
1650					this.options.titleoverlay || c(".html5gallery-title-" + this.id).css({
1651						top: a + "px"
1652					});
1653					c(".html5gallery-viral-" + this.id).css({
1654						top: d + "px"
1655					});
1656					c(".html5gallery-timer-" + this.id).css({
1657						top: String(this.options.elemTop + this.options.height - 2) + "px"
1658					});
1659					this.options.showcarousel && (c(".html5gallery-car-" + this.id).css({
1660						width: this.options.width + "px",
1661						top: this.options.carouselTop + "px"
1662					}), a = 4, this.options.slideshadow && (a += 12), c(".html5gallery-car-list-" + this.id).css({
1663						width: String(this.options.width - a - 4) + "px"
1664					}), d = 0, this.options.carouselNavButton && (d = 72), this.options.thumbShowNum = Math.floor((this.options.width - a - 4 - d) / (this.options.thumbwidth + this.options.thumbgap)), this.options.thumbMaskWidth = this.options.thumbShowNum * this.options.thumbwidth + this.options.thumbShowNum * this.options.thumbgap, this.options.thumbTotalWidth = this.elemArray.length * this.options.thumbwidth + (this.elemArray.length - 1) * this.options.thumbgap, d = 0, this.options.carouselmultirows ? (d = Math.floor(this.options.width / (this.options.thumbwidth + this.options.thumbgap)), d = (this.options.width - d * this.options.thumbwidth - (d - 1) * this.options.thumbgap) / 2, c(".html5gallery-thumbs-" + this.id).css({
1665						"margin-left": d + "px",
1666						width: this.options.width + "px"
1667					})) : (this.options.thumbMaskWidth > this.options.thumbTotalWidth && (d = this.options.thumbMaskWidth / 2 - this.options.thumbTotalWidth / 2 - this.options.thumbgap / 2), c(".html5gallery-thumbs-" + this.id).css({
1668						"margin-left": d + "px",
1669						width: String(this.elemArray.length * (this.options.thumbwidth + this.options.thumbgap)) + "px"
1670					})), a = Math.round((this.options.width - a - 4) / 2 - this.options.thumbMaskWidth / 2), c(".html5gallery-car-mask-" + this.id).css({
1671						left: a + "px",
1672						width: this.options.thumbMaskWidth + "px"
1673					}), this.carouselHighlight(this.curElem, !0))
1674				}
1675			},
1676			createStyleDefault: function() {
1677				this.options.thumbimagewidth = this.options.thumbwidth - 2 * this.options.thumbimageborder;
1678				this.options.thumbimageheight = this.options.thumbheight - 2 * this.options.thumbimageborder;
1679				this.options.thumbshowtitle && (this.options.thumbheight += this.options.thumbtitleheight);
1680				this.options.showtitle || (this.options.titleheight = 0);
1681				if (!this.options.showsocialmedia || !this.options.showfacebooklike && !this.options.showtwitter && !this.options.showgoogleplus) this.options.socialheight = 0;
1682				this.options.headerHeight = this.options.titleoverlay ? this.options.socialheight : this.options.titleheight + this.options.socialheight;
1683				this.options.boxWidth = this.options.width;
1684				this.options.boxHeight = this.options.height + this.options.headerHeight;
1685				this.options.boxLeft = this.options.padding;
1686				this.options.boxTop = this.options.padding;
1687				this.options.slideshadow && (this.options.boxLeft -= 4, this.options.boxTop -= 4);
1688				this.options.showcarousel ? (this.options.carouselWidth = this.options.width, this.options.carouselHeight = this.options.thumbheight + 2 * this.options.thumbmargin, this.options.carouselLeft = this.options.padding, this.options.carouselTop = this.options.padding + this.options.boxHeight + this.options.carouselmargin, this.options.carouselmultirows && (this.options.carouselHeight = Math.ceil(this.options.width / (this.options.thumbwidth + this.options.thumbgap)) * (this.options.thumbheight + this.options.thumbrowgap))) : (this.options.carouselWidth = 0, this.options.carouselHeight = 0, this.options.carouselLeft = 0, this.options.carouselTop = 0, this.options.carouselmargin = 0);
1689				this.options.totalWidth = this.options.width + 2 * this.options.padding;
1690				this.options.totalHeight = this.options.height + this.options.carouselHeight + this.options.carouselmargin + this.options.headerHeight + 2 * this.options.padding;
1691				this.options.containerWidth = this.options.totalWidth;
1692				this.options.containerHeight = this.options.totalHeight;
1693				this.options.responsive ? (this.options.originalWidth = this.options.width, this.options.originalHeight = this.options.height, this.container.css({
1694					"max-width": "100%"
1695				})) : this.container.css({
1696					width: this.options.containerWidth,
1697					height: this.options.containerHeight
1698				});
1699				var a = 0,
1700					d = 0;
1701				this.options.elemTop = 0;
1702				"top" == this.options.headerpos ? (d = 0, a = this.options.socialheight, this.options.elemTop = this.options.headerHeight) : "bottom" == this.options.headerpos && (this.options.elemTop = 0, a = this.options.titleoverlay ? this.options.height - this.options.titleheight : this.options.height, d = this.options.titleoverlay ? this.options.height : this.options.height + this.options.titleheight);
1703				var b = " .html5gallery-container-" + this.id + " { display:block; position:absolute; left:0px; top:0px;
1703 width:" + this.options.totalWidth + "px; height:" + this.options.totalHeight + "px; background:url('" + this.options.skinfolder + this.options.bgimage + "') center top; background-color:" + this.options.bgcolor + ";}";
1704				this.options.galleryshadow && (b += " .html5gallery-container-" + this.id + " { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}");
1705				var b = b + (" .html5gallery-box-" + this.id + " {display:block; position:absolute; text-align:center; left:" + this.options.boxLeft + "px; top:" + this.options.boxTop + "px; width:" + this.options.boxWidth + "px; height:" + this.options.boxHeight + "px;}"),
1706					e = Math.round(this.options.socialheight / 2 - 12),
1707					b = b + (" .html5gallery-title-text-" + this.id + " " + this.options.titlecss + " .html5gallery-title-text-" + this.id + " " + this.options.titlecsslink + " .html5gallery-error-" + this.id + " " + this.options.errorcss),
1708					b = b + (" .html5gallery-description-text-" + this.id + " " + this.options.descriptioncss + " .html5gallery-description-text-" + this.id + " " + this.options.descriptioncsslink),
1709					b = b + (" .html5gallery-fullscreen-title-" + this.id + "" + this.options.titlefullscreencss + " .html5gallery-fullscreen-title-" + this.id + "" + this.options.titlefullscreencsslink),
1710					b = b + (" .html5gallery-viral-" + this.id + " {display:block; overflow:hidden; position:absolute; text-align:left; top:" + d + "px; left:0px; width:" + this.options.boxWidth + "px; height:" + this.options.socialheight + "px; padding-top:" + e + "px;}"),
1711					b = b + (" .html5gallery-title-" + this.id + " {display:" + (this.options.titleoverlay && this.options.titleautohide ? "none" : "block") + "; overflow:hidden; position:absolute; left:0px; width:" + this.options.boxWidth + "px; "),
1712					b = this.options.titleoverlay ? "top" == this.options.headerpos ? b + "top:0px; height:auto; }" : b + "bottom:0px; height:auto; }" : b + ("top:" + a + "px; height:" + this.options.titleheight + "px; }"),
1713					b = b + (" .html5gallery-timer-" + this.id + " {display:block; position:absolute; top:" + String(this.options.elemTop + this.options.height - 2) + "px; left:0px; width:0px; height:2px; background-color:#ccc; filter:alpha(opacity=60); opacity:0.6; }"),
1714					b = b + (" .html5gallery-elem-" + this.id + " {display:block; overflow:hidden; position:absolute; top:" + this.options.elemTop + "px; left:0px; width:" + this.options.width + "px; height:" + this.options.height + "px;}");
1715				this.options.isIE7 || this.options.isIE6 ? (b += " .html5gallery-loading-" + this.id + " {display:none; }", b += " .html5gallery-loading-center-" + this.id + " {display:none; }") : (b += " .html5gallery-loading-" + this.id + " {display:block; position:absolute; top:4px; right:4px; width:100%; height:100%; background:url('" + this.options.skinfolder + "loading.gif') no-repeat top right;}", b += " .html5gallery-loading-center-" + this.id + " {display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background:url('" + this.options.skinfolder + "loading_center.gif') no-repeat center center;}");
1716				0 < this.options.borderradius && (b += " .html5gallery-elem-" + this.id + " {overflow:hidden; border-radius:" + this.options.borderradius + "px; -moz-border-radius:" + this.options.borderradius + "px; -webkit-border-radius:" + this.options.borderradius + "px;}");
1717				this.options.slideshadow && (b += " .html5gallery-title-" + this.id + " { padding:4px;}", b += " .html5gallery-timer-" + this.id + " { margin:4px;}", b += " .html5gallery-elem-" + this.id + " { overflow:hidden; padding:4px; -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}");
1718				this.options.showcarousel && this.options.carouselmultirows ? (b += " .html5gallery-car-" + this.id + " { position:absolute; display:block; overflow:hidden; left:" + this.options.carouselLeft + "px; top:" + this.options.carouselTop + "px; width:" + this.options.width + "px;", b = this.options.carouselbgtransparent ? b + "background-color:transparent;" : b + ("border-top:1px solid " + this.options.carouseltopborder + ";border-bottom:1px solid " + this.options.carouselbottomborder + ";background-color: " + this.options.carouselbgcolorend + "; background: " + this.options.carouselbgcolorend + " -webkit-gradient(linear, left top, left bottom, from(" + this.options.carouselbgcolorstart + "), to(" + this.options.carouselbgcolorend + ")) n
1718o-repeat; background: " + this.options.carouselbgcolorend + " -moz-linear-gradient(top, " + this.options.carouselbgcolorstart + ", " + this.options.carouselbgcolorend + ") no-repeat; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=" + this.options.carouselbgcolorstart + ", endColorstr=" + this.options.carouselbgcolorend + ") no-repeat; -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=" + this.options.carouselbgcolorstart + ", endColorstr=" + this.options.carouselbgcolorend + ")' no-repeat;"), this.options.carouselbgimage && (b += "background:url('" + this.options.skinfolder + this.options.carouselbgimage + "') center top;"), a = Math.floor(this.options.width / (this.options.thumbwidth + this.options.thumbgap)), d = (this.options.width - a * this.options.thumbwidth - (a - 1) * this.options.thumbgap) / 2, b = b + "}" + (".html5gallery-thumbs-" + this.id + " { position:relative; display:block; margin-left:" + d + "px; width:" + this.options.width + "px; top:0px; }"), b += " .html5gallery-tn-" + this.id + " { display:block; float:left; margin-left:0px; margin-right:" + this.options.thumbgap + "px; margin-bottom:" + this.options.thumbrowgap + "px; text-align:center; cursor:pointer; width:" + this.options.thumbwidth + "px;height:" + this.options.thumbheight + "px;overflow:hidden;}", this.options.thumbshadow && (b += " .html5gallery-tn-" + this.id + " { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"), b += " .html5gallery-tn-selected-" + this.id + " { display:block; float:left; margin-left:0px; margin-right:" + this.options.thumbgap + "px; margin-bottom:" + this.options.thumbrowgap + "px; text-align:center; cursor:pointer; width:" + this.options.thumbwidth + "px;height:" + this.options.thumbheight + "px;overflow:hidden;}", this.options.thumbshadow && (b += " .html5gallery-tn-selected-" + this.id + " { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"), b += " .html5gallery-tn-" + this.id + " {background-color:" + this.options.thumbimagebordercolor + ";} .html5gallery-tn-" + this.id + " { filter:alpha(opacity=" + Math.round(100 * this.options.thumbopacity) + "); opacity:" + this.options.thumbopacity + "; }  .html5gallery-tn-selected-" + this.id + " { filter:alpha(opacity=100); opacity:1; } ", b += " .html5gallery-tn-img-" + this.id + " {display:block; overflow:hidden; width:" + String(this.options.thumbimagewidth + 2 * this.options.thumbimageborder) + "px;height:" + String(this.options.thumbimageheight + 2 * this.options.thumbimageborder) + "px;}", this.options.thumbunselectedimagebordercolor && (b += " .html5gallery-tn-selected-" + this.id + " {background-color:" + this.options.thumbunselectedimagebordercolor + ";}"), this.options.thumbshowtitle ? (b += " .html5gallery-tn-title-" + this.id + " {display:block; overflow:hidden; float:top; height:" + this.options.thumbtitleheight + "px;width:" + String(this.options.thumbwidth - 2) + "px;line-height:" + this.options.thumbtitleheight + "px;}", b += " .html5gallery-tn-title-" + this.id + this.options.thumbtitlecss) : b += " .html5gallery-tn-title-" + this.id + " {display:none;}", this.carouselHighlight = function() {}) : this.options.showcarousel ? (b += " .html5gallery-car-" + this.id + " { position:absolute; display:block; overflow:hidden; left:" + this.options.carouselLeft + "px; top:" + this.options.carouselTop + "px; width:" + this.options.width + "px; height:" + this.options.carouselHeight + "px;", b = this.options.carouselbgtransparent ? b + "background-color:transparent;" : b + ("border-top:1px solid " + this.options.carouseltopborder + ";border-bottom:1px solid " + this.options.carouselbottomborder + ";background-color: " + this.options.carouselbgcolorend + "; background: " + this.options.carouselbgcolorend + " -webkit-gradient(linear, left top, left bottom, from(" + this.options.carouselbgcolorstart + "), to(" + this.options.carouselbgcolorend + ")) no-repeat; background: " + this.options.carouselbgcolorend + " -moz-linear-gradient(top, " + this.options.carouselbgcolorstart + ", " + this.options.carouselbgcolorend + ") 
1718no-repeat; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=" + this.options.carouselbgcolorstart + ", endColorstr=" + this.options.carouselbgcolorend + ") no-repeat; -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=" + this.options.carouselbgcolorstart + ", endColorstr=" + this.options.carouselbgcolorend + ")' no-repeat;"), this.options.carouselbgimage && (b += "background:url('" + this.options.skinfolder + this.options.carouselbgimage + "') center top;"), b += "}", a = 4, this.options.slideshadow && (a += 12), b += " .html5gallery-car-list-" + this.id + " { position:absolute; display:block; overflow:hidden; left:" + a + "px; width:" + String(this.options.width - a - 4) + "px; top:0px; height:" + this.options.carouselHeight + "px; }", d = 0, this.options.carouselNavButton = !1, Math.floor((this.options.width - a - 4) / (this.options.thumbwidth + this.options.thumbgap)) < this.elemArray.length && (this.options.carouselNavButton = !0), this.options.carouselNavButton && (b += " .html5gallery-car-left-" + this.id + " { position:absolute; display:block; overflow:hidden; width:32px; height:32px; left:0px; top:" + String(this.options.carouselHeight / 2 - 16) + "px; background:url('" + this.options.skinfolder + "carousel_left.png') no-repeat 0px 0px;}  .html5gallery-car-right-" + this.id + " { position:absolute; display:block; overflow:hidden; width:32px; height:32px; right:0px; top:" + String(this.options.carouselHeight / 2 - 16) + "px; background:url('" + this.options.skinfolder + "carousel_right.png') no-repeat 0px 0px;} ", d = 72), this.options.thumbShowNum = Math.floor((this.options.width - a - 4 - d) / (this.options.thumbwidth + this.options.thumbgap)), this.options.thumbMaskWidth = this.options.thumbShowNum * this.options.thumbwidth + this.options.thumbShowNum * this.options.thumbgap, this.options.thumbTotalWidth = this.elemArray.length * this.options.thumbwidth + (this.elemArray.length - 1) * this.options.thumbgap, d = 0, this.options.thumbMaskWidth > this.options.thumbTotalWidth && (d = this.options.thumbMaskWidth / 2 - this.options.thumbTotalWidth / 2 - this.options.thumbgap / 2), b += ".html5gallery-thumbs-" + this.id + " { position:relative; display:block; margin-left:" + d + "px; width:" + String(this.elemArray.length * (this.options.thumbwidth + this.options.thumbgap)) + "px; top:" + Math.round(this.options.carouselHeight / 2 - this.options.thumbheight / 2) + "px; }", a = Math.round((this.options.width - a - 4) / 2 - this.options.thumbMaskWidth / 2), b += " .html5gallery-car-mask-" + this.id + " { position:absolute; display:block; text-align:left; overflow:hidden; left:" + a + "px; width:" + this.options.thumbMaskWidth + "px; top:0px; height:" + this.options.carouselHeight + "px;} ", b += " .html5gallery-tn-" + this.id + " { display:block; float:left; margin-left:" + Math.round(this.options.thumbgap / 2) + "px; margin-right:" + Math.round(this.options.thumbgap / 2) + "px; text-align:center; cursor:pointer; width:" + this.options.thumbwidth + "px;height:" + this.options.thumbheight + "px;overflow:hidden;}", this.options.thumbshadow && (b += " .html5gallery-tn-" + this.id + " { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"), b += " .html5gallery-tn-selected-" + this.id + " { display:block; float:left; margin-left:" + Math.round(this.options.thumbgap / 2) + "px; margin-right:" + Math.round(this.options.thumbgap / 2) + "px;text-align:center; cursor:pointer; width:" + this.options.thumbwidth + "px;height:" + this.options.thumbheight + "px;overflow:hidden;}", this.options.thumbshadow && (b += " .html5gallery-tn-selected-" + this.id + " { -moz-box-shadow: 0px 2px 5px #aaa; -webkit-box-shadow: 0px 2px 5px #aaa; box-shadow: 0px 2px 5px #aaa;}"), b += " .html5gallery-tn-" + this.id + " {background-color:" + this.options.thumbimagebordercolor + ";} .html5gallery-tn-" + this.id + " { filter:alpha(opacity=" + Math.round(100 * this.options.thumbopacity) + "); opacity:" + this.options.thumbopacity + "; }  .html5gallery-tn-selected-" + this.id + " { filter:alpha(opacity=100); opacity:1; } ", b += " .html5gallery-tn-img-" + this.id + " {display:block; overflow:hidden;
1718 width:" + String(this.options.thumbimagewidth + 2 * this.options.thumbimageborder) + "px;height:" + String(this.options.thumbimageheight + 2 * this.options.thumbimageborder) + "px;}", this.options.thumbunselectedimagebordercolor && (b += " .html5gallery-tn-selected-" + this.id + " {background-color:" + this.options.thumbunselectedimagebordercolor + ";}"), this.options.thumbshowtitle ? (b += " .html5gallery-tn-title-" + this.id + " {display:block; overflow:hidden; float:top; height:" + this.options.thumbtitleheight + "px;width:" + String(this.options.thumbwidth - 2) + "px;line-height:" + this.options.thumbtitleheight + "px;}", b += " .html5gallery-tn-title-" + this.id + this.options.thumbtitlecss) : b += " .html5gallery-tn-title-" + this.id + " {display:none;}", this.carouselHighlight = function(a, b) {
1719					c("#html5gallery-tn-" + this.id + "-" + a, this.$gallery).removeClass("html5gallery-tn-" + this.id).addClass("html5gallery-tn-selected-" + this.id);
1720					if (this.options.thumbShowNum >= this.elemArray.length) c(".html5gallery-car-left-" + this.id, this.$gallery).css({
1721						"background-position": "-64px 0px",
1722						cursor: ""
1723					}), c(".html5gallery-car-left-" + this.id, this.$gallery).data("disabled", !0), c(".html5gallery-car-right-" + this.id, this.$gallery).css({
1724						"background-position": "-64px 0px",
1725						cursor: ""
1726					}), c(".html5gallery-car-right-" + this.id, this.$gallery).data("disabled", !0);
1727					else {
1728						var d = Math.floor(a / this.options.thumbShowNum) * this.options.thumbShowNum * (this.options.thumbwidth + this.options.thumbgap);
1729						d >= this.options.thumbTotalWidth - this.options.thumbMaskWidth + this.options.thumbgap && (d = this.options.thumbTotalWidth - this.options.thumbMaskWidth + this.options.thumbgap);
1730						d = -d;
1731						b ? c(".html5gallery-thumbs-" + this.id, this.$gallery).css({
1732							marginLeft: d
1733						}) : c(".html5gallery-thumbs-" + this.id, this.$gallery).animate({
1734							marginLeft: d
1735						}, 500);
1736						this.updateCarouseButtons(d)
1737					}
1738				}, this.carouselPrev = function() {
1739					var a = c(".html5gallery-thumbs-" + this.id, this.$gallery);
1740					if (0 != parseInt(a.css("margin-left"))) {
1741						var b = -1 * parseInt(a.css("margin-left")) - this.options.thumbShowNum * (this.options.thumbwidth + this.options.thumbgap);
1742						0 > b && (b = 0);
1743						a.animate({
1744							marginLeft: -b
1745						}, 500, this.options.carouseleasing);
1746						this.updateCarouseButtons(-b)
1747					}
1748				}, this.carouselNext = function() {
1749					var a = c(".html5gallery-thumbs-" + this.id, this.$gallery);
1750					if (parseInt(a.css("margin-left")) != -(this.options.thumbTotalWidth - this.options.thumbMaskWidth + this.options.thumbgap)) {
1751						var b = -1 * parseInt(a.css("margin-left")) + this.options.thumbShowNum * (this.options.thumbwidth + this.options.thumbgap);
1752						b >= this.options.thumbTotalWidth - this.options.thumbMaskWidth + this.options.thumbgap && (b = this.options.thumbTotalWidth - this.options.thumbMaskWidth + this.options.thumbgap);
1753						a.animate({
1754							marginLeft: -b
1755						}, 500, this.options.carouseleasing);
1756						this.updateCarouseButtons(-b)
1757					}
1758				}, this.updateCarouseButtons = function(a) {
1759					var b = c(".html5gallery-car-left-" + this.id, this.$gallery),
1760						d = c(".html5gallery-car-right-" + this.id, this.$gallery),
1761						e = -1 * (this.options.thumbTotalWidth - this.options.thumbMaskWidth + this.options.thumbgap);
1762					0 == a ? (b.css({
1763						"background-position": "-64px 0px",
1764						cursor: ""
1765					}), b.data("disabled", !0)) : b.data("disabled") && (b.css({
1766						"background-position": "0px 0px",
1767						cursor: "pointer"
1768					}), b.data("disabled", !1));
1769					a == e ? (d.css({
1770						"background-position": "-64px 0px",
1771						cursor: ""
1772					}), d.data("disabled", !0)) : d.data("disabled") && (d.css({
1773						"background-position": "0px 0px",
1774						cursor: "pointer"
1775					}), d.data("disabled", !1))
1776				}) : b += " .html5gallery-car-" + this.id + " { display:none; }";
1777				b += ".html5gallery-container-" + this.id + " div {box-sizing:content-box;}";
1778				c("head").append("<style type='text/css' data-creator='html5gallery'>" + b + "</style>")
1779			},
1780			loadCarousel: function() {
1781				var a = this,
1782					d = c(".html5gallery-thumbs-" + this.id, this.$gallery);
1783				d.empty();
1784				for (var b = 0; b < this.elemArray.length; b++) {
1785					var e = c("<div id='html5gallery-tn-" + this.id + "-" + b + "' class='html5gallery-tn-" + this.id + "' data-index=" + b + " ></div>");
1786					e.appendTo(d);
1787					e.unbind("click").click(function(b) {
1788						a.slideRun(c(this).data("index"), !0, !0);
1789						b.preventDefault()
1790					});
1791					e.hover(function() {
1792						a.onThumbOver();
1793						c(this).removeClass("html5gallery-tn-" + a.id).addClass("html5gallery-tn-selected-" + a.id)
1794					}, function() {
1795						c(this).data("index") !== a.curElem && c(this).removeClass("html5gallery-tn-selected-" + a.id).addClass("html5gallery-tn-" + a.id)
1796					});
1797					e = new Image;
1798					e.data = b;
1799					c(e).load(function() {
1800						var b = Math.max(a.options.thumbimagewidth / this.width, a.options.thumbimageheight / this.height),
1801							e = Math.round(b * this.width),
1802							b = Math.round(b * this.height),
1803							f = a.options.thumbshowplayonvideo && 1 != a.elemArray[this.data][9] ? "<div class='html5gallery-tn-img-play-" + a.id + "' style='display:block; overflow:hidden; position:absolute; width:" + a.options.thumbimagewidth + "px;height:" + a.options.thumbimageheight + "px; top:" + a.options.thumbimageborder + "px; left:" + a.options.thumbimageborder + 'px;background:url("' + a.options.skinfolder + "playvideo.png\") no-repeat center center;'></div>" : "";
1804						c("#html5gallery-tn-" + a.id + "-" + this.data, d).append("<div class='html5gallery-tn-img-" + a.id + "' style='position:relative;'><div style='display:block; overflow:hidden; position:absolute; width:" + a.options.thumbimagewidth + "px;height:" + a.options.thumbimageheight + "px; top:" + a.options.thumbimageborder + "px; left:" + a.options.thumbimageborder + "px;'><img class='html5gallery-tn-image-" + a.id + "' style='border:none !important; padding:0px !important; margin:0px !important; max-width:none !important; max-height:none !important; width:" + e + "px !important; height:" + b + "px !important;' src='" + a.elemArray[this.data][1] + "' /></div>" + f + "</div><div class='html5gallery-tn-title-" + a.id + "'>" + a.elemArray[this.data][7] + (a.options.thumbshowdescription ? "<br /><span class='html5gallery-tn-description-" + a.id + "'>" + a.elemArray[this.data][8] + "</span>" : "") + "</div>")
1805					});
1806					e.src = this.elemArray[b][1]
1807				}
1808				this.options.carouselmultirows && d.append("<div style='clear:both;'></div>")
1809			},
1810			goNormal: function() {
1811				clearTimeout(this.slideshowTimeout);
1812				c(document).unbind("keyup.html5gallery");
1813				c(".html5gallery-timer-" + this.id, this.$gallery).css({
1814					width: 0
1815				});
1816				clearInterval(this.slideTimer);
1817				this.slideTimerCount = 0;
1818				this.isFullscreen = !1;
1819				var a = c(".html5gallery-elem-" + this.id, this.$fullscreen).empty().css({
1820					top: this.options.elemTop
1821				});
1822				c(".html5gallery-box-" + this.id, this.$gallery).prepend(a);
1823				this.slideRun(this.curElem);
1824				this.$fullscreen.remove();
1825				"show" == this.options.imagetoolboxmode ? this.showimagetoolbox(this.elemArray[this.curElem][9]) : this.hideimagetoolbox()
1826			},
1827			goFullscreen: function() {
1828				this.hideimagetoolbox();
1829				clearTimeout(this.slideshowTimeout);
1830				c(".html5gallery-fullscreen-timer-" + this.id, this.$fullscreen).css({
1831					width: 0
1832				});
1833				clearInterval(this.slideTimer);
1834				this.slideTimerCount = 0;
1835				this.isFullscreen = !0;
1836				this.fullscreenInitial = 20;
1837				this.fullscreenMargin = this.options.lightboxborder;
1838				this.fullscreenBarH = this.options.lightboxtextheight;
1839				this.fullscreenOutsideMargin = this.options.lightboxmargin;
1840				var a = this.options.isMobile ? Math.max(c(window).width(), c(document).width()) : c(window).width(),
1841					d = this.elemArray[this.curElem][10],
1842					b = this.elemArray[this.curElem][11];
1843				this.fullscreenWidth = a - 2 * this.fullscreenMargin - 2 * this.fullscreenOutsideMargin;
1844				var e = window.innerHeight ? window.innerHeight : c(window).height();
1845				this.fullscreenHeight = e - 2 * this.fullscreenMargin - this.fullscreenBarH - 2 * this.fullscreenOutsideMargin;
1846				var g = Math.max(e, c(document).height()),
1847					h = Math.min(this.fullscreenWidth / d, this.fullscreenHeight / b);
1848				1 > h && (d *= h, b *= h);
1849				e = c(window).scrollTop() + Math.round((e - (b + 2 * this.fullscreenMargin + this.fullscreenBarH)) / 2);
1850				this.$fullscreen = c("<div class='html5gallery-fullscreen-" + this.id + "' style='position:absolute;top:0px;left:0px;
1850width:" + a + "px;height:" + g + "px;text-align:center;z-index:99999;'><div class='html5gallery-fullscreen-overlay-" + this.id + "' style='display:block;position:absolute;top:0px;left:0px;width:100%;height:100%;background-color:#000000;opacity:0.9;filter:alpha(opacity=80);'></div><div class='html5gallery-fullscreen-box-" + this.id + "' style='display:block;overflow:hidden;position:relative;margin:0px auto;top:" + e + "px;width:" + this.fullscreenInitial + "px;height:" + this.fullscreenInitial + "px;background-color:" + this.options.lightboxbgcolor + ";'><div class='html5gallery-fullscreen-elem-" + this.id + "' style='display:block;position:absolute;overflow:hidden;width:" + d + "px;height:" + b + "px;left:" + this.fullscreenMargin + "px;top:" + this.fullscreenMargin + "px;'><div class='html5gallery-fullscreen-timer-" + this.id + "' style='display:block; position:absolute; top:" + String(b - 4) + "px; left:0px; width:0px; height:4px; background-color:#666; filter:alpha(opacity=60); opacity:0.6;'></div></div><div class='html5gallery-fullscreen-bar-" + this.id + "' style='display:block;position:absolute;padding-top:8px;width:" + d + "px;height:" + this.fullscreenBarH + "px;left:" + this.fullscreenMargin + "px;top:" + String(b + this.fullscreenMargin) + "px;'><div class='html5gallery-fullscreen-close-" + this.id + "' style='display:block;position:relative;float:right;cursor:pointer;width:32px;height:32px;top:8px;background-image:url(\"" + this.options.skinfolder + "lightbox_close.png\");'></div><div class='html5gallery-fullscreen-play-" + this.id + "' style='display:" + (this.isPaused && 1 < this.elemArray.length && 1 == this.elemArray[this.curElem][9] ? "block" : "none") + ';position:relative;float:right;cursor:pointer;width:32px;height:32px;top:8px;background-image:url("' + this.options.skinfolder + "lightbox_play.png\");'></div><div class='html5gallery-fullscreen-pause-" + this.id + "' style='display:" + (this.isPaused || 1 >= this.elemArray.length || 1 != this.elemArray[this.curElem][9] ? "none" : "block") + ';position:relative;float:right;cursor:pointer;width:32px;height:32px;top:8px;background-image:url("' + this.options.skinfolder + "lightbox_pause.png\");'></div><div class='html5gallery-fullscreen-title-" + this.id + "' style='display:block;position:relative;float:left;width:" + String(d - 72) + "px;height:" + this.fullscreenBarH + "px;top:0px;left:0px;text-align:left;'></div></div><div class='html5gallery-fullscreen-next-" + this.id + "' style='display:none;position:absolute;cursor:pointer;width:48px;height:48px;right:" + this.fullscreenMargin + "px;top:" + Math.round(b / 2) + 'px;background-image:url("' + this.options.skinfolder + "lightbox_next.png\");'></div><div class='html5gallery-fullscreen-prev-" + this.id + "' style='display:none;position:absolute;cursor:pointer;width:48px;height:48px;left:" + this.fullscreenMargin + "px;top:" + Math.round(b / 2) + 'px;background-image:url("' + this.options.skinfolder + "lightbox_prev.png\");'></div></div></div>");
1851				this.$fullscreen.appendTo("body");
1852				var f = this;
1853				c(window).scroll(function() {
1854					var a = c(".html5gallery-fullscreen-box-" + f.id, f.$fullscreen),
1855						b = window.innerHeight ? window.innerHeight : c(window).height(),
1856						b = c(window).scrollTop() + Math.round((b - a.height()) / 2);
1857					a.css({
1858						top: b
1859					})
1860				});
1861				var j = c(".html5gallery-elem-" + this.id, this.$gallery).empty().css({
1862					top: 0
1863				});
1864				c(".html5gallery-fullscreen-box-" + this.id, this.$fullscreen).animate({
1865					height: b + 2 * this.fullscreenMargin
1866				}, "slow", function() {
1867					c(this).animate({
1868						width: d + 2 * f.fullscreenMargin
1869					}, "slow", function() {
1870						c(this).animate({
1871							height: "+=" + f.fullscreenBarH
1872						}, "slow", function() {
1873							c(".html5gallery-fullscreen-elem-" + f.id, f.$fullscreen).prepend(j);
1874							f.slideRun(f.curElem)
1875						})
1876					})
1877				});
1878				c(".html5gallery-fullscreen-overlay-" + this.id, this.$fullscreen).click(function() {
1879					f.goNormal()
1880				});
1881				c(".html5gallery-fullscreen-box-" + this.id, this.$fullscreen).hover(function() {
1882					1 < f.elemArray.length && (c(".html5gallery-fullscreen-next-" + f.id, f.$fullscreen).fadeIn(), c(".html5gallery-fullscreen-prev-" + f.id, f.$fullscreen).fadeIn())
1883				}, function() {
1884					c(".html5gallery-fullscreen-next-" + f.id, f.$fullscreen).fadeOut();
1885					c(".html5gallery-fullscreen-prev-" + f.id, f.$fullscreen).fadeOut()
1886				});
1887				c(".html5gallery-fullscreen-box-" + this.id, this.$fullscreen).touchSwipe({
1888					preventWebBrowser: !0,
1889					swipeLeft: function() {
1890						f.disableTouchSwipe || f.slideRun(-1)
1891					},
1892					swipeRight: function() {
1893						f.disableTouchSwipe || f.slideRun(-2)
1894					}
1895				});
1896				c(".html5gallery-fullscreen-close-" + this.id, this.$fullscreen).click(function() {
1897					f.goNormal()
1898				});
1899				c(".html5gallery-fullscreen-next-" + this.id, this.$fullscreen).click(function() {
1900					f.slideRun(-1)
1901				});
1902				c(".html5gallery-fullscreen-prev-" + this.id, this.$fullscreen).click(function() {
1903					f.slideRun(-2)
1904				});
1905				c(".html5gallery-fullscreen-play-" + this.id, this.$fullscreen).click(function() {
1906					c(".html5gallery-fullscreen-play-" + f.id, f.$fullscreen).hide();
1907					c(".html5gallery-fullscreen-pause-" + f.id, f.$fullscreen).show();
1908					f.isPaused = !1;
1909					f.slideshowTimeout = setTimeout(function() {
1910						f.slideRun(-1)
1911					}, f.options.slideshowinterval);
1912					c(".html5gallery-fullscreen-timer-" + f.id, f.$fullscreen).css({
1913						width: 0
1914					});
1915					f.slideTimerCount = 0;
1916					f.options.showtimer && (f.slideTimer = setInterval(function() {
1917						f.showSlideTimer()
1918					}, 50))
1919				});
1920				c(".html5gallery-fullscreen-pause-" + this.id, this.$fullscreen).click(function() {
1921					c(".html5gallery-fullscreen-play-" + f.id, f.$fullscreen).show();
1922					c(".html5gallery-fullscreen-pause-" + f.id, f.$fullscreen).hide();
1923					f.isPaused = !0;
1924					clearTimeout(f.slideshowTimeout);
1925					c(".html5gallery-fullscreen-timer-" + f.id, f.$fullscreen).css({
1926						width: 0
1927					});
1928					clearInterval(f.slideTimer);
1929					f.slideTimerCount = 0
1930				});
1931				c(document).bind("keyup.html5gallery", function(a) {
1932					27 == a.keyCode ? f.goNormal() : 39 == a.keyCode ? f.slideRun(-1) : 37 == a.keyCode && f.slideRun(-2)
1933				})
1934			},
1935			calcIndex: function(a) {
1936				this.savedElem = this.curElem; - 2 == a ? (this.nextElem = this.curElem, this.curElem = this.prevElem, this.prevElem = 0 > this.curElem - 1 ? this.elemArray.length - 1 : this.curElem - 1) : -1 == a ? (this.prevElem = this.curElem, this.curElem = this.nextElem, this.nextElem = this.curElem + 1 >= this.elemArray.length ? 0 : this.curElem + 1) : 0 <= a && (this.curElem = a, this.prevElem = 0 > this.curElem - 1 ? this.elemArray.length - 1 : this.curElem - 1, this.nextElem = this.curElem + 1 >= this.elemArray.length ? 0 : this.curElem + 1)
1937			},
1938			showSlideTimer: function() {
1939				this.slideTimerCount++;
1940				this.isFullscreen ? c(".html5gallery-fullscreen-timer-" + this.id, this.$fullscreen).width(Math.round(50 * c(".html5gallery-fullscreen-elem-" + this.id, this.$fullscreen).width() * (this.slideTimerCount + 1) / this.options.slideshowinterval)) : c(".html5gallery-timer-" + this.id, this.$gallery).width(Math.round(50 * this.options.boxWidth * (this.slideTimerCount + 1) / this.options.slideshowinterval))
1941			},
1942			setHd: function(a, c) {
1943				var b = this.elemArray[this.curElem][9],
1944					b = this.isHd != a && c && (5 == b || 6 == b || 7 == b || 8 == b);
1945				this.isHd = a;
1946				b && this.slideRun(this.curElem, !1, !1, !0)
1947			},
1948			enableUpdateCarousel: function() {
1949				this.disableupdatecarousel = !1
1950			},
1951			slideRun: function(a, d, b, e) {
1952				clearTimeout(this.slideshowTimeout);
1953				this.isFullscreen ? c(".html5gallery-fullscreen-timer-" + this.id, this.$fullscreen).css({
1954					width: 0
1955				}) : c(".html5gallery-timer-" + this.id, this.$gallery).css({
1956					width: 0
1957				});
1958				clearInterval(this.slideTimer);
1959				this.slideTimerCount = 0;
1960				this.options.showcarousel && 0 <= this.curElem && c("#html5gallery-tn-" + this.id + "-" + this.curElem, this.$gallery).removeClass("html5gallery-tn-selected-" + this.id).addClass("html5gallery-tn-" + this.id);
1961				this.calcIndex(a);
1962				this.options.socialurlforeach && this.createSocialMedia();
1963				!this.isFullscreen && this.options.showcarousel && (c("#html5gallery-tn-" + this.id + "-" + this.curElem, this.$gallery).removeClass("html5gallery-tn-" + this.id).addClass("html5gallery-tn-selected-" + this.id), !this.options.notupdatecarousel && !this.disableupdatecarousel && this.carouselHighlight(this.curElem));
1964				if (this.options.showtitle) {
1965					var g = this.elemArray[this.curElem][7];
1966					a = this.elemArray[this.curElem][8];
1967					this.options.shownumbering && (g = this.options.numberingformat.replace("%NUM", this.curElem + 1).replace("%TOTAL", this.elemArray.length) + " " + g);
1968					this.isFullscreen ? c(".html5gallery-fullscreen-title-" + this.id, this.$fullscreen).html(g) : (g = "<div class='html5gallery-title-text-" + this.id + "'>" + g + "</div>", this.options.showdescription && a && (g += "<div class='html5gallery-description-text-" + this.id + "'>" + a + "</div>"), c(".html5gallery-title-" + this.id, this.$gallery).html(g))
1969				}
1970				a = this.elemArray[this.curElem][9];
1971				if (!(0 > a)) {
1972					!this.isFullscreen && d ? "always" == this.options.showimagetoolbox ? ("mouseover" == this.options.imagetoolboxmode || "show" == this.options.imagetoolboxmode) && this.showimagetoolbox(a) : "image" == this.options.showimagetoolbox && 1 != a && this.hideimagetoolbox() : "show" == this.options.imagetoolboxmode ? this.showimagetoolbox(a) : this.hideimagetoolbox();
1973					this.onChange();
1974					d = c(".html5gallery-elem-" + this.id, h);
1975					d.find("iframe").each(function() {
1976						c(this).attr("src", "")
1977					});
1978					d.find("video").each(function() {
1979						c(this).attr("src", "")
1980					});
1981					this.disableTouchSwipe = !1;
1982					b = this.options.autoplayvideo || this.options.playvideoonclick && b || e;
1983					var h = this.isFullscreen ? this.$fullscreen : this.$gallery;
1984					this.showingPoster = !1;
1985					(5 == a || 6 == a || 7 == a || 8 == a || 9 == a || 10 == a) && !b && this.elemArray[this.curElem][12] ? (this.showingPoster = !0, this.showPoster()) : (c(".html5gallery-video-play-" + this.id, h).length && c(".html5gallery-video-play-" + this.id, h).remove(), 1 == a ? this.showImage() : 5 == a || 6 == a || 7 == a || 8 == a ? this.showVideo(b, e) : 9 == a ? this.showYoutube(b) : 10 == a ? this.showVimeo(b) : 2 == a && this.showSWF());
1986					this.prevElem in this.elemArray && 1 == this.elemArray[this.prevElem][9] && ((new Image).src = this.elemArray[this.prevElem][2]);
1987					this.nextElem in this.elemArray && 1 == this.elemArray[this.nextElem][9] && ((new Image).src = this.elemArray[this.nextElem][2]);
1988					this.prevElem in this.elemArray && (!this.options.autoplayvideo && this.elemArray[this.prevElem][12]) && ((new Image).src = this.elemArray[this.prevElem][12]);
1989					this.nextElem in this.elemArray && (!this.options.autoplayvideo && this.elemArray[this.nextElem][12]) && ((new Image).src = this.elemArray[this.nextElem][12]);
1990					this.curElem == this.elemArray.length - 1 && this.looptimes++;
1991					var f = this;
1992					if ((1 == a || this.showingPoster) && !this.isPaused && 1 < this.elemArray.length && (!this.options.loop || this.looptimes < this.options.loop)) this.slideshowTimeout = setTimeout(function() {
1993						f.slideRun(-1)
1994					}, this.options.slideshowinterval), this.isFullscreen ? c(".html5gallery-fullscreen-timer-" + this.id, this.$fullscreen).css({
1995						width: 0
1996					}) : c(".html5gallery-timer-" + this.id, this.$gallery).css({
1997						width: 0
1998					}), this.slideTimerCount = 0, this.options.showtimer && (this.slideTimer = setInterval(function() {
1999						f.showSlideTimer()
2000					}, 50));
2001					this.options.loop && this.looptimes >= this.options.loop && (this.looptimes = 0, this.pauseGallery());
2002					this.elemArray[this.curElem][5] ? (d.css({
2003						cursor: "pointer"
2004					}), d.unbind("click").bind("click", function() {
2005						f.elemArray[f.curElem][6] ? window.open(f.elemArray[f.curElem][5], f.elemArray[f.curElem][6]) : window.open(f.elemArray[f.curElem][5])
2006					})) : (d.css({
2007						cursor: ""
2008					}), d.unbind("click"))
2009				}
2010			},
2011			showImage: function() {
2012				var a = c(".html5gallery-elem-" + this.id, this.isFullscreen ? this.$fullscreen : this.$gallery);
2013				$preloading = "" === a.html() ? c("<div class='html5gallery-loading-center-" + this.id + "'></div>").appendTo(a) : c("<div class='html5gallery-loading-" + this.id + "'></div>").appendTo(a);
2014				var d = this,
2015					b = new Image;
2016				c(b).load(function() {
2017					$preloading.remove();
2018					d.elemArray[d.curElem][10] = this.width;
2019					d.elemArray[d.curElem][11] = this.height;
2020					var b;
2021					d.isFullscreen ? (b = Math.min(d.fullscreenWidth / this.width, d.fullscreenHeight / this.height), b = 1 < b ? 1 : b) : b = "fill" == d.options.resizemode ? Math.max(d.options.width / this.width, d.options.height / this.height) : Math.min(d.options.width / this.width, d.options.height / this.height);
2022					var e = Math.round(b * this.width);
2023					b = Math.round(b * this.height);
2024					var h = d.isFullscreen ? e : d.options.width,
2025						f = d.isFullscreen ? b : d.options.height,
2026						j = Math.round(h / 2 - e / 2),
2027						l = Math.round(f / 2 - b / 2);
2028					d.isFullscreen && d.adjustFullscreen(h, f);
2029					a.css({
2030						width: h,
2031						height: f
2032					});
2033					e = c("<div class='html5gallery-elem-img-" + d.id + "' style='display:block; position:absolute; overflow:hidden; width:" + h + "px; height:" + f + "px; left:0px; margin-left:" + (d.options.slideshadow && !d.isFullscreen ? 4 : 0) + "px; top:0px; margin-top:" + (d.options.slideshadow && !d.isFullscreen ? 4 : 0) + "px;'><img class='html5gallery-elem-image-" + d.id + "' style='border:none; position:absolute; opacity:inherit; filter:inherit; padding:0px; margin:0px; left:" + j + "px; top:" + l + "px; max-width:none; max-height:none;
2033 width:" + e + "px; height:" + b + "px;' src='" + d.elemArray[d.curElem][2] + "' />" + d.options.watermarkcode + "</div>");
2034					b = c(".html5gallery-elem-img-" + d.id, a);
2035					b.length ? (a.prepend(e), a.html5boxTransition(d.id, b, e, {
2036						effect: d.options.effect,
2037						easing: d.options.easing,
2038						duration: d.options.duration,
2039						direction: d.curElem >= d.savedElem,
2040						slide: d.options.slide
2041					}, function() {})) : a.html(e);
2042					d.options.googleanalyticsaccount && window._gaq.push(["_trackEvent", "Image", "Play", d.elemArray[d.curElem][7]])
2043				});
2044				c(b).error(function() {
2045					$preloading.remove();
2046					d.isFullscreen && d.adjustFullscreen(d.options.width, d.options.height);
2047					a.html("<div class='html5gallery-elem-error-" + d.id + "' style='display:block; position:absolute; overflow:hidden; text-align:center; width:" + d.options.width + "px; left:0px; top:" + Math.round(d.options.height / 2 - 10) + "px; margin:4px;'><div class='html5gallery-error-" + d.id + "'>The requested content cannot be found</div>");
2048					d.options.googleanalyticsaccount && window._gaq.push(["_trackEvent", "Image", "Error", d.elemArray[d.curElem][7]])
2049				});
2050				b.src = this.elemArray[this.curElem][2]
2051			},
2052			adjustFullscreen: function(a, d, b) {
2053				var e = this.options.isMobile ? Math.max(c(window).width(), c(document).width()) : c(window).width();
2054				this.fullscreenWidth = e - 2 * this.fullscreenMargin - 2 * this.fullscreenOutsideMargin;
2055				var g = window.innerHeight ? window.innerHeight : c(window).height();
2056				this.fullscreenHeight = g - 2 * this.fullscreenMargin - this.fullscreenBarH - 2 * this.fullscreenOutsideMargin;
2057				var h = Math.max(g, c(document).height()),
2058					f = Math.min(this.fullscreenWidth / a, this.fullscreenHeight / d);
2059				1 > f && (a *= f, d *= f);
2060				g = c(window).scrollTop() + Math.round((g - (d + 2 * this.fullscreenMargin + this.fullscreenBarH)) / 2);
2061				c(".html5gallery-fullscreen-" + this.id).css({
2062					width: e + "px",
2063					height: h + "px"
2064				});
2065				c(".html5gallery-fullscreen-title-" + this.id, this.$fullscreen).css({
2066					width: a - 72
2067				});
2068				b ? (c(".html5gallery-fullscreen-box-" + this.id, this.$fullscreen).css({
2069					width: a + 2 * this.fullscreenMargin,
2070					height: d + 2 * this.fullscreenMargin + this.fullscreenBarH,
2071					top: g
2072				}), c(".html5gallery-fullscreen-elem-" + this.id, this.$fullscreen).css({
2073					width: a,
2074					height: d
2075				}), c(".html5gallery-fullscreen-bar-" + this.id, this.$fullscreen).css({
2076					width: a,
2077					top: d + this.fullscreenMargin
2078				})) : (c(".html5gallery-fullscreen-box-" + this.id, this.$fullscreen).animate({
2079					width: a + 2 * this.fullscreenMargin,
2080					height: d + 2 * this.fullscreenMargin + this.fullscreenBarH,
2081					top: g
2082				}, "slow"), c(".html5gallery-fullscreen-elem-" + this.id, this.$fullscreen).animate({
2083					width: a,
2084					height: d
2085				}, "slow"), c(".html5gallery-fullscreen-bar-" + this.id, this.$fullscreen).animate({
2086					width: a,
2087					top: d + this.fullscreenMargin
2088				}, "slow"));
2089				c(".html5gallery-fullscreen-next-" + this.id, this.$fullscreen).css({
2090					top: Math.round(d / 2)
2091				});
2092				c(".html5gallery-fullscreen-prev-" + this.id, this.$fullscreen).css({
2093					top: Math.round(d / 2)
2094				});
2095				c(".html5gallery-fullscreen-play-" + this.id, this.$fullscreen).css("display", this.isPaused && 1 < this.elemArray.length && 1 == this.elemArray[this.curElem][9] ? "block" : "none");
2096				c(".html5gallery-fullscreen-pause-" + this.id, this.$fullscreen).css("display", this.isPaused || 1 >= this.elemArray.length || 1 != this.elemArray[this.curElem][9] ? "none" : "block");
2097				c(".html5gallery-elem-" + this.id, this.$fullscreen).css({
2098					width: a,
2099					height: d
2100				});
2101				c(".html5gallery-fullscreen-timer-" + this.id, this.$fullscreen).css({
2102					top: String(d - 4) + "px"
2103				})
2104			},
2105			showPoster: function() {
2106				var a = this.isFullscreen ? this.$fullscreen : this.$gallery,
2107					d = c(".html5gallery-elem-" + this.id, a);
2108				$preloading = "" === d.html() ? c("<div class='html5gallery-loading-center-" + this.id + "'></div>").appendTo(d) : c("<div class='html5gallery-loading-" + this.id + "'></div>").appendTo(d);
2109				var b = this,
2110					e = this.elemArray[this.curElem][10],
2111					g = this.elemArray[this.curElem][11],
2112					h = new Image;
2113				c(h).load(function() {
2114					$preloading.remove();
2115					var f, h, j;
2116					b.isFullscreen ? (f = Math.max(e / this.width, g / this.height), f = 1 < f ? 1 : f, h = e, j = g) : (f = "fill" == b.options.resizemode ? Math.max(b.options.width / this.width, b.options.height / this.height) : Math.min(b.options.width / this.width, b.options.height / this.height), h = b.options.width, j = b.options.height);
2117					var l = Math.round(f * this.width);
2118					f = Math.round(f * this.height);
2119					var q = Math.round(h / 2 - l / 2),
2120						n = Math.round(j / 2 - f / 2);
2121					b.isFullscreen && b.adjustFullscreen(h, j);
2122					d.css({
2123						width: h,
2124						height: j
2125					});
2126					h = c("<div class='html5gallery-elem-img-" + b.id + "' style='display:block; position:absolute; overflow:hidden;
2126 width:" + h + "px; height:" + j + "px; left:0px; margin-left:" + (b.options.slideshadow && !b.isFullscreen ? 4 : 0) + "px; top:0px; margin-top:" + (b.options.slideshadow && !b.isFullscreen ? 4 : 0) + "px;'><img class='html5gallery-elem-image-" + b.id + "' style='border:none; position:absolute; opacity:inherit; filter:inherit; padding:0px; margin:0px; left:" + q + "px; top:" + n + "px; max-width:none; max-height:none; width:" + l + "px; height:" + f + "px;' src='" + b.elemArray[b.curElem][12] + "' />" + b.options.watermarkcode + "</div>");
2127					j = c(".html5gallery-elem-img-" + b.id, d);
2128					j.length ? (d.prepend(h), d.html5boxTransition(b.id, j, h, {
2129						effect: b.options.effect,
2130						easing: b.options.easing,
2131						duration: b.options.duration,
2132						direction: b.curElem >= b.savedElem,
2133						slide: b.options.slide
2134					}, function() {})) : d.html(h);
2135					c(".html5gallery-video-play-" + b.id, a).length || c("<div class='html5gallery-video-play-" + b.id + "' style='position:absolute;display:block;cursor:pointer;top:50%;left:50%;width:64px;height:64px;margin-left:-32px;margin-top:-32px;background:url(\"" + b.options.skinfolder + "playvideo_64.png\") no-repeat center center;'></div>").appendTo(d).unbind(b.eClick).bind(b.eClick, function() {
2136						c(this).remove();
2137						clearTimeout(b.slideshowTimeout);
2138						c(".html5gallery-timer-" + b.id, b.$gallery).css({
2139							width: 0
2140						});
2141						clearInterval(b.slideTimer);
2142						b.slideTimerCount = 0;
2143						var a = b.elemArray[b.curElem][9];
2144						5 == a || 6 == a || 7 == a || 8 == a ? b.showVideo(!0) : 9 == a ? b.showYoutube(!0) : 10 == a && b.showVimeo(!0)
2145					})
2146				});
2147				c(h).error(function() {
2148					$preloading.remove();
2149					b.isFullscreen && b.adjustFullscreen(b.options.width, b.options.height);
2150					d.html("<div class='html5gallery-elem-error-" + b.id + "' style='display:block; position:absolute; overflow:hidden; text-align:center; width:" + b.options.width + "px; left:0px; top:" + Math.round(b.options.height / 2 - 10) + "px; margin:4px;'><div class='html5gallery-error-" + b.id + "'>The requested content cannot be found</div>");
2151					b.options.googleanalyticsaccount && window._gaq.push(["_trackEvent", "Image", "Error", b.elemArray[b.curElem][7]])
2152				});
2153				h.src = this.elemArray[this.curElem][12]
2154			},
2155			showVideo: function(a, d) {
2156				this.disableTouchSwipe = !0;
2157				var b = this.isFullscreen ? this.$fullscreen : this.$gallery,
2158					e = this.elemArray[this.curElem][10],
2159					g = this.elemArray[this.curElem][11];
2160				this.isFullscreen ? this.adjustFullscreen(e, g) : (c(".html5gallery-elem-" + this.id, this.$gallery).css({
2161					width: this.options.width,
2162					height: this.options.height
2163				}), e = this.options.width, g = this.options.height);
2164				var h = -1;
2165				d && c(".html5gallery-elem-" + this.id, b).find("video").length && (h = c(".html5gallery-elem-" + this.id, b).find("video:first").get(0).currentTime);
2166				c(".html5gallery-elem-" + this.id, b).html("<div class='html5gallery-loading-center-" + this.id + "'></div><div class='html5gallery-elem-video-" + this.id + "' style='display:block;position:absolute;overflow:hidden;top:" + (this.options.slideshadow && !this.isFullscreen ? 4 : 0) + "px;left:" + (this.options.slideshadow && !this.isFullscreen ? 4 : 0) + "px;width:" + e + "px;height:" + g + "px;'></div>" + this.options.watermarkcode);
2167				this.isHTML5 = !1;
2168				if (this.options.isIE678 || this.options.isIE9 && this.options.useflashonie9 || this.options.isIE10 && this.options.useflashonie10 || this.options.isIE11 && this.options.useflashonie11) this.isHTML5 = !1;
2169				else if (this.options.isMobile) this.isHTML5 = !0;
2170				else if ((this.options.html5player || !this.options.flashInstalled) && this.options.html5VideoSupported) if (!this.options.isFirefox && !this.options.isOpera || (this.options.isFirefox || this.options.isOpera) && (this.elemArray[this.curElem][3] || this.elemArray[this.curElem][4])) this.isHTML5 = !0;
2171				if (this.isHTML5) {
2172					var f = this.elemArray[this.curElem][2],
2173						j = this.elemArray[this.curElem][13];
2174					if (this.options.isFirefox || this.options.isOpera || !f) f = this.elemArray[this.curElem][4] ? this.elemArray[this.curElem][4] : this.elemArray[this.curElem][3], j = this.elemArray[this.curElem][15] ? this.elemArray[this.curElem][15] : this.elemArray[this.curElem][14];
2175					this.embedHTML5Video(c(".html5gallery-elem-video-" + this.id, b), e, g, f, j, a, h, d)
2176				} else h = this.elemArray[this.curElem][2], "/" != h.charAt(0) && ("http:" != h.substring(0, 5) && "https:" != h.substring(0, 6)) && (h = this.options.htmlfolder + h), f = "", this.elemArray[this.curElem][13] && (f = this.elemArray[this.curElem][13], "/" != f.charAt(0) && ("http:" != f.substring(0, 5) && "https:" != f.substring(0, 6)) && (f = this.options.htmlfolder + f)), this.embedFlash(c(".html5gallery-elem-video-" + this.id, b), "100%", "100%", this.options.jsfolder + "html5boxplayer.swf", "transparent", {
2177					width: e,
2178					height: g,
2179					videofile: h,
2180					hdfile: f,
2181					ishd: this.isHd ? "1" : "0",
2182					autoplay: a ? "1" : "0",
2183					errorcss: ".html5box-error" + this.options.errorcss,
2184					id: this.id
2185				});
2186				this.options.googleanalyticsaccount && window._gaq.push(["_trackEvent", "Video", "Play", this.elemArray[this.curElem][7]])
2187			},
2188			showSWF: function() {
2189				var a = this.isFullscreen ? this.$fullscreen : this.$gallery,
2190					d = this.elemArray[this.curElem][10],
2191					b = this.elemArray[this.curElem][11];
2192				this.isFullscreen ? this.adjustFullscreen(d, b) : c(".html5gallery-elem-" + this.id, this.$gallery).css({
2193					width: this.options.width,
2194					height: this.options.height
2195				});
2196				var e = this.isFullscreen ? 0 : Math.round((this.options.height - b) / 2) + (this.options.slideshadow ? 4 : 0),
2197					g = this.isFullscreen ? 0 : Math.round((this.options.width - d) / 2) + (this.options.slideshadow ? 4 : 0);
2198				c(".html5gallery-elem-" + this.id, a).html("<div class='html5gallery-elem-flash-" + this.id + "' style='display:block;position:absolute;overflow:hidden;top:" + e + "px;left:" + g + "px;width:" + d + "px;height:" + b + "px;'></div>" + this.options.watermarkcode);
2199				this.embedFlash(c(".html5gallery-elem-flash-" + this.id, a), d, b, this.elemArray[this.curElem][2], "window", {});
2200				this.options.googleanalyticsaccount && window._gaq.push(["_trackEvent", "Flash", "Play", this.elemArray[this.curElem][7]])
2201			},
2202			prepareYoutubeHref: function(a) {
2203				var c = "http://www.youtube.com/embed/" + a.match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];
2204				a = this.getYoutubeParams(a);
2205				var b = !0,
2206					e;
2207				for (e in a) b ? (c += "?", b = !1) : c += "&", c += e + "=" + a[e];
2208				return c
2209			},
2210			getYoutubeParams: function(a) {
2211				var c = {};
2212				if (0 > a.indexOf("?")) return c;
2213				a = a.substring(a.indexOf("?") + 1).split("&");
2214				for (var b = 0; b < a.length; b++) {
2215					var e = a[b].split("=");
2216					e && (2 == e.length && "v" != e[0].toLowerCase()) && (c[e[0].toLowerCase()] = e[1])
2217				}
2218				return c
2219			},
2220			initYoutubeApi: function() {
2221				var a, c = !1;
2222				for (a = 0; a < this.elemArray.length; a++) if (9 == this.elemArray[a][9]) {
2223					c = !0;
2224					break
2225				}
2226				c && (a = document.createElement("script"), a.src = ("https:" == document.location.protocol ? "https" : "http") + "://www.youtube.com/iframe_api", c = document.getElementsByTagName("script")[0], c.parentNode.insertBefore(a, c))
2227			},
2228			showYoutube: function(a) {
2229				var d = this.isFullscreen ? this.$fullscreen : this.$gallery,
2230					b = this.elemArray[this.curElem][10],
2231					e = this.elemArray[this.curElem][11];
2232				this.isFullscreen ? this.adjustFullscreen(b, e) : (c(".html5gallery-elem-" + this.id, this.$gallery).css({
2233					width: this.options.width,
2234					height: this.options.height
2235				}), b = this.options.width, e = this.options.height);
2236				var g = this.elemArray[this.curElem][2];
2237				c(".html5gallery-elem-" + this.id, d).html("<div class='html5gallery-loading-center-" + this.id + "'></div><div id='html5gallery-elem-video-" + this.id + "' style='display:block;position:absolute;overflow:hidden;top:" + (this.options.slideshadow && !this.isFullscreen ? 4 : 0) + "px;left:" + (this.options.slideshadow && !this.isFullscreen ? 4 : 0) + "px;width:" + b + "px;height:" + e + "px;'></div>" + this.options.watermarkcode);
2238				var h = this;
2239				if (!ASYouTubeIframeAPIReady && (ASYouTubeTimeout += 100, 3E3 > ASYouTubeTimeout)) {
2240					setTimeout(function() {
2241						h.showYoutube(a)
2242					}, 100);
2243					return
2244				}
2245				if (ASYouTubeIframeAPIReady && !this.options.isMobile && !this.options.isIE6 && !this.options.isIE7) {
2246					d = this.elemArray[this.curElem][2].match(/(\?v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2];
2247					g = null;
2248					a && (g = function(a) {
2249						a.target.playVideo()
2250					});
2251					var f = this.getYoutubeParams(this.elemArray[this.curElem][2]),
2252						f = c.extend({
2253							autoplay: a ? 1 : 0,
2254							rel: 0,
2255							wmode: "transparent"
2256						}, f);
2257					new YT.Player("html5gallery-elem-video-" + this.id, {
2258						width: b,
2259						height: e,
2260						videoId: d,
2261						playerVars: f,
2262						events: {
2263							onReady: g,
2264							onStateChange: function(a) {
2265								a.data == YT.PlayerState.ENDED && (h.onVideoEnd(), h.isPaused || h.slideRun(-1))
2266							}
2267						}
2268					})
2269				} else g = this.prepareYoutubeHref(g), a && (g = 0 > g.indexOf("?") ? g + "?autoplay=1" : g + "&autoplay=1"), g = 0 > g.indexOf("?") ? g + "?wmode=transparent&rel=0" : g + "&wmode=transparent&rel=0", c("#html5gallery-elem-video-" + this.id, d).html("<iframe width='" + b + "' height='" + e + "' src='" + g + "' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");
2270				this.options.googleanalyticsaccount && window._gaq.push(["_trackEvent", "Video", "Play", this.elemArray[this.curElem][7]])
2271			},
2272			showVimeo: function(a) {
2273				var d = this.isFullscreen ? this.$fullscreen : this.$gallery,
2274					b = this.elemArray[this.curElem][10],
2275					e = this.elemArray[this.curElem][11];
2276				this.isFullscreen ? this.adjustFullscreen(b, e) : (c(".html5gallery-elem-" + this.id, this.$gallery).css({
2277					width: this.options.width,
2278					height: this.options.height
2279				}), b = this.options.width, e = this.options.height);
2280				var g = this.elemArray[this.curElem][2];
2281				a && (g = 0 > g.indexOf("?") ? g + "?autoplay=1" : g + "&autoplay=1");
2282				c(".html5gallery-elem-" + this.id, d).html("<div class='html5gallery-loading-center-" + this.id + "'></div><div class='html5gallery-elem-video-" + this.id + "' style='display:block;position:absolute;overflow:hidden;top:" + (this.options.slideshadow && !this.isFullscreen ? 4 : 0) + "px;left:" + (this.options.slideshadow && !this.isFullscreen ? 4 : 0) + "px;width:" + b + "px;height:" + e + "px;'></div>" + this.options.watermarkcode);
2283				c(".html5gallery-elem-video-" + this.id, d).html("<iframe width='" + b + "' height='" + e + "' src='" + g + "' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>");
2284				this.options.googleanalyticsaccount && window._gaq.push(["_trackEvent", "Video", "Play", this.elemArray[this.curElem][7]])
2285			},
2286			checkType: function(a) {
2287				return !a ? -1 : a.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i) ? 1 : a.match(/[^\.]\.(swf)\s*$/i) ? 2 : a.match(/[^\.]\.(mp3)\s*$/i) ? 3 : a.match(/[^\.]\.(pdf)\s*$/i) ? 4 : a.match(/\.(flv)(.*)?$/i) ? 5 : a.match(/\.(mp4|m4v)(.*)?$/i) ? 6 : a.match(/\.(ogv|ogg)(.*)?$/i) ? 7 : a.match(/\.(webm)(.*)?$/i) ? 8 : a.match(/\:\/\/.*(youtube\.com)/i) || a.match(/\:\/\/.*(youtu\.be)/i) ? 9 : a.match(/\:\/\/.*(vimeo\.com)/i) ? 10 : 0
2288			},
2289			onChange: function() {
2290				if (this.options.onchange && window[this.options.onchange] && "function" == typeof window[this.options.onchange]) window[this.options.onchange](this.elemArray[this.curElem])
2291			},
2292			onSlideshowOver: function() {
2293				if (this.options.onslideshowover && window[this.options.onslideshowover] && "function" == typeof window[this.options.onslideshowover]) window[this.options.onslideshowover](this.elemArray[this.curElem])
2294			},
2295			onThumbOver: function() {
2296				if (this.options.onthumbover && window[this.options.onthumbover] && "function" == typeof window[this.options.onthumbover]) window[this.options.onthumbover](this.elemArray[this.curElem])
2297			},
2298			onVideoEnd: function() {
2299				if (this.options.onvideoend && window[this.options.onvideoend] && "function" == typeof window[this.options.onvideoend]) window[this.options.onvideoend](this.elemArray[this.curElem])
2300			},
2301			embedHTML5Video: function(a, d, b, e, g, h, f, j) {
2302				a.html("<div class='html5gallery-elem-video-container-" + this.id + "' style='position:relative;display:block;width:" + d + "px;height:" + b + "px;'><video width='" + d + "px' height='" + b + "px'" + (this.options.nativehtml5controls ? " controls" : "") + "></div>");
2303				c("video", a).get(0).setAttribute("src", (g && this.isHd ? g : e) + (0 < f ? "#t=" + f : ""));
2304				this.options.nativehtml5controls || (c("video", a).data("src", e), c("video", a).data("hd", g), c("video", a).data("ishd", this.isHd), c("video", a).addHTML5VideoControls(this.options.skinfolder, this));
2305				(h || j) && c("video", a).get(0).play();
2306				var l = this;
2307				c("video", a).unbind("ended").bind("ended", function() {
2308					l.onVideoEnd();
2309					l.isPaused || l.slideRun(-1)
2310				})
2311			},
2312			embedFlash: function(a, d, b, e, g, h) {
2313				if (this.options.flashInstalled) {
2314					var f = {
2315						pluginspage: "http://www.adobe.com/go/getflashplayer",
2316						quality: "high",
2317						allowFullScreen: "true",
2318						allowScriptAccess: "always",
2319						type: "application/x-shockwave-flash"
2320					};
2321					f.width = d;
2322					f.height = b;
2323					f.src = e;
2324					f.wmode = g;
2325					f.flashVars = c.param(h);
2326					d = "";
2327					for (var j in f) d += j + "=" + f[j] + " ";
2328					a.html("<embed " + d + "/>")
2329				} else a.html("<div class='html5gallery-elem-error-" + this.id + "' style='display:block; position:absolute; text-align:center; width:" + this.options.width + "px; left:0px; top:" + Math.round(this.options.height / 2 - 10) + "px;'><div class='html5gallery-error-" + this.id + "'><div>The required Adobe Flash Player plugin is not installed</div><div style='display:block;position:relative;text-align:center;width:112px;height:33px;margin:0px auto;'><a href='http://www.adobe.com/go/getflashplayer'><img src='http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' width='112' height='33'></img></a></div></div>")
2330			}
2331		};
2332		this.each(function() {
2333			var a = c(this);
2334			h = h || {};
2335			for (var d in h) d.toLowerCase() !== d && (h[d.toLowerCase()] = h[d], delete h[d]);
2336			this.options = c.extend({}, h);
2337			var b = this;
2338			c.each(a.data(), function(a, c) {
2339				b.options[a.toLowerCase()] = c
2340			});
2341			"skin" in this.options && (this.options.skin = this.options.skin.toLowerCase());
2342			d = {
2343				skinfolder: "../images/skins-html5gallery/skins/horizontal/",
2344				padding: 6,
2345				bgcolor: "#ffffff",
2346				bgimage: "",
2347				galleryshadow: !0,
2348				slideshadow: !1,
2349				showsocialmedia: !1,
2350				headerpos: "top",
2351				showdescription: !0,
2352				titleoverlay: !0,
2353				titleautohide: !0,
2354				titlecss: " {color:#ffffff; font-size:14px; font-family:Armata, sans-serif, Arial; overflow:hidden; text-align:left; padding:10px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
2355				titlecsslink: " a {color:#ffffff;}",
2356				descriptioncss: " {color:#ffffff; font-size:13px; font-family:Armata, sans-serif, Arial; overflow:hidden; text-align:left; padding:0px 0px 10px 10px; background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
2357				descriptioncsslink: " a {color:#ffffff;}",
2358				showcarousel: !0,
2359				carouselmargin: 0,
2360				carouselbgtransparent: !1,
2361				carouselbgcolorstart: "#494f54",
2362				carouselbgcolorend: "#292c31",
2363				carouseltopborder: "#666666",
2364				carouselbottomborder: "#111111",
2365				thumbwidth: 64,
2366				thumbheight: 48,
2367				thumbgap: 4,
2368				thumbmargin: 6,
2369				thumbunselectedimagebordercolor: "",
2370				thumbimageborder: 1,
2371				thumbimagebordercolor: "#ffffff",
2372				thumbshowplayonvideo: !0,
2373				thumbshadow: !1,
2374				thumbopacity: 0.8
2375			};
2376			var j = {
2377					padding: 12,
2378					skinfolder: "../images/skins-html5gallery/skins/light/",
2379					bgcolor: "",
2380					bgimage: "",
2381					galleryshadow: !1,
2382					slideshadow: !0,
2383					showsocialmedia: !1,
2384					headerpos: "top",
2385					showdescription: !0,
2386					titleoverlay: !0,
2387					titleautohide: !0,
2388					titlecss: " {color:#ffffff; font-size:14px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px;  background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
2389					titlecsslink: " a {color:#ffffff;}",
2390					descriptioncss: " {color:#ffffff; font-size:12px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px;  background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
2391					descriptioncsslink: " a {color:#ffffff;}",
2392					showcarousel: !0,
2393					carouselmargin: 10,
2394					carouselbgtransparent: !0,
2395					thumbwidth: 48,
2396					thumbheight: 48,
2397					thumbgap: 8,
2398					thumbmargin: 12,
2399					thumbunselectedimagebordercolor: "#fff",
2400					thumbimageborder: 2,
2401					thumbimagebordercolor: "red",
2402					thumbshowplayonvideo: !0,
2403					thumbshadow: !0,
2404					thumbopacity: 0.8
2405				},
2406				g = {
2407					padding: 0,
2408					skinfolder: "../images/skins-html5gallery/skins/mediapage/",
2409					bgcolor: "",
2410					bgimage: "",
2411					galleryshadow: !1,
2412					slideshadow: !1,
2413					showsocialmedia: !1,
2414					headerpos: "top",
2415					showdescription: !0,
2416					titleoverlay: !0,
2417					titleautohide: !0,
2418					titlecss: " {color:#ffffff; font-size:14px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px;  background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
2419					titlecsslink: " a {color:#ffffff;}",
2420					descriptioncss: " {color:#ffffff; font-size:12px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px;  background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
2421					descriptioncsslink: " a {color:#ffffff;}",
2422					showcarousel: !0,
2423					carouselmargin: 24,
2424					carouselmultirows: !0,
2425					thumbrowgap: 16,
2426					carouselbgtransparent: !0,
2427					thumbwidth: 120,
2428					thumbheight: 60,
2429					thumbgap: 10,
2430					thumbmargin: 12,
2431					thumbunselectedimagebordercolor: "#fff",
2432					thumbimageborder: 0,
2433					thumbimagebordercolor: "#fff",
2434					thumbshowplayonvideo: !0,
2435					thumbshadow: !1,
2436					thumbopacity: 0.8,
2437					thumbshowtitle: !0,
2438					thumbtitlecss: "{text-align:center; color:#000; font-size:12px; font-family:Armata,Arial,Helvetica,sans-serif; overflow:hidden;}",
2439					thumbtitleheight: 24
2440				},
2441				l = {
2442					padding: 12,
2443					skinfolder: "../images/skins-html5gallery/skins/gallery/",
2444					bgcolor: "",
2445					bgimage: "",
2446					galleryshadow: !1,
2447					slideshadow: !0,
2448					showsocialmedia: !1,
2449					headerpos: "top",
2450					showdescription: !0,
2451					titleoverlay: !0,
2452					titleautohide: !0,
2453					titlecss: " {color:#ffffff; font-size:14px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px 10px 10px;  background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
2454					titlecsslink: " a {color:#ffffff;}",
2455					descriptioncss: " {color:#ffffff; font-size:12px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 10px;  background:rgb(102, 102, 102) transparent; background: rgba(102, 102, 102, 0.6); filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; -ms-filter:'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99666666, endColorstr=#99666666)'; }",
2456					descriptioncsslink: " a {color:#ffffff;}",
2457					showcarousel: !0,
2458					carouselmargin: 10,
2459					carouselbgtransparent: !0,
2460					thumbwidth: 120,
2461					thumbheight: 60,
2462					thumbgap: 8,
2463					thumbmargin: 12,
2464					thumbunselectedimagebordercolor: "#fff",
2465					thumbimageborder: 2,
2466					thumbimagebordercolor: "#fff",
2467					thumbshowplayonvideo: !0,
2468					thumbshadow: !0,
2469					thumbopacity: 0.8,
2470					thumbshowtitle: !0,
2471					thumbtitlecss: "{text-align:center; color:#000; font-size:12px; font-family:Armata,Arial,Helvetica,sans-serif; overflow:hidden; white-space:nowrap;}",
2472					thumbtitleheight: 18
2473				},
2474				f = {
2475					skinfolder: "../images/skins-html5gallery/skins/darkness/",
2476					padding: 12,
2477					bgcolor: "#444444",
2478					bgimage: "background.jpg",
2479					galleryshadow: !1,
2480					slideshadow: !1,
2481					headerpos: "bottom",
2482					showdescription: !1,
2483					titleoverlay: !1,
2484					titleautohide: !1,
2485					titlecss: " {color:#ffffff; font-size:16px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",
2486					titlecsslink: " a {color:#ffffff;}",
2487					descriptioncss: " {color:#ffffff; font-size:12px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",
2488					descriptioncsslink: " a {color:#ffffff;}",
2489					showcarousel: !0,
2490					carouselmargin: 8,
2491					carouselbgtransparent: !1,
2492					carouselbgcolorstart: "#494f54",
2493					carouselbgcolorend: "#292c31",
2494					carouseltopborder: "#666666",
2495					carouselbottomborder: "#111111",
2496					thumbwidth: 64,
2497					thumbheight: 48,
2498					thumbgap: 4,
2499					thumbmargin: 6,
2500					thumbunselectedimagebordercolor: "",
2501					thumbimageborder: 1,
2502					thumbimagebordercolor: "#cccccc",
2503					thumbshowplayonvideo: !0,
2504					thumbshadow: !1,
2505					thumbopacity: 0.8
2506				},
2507				r = {
2508					skinfolder: "../images/skins-html5gallery/skins/vertical/",
2509					padding: 12,
2510					bgcolor: "#444444",
2511					bgimage: "background.jpg",
2512					galleryshadow: !1,
2513					slideshadow: !1,
2514					headerpos: "bottom",
2515					showdescription: !1,
2516					titleoverlay: !1,
2517					titleautohide: !1,
2518					titlecss: " {color:#ffffff; font-size:16px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",
2519					titlecsslink: " a {color:#ffffff;}",
2520					descriptioncss: " {color:#ffffff; font-size:12px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",
2521					descriptioncsslink: " a {color:#ffffff;}",
2522					showcarousel: !0,
2523					carouselmargin: 8,
2524					carouselposition: "right",
2525					carouselbgtransparent: !1,
2526					carouselbgcolorstart: "#494f54",
2527					carouselbgcolorend: "#292c31",
2528					carouseltopborder: "#666666",
2529					carouselbottomborder: "#111111",
2530					carouselhighlightbgcolorstart: "#999999",
2531					carouselhighlightbgcolorend: "#666666",
2532					carouselhighlighttopborder: "#cccccc",
2533					carouselhighlightbottomborder: "#444444",
2534					carouselhighlightbgimage: "",
2535					thumbwidth: 148,
2536					thumbheight: 48,
2537					thumbgap: 2,
2538					thumbmargin: 6,
2539					thumbunselectedimagebordercolor: "",
2540					thumbimageborder: 1,
2541					thumbimagebordercolor: "#cccccc",
2542					thumbshowplayonvideo: !0,
2543					thumbshadow: !1,
2544					thumbopacity: 0.8,
2545					thumbshowimage: !0,
2546					thumbshowtitle: !0,
2547					thumbtitlecss: "{text-align:center; color:#ffffff; font-size:12px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:nowrap;}"
2548				},
2549				s = {
2550					skinfolder: "../images/skins-html5gallery/skins/showcase/",
2551					padding: 12,
2552					bgcolor: "#444444",
2553					bgimage: "background.jpg",
2554					galleryshadow: !1,
2555					slideshadow: !1,
2556					showsocialmedia: !1,
2557					headerpos: "bottom",
2558					showdescription: !1,
2559					titleoverlay: !1,
2560					titleautohide: !1,
2561					titlecss: " {color:#ffffff; font-size:16px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:10px 0px;}",
2562					titlecsslink: " a {color:#ffffff;}",
2563					descriptioncss: " {color:#ffffff; font-size:12px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; text-align:left; padding:0px 0px 10px 0px;}",
2564					descriptioncsslink: " a {color:#ffffff;}",
2565					showcarousel: !0,
2566					carouselmargin: 8,
2567					carouselposition: "bottom",
2568					carouselheight: 200,
2569					carouselbgtransparent: !1,
2570					carouselbgcolorstart: "#494f54",
2571					carouselbgcolorend: "#292c31",
2572					carouseltopborder: "#666666",
2573					carouselbottomborder: "#111111",
2574					carouselhighlightbgcolorstart: "#999999",
2575					carouselhighlightbgcolorend: "#666666",
2576					carouselhighlighttopborder: "#cccccc",
2577					carouselhighlightbottomborder: "#444444",
2578					carouselhighlightbgimage: "",
2579					thumbwidth: 148,
2580					thumbheight: 60,
2581					thumbgap: 2,
2582					thumbmargin: 6,
2583					thumbunselectedimagebordercolor: "",
2584					thumbimageborder: 1,
2585					thumbimagebordercolor: "#cccccc",
2586					thumbshowplayonvideo: !0,
2587					thumbshadow: !1,
2588					thumbopacity: 0.8,
2589					thumbshowimage: !0,
2590					thumbshowtitle: !0,
2591					thumbtitlecss: "{text-align:left; color:#ffffff; font-size:12px; font-family:Armata, sans-serif, Arial; overflow:hidden; padding: 6px 0;}",
2592					thumbshowdescription: !0,
2593					thumbdescriptioncss: "{font-size:10px;}"
2594				},
2595				p = {
2596					freelink: "",
2597					watermark: "",
2598					watermarklink: "",
2599					skin: "horizontal",
2600					googlefonts: "Armata",
2601					enabletouchswipe: !0,
2602					enabletouchswipeonandroid: !0,
2603					responsive: !1,
2604					responsivefullscreen: !1,
2605					screenquery: {},
2606					src: "",
2607					xml: "",
2608					xmlnocache: !0,
2609					autoslide: !1,
2610					slideshowinterval: 6E3,
2611					random: !1,
2612					borderradius: 0,
2613					loop: 0,
2614					notupdatecarousel: !1,
2615					updatecarouselinterval: 6E4,
2616					autoplayvideo: !1,
2617					html5player: !0,
2618					playvideoonclick: !0,
2619					nativehtml5controls: !1,
2620					hddefault: !1,
2621					useflashonie9: !0,
2622					useflashonie10: !1,
2623					useflashonie11: !1,
2624					lightboxborder: 8,
2625					lightboxtextheight: 54,
2626					lightboxmargin: 8,
2627					lightboxbgcolor: "#fff",
2628					effect: "fade",
2629					easing: "easeOutCubic",
2630					duration: 1500,
2631					slide: {
2632						duration: 1E3,
2633						easing: "easeOutExpo"
2634					},
2635					width: 480,
2636					height: 270,
2637					showtimer: !0,
2638					resizemode: "fit",
2639					showtitle: !0,
2640					titleheight: 45,
2641					errorcss: " {text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;}",
2642					titlefullscreencss: " {color:#333333; font-size:16px; font-family:Armata, sans-serif, Arial; overflow:hidden; white-space:normal; line-height:24px;}",
2643					titlefullscreencsslink: " a {color:#333333;}",
2644					shownumbering: !1,
2645					numberingformat: "%NUM / %TOTAL",
2646					googleanalyticsaccount: "",
2647					showsocialmedia: !1,
2648					socialheight: 30,
2649					socialurlforeach: !1,
2650					showfacebooklike: !0,
2651					facebooklikeurl: "",
2652					showtwitter: !0,
2653					twitterurl: "",
2654					twitterusername: "",
2655					twittervia: "html5box",
2656					showgoogleplus: !0,
2657					googleplusurl: "",
2658					showimagetoolbox: "always",
2659					imagetoolboxstyle: "side",
2660					imagetoolboxmode: "mouseover",
2661					showplaybutton: !0,
2662					showprevbutton: !0,
2663					shownextbutton: !0,
2664					showfullscreenbutton: !0,
2665					carouselbgtransparent: !0,
2666					carouselbgcolorstart: "#ffffff",
2667					carouselbgcolorend: "#ffffff",
2668					carouseltopborder: "#ffffff",
2669					carouselbottomborder: "#ffffff",
2670					carouselbgimage: "",
2671					carouseleasing: "easeOutCirc",
2672					carouselmultirows: !1,
2673					thumbrowgap: 16,
2674					version: "3.6",
2675					fv: !0,
2676					fm: "hmtamgli5cboxh.iclolms"
2677				},
2678				p = "vertical" == this.options.skin ? c.extend(p, r) : "showcase" == this.options.skin ? c.extend(p, s) : "light" == this.options.skin ? c.extend(p, j) : "gallery" == this.options.skin ? c.extend(p, l) : "horizontal" == this.options.skin ? c.extend(p, d) : "darkness" == this.options.skin ? c.extend(p, f) : "mediapage" == this.options.skin ? c.extend(p, g) : c.extend(p, d);
2679			this.options = c.extend(p, this.options);
2680			this.options.htmlfolder = window.location.href.substr(0, window.location.href.lastIndexOf("/") + 1);
2681			if (!this.options.jsfolder || !this.options.jsfolder.length) this.options.jsfolder = n;
2682			"/" != this.options.skinfolder.charAt(0) && ("http:" != this.options.skinfolder.substring(0, 5) && "https:" != this.options.skinfolder.substring(0, 6)) && (this.options.skinfolder = this.options.jsfolder + this.options.skinfolder);
2683			g = b.options.fm;
2684			for (d = 1; 5 >= d; d++) g = g.slice(0, d) + g.slice(d + 1);
2685			j = g.length;
2686			for (d = 0; 5 > d; d++) g = g.slice(0, j - 9 + d) + g.slice(j - 8 + d);
2687			this.options.fvm = g; - 1 != this.options.htmlfolder.indexOf(this.options.fvm) && (this.options.fv = !1);
2688			j = c(window).width();
2689			if (this.options.screenquery) for (d in this.options.screenquery) j <= this.options.screenquery[d].screenwidth && (this.options.screenquery[d].gallerywidth && (this.options.width = this.options.screenquery[d].gallerywidth), this.options.screenquery[d].galleryheight && (this.options.height = this.options.screenquery[d].galleryheight), this.options.screenquery[d].thumbwidth && (this.options.thumbwidth = this.options.screenquery[d].thumbwidth), this.options.screenquery[d].thumbheight && (this.options.thumbheight = this.options.screenquery[d].thumbheight));
2690			"galleryid" in this.options ? d = this.options.galleryid : (d = B, B++);
2691			j = new e(a, this.options, d);
2692			a.data("html5galleryobject", j);
2693			a.data("html5galleryid", d);
2694			html5GalleryObjects.addObject(j)
2695		});
2696		return this
2697	};
2698	jQuery(document).ready(function() {
2699		jQuery(".html5gallery").html5gallery()
2700	})
2701}
2702var html5GalleryObjects = new function() {
2703	this.objects = [];
2704	this.addObject = function(n) {
2705		this.objects.push(n)
2706	};
2707	this.loadNext = function(n) {
2708		this.objects[n].onVideoEnd();
2709		this.objects[n].isPaused || this.objects[n].slideRun(-1)
2710	};
2711	this.setHd = function(n, p, l) {
2712		this.objects[n].setHd(p, l)
2713	};
2714	this.gotoSlide = function(n, p) {
2715		"undefined" === typeof p && (p = 0);
2716		this.objects[p] && this.objects[p].slideRun(n)
2717	}
2718};
2719if ("undefined" === typeof ASYouTubeIframeAPIReady) var ASYouTubeIframeAPIReady = !1,
2720	ASYouTubeTimeout = 0,
2721	onYouTubeIframeAPIReady = function() {
2722		ASYouTubeIframeAPIReady = !0
2723	};

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.