· 6 years ago · Feb 05, 2020, 06:58 PM
1/*
2++++++++++++++++++++++++++++++++++++++++++++++++++++++
3AUTHOR : NCode.Art
4PROJECT : NC-Hold Coming-Soon Page
5VERSION : 2.0
6++++++++++++++++++++++++++++++++++++++++++++++++++++++
7*/
8
9/*++++++++++++++++++++++++++++++++++++++++++++++++++++
10SCRIPT LIST
11
121> css_browser_selector.js
132> matchMedia.js
143> enquire.min.js
154> modernizr.js
165> owl.carousel.min.js
176> jquery.lwtCountdown-1.0.js
187> notifyMe.js
198> jquery.magnific-popup.min.js
209> jquery.mCustomScrollbar.concat.min.js
21++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
22
23
24/*++++++++++++++++++++++++++++++++++++++++++++++++++++
25 css_browser_selector.js
26++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
27/*
28 CSS Browser Selector js v0.5.3 (July 2, 2013)
29
30 -- original --
31 Rafael Lima (http://rafael.adm.br)
32 http://rafael.adm.br/css_browser_selector
33 License: http://choosealicense.com/licenses/mit/
34 Contributors: http://rafael.adm.br/css_browser_selector#contributors
35 -- /original --
36
37 Fork project: http://code.google.com/p/css-browser-selector/
38 Song Hyo-Jin (shj at xenosi.de)
39 */
40function css_browser_selector(e) {
41 var r = e.toLowerCase(),
42 i = function(e) {
43 return r.indexOf(e) > -1
44 },
45 t = "gecko",
46 o = "webkit",
47 a = "safari",
48 n = "chrome",
49 s = "opera",
50 d = "mobile",
51 c = 0,
52 l = window.devicePixelRatio ? (window.devicePixelRatio + "").replace(".", "_") : "1",
53 w = [!/opera|webtv/.test(r) && /msie\s(\d+)/.test(r) && (c = 1 * RegExp.$1) ? "ie ie" + c + (6 == c || 7 == c ? " ie67 ie678 ie6789" : 8 == c ? " ie678 ie6789" : 9 == c ? " ie6789 ie9m" : c > 9 ? " ie9m" : "") : /trident\/\d+.*?;\s*rv:(\d+)\.(\d+)\)/.test(r) && (c = [RegExp.$1, RegExp.$2]) ? "ie ie" + c[0] + " ie" + c[0] + "_" + c[1] + " ie9m" : /firefox\/(\d+)\.(\d+)/.test(r) && (re = RegExp) ? t + " ff ff" + re.$1 + " ff" + re.$1 + "_" + re.$2 : i("gecko/") ? t : i(s) ? s + (/version\/(\d+)/.test(r) ? " " + s + RegExp.$1 : /opera(\s|\/)(\d+)/.test(r) ? " " + s + RegExp.$2 : "") : i("konqueror") ? "konqueror" : i("blackberry") ? d + " blackberry" : i(n) || i("crios") ? o + " " + n : i("iron") ? o + " iron" : !i("cpu os") && i("applewebkit/") ? o + " " + a : i("mozilla/") ? t : "", i("android") ? d + " android" : "", i("tablet") ? "tablet" : "", i("j2me") ? d + " j2me" : i("ipad; u; cpu os") ? d + " chrome android tablet" : i("ipad;u;cpu os") ? d + " chromedef android tablet" : i("iphone") ? d + " ios iphone" : i("ipod") ? d + " ios ipod" : i("ipad") ? d + " ios ipad tablet" : i("mac") ? "mac" : i("darwin") ? "mac" : i("webtv") ? "webtv" : i("win") ? "win" + (i("windows nt 6.0") ? " vista" : "") : i("freebsd") ? "freebsd" : i("x11") || i("linux") ? "linux" : "", "1" != l ? " retina ratio" + l : "", "js portrait"].join(" ");
54 return window.jQuery && !window.jQuery.browser && (window.jQuery.browser = c ? {
55 msie: 1,
56 version: c
57 } : {}), w
58}! function(e, r) {
59 var i = css_browser_selector(navigator.userAgent),
60 t = e.documentElement;
61 t.className += " " + i;
62 var o = i.replace(/^\s*|\s*$/g, "").split(/ +/);
63 r.CSSBS = 1;
64 for (var a = 0; a < o.length; a++) r["CSSBS_" + o[a]] = 1;
65 var n = function(r) {
66 return e.documentElement[r] || e.body[r]
67 };
68 r.jQuery && ! function(e) {
69 function i() {
70 if (0 == m) {
71 try {
72 var e = n("clientWidth"),
73 r = n("clientHeight");
74 if (e > r ? u.removeClass(a).addClass(s) : u.removeClass(s).addClass(a), e == b) return;
75 b = e
76 } catch (i) {}
77 m = setTimeout(o, 100)
78 }
79 }
80
81 function o() {
82 try {
83 u.removeClass(p), u.addClass(360 >= b ? d : 640 >= b ? c : 768 >= b ? l : 1024 >= b ? w : "pc")
84 } catch (e) {}
85 m = 0
86 }
87 var a = "portrait",
88 s = "landscape",
89 d = "smartnarrow",
90 c = "smartwide",
91 l = "tabletnarrow",
92 w = "tabletwide",
93 p = d + " " + c + " " + l + " " + w + " pc",
94 u = e(t),
95 m = 0,
96 b = 0;
97 r.CSSBS_ie ? setInterval(i, 1e3) : e(r).on("resize orientationchange", i).trigger("resize"), e(r).load(i)
98 }(r.jQuery)
99}(document, window);
100
101
102/*++++++++++++++++++++++++++++++++++++++++++++++++++++
103 matchMedia.js
104++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
105/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
106
107window.matchMedia || (window.matchMedia = function() {
108 "use strict";
109
110 // For browsers that support matchMedium api such as IE 9 and webkit
111 var styleMedia = (window.styleMedia || window.media);
112
113 // For those that don't support matchMedium
114 if (!styleMedia) {
115 var style = document.createElement('style'),
116 script = document.getElementsByTagName('script')[0],
117 info = null;
118
119 style.type = 'text/css';
120 style.id = 'matchmediajs-test';
121
122 script.parentNode.insertBefore(style, script);
123
124 // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
125 info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;
126
127 styleMedia = {
128 matchMedium: function(media) {
129 var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
130
131 // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
132 if (style.styleSheet) {
133 style.styleSheet.cssText = text;
134 } else {
135 style.textContent = text;
136 }
137
138 // Test if media query is true or false
139 return info.width === '1px';
140 }
141 };
142 }
143
144 return function(media) {
145 return {
146 matches: styleMedia.matchMedium(media || 'all'),
147 media: media || 'all'
148 };
149 };
150}());
151
152
153
154/*++++++++++++++++++++++++++++++++++++++++++++++++++++
155 enquire.min.js
156++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
157/*!
158 * enquire.js v2.1.2 - Awesome Media Queries in JavaScript
159 * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/enquire.js
160 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
161 */
162
163! function(a, b, c) {
164 var d = window.matchMedia;
165 "undefined" != typeof module && module.exports ? module.exports = c(d) : "function" == typeof define && define.amd ? define(function() {
166 return b[a] = c(d)
167 }) : b[a] = c(d)
168}("enquire", this, function(a) {
169 "use strict";
170
171 function b(a, b) {
172 var c, d = 0,
173 e = a.length;
174 for (d; e > d && (c = b(a[d], d), c !== !1); d++);
175 }
176
177 function c(a) {
178 return "[object Array]" === Object.prototype.toString.apply(a)
179 }
180
181 function d(a) {
182 return "function" == typeof a
183 }
184
185 function e(a) {
186 this.options = a, !a.deferSetup && this.setup()
187 }
188
189 function f(b, c) {
190 this.query = b, this.isUnconditional = c, this.handlers = [], this.mql = a(b);
191 var d = this;
192 this.listener = function(a) {
193 d.mql = a, d.assess()
194 }, this.mql.addListener(this.listener)
195 }
196
197 function g() {
198 if (!a) throw new Error("matchMedia not present, legacy browsers require a polyfill");
199 this.queries = {}, this.browserIsIncapable = !a("only all").matches
200 }
201 return e.prototype = {
202 setup: function() {
203 this.options.setup && this.options.setup(), this.initialised = !0
204 },
205 on: function() {
206 !this.initialised && this.setup(), this.options.match && this.options.match()
207 },
208 off: function() {
209 this.options.unmatch && this.options.unmatch()
210 },
211 destroy: function() {
212 this.options.destroy ? this.options.destroy() : this.off()
213 },
214 equals: function(a) {
215 return this.options === a || this.options.match === a
216 }
217 }, f.prototype = {
218 addHandler: function(a) {
219 var b = new e(a);
220 this.handlers.push(b), this.matches() && b.on()
221 },
222 removeHandler: function(a) {
223 var c = this.handlers;
224 b(c, function(b, d) {
225 return b.equals(a) ? (b.destroy(), !c.splice(d, 1)) : void 0
226 })
227 },
228 matches: function() {
229 return this.mql.matches || this.isUnconditional
230 },
231 clear: function() {
232 b(this.handlers, function(a) {
233 a.destroy()
234 }), this.mql.removeListener(this.listener), this.handlers.length = 0
235 },
236 assess: function() {
237 var a = this.matches() ? "on" : "off";
238 b(this.handlers, function(b) {
239 b[a]()
240 })
241 }
242 }, g.prototype = {
243 register: function(a, e, g) {
244 var h = this.queries,
245 i = g && this.browserIsIncapable;
246 return h[a] || (h[a] = new f(a, i)), d(e) && (e = {
247 match: e
248 }), c(e) || (e = [e]), b(e, function(b) {
249 d(b) && (b = {
250 match: b
251 }), h[a].addHandler(b)
252 }), this
253 },
254 unregister: function(a, b) {
255 var c = this.queries[a];
256 return c && (b ? c.removeHandler(b) : (c.clear(), delete this.queries[a])), this
257 }
258 }, new g
259});
260
261
262
263
264/*++++++++++++++++++++++++++++++++++++++++++++++++++++
265 modernizr.js
266++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
267/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
268 * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
269 */
270;
271window.Modernizr = function(a, b, c) {
272 function C(a) {
273 j.cssText = a
274 }
275
276 function D(a, b) {
277 return C(n.join(a + ";") + (b || ""))
278 }
279
280 function E(a, b) {
281 return typeof a === b
282 }
283
284 function F(a, b) {
285 return !!~("" + a).indexOf(b)
286 }
287
288 function G(a, b) {
289 for (var d in a) {
290 var e = a[d];
291 if (!F(e, "-") && j[e] !== c) return b == "pfx" ? e : !0
292 }
293 return !1
294 }
295
296 function H(a, b, d) {
297 for (var e in a) {
298 var f = b[a[e]];
299 if (f !== c) return d === !1 ? a[e] : E(f, "function") ? f.bind(d || b) : f
300 }
301 return !1
302 }
303
304 function I(a, b, c) {
305 var d = a.charAt(0).toUpperCase() + a.slice(1),
306 e = (a + " " + p.join(d + " ") + d).split(" ");
307 return E(b, "string") || E(b, "undefined") ? G(e, b) : (e = (a + " " + q.join(d + " ") + d).split(" "), H(e, b, c))
308 }
309
310 function J() {
311 e.input = function(c) {
312 for (var d = 0, e = c.length; d < e; d++) u[c[d]] = c[d] in k;
313 return u.list && (u.list = !!b.createElement("datalist") && !!a.HTMLDataListElement), u
314 }("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")), e.inputtypes = function(a) {
315 for (var d = 0, e, f, h, i = a.length; d < i; d++) k.setAttribute("type", f = a[d]), e = k.type !== "text", e && (k.value = l, k.style.cssText = "position:absolute;visibility:hidden;", /^range$/.test(f) && k.style.WebkitAppearance !== c ? (g.appendChild(k), h = b.defaultView, e = h.getComputedStyle && h.getComputedStyle(k, null).WebkitAppearance !== "textfield" && k.offsetHeight !== 0, g.removeChild(k)) : /^(search|tel)$/.test(f) || (/^(url|email)$/.test(f) ? e = k.checkValidity && k.checkValidity() === !1 : e = k.value != l)), t[a[d]] = !!e;
316 return t
317 }("search tel url email datetime date month week time datetime-local number range color".split(" "))
318 }
319 var d = "2.8.3",
320 e = {},
321 f = !0,
322 g = b.documentElement,
323 h = "modernizr",
324 i = b.createElement(h),
325 j = i.style,
326 k = b.createElement("input"),
327 l = ":)",
328 m = {}.toString,
329 n = " -webkit- -moz- -o- -ms- ".split(" "),
330 o = "Webkit Moz O ms",
331 p = o.split(" "),
332 q = o.toLowerCase().split(" "),
333 r = {
334 svg: "http://www.w3.org/2000/svg"
335 },
336 s = {},
337 t = {},
338 u = {},
339 v = [],
340 w = v.slice,
341 x, y = function(a, c, d, e) {
342 var f, i, j, k, l = b.createElement("div"),
343 m = b.body,
344 n = m || b.createElement("body");
345 if (parseInt(d, 10))
346 while (d--) j = b.createElement("div"), j.id = e ? e[d] : h + (d + 1), l.appendChild(j);
347 return f = ["­", '<style id="s', h, '">', a, "</style>"].join(""), l.id = h, (m ? l : n).innerHTML += f, n.appendChild(l), m || (n.style.background = "", n.style.overflow = "hidden", k = g.style.overflow, g.style.overflow = "hidden", g.appendChild(n)), i = c(l, a), m ? l.parentNode.removeChild(l) : (n.parentNode.removeChild(n), g.style.overflow = k), !!i
348 },
349 z = function() {
350 function d(d, e) {
351 e = e || b.createElement(a[d] || "div"), d = "on" + d;
352 var f = d in e;
353 return f || (e.setAttribute || (e = b.createElement("div")), e.setAttribute && e.removeAttribute && (e.setAttribute(d, ""), f = E(e[d], "function"), E(e[d], "undefined") || (e[d] = c), e.removeAttribute(d))), e = null, f
354 }
355 var a = {
356 select: "input",
357 change: "input",
358 submit: "form",
359 reset: "form",
360 error: "img",
361 load: "img",
362 abort: "img"
363 };
364 return d
365 }(),
366 A = {}.hasOwnProperty,
367 B;
368 !E(A, "undefined") && !E(A.call, "undefined") ? B = function(a, b) {
369 return A.call(a, b)
370 } : B = function(a, b) {
371 return b in a && E(a.constructor.prototype[b], "undefined")
372 }, Function.prototype.bind || (Function.prototype.bind = function(b) {
373 var c = this;
374 if (typeof c != "function") throw new TypeError;
375 var d = w.call(arguments, 1),
376 e = function() {
377 if (this instanceof e) {
378 var a = function() {};
379 a.prototype = c.prototype;
380 var f = new a,
381 g = c.apply(f, d.concat(w.call(arguments)));
382 return Object(g) === g ? g : f
383 }
384 return c.apply(b, d.concat(w.call(arguments)))
385 };
386 return e
387 }), s.flexbox = function() {
388 return I("flexWrap")
389 }, s.canvas = function() {
390 var a = b.createElement("canvas");
391 return !!a.getContext && !!a.getContext("2d")
392 }, s.canvastext = function() {
393 return !!e.canvas && !!E(b.createElement("canvas").getContext("2d").fillText, "function")
394 }, s.webgl = function() {
395 return !!a.WebGLRenderingContext
396 }, s.touch = function() {
397 var c;
398 return "ontouchstart" in a || a.DocumentTouch && b instanceof DocumentTouch ? c = !0 : y(["@media (", n.join("touch-enabled),("), h, ")", "{#modernizr{top:9px;position:absolute}}"].join(""), function(a) {
399 c = a.offsetTop === 9
400 }), c
401 }, s.geolocation = function() {
402 return "geolocation" in navigator
403 }, s.postmessage = function() {
404 return !!a.postMessage
405 }, s.websqldatabase = function() {
406 return !!a.openDatabase
407 }, s.indexedDB = function() {
408 return !!I("indexedDB", a)
409 }, s.hashchange = function() {
410 return z("hashchange", a) && (b.documentMode === c || b.documentMode > 7)
411 }, s.history = function() {
412 return !!a.history && !!history.pushState
413 }, s.draganddrop = function() {
414 var a = b.createElement("div");
415 return "draggable" in a || "ondragstart" in a && "ondrop" in a
416 }, s.websockets = function() {
417 return "WebSocket" in a || "MozWebSocket" in a
418 }, s.rgba = function() {
419 return C("background-color:rgba(150,255,150,.5)"), F(j.backgroundColor, "rgba")
420 }, s.hsla = function() {
421 return C("background-color:hsla(120,40%,100%,.5)"), F(j.backgroundColor, "rgba") || F(j.backgroundColor, "hsla")
422 }, s.multiplebgs = function() {
423 return C("background:url(https://),url(https://),red url(https://)"), /(url\s*\(.*?){3}/.test(j.background)
424 }, s.backgroundsize = function() {
425 return I("backgroundSize")
426 }, s.borderimage = function() {
427 return I("borderImage")
428 }, s.borderradius = function() {
429 return I("borderRadius")
430 }, s.boxshadow = function() {
431 return I("boxShadow")
432 }, s.textshadow = function() {
433 return b.createElement("div").style.textShadow === ""
434 }, s.opacity = function() {
435 return D("opacity:.55"), /^0.55$/.test(j.opacity)
436 }, s.cssanimations = function() {
437 return I("animationName")
438 }, s.csscolumns = function() {
439 return I("columnCount")
440 }, s.cssgradients = function() {
441 var a = "background-image:",
442 b = "gradient(linear,left top,right bottom,from(#9f9),to(white));",
443 c = "linear-gradient(left top,#9f9, white);";
444 return C((a + "-webkit- ".split(" ").join(b + a) + n.join(c + a)).slice(0, -a.length)), F(j.backgroundImage, "gradient")
445 }, s.cssreflections = function() {
446 return I("boxReflect")
447 }, s.csstransforms = function() {
448 return !!I("transform")
449 }, s.csstransforms3d = function() {
450 var a = !!I("perspective");
451 return a && "webkitPerspective" in g.style && y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}", function(b, c) {
452 a = b.offsetLeft === 9 && b.offsetHeight === 3
453 }), a
454 }, s.csstransitions = function() {
455 return I("transition")
456 }, s.fontface = function() {
457 var a;
458 return y('@font-face {font-family:"font";src:url("https://")}', function(c, d) {
459 var e = b.getElementById("smodernizr"),
460 f = e.sheet || e.styleSheet,
461 g = f ? f.cssRules && f.cssRules[0] ? f.cssRules[0].cssText : f.cssText || "" : "";
462 a = /src/i.test(g) && g.indexOf(d.split(" ")[0]) === 0
463 }), a
464 }, s.generatedcontent = function() {
465 var a;
466 return y(["#", h, "{font:0/0 a}#", h, ':after{content:"', l, '";visibility:hidden;font:3px/1 a}'].join(""), function(b) {
467 a = b.offsetHeight >= 3
468 }), a
469 }, s.video = function() {
470 var a = b.createElement("video"),
471 c = !1;
472 try {
473 if (c = !!a.canPlayType) c = new Boolean(c), c.ogg = a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, ""), c.h264 = a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ""), c.webm = a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, "")
474 } catch (d) {}
475 return c
476 }, s.audio = function() {
477 var a = b.createElement("audio"),
478 c = !1;
479 try {
480 if (c = !!a.canPlayType) c = new Boolean(c), c.ogg = a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), c.mp3 = a.canPlayType("audio/mpeg;").replace(/^no$/, ""), c.wav = a.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""), c.m4a = (a.canPlayType("audio/x-m4a;") || a.canPlayType("audio/aac;")).replace(/^no$/, "")
481 } catch (d) {}
482 return c
483 }, s.localstorage = function() {
484 try {
485 return localStorage.setItem(h, h), localStorage.removeItem(h), !0
486 } catch (a) {
487 return !1
488 }
489 }, s.sessionstorage = function() {
490 try {
491 return sessionStorage.setItem(h, h), sessionStorage.removeItem(h), !0
492 } catch (a) {
493 return !1
494 }
495 }, s.webworkers = function() {
496 return !!a.Worker
497 }, s.applicationcache = function() {
498 return !!a.applicationCache
499 }, s.svg = function() {
500 return !!b.createElementNS && !!b.createElementNS(r.svg, "svg").createSVGRect
501 }, s.inlinesvg = function() {
502 var a = b.createElement("div");
503 return a.innerHTML = "<svg/>", (a.firstChild && a.firstChild.namespaceURI) == r.svg
504 }, s.smil = function() {
505 return !!b.createElementNS && /SVGAnimate/.test(m.call(b.createElementNS(r.svg, "animate")))
506 }, s.svgclippaths = function() {
507 return !!b.createElementNS && /SVGClipPath/.test(m.call(b.createElementNS(r.svg, "clipPath")))
508 };
509 for (var K in s) B(s, K) && (x = K.toLowerCase(), e[x] = s[K](), v.push((e[x] ? "" : "no-") + x));
510 return e.input || J(), e.addTest = function(a, b) {
511 if (typeof a == "object")
512 for (var d in a) B(a, d) && e.addTest(d, a[d]);
513 else {
514 a = a.toLowerCase();
515 if (e[a] !== c) return e;
516 b = typeof b == "function" ? b() : b, typeof f != "undefined" && f && (g.className += " " + (b ? "" : "no-") + a), e[a] = b
517 }
518 return e
519 }, C(""), i = k = null,
520 function(a, b) {
521 function l(a, b) {
522 var c = a.createElement("p"),
523 d = a.getElementsByTagName("head")[0] || a.documentElement;
524 return c.innerHTML = "x<style>" + b + "</style>", d.insertBefore(c.lastChild, d.firstChild)
525 }
526
527 function m() {
528 var a = s.elements;
529 return typeof a == "string" ? a.split(" ") : a
530 }
531
532 function n(a) {
533 var b = j[a[h]];
534 return b || (b = {}, i++, a[h] = i, j[i] = b), b
535 }
536
537 function o(a, c, d) {
538 c || (c = b);
539 if (k) return c.createElement(a);
540 d || (d = n(c));
541 var g;
542 return d.cache[a] ? g = d.cache[a].cloneNode() : f.test(a) ? g = (d.cache[a] = d.createElem(a)).cloneNode() : g = d.createElem(a), g.canHaveChildren && !e.test(a) && !g.tagUrn ? d.frag.appendChild(g) : g
543 }
544
545 function p(a, c) {
546 a || (a = b);
547 if (k) return a.createDocumentFragment();
548 c = c || n(a);
549 var d = c.frag.cloneNode(),
550 e = 0,
551 f = m(),
552 g = f.length;
553 for (; e < g; e++) d.createElement(f[e]);
554 return d
555 }
556
557 function q(a, b) {
558 b.cache || (b.cache = {}, b.createElem = a.createElement, b.createFrag = a.createDocumentFragment, b.frag = b.createFrag()), a.createElement = function(c) {
559 return s.shivMethods ? o(c, a, b) : b.createElem(c)
560 }, a.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + m().join().replace(/[\w\-]+/g, function(a) {
561 return b.createElem(a), b.frag.createElement(a), 'c("' + a + '")'
562 }) + ");return n}")(s, b.frag)
563 }
564
565 function r(a) {
566 a || (a = b);
567 var c = n(a);
568 return s.shivCSS && !g && !c.hasCSS && (c.hasCSS = !!l(a, "article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")), k || q(a, c), a
569 }
570 var c = "3.7.0",
571 d = a.html5 || {},
572 e = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
573 f = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,
574 g, h = "_html5shiv",
575 i = 0,
576 j = {},
577 k;
578 (function() {
579 try {
580 var a = b.createElement("a");
581 a.innerHTML = "<xyz></xyz>", g = "hidden" in a, k = a.childNodes.length == 1 || function() {
582 b.createElement("a");
583 var a = b.createDocumentFragment();
584 return typeof a.cloneNode == "undefined" || typeof a.createDocumentFragment == "undefined" || typeof a.createElement == "undefined"
585 }()
586 } catch (c) {
587 g = !0, k = !0
588 }
589 })();
590 var s = {
591 elements: d.elements || "abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",
592 version: c,
593 shivCSS: d.shivCSS !== !1,
594 supportsUnknownElements: k,
595 shivMethods: d.shivMethods !== !1,
596 type: "default",
597 shivDocument: r,
598 createElement: o,
599 createDocumentFragment: p
600 };
601 a.html5 = s, r(b)
602 }(this, b), e._version = d, e._prefixes = n, e._domPrefixes = q, e._cssomPrefixes = p, e.hasEvent = z, e.testProp = function(a) {
603 return G([a])
604 }, e.testAllProps = I, e.testStyles = y, e.prefixed = function(a, b, c) {
605 return b ? I(a, b, c) : I(a, "pfx")
606 }, g.className = g.className.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (f ? " js " + v.join(" ") : ""), e
607 }(this, this.document),
608 function(a, b, c) {
609 function d(a) {
610 return "[object Function]" == o.call(a)
611 }
612
613 function e(a) {
614 return "string" == typeof a
615 }
616
617 function f() {}
618
619 function g(a) {
620 return !a || "loaded" == a || "complete" == a || "uninitialized" == a
621 }
622
623 function h() {
624 var a = p.shift();
625 q = 1, a ? a.t ? m(function() {
626 ("c" == a.t ? B.injectCss : B.injectJs)(a.s, 0, a.a, a.x, a.e, 1)
627 }, 0) : (a(), h()) : q = 0
628 }
629
630 function i(a, c, d, e, f, i, j) {
631 function k(b) {
632 if (!o && g(l.readyState) && (u.r = o = 1, !q && h(), l.onload = l.onreadystatechange = null, b)) {
633 "img" != a && m(function() {
634 t.removeChild(l)
635 }, 50);
636 for (var d in y[c]) y[c].hasOwnProperty(d) && y[c][d].onload()
637 }
638 }
639 var j = j || B.errorTimeout,
640 l = b.createElement(a),
641 o = 0,
642 r = 0,
643 u = {
644 t: d,
645 s: c,
646 e: f,
647 a: i,
648 x: j
649 };
650 1 === y[c] && (r = 1, y[c] = []), "object" == a ? l.data = c : (l.src = c, l.type = a), l.width = l.height = "0", l.onerror = l.onload = l.onreadystatechange = function() {
651 k.call(this, r)
652 }, p.splice(e, 0, u), "img" != a && (r || 2 === y[c] ? (t.insertBefore(l, s ? null : n), m(k, j)) : y[c].push(l))
653 }
654
655 function j(a, b, c, d, f) {
656 return q = 0, b = b || "j", e(a) ? i("c" == b ? v : u, a, b, this.i++, c, d, f) : (p.splice(this.i++, 0, a), 1 == p.length && h()), this
657 }
658
659 function k() {
660 var a = B;
661 return a.loader = {
662 load: j,
663 i: 0
664 }, a
665 }
666 var l = b.documentElement,
667 m = a.setTimeout,
668 n = b.getElementsByTagName("script")[0],
669 o = {}.toString,
670 p = [],
671 q = 0,
672 r = "MozAppearance" in l.style,
673 s = r && !!b.createRange().compareNode,
674 t = s ? l : n.parentNode,
675 l = a.opera && "[object Opera]" == o.call(a.opera),
676 l = !!b.attachEvent && !l,
677 u = r ? "object" : l ? "script" : "img",
678 v = l ? "script" : u,
679 w = Array.isArray || function(a) {
680 return "[object Array]" == o.call(a)
681 },
682 x = [],
683 y = {},
684 z = {
685 timeout: function(a, b) {
686 return b.length && (a.timeout = b[0]), a
687 }
688 },
689 A, B;
690 B = function(a) {
691 function b(a) {
692 var a = a.split("!"),
693 b = x.length,
694 c = a.pop(),
695 d = a.length,
696 c = {
697 url: c,
698 origUrl: c,
699 prefixes: a
700 },
701 e, f, g;
702 for (f = 0; f < d; f++) g = a[f].split("="), (e = z[g.shift()]) && (c = e(c, g));
703 for (f = 0; f < b; f++) c = x[f](c);
704 return c
705 }
706
707 function g(a, e, f, g, h) {
708 var i = b(a),
709 j = i.autoCallback;
710 i.url.split(".").pop().split("?").shift(), i.bypass || (e && (e = d(e) ? e : e[a] || e[g] || e[a.split("/").pop().split("?")[0]]), i.instead ? i.instead(a, e, f, g, h) : (y[i.url] ? i.noexec = !0 : y[i.url] = 1, f.load(i.url, i.forceCSS || !i.forceJS && "css" == i.url.split(".").pop().split("?").shift() ? "c" : c, i.noexec, i.attrs, i.timeout), (d(e) || d(j)) && f.load(function() {
711 k(), e && e(i.origUrl, h, g), j && j(i.origUrl, h, g), y[i.url] = 2
712 })))
713 }
714
715 function h(a, b) {
716 function c(a, c) {
717 if (a) {
718 if (e(a)) c || (j = function() {
719 var a = [].slice.call(arguments);
720 k.apply(this, a), l()
721 }), g(a, j, b, 0, h);
722 else if (Object(a) === a)
723 for (n in m = function() {
724 var b = 0,
725 c;
726 for (c in a) a.hasOwnProperty(c) && b++;
727 return b
728 }(), a) a.hasOwnProperty(n) && (!c && !--m && (d(j) ? j = function() {
729 var a = [].slice.call(arguments);
730 k.apply(this, a), l()
731 } : j[n] = function(a) {
732 return function() {
733 var b = [].slice.call(arguments);
734 a && a.apply(this, b), l()
735 }
736 }(k[n])), g(a[n], j, b, n, h))
737 } else !c && l()
738 }
739 var h = !!a.test,
740 i = a.load || a.both,
741 j = a.callback || f,
742 k = j,
743 l = a.complete || f,
744 m, n;
745 c(h ? a.yep : a.nope, !!i), i && c(i)
746 }
747 var i, j, l = this.yepnope.loader;
748 if (e(a)) g(a, 0, l, 0);
749 else if (w(a))
750 for (i = 0; i < a.length; i++) j = a[i], e(j) ? g(j, 0, l, 0) : w(j) ? B(j) : Object(j) === j && h(j, l);
751 else Object(a) === a && h(a, l)
752 }, B.addPrefix = function(a, b) {
753 z[a] = b
754 }, B.addFilter = function(a) {
755 x.push(a)
756 }, B.errorTimeout = 1e4, null == b.readyState && b.addEventListener && (b.readyState = "loading", b.addEventListener("DOMContentLoaded", A = function() {
757 b.removeEventListener("DOMContentLoaded", A, 0), b.readyState = "complete"
758 }, 0)), a.yepnope = k(), a.yepnope.executeStack = h, a.yepnope.injectJs = function(a, c, d, e, i, j) {
759 var k = b.createElement("script"),
760 l, o, e = e || B.errorTimeout;
761 k.src = a;
762 for (o in d) k.setAttribute(o, d[o]);
763 c = j ? h : c || f, k.onreadystatechange = k.onload = function() {
764 !l && g(k.readyState) && (l = 1, c(), k.onload = k.onreadystatechange = null)
765 }, m(function() {
766 l || (l = 1, c(1))
767 }, e), i ? k.onload() : n.parentNode.insertBefore(k, n)
768 }, a.yepnope.injectCss = function(a, c, d, e, g, i) {
769 var e = b.createElement("link"),
770 j, c = i ? h : c || f;
771 e.href = a, e.rel = "stylesheet", e.type = "text/css";
772 for (j in d) e.setAttribute(j, d[j]);
773 g || (n.parentNode.insertBefore(e, n), m(c, 0))
774 }
775 }(this, document), Modernizr.load = function() {
776 yepnope.apply(window, [].slice.call(arguments, 0))
777 };
778
779
780
781/*++++++++++++++++++++++++++++++++++++++++++++++++++++
782 owl.carousel.min.js
783++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
784! function(a, b, c, d) {
785 function e(b, c) {
786 this.settings = null, this.options = a.extend({}, e.Defaults, c), this.$element = a(b), this.drag = a.extend({}, m), this.state = a.extend({}, n), this.e = a.extend({}, o), this._plugins = {}, this._supress = {}, this._current = null, this._speed = null, this._coordinates = [], this._breakpoint = null, this._width = null, this._items = [], this._clones = [], this._mergers = [], this._invalidated = {}, this._pipe = [], a.each(e.Plugins, a.proxy(function(a, b) {
787 this._plugins[a[0].toLowerCase() + a.slice(1)] = new b(this)
788 }, this)), a.each(e.Pipe, a.proxy(function(b, c) {
789 this._pipe.push({
790 filter: c.filter,
791 run: a.proxy(c.run, this)
792 })
793 }, this)), this.setup(), this.initialize()
794 }
795
796 function f(a) {
797 if (a.touches !== d) return {
798 x: a.touches[0].pageX,
799 y: a.touches[0].pageY
800 };
801 if (a.touches === d) {
802 if (a.pageX !== d) return {
803 x: a.pageX,
804 y: a.pageY
805 };
806 if (a.pageX === d) return {
807 x: a.clientX,
808 y: a.clientY
809 }
810 }
811 }
812
813 function g(a) {
814 var b, d, e = c.createElement("div"),
815 f = a;
816 for (b in f)
817 if (d = f[b], "undefined" != typeof e.style[d]) return e = null, [d, b];
818 return [!1]
819 }
820
821 function h() {
822 return g(["transition", "WebkitTransition", "MozTransition", "OTransition"])[1]
823 }
824
825 function i() {
826 return g(["transform", "WebkitTransform", "MozTransform", "OTransform", "msTransform"])[0]
827 }
828
829 function j() {
830 return g(["perspective", "webkitPerspective", "MozPerspective", "OPerspective", "MsPerspective"])[0]
831 }
832
833 function k() {
834 return "ontouchstart" in b || !!navigator.msMaxTouchPoints
835 }
836
837 function l() {
838 return b.navigator.msPointerEnabled
839 }
840 var m, n, o;
841 m = {
842 start: 0,
843 startX: 0,
844 startY: 0,
845 current: 0,
846 currentX: 0,
847 currentY: 0,
848 offsetX: 0,
849 offsetY: 0,
850 distance: null,
851 startTime: 0,
852 endTime: 0,
853 updatedX: 0,
854 targetEl: null
855 }, n = {
856 isTouch: !1,
857 isScrolling: !1,
858 isSwiping: !1,
859 direction: !1,
860 inMotion: !1
861 }, o = {
862 _onDragStart: null,
863 _onDragMove: null,
864 _onDragEnd: null,
865 _transitionEnd: null,
866 _resizer: null,
867 _responsiveCall: null,
868 _goToLoop: null,
869 _checkVisibile: null
870 }, e.Defaults = {
871 items: 3,
872 loop: !1,
873 center: !1,
874 mouseDrag: !0,
875 touchDrag: !0,
876 pullDrag: !0,
877 freeDrag: !1,
878 margin: 0,
879 stagePadding: 0,
880 merge: !1,
881 mergeFit: !0,
882 autoWidth: !1,
883 startPosition: 0,
884 rtl: !1,
885 smartSpeed: 250,
886 fluidSpeed: !1,
887 dragEndSpeed: !1,
888 responsive: {},
889 responsiveRefreshRate: 200,
890 responsiveBaseElement: b,
891 responsiveClass: !1,
892 fallbackEasing: "swing",
893 info: !1,
894 nestedItemSelector: !1,
895 itemElement: "div",
896 stageElement: "div",
897 themeClass: "owl-theme",
898 baseClass: "owl-carousel",
899 itemClass: "owl-item",
900 centerClass: "center",
901 activeClass: "active"
902 }, e.Width = {
903 Default: "default",
904 Inner: "inner",
905 Outer: "outer"
906 }, e.Plugins = {}, e.Pipe = [{
907 filter: ["width", "items", "settings"],
908 run: function(a) {
909 a.current = this._items && this._items[this.relative(this._current)]
910 }
911 }, {
912 filter: ["items", "settings"],
913 run: function() {
914 var a = this._clones,
915 b = this.$stage.children(".cloned");
916 (b.length !== a.length || !this.settings.loop && a.length > 0) && (this.$stage.children(".cloned").remove(), this._clones = [])
917 }
918 }, {
919 filter: ["items", "settings"],
920 run: function() {
921 var a, b, c = this._clones,
922 d = this._items,
923 e = this.settings.loop ? c.length - Math.max(2 * this.settings.items, 4) : 0;
924 for (a = 0, b = Math.abs(e / 2); b > a; a++) e > 0 ? (this.$stage.children().eq(d.length + c.length - 1).remove(), c.pop(), this.$stage.children().eq(0).remove(), c.pop()) : (c.push(c.length / 2), this.$stage.append(d[c[c.length - 1]].clone().addClass("cloned")), c.push(d.length - 1 - (c.length - 1) / 2), this.$stage.prepend(d[c[c.length - 1]].clone().addClass("cloned")))
925 }
926 }, {
927 filter: ["width", "items", "settings"],
928 run: function() {
929 var a, b, c, d = this.settings.rtl ? 1 : -1,
930 e = (this.width() / this.settings.items).toFixed(3),
931 f = 0;
932 for (this._coordinates = [], b = 0, c = this._clones.length + this._items.length; c > b; b++) a = this._mergers[this.relative(b)], a = this.settings.mergeFit && Math.min(a, this.settings.items) || a, f += (this.settings.autoWidth ? this._items[this.relative(b)].width() + this.settings.margin : e * a) * d, this._coordinates.push(f)
933 }
934 }, {
935 filter: ["width", "items", "settings"],
936 run: function() {
937 var b, c, d = (this.width() / this.settings.items).toFixed(3),
938 e = {
939 width: Math.abs(this._coordinates[this._coordinates.length - 1]) + 2 * this.settings.stagePadding,
940 "padding-left": this.settings.stagePadding || "",
941 "padding-right": this.settings.stagePadding || ""
942 };
943 if (this.$stage.css(e), e = {
944 width: this.settings.autoWidth ? "auto" : d - this.settings.margin
945 }, e[this.settings.rtl ? "margin-left" : "margin-right"] = this.settings.margin, !this.settings.autoWidth && a.grep(this._mergers, function(a) {
946 return a > 1
947 }).length > 0)
948 for (b = 0, c = this._coordinates.length; c > b; b++) e.width = Math.abs(this._coordinates[b]) - Math.abs(this._coordinates[b - 1] || 0) - this.settings.margin, this.$stage.children().eq(b).css(e);
949 else this.$stage.children().css(e)
950 }
951 }, {
952 filter: ["width", "items", "settings"],
953 run: function(a) {
954 a.current && this.reset(this.$stage.children().index(a.current))
955 }
956 }, {
957 filter: ["position"],
958 run: function() {
959 this.animate(this.coordinates(this._current))
960 }
961 }, {
962 filter: ["width", "position", "items", "settings"],
963 run: function() {
964 var a, b, c, d, e = this.settings.rtl ? 1 : -1,
965 f = 2 * this.settings.stagePadding,
966 g = this.coordinates(this.current()) + f,
967 h = g + this.width() * e,
968 i = [];
969 for (c = 0, d = this._coordinates.length; d > c; c++) a = this._coordinates[c - 1] || 0, b = Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g) && this.op(a, ">", h) || this.op(b, "<", g) && this.op(b, ">", h)) && i.push(c);
970 this.$stage.children("." + this.settings.activeClass).removeClass(this.settings.activeClass), this.$stage.children(":eq(" + i.join("), :eq(") + ")").addClass(this.settings.activeClass), this.settings.center && (this.$stage.children("." + this.settings.centerClass).removeClass(this.settings.centerClass), this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))
971 }
972 }], e.prototype.initialize = function() {
973 if (this.trigger("initialize"), this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl", this.settings.rtl), this.browserSupport(), this.settings.autoWidth && this.state.imagesLoaded !== !0) {
974 var b, c, e;
975 if (b = this.$element.find("img"), c = this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector : d, e = this.$element.children(c).width(), b.length && 0 >= e) return this.preloadAutoWidthImages(b), !1
976 }
977 this.$element.addClass("owl-loading"), this.$stage = a("<" + this.settings.stageElement + ' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'), this.$element.append(this.$stage.parent()), this.replace(this.$element.children().not(this.$stage.parent())), this._width = this.$element.width(), this.refresh(), this.$element.removeClass("owl-loading").addClass("owl-loaded"), this.eventsCall(), this.internalEvents(), this.addTriggerableEvents(), this.trigger("initialized")
978 }, e.prototype.setup = function() {
979 var b = this.viewport(),
980 c = this.options.responsive,
981 d = -1,
982 e = null;
983 c ? (a.each(c, function(a) {
984 b >= a && a > d && (d = Number(a))
985 }), e = a.extend({}, this.options, c[d]), delete e.responsive, e.responsiveClass && this.$element.attr("class", function(a, b) {
986 return b.replace(/\b owl-responsive-\S+/g, "")
987 }).addClass("owl-responsive-" + d)) : e = a.extend({}, this.options), (null === this.settings || this._breakpoint !== d) && (this.trigger("change", {
988 property: {
989 name: "settings",
990 value: e
991 }
992 }), this._breakpoint = d, this.settings = e, this.invalidate("settings"), this.trigger("changed", {
993 property: {
994 name: "settings",
995 value: this.settings
996 }
997 }))
998 }, e.prototype.optionsLogic = function() {
999 this.$element.toggleClass("owl-center", this.settings.center), this.settings.loop && this._items.length < this.settings.items && (this.settings.loop = !1), this.settings.autoWidth && (this.settings.stagePadding = !1, this.settings.merge = !1)
1000 }, e.prototype.prepare = function(b) {
1001 var c = this.trigger("prepare", {
1002 content: b
1003 });
1004 return c.data || (c.data = a("<" + this.settings.itemElement + "/>").addClass(this.settings.itemClass).append(b)), this.trigger("prepared", {
1005 content: c.data
1006 }), c.data
1007 }, e.prototype.update = function() {
1008 for (var b = 0, c = this._pipe.length, d = a.proxy(function(a) {
1009 return this[a]
1010 }, this._invalidated), e = {}; c > b;)(this._invalidated.all || a.grep(this._pipe[b].filter, d).length > 0) && this._pipe[b].run(e), b++;
1011 this._invalidated = {}
1012 }, e.prototype.width = function(a) {
1013 switch (a = a || e.Width.Default) {
1014 case e.Width.Inner:
1015 case e.Width.Outer:
1016 return this._width;
1017 default:
1018 return this._width - 2 * this.settings.stagePadding + this.settings.margin
1019 }
1020 }, e.prototype.refresh = function() {
1021 if (0 === this._items.length) return !1;
1022 (new Date).getTime();
1023 this.trigger("refresh"), this.setup(), this.optionsLogic(), this.$stage.addClass("owl-refresh"), this.update(), this.$stage.removeClass("owl-refresh"), this.state.orientation = b.orientation, this.watchVisibility(), this.trigger("refreshed")
1024 }, e.prototype.eventsCall = function() {
1025 this.e._onDragStart = a.proxy(function(a) {
1026 this.onDragStart(a)
1027 }, this), this.e._onDragMove = a.proxy(function(a) {
1028 this.onDragMove(a)
1029 }, this), this.e._onDragEnd = a.proxy(function(a) {
1030 this.onDragEnd(a)
1031 }, this), this.e._onResize = a.proxy(function(a) {
1032 this.onResize(a)
1033 }, this), this.e._transitionEnd = a.proxy(function(a) {
1034 this.transitionEnd(a)
1035 }, this), this.e._preventClick = a.proxy(function(a) {
1036 this.preventClick(a)
1037 }, this)
1038 }, e.prototype.onThrottledResize = function() {
1039 b.clearTimeout(this.resizeTimer), this.resizeTimer = b.setTimeout(this.e._onResize, this.settings.responsiveRefreshRate)
1040 }, e.prototype.onResize = function() {
1041 return this._items.length ? this._width === this.$element.width() ? !1 : this.trigger("resize").isDefaultPrevented() ? !1 : (this._width = this.$element.width(), this.invalidate("width"), this.refresh(), void this.trigger("resized")) : !1
1042 }, e.prototype.eventsRouter = function(a) {
1043 var b = a.type;
1044 "mousedown" === b || "touchstart" === b ? this.onDragStart(a) : "mousemove" === b || "touchmove" === b ? this.onDragMove(a) : "mouseup" === b || "touchend" === b ? this.onDragEnd(a) : "touchcancel" === b && this.onDragEnd(a)
1045 }, e.prototype.internalEvents = function() {
1046 var c = (k(), l());
1047 this.settings.mouseDrag ? (this.$stage.on("mousedown", a.proxy(function(a) {
1048 this.eventsRouter(a)
1049 }, this)), this.$stage.on("dragstart", function() {
1050 return !1
1051 }), this.$stage.get(0).onselectstart = function() {
1052 return !1
1053 }) : this.$element.addClass("owl-text-select-on"), this.settings.touchDrag && !c && this.$stage.on("touchstart touchcancel", a.proxy(function(a) {
1054 this.eventsRouter(a)
1055 }, this)), this.transitionEndVendor && this.on(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd, !1), this.settings.responsive !== !1 && this.on(b, "resize", a.proxy(this.onThrottledResize, this))
1056 }, e.prototype.onDragStart = function(d) {
1057 var e, g, h, i;
1058 if (e = d.originalEvent || d || b.event, 3 === e.which || this.state.isTouch) return !1;
1059 if ("mousedown" === e.type && this.$stage.addClass("owl-grab"), this.trigger("drag"), this.drag.startTime = (new Date).getTime(), this.speed(0), this.state.isTouch = !0, this.state.isScrolling = !1, this.state.isSwiping = !1, this.drag.distance = 0, g = f(e).x, h = f(e).y, this.drag.offsetX = this.$stage.position().left, this.drag.offsetY = this.$stage.position().top, this.settings.rtl && (this.drag.offsetX = this.$stage.position().left + this.$stage.width() - this.width() + this.settings.margin), this.state.inMotion && this.support3d) i = this.getTransformProperty(), this.drag.offsetX = i, this.animate(i), this.state.inMotion = !0;
1060 else if (this.state.inMotion && !this.support3d) return this.state.inMotion = !1, !1;
1061 this.drag.startX = g - this.drag.offsetX, this.drag.startY = h - this.drag.offsetY, this.drag.start = g - this.drag.startX, this.drag.targetEl = e.target || e.srcElement, this.drag.updatedX = this.drag.start, ("IMG" === this.drag.targetEl.tagName || "A" === this.drag.targetEl.tagName) && (this.drag.targetEl.draggable = !1), a(c).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents", a.proxy(function(a) {
1062 this.eventsRouter(a)
1063 }, this))
1064 }, e.prototype.onDragMove = function(a) {
1065 var c, e, g, h, i, j;
1066 this.state.isTouch && (this.state.isScrolling || (c = a.originalEvent || a || b.event, e = f(c).x, g = f(c).y, this.drag.currentX = e - this.drag.startX, this.drag.currentY = g - this.drag.startY, this.drag.distance = this.drag.currentX - this.drag.offsetX, this.drag.distance < 0 ? this.state.direction = this.settings.rtl ? "right" : "left" : this.drag.distance > 0 && (this.state.direction = this.settings.rtl ? "left" : "right"), this.settings.loop ? this.op(this.drag.currentX, ">", this.coordinates(this.minimum())) && "right" === this.state.direction ? this.drag.currentX -= (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length) : this.op(this.drag.currentX, "<", this.coordinates(this.maximum())) && "left" === this.state.direction && (this.drag.currentX += (this.settings.center && this.coordinates(0)) - this.coordinates(this._items.length)) : (h = this.coordinates(this.settings.rtl ? this.maximum() : this.minimum()), i = this.coordinates(this.settings.rtl ? this.minimum() : this.maximum()), j = this.settings.pullDrag ? this.drag.distance / 5 : 0, this.drag.currentX = Math.max(Math.min(this.drag.currentX, h + j), i + j)), (this.drag.distance > 8 || this.drag.distance < -8) && (c.preventDefault !== d ? c.preventDefault() : c.returnValue = !1, this.state.isSwiping = !0), this.drag.updatedX = this.drag.currentX, (this.drag.currentY > 16 || this.drag.currentY < -16) && this.state.isSwiping === !1 && (this.state.isScrolling = !0, this.drag.updatedX = this.drag.start), this.animate(this.drag.updatedX)))
1067 }, e.prototype.onDragEnd = function(b) {
1068 var d, e, f;
1069 if (this.state.isTouch) {
1070 if ("mouseup" === b.type && this.$stage.removeClass("owl-grab"), this.trigger("dragged"), this.drag.targetEl.removeAttribute("draggable"), this.state.isTouch = !1, this.state.isScrolling = !1, this.state.isSwiping = !1, 0 === this.drag.distance && this.state.inMotion !== !0) return this.state.inMotion = !1, !1;
1071 this.drag.endTime = (new Date).getTime(), d = this.drag.endTime - this.drag.startTime, e = Math.abs(this.drag.distance), (e > 3 || d > 300) && this.removeClick(this.drag.targetEl), f = this.closest(this.drag.updatedX), this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed), this.current(f), this.invalidate("position"), this.update(), this.settings.pullDrag || this.drag.updatedX !== this.coordinates(f) || this.transitionEnd(), this.drag.distance = 0, a(c).off(".owl.dragEvents")
1072 }
1073 }, e.prototype.removeClick = function(c) {
1074 this.drag.targetEl = c, a(c).on("click.preventClick", this.e._preventClick), b.setTimeout(function() {
1075 a(c).off("click.preventClick")
1076 }, 300)
1077 }, e.prototype.preventClick = function(b) {
1078 b.preventDefault ? b.preventDefault() : b.returnValue = !1, b.stopPropagation && b.stopPropagation(), a(b.target).off("click.preventClick")
1079 }, e.prototype.getTransformProperty = function() {
1080 var a, c;
1081 return a = b.getComputedStyle(this.$stage.get(0), null).getPropertyValue(this.vendorName + "transform"), a = a.replace(/matrix(3d)?\(|\)/g, "").split(","), c = 16 === a.length, c !== !0 ? a[4] : a[12]
1082 }, e.prototype.closest = function(b) {
1083 var c = -1,
1084 d = 30,
1085 e = this.width(),
1086 f = this.coordinates();
1087 return this.settings.freeDrag || a.each(f, a.proxy(function(a, g) {
1088 return b > g - d && g + d > b ? c = a : this.op(b, "<", g) && this.op(b, ">", f[a + 1] || g - e) && (c = "left" === this.state.direction ? a + 1 : a), -1 === c
1089 }, this)), this.settings.loop || (this.op(b, ">", f[this.minimum()]) ? c = b = this.minimum() : this.op(b, "<", f[this.maximum()]) && (c = b = this.maximum())), c
1090 }, e.prototype.animate = function(b) {
1091 this.trigger("translate"), this.state.inMotion = this.speed() > 0, this.support3d ? this.$stage.css({
1092 transform: "translate3d(" + b + "px,0px, 0px)",
1093 transition: this.speed() / 1e3 + "s"
1094 }) : this.state.isTouch ? this.$stage.css({
1095 left: b + "px"
1096 }) : this.$stage.animate({
1097 left: b
1098 }, this.speed() / 1e3, this.settings.fallbackEasing, a.proxy(function() {
1099 this.state.inMotion && this.transitionEnd()
1100 }, this))
1101 }, e.prototype.current = function(a) {
1102 if (a === d) return this._current;
1103 if (0 === this._items.length) return d;
1104 if (a = this.normalize(a), this._current !== a) {
1105 var b = this.trigger("change", {
1106 property: {
1107 name: "position",
1108 value: a
1109 }
1110 });
1111 b.data !== d && (a = this.normalize(b.data)), this._current = a, this.invalidate("position"), this.trigger("changed", {
1112 property: {
1113 name: "position",
1114 value: this._current
1115 }
1116 })
1117 }
1118 return this._current
1119 }, e.prototype.invalidate = function(a) {
1120 this._invalidated[a] = !0
1121 }, e.prototype.reset = function(a) {
1122 a = this.normalize(a), a !== d && (this._speed = 0, this._current = a, this.suppress(["translate", "translated"]), this.animate(this.coordinates(a)), this.release(["translate", "translated"]))
1123 }, e.prototype.normalize = function(b, c) {
1124 var e = c ? this._items.length : this._items.length + this._clones.length;
1125 return !a.isNumeric(b) || 1 > e ? d : b = this._clones.length ? (b % e + e) % e : Math.max(this.minimum(c), Math.min(this.maximum(c), b))
1126 }, e.prototype.relative = function(a) {
1127 return a = this.normalize(a), a -= this._clones.length / 2, this.normalize(a, !0)
1128 }, e.prototype.maximum = function(a) {
1129 var b, c, d, e = 0,
1130 f = this.settings;
1131 if (a) return this._items.length - 1;
1132 if (!f.loop && f.center) b = this._items.length - 1;
1133 else if (f.loop || f.center)
1134 if (f.loop || f.center) b = this._items.length + f.items;
1135 else {
1136 if (!f.autoWidth && !f.merge) throw "Can not detect maximum absolute position.";
1137 for (revert = f.rtl ? 1 : -1, c = this.$stage.width() - this.$element.width();
1138 (d = this.coordinates(e)) && !(d * revert >= c);) b = ++e
1139 }
1140 else b = this._items.length - f.items;
1141 return b
1142 }, e.prototype.minimum = function(a) {
1143 return a ? 0 : this._clones.length / 2
1144 }, e.prototype.items = function(a) {
1145 return a === d ? this._items.slice() : (a = this.normalize(a, !0), this._items[a])
1146 }, e.prototype.mergers = function(a) {
1147 return a === d ? this._mergers.slice() : (a = this.normalize(a, !0), this._mergers[a])
1148 }, e.prototype.clones = function(b) {
1149 var c = this._clones.length / 2,
1150 e = c + this._items.length,
1151 f = function(a) {
1152 return a % 2 === 0 ? e + a / 2 : c - (a + 1) / 2
1153 };
1154 return b === d ? a.map(this._clones, function(a, b) {
1155 return f(b)
1156 }) : a.map(this._clones, function(a, c) {
1157 return a === b ? f(c) : null
1158 })
1159 }, e.prototype.speed = function(a) {
1160 return a !== d && (this._speed = a), this._speed
1161 }, e.prototype.coordinates = function(b) {
1162 var c = null;
1163 return b === d ? a.map(this._coordinates, a.proxy(function(a, b) {
1164 return this.coordinates(b)
1165 }, this)) : (this.settings.center ? (c = this._coordinates[b], c += (this.width() - c + (this._coordinates[b - 1] || 0)) / 2 * (this.settings.rtl ? -1 : 1)) : c = this._coordinates[b - 1] || 0, c)
1166 }, e.prototype.duration = function(a, b, c) {
1167 return Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c || this.settings.smartSpeed)
1168 }, e.prototype.to = function(c, d) {
1169 if (this.settings.loop) {
1170 var e = c - this.relative(this.current()),
1171 f = this.current(),
1172 g = this.current(),
1173 h = this.current() + e,
1174 i = 0 > g - h ? !0 : !1,
1175 j = this._clones.length + this._items.length;
1176 h < this.settings.items && i === !1 ? (f = g + this._items.length, this.reset(f)) : h >= j - this.settings.items && i === !0 && (f = g - this._items.length, this.reset(f)), b.clearTimeout(this.e._goToLoop), this.e._goToLoop = b.setTimeout(a.proxy(function() {
1177 this.speed(this.duration(this.current(), f + e, d)), this.current(f + e), this.update()
1178 }, this), 30)
1179 } else this.speed(this.duration(this.current(), c, d)), this.current(c), this.update()
1180 }, e.prototype.next = function(a) {
1181 a = a || !1, this.to(this.relative(this.current()) + 1, a)
1182 }, e.prototype.prev = function(a) {
1183 a = a || !1, this.to(this.relative(this.current()) - 1, a)
1184 }, e.prototype.transitionEnd = function(a) {
1185 return a !== d && (a.stopPropagation(), (a.target || a.srcElement || a.originalTarget) !== this.$stage.get(0)) ? !1 : (this.state.inMotion = !1, void this.trigger("translated"))
1186 }, e.prototype.viewport = function() {
1187 var d;
1188 if (this.options.responsiveBaseElement !== b) d = a(this.options.responsiveBaseElement).width();
1189 else if (b.innerWidth) d = b.innerWidth;
1190 else {
1191 if (!c.documentElement || !c.documentElement.clientWidth) throw "Can not detect viewport width.";
1192 d = c.documentElement.clientWidth
1193 }
1194 return d
1195 }, e.prototype.replace = function(b) {
1196 this.$stage.empty(), this._items = [], b && (b = b instanceof jQuery ? b : a(b)), this.settings.nestedItemSelector && (b = b.find("." + this.settings.nestedItemSelector)), b.filter(function() {
1197 return 1 === this.nodeType
1198 }).each(a.proxy(function(a, b) {
1199 b = this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push(1 * b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1)
1200 }, this)), this.reset(a.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0), this.invalidate("items")
1201 }, e.prototype.add = function(a, b) {
1202 b = b === d ? this._items.length : this.normalize(b, !0), this.trigger("add", {
1203 content: a,
1204 position: b
1205 }), 0 === this._items.length || b === this._items.length ? (this.$stage.append(a), this._items.push(a), this._mergers.push(1 * a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1)) : (this._items[b].before(a), this._items.splice(b, 0, a), this._mergers.splice(b, 0, 1 * a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1)), this.invalidate("items"), this.trigger("added", {
1206 content: a,
1207 position: b
1208 })
1209 }, e.prototype.remove = function(a) {
1210 a = this.normalize(a, !0), a !== d && (this.trigger("remove", {
1211 content: this._items[a],
1212 position: a
1213 }), this._items[a].remove(), this._items.splice(a, 1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed", {
1214 content: null,
1215 position: a
1216 }))
1217 }, e.prototype.addTriggerableEvents = function() {
1218 var b = a.proxy(function(b, c) {
1219 return a.proxy(function(a) {
1220 a.relatedTarget !== this && (this.suppress([c]), b.apply(this, [].slice.call(arguments, 1)), this.release([c]))
1221 }, this)
1222 }, this);
1223 a.each({
1224 next: this.next,
1225 prev: this.prev,
1226 to: this.to,
1227 destroy: this.destroy,
1228 refresh: this.refresh,
1229 replace: this.replace,
1230 add: this.add,
1231 remove: this.remove
1232 }, a.proxy(function(a, c) {
1233 this.$element.on(a + ".owl.carousel", b(c, a + ".owl.carousel"))
1234 }, this))
1235 }, e.prototype.watchVisibility = function() {
1236 function c(a) {
1237 return a.offsetWidth > 0 && a.offsetHeight > 0
1238 }
1239
1240 function d() {
1241 c(this.$element.get(0)) && (this.$element.removeClass("owl-hidden"), this.refresh(), b.clearInterval(this.e._checkVisibile))
1242 }
1243 c(this.$element.get(0)) || (this.$element.addClass("owl-hidden"), b.clearInterval(this.e._checkVisibile), this.e._checkVisibile = b.setInterval(a.proxy(d, this), 500))
1244 }, e.prototype.preloadAutoWidthImages = function(b) {
1245 var c, d, e, f;
1246 c = 0, d = this, b.each(function(g, h) {
1247 e = a(h), f = new Image, f.onload = function() {
1248 c++, e.attr("src", f.src), e.css("opacity", 1), c >= b.length && (d.state.imagesLoaded = !0, d.initialize())
1249 }, f.src = e.attr("src") || e.attr("data-src") || e.attr("data-src-retina")
1250 })
1251 }, e.prototype.destroy = function() {
1252 this.$element.hasClass(this.settings.themeClass) && this.$element.removeClass(this.settings.themeClass), this.settings.responsive !== !1 && a(b).off("resize.owl.carousel"), this.transitionEndVendor && this.off(this.$stage.get(0), this.transitionEndVendor, this.e._transitionEnd);
1253 for (var d in this._plugins) this._plugins[d].destroy();
1254 (this.settings.mouseDrag || this.settings.touchDrag) && (this.$stage.off("mousedown touchstart touchcancel"), a(c).off(".owl.dragEvents"), this.$stage.get(0).onselectstart = function() {}, this.$stage.off("dragstart", function() {
1255 return !1
1256 })), this.$element.off(".owl"), this.$stage.children(".cloned").remove(), this.e = null, this.$element.removeData("owlCarousel"), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$stage.unwrap()
1257 }, e.prototype.op = function(a, b, c) {
1258 var d = this.settings.rtl;
1259 switch (b) {
1260 case "<":
1261 return d ? a > c : c > a;
1262 case ">":
1263 return d ? c > a : a > c;
1264 case ">=":
1265 return d ? c >= a : a >= c;
1266 case "<=":
1267 return d ? a >= c : c >= a
1268 }
1269 }, e.prototype.on = function(a, b, c, d) {
1270 a.addEventListener ? a.addEventListener(b, c, d) : a.attachEvent && a.attachEvent("on" + b, c)
1271 }, e.prototype.off = function(a, b, c, d) {
1272 a.removeEventListener ? a.removeEventListener(b, c, d) : a.detachEvent && a.detachEvent("on" + b, c)
1273 }, e.prototype.trigger = function(b, c, d) {
1274 var e = {
1275 item: {
1276 count: this._items.length,
1277 index: this.current()
1278 }
1279 },
1280 f = a.camelCase(a.grep(["on", b, d], function(a) {
1281 return a
1282 }).join("-").toLowerCase()),
1283 g = a.Event([b, "owl", d || "carousel"].join(".").toLowerCase(), a.extend({
1284 relatedTarget: this
1285 }, e, c));
1286 return this._supress[b] || (a.each(this._plugins, function(a, b) {
1287 b.onTrigger && b.onTrigger(g)
1288 }), this.$element.trigger(g), this.settings && "function" == typeof this.settings[f] && this.settings[f].apply(this, g)), g
1289 }, e.prototype.suppress = function(b) {
1290 a.each(b, a.proxy(function(a, b) {
1291 this._supress[b] = !0
1292 }, this))
1293 }, e.prototype.release = function(b) {
1294 a.each(b, a.proxy(function(a, b) {
1295 delete this._supress[b]
1296 }, this))
1297 }, e.prototype.browserSupport = function() {
1298 if (this.support3d = j(), this.support3d) {
1299 this.transformVendor = i();
1300 var a = ["transitionend", "webkitTransitionEnd", "transitionend", "oTransitionEnd"];
1301 this.transitionEndVendor = a[h()], this.vendorName = this.transformVendor.replace(/Transform/i, ""), this.vendorName = "" !== this.vendorName ? "-" + this.vendorName.toLowerCase() + "-" : ""
1302 }
1303 this.state.orientation = b.orientation
1304 }, a.fn.owlCarousel = function(b) {
1305 return this.each(function() {
1306 a(this).data("owlCarousel") || a(this).data("owlCarousel", new e(this, b))
1307 })
1308 }, a.fn.owlCarousel.Constructor = e
1309}(window.Zepto || window.jQuery, window, document),
1310function(a, b) {
1311 var c = function(b) {
1312 this._core = b, this._loaded = [], this._handlers = {
1313 "initialized.owl.carousel change.owl.carousel": a.proxy(function(b) {
1314 if (b.namespace && this._core.settings && this._core.settings.lazyLoad && (b.property && "position" == b.property.name || "initialized" == b.type))
1315 for (var c = this._core.settings, d = c.center && Math.ceil(c.items / 2) || c.items, e = c.center && -1 * d || 0, f = (b.property && b.property.value || this._core.current()) + e, g = this._core.clones().length, h = a.proxy(function(a, b) {
1316 this.load(b)
1317 }, this); e++ < d;) this.load(g / 2 + this._core.relative(f)), g && a.each(this._core.clones(this._core.relative(f++)), h)
1318 }, this)
1319 }, this._core.options = a.extend({}, c.Defaults, this._core.options), this._core.$element.on(this._handlers)
1320 };
1321 c.Defaults = {
1322 lazyLoad: !1
1323 }, c.prototype.load = function(c) {
1324 var d = this._core.$stage.children().eq(c),
1325 e = d && d.find(".owl-lazy");
1326 !e || a.inArray(d.get(0), this._loaded) > -1 || (e.each(a.proxy(function(c, d) {
1327 var e, f = a(d),
1328 g = b.devicePixelRatio > 1 && f.attr("data-src-retina") || f.attr("data-src");
1329 this._core.trigger("load", {
1330 element: f,
1331 url: g
1332 }, "lazy"), f.is("img") ? f.one("load.owl.lazy", a.proxy(function() {
1333 f.css("opacity", 1), this._core.trigger("loaded", {
1334 element: f,
1335 url: g
1336 }, "lazy")
1337 }, this)).attr("src", g) : (e = new Image, e.onload = a.proxy(function() {
1338 f.css({
1339 "background-image": "url(" + g + ")",
1340 opacity: "1"
1341 }), this._core.trigger("loaded", {
1342 element: f,
1343 url: g
1344 }, "lazy")
1345 }, this), e.src = g)
1346 }, this)), this._loaded.push(d.get(0)))
1347 }, c.prototype.destroy = function() {
1348 var a, b;
1349 for (a in this.handlers) this._core.$element.off(a, this.handlers[a]);
1350 for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null)
1351 }, a.fn.owlCarousel.Constructor.Plugins.Lazy = c
1352}(window.Zepto || window.jQuery, window, document),
1353function(a) {
1354 var b = function(c) {
1355 this._core = c, this._handlers = {
1356 "initialized.owl.carousel": a.proxy(function() {
1357 this._core.settings.autoHeight && this.update()
1358 }, this),
1359 "changed.owl.carousel": a.proxy(function(a) {
1360 this._core.settings.autoHeight && "position" == a.property.name && this.update()
1361 }, this),
1362 "loaded.owl.lazy": a.proxy(function(a) {
1363 this._core.settings.autoHeight && a.element.closest("." + this._core.settings.itemClass) === this._core.$stage.children().eq(this._core.current()) && this.update()
1364 }, this)
1365 }, this._core.options = a.extend({}, b.Defaults, this._core.options), this._core.$element.on(this._handlers)
1366 };
1367 b.Defaults = {
1368 autoHeight: !1,
1369 autoHeightClass: "owl-height"
1370 }, b.prototype.update = function() {
1371 this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)
1372 }, b.prototype.destroy = function() {
1373 var a, b;
1374 for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
1375 for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null)
1376 }, a.fn.owlCarousel.Constructor.Plugins.AutoHeight = b
1377}(window.Zepto || window.jQuery, window, document),
1378function(a, b, c) {
1379 var d = function(b) {
1380 this._core = b, this._videos = {}, this._playing = null, this._fullscreen = !1, this._handlers = {
1381 "resize.owl.carousel": a.proxy(function(a) {
1382 this._core.settings.video && !this.isInFullScreen() && a.preventDefault()
1383 }, this),
1384 "refresh.owl.carousel changed.owl.carousel": a.proxy(function() {
1385 this._playing && this.stop()
1386 }, this),
1387 "prepared.owl.carousel": a.proxy(function(b) {
1388 var c = a(b.content).find(".owl-video");
1389 c.length && (c.css("display", "none"), this.fetch(c, a(b.content)))
1390 }, this)
1391 }, this._core.options = a.extend({}, d.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", a.proxy(function(a) {
1392 this.play(a)
1393 }, this))
1394 };
1395 d.Defaults = {
1396 video: !1,
1397 videoHeight: !1,
1398 videoWidth: !1
1399 }, d.prototype.fetch = function(a, b) {
1400 var c = a.attr("data-vimeo-id") ? "vimeo" : "youtube",
1401 d = a.attr("data-vimeo-id") || a.attr("data-youtube-id"),
1402 e = a.attr("data-width") || this._core.settings.videoWidth,
1403 f = a.attr("data-height") || this._core.settings.videoHeight,
1404 g = a.attr("href");
1405 if (!g) throw new Error("Missing video URL.");
1406 if (d = g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/), d[3].indexOf("youtu") > -1) c = "youtube";
1407 else {
1408 if (!(d[3].indexOf("vimeo") > -1)) throw new Error("Video URL not supported.");
1409 c = "vimeo"
1410 }
1411 d = d[6], this._videos[g] = {
1412 type: c,
1413 id: d,
1414 width: e,
1415 height: f
1416 }, b.attr("data-video", g), this.thumbnail(a, this._videos[g])
1417 }, d.prototype.thumbnail = function(b, c) {
1418 var d, e, f, g = c.width && c.height ? 'style="width:' + c.width + "px;height:" + c.height + 'px;"' : "",
1419 h = b.find("img"),
1420 i = "src",
1421 j = "",
1422 k = this._core.settings,
1423 l = function(a) {
1424 e = '<div class="owl-video-play-icon"></div>', d = k.lazyLoad ? '<div class="owl-video-tn ' + j + '" ' + i + '="' + a + '"></div>' : '<div class="owl-video-tn" style="opacity:1;background-image:url(' + a + ')"></div>', b.after(d), b.after(e)
1425 };
1426 return b.wrap('<div class="owl-video-wrapper"' + g + "></div>"), this._core.settings.lazyLoad && (i = "data-src", j = "owl-lazy"), h.length ? (l(h.attr(i)), h.remove(), !1) : void("youtube" === c.type ? (f = "http://img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)) : "vimeo" === c.type && a.ajax({
1427 type: "GET",
1428 url: "http://vimeo.com/api/v2/video/" + c.id + ".json",
1429 jsonp: "callback",
1430 dataType: "jsonp",
1431 success: function(a) {
1432 f = a[0].thumbnail_large, l(f)
1433 }
1434 }))
1435 }, d.prototype.stop = function() {
1436 this._core.trigger("stop", null, "video"), this._playing.find(".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing = null
1437 }, d.prototype.play = function(b) {
1438 this._core.trigger("play", null, "video"), this._playing && this.stop();
1439 var c, d, e = a(b.target || b.srcElement),
1440 f = e.closest("." + this._core.settings.itemClass),
1441 g = this._videos[f.attr("data-video")],
1442 h = g.width || "100%",
1443 i = g.height || this._core.$stage.height();
1444 "youtube" === g.type ? c = '<iframe width="' + h + '" height="' + i + '" src="http://www.youtube.com/embed/' + g.id + "?autoplay=1&v=" + g.id + '" frameborder="0" allowfullscreen></iframe>' : "vimeo" === g.type && (c = '<iframe src="http://player.vimeo.com/video/' + g.id + '?autoplay=1" width="' + h + '" height="' + i + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'), f.addClass("owl-video-playing"), this._playing = f, d = a('<div style="height:' + i + "px; width:" + h + 'px" class="owl-video-frame">' + c + "</div>"), e.after(d)
1445 }, d.prototype.isInFullScreen = function() {
1446 var d = c.fullscreenElement || c.mozFullScreenElement || c.webkitFullscreenElement;
1447 return d && a(d).parent().hasClass("owl-video-frame") && (this._core.speed(0), this._fullscreen = !0), d && this._fullscreen && this._playing ? !1 : this._fullscreen ? (this._fullscreen = !1, !1) : this._playing && this._core.state.orientation !== b.orientation ? (this._core.state.orientation = b.orientation, !1) : !0
1448 }, d.prototype.destroy = function() {
1449 var a, b;
1450 this._core.$element.off("click.owl.video");
1451 for (a in this._handlers) this._core.$element.off(a, this._handlers[a]);
1452 for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null)
1453 }, a.fn.owlCarousel.Constructor.Plugins.Video = d
1454}(window.Zepto || window.jQuery, window, document),
1455function(a, b, c, d) {
1456 var e = function(b) {
1457 this.core = b, this.core.options = a.extend({}, e.Defaults, this.core.options), this.swapping = !0, this.previous = d, this.next = d, this.handlers = {
1458 "change.owl.carousel": a.proxy(function(a) {
1459 "position" == a.property.name && (this.previous = this.core.current(), this.next = a.property.value)
1460 }, this),
1461 "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": a.proxy(function(a) {
1462 this.swapping = "translated" == a.type
1463 }, this),
1464 "translate.owl.carousel": a.proxy(function() {
1465 this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap()
1466 }, this)
1467 }, this.core.$element.on(this.handlers)
1468 };
1469 e.Defaults = {
1470 animateOut: !1,
1471 animateIn: !1
1472 }, e.prototype.swap = function() {
1473 if (1 === this.core.settings.items && this.core.support3d) {
1474 this.core.speed(0);
1475 var b, c = a.proxy(this.clear, this),
1476 d = this.core.$stage.children().eq(this.previous),
1477 e = this.core.$stage.children().eq(this.next),
1478 f = this.core.settings.animateIn,
1479 g = this.core.settings.animateOut;
1480 this.core.current() !== this.previous && (g && (b = this.core.coordinates(this.previous) - this.core.coordinates(this.next), d.css({
1481 left: b + "px"
1482 }).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", c)), f && e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", c))
1483 }
1484 }, e.prototype.clear = function(b) {
1485 a(b.target).css({
1486 left: ""
1487 }).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.transitionEnd()
1488 }, e.prototype.destroy = function() {
1489 var a, b;
1490 for (a in this.handlers) this.core.$element.off(a, this.handlers[a]);
1491 for (b in Object.getOwnPropertyNames(this)) "function" != typeof this[b] && (this[b] = null)
1492 }, a.fn.owlCarousel.Constructor.Plugins.Animate = e
1493}(window.Zepto || window.jQuery, window, document),
1494function(a, b, c) {
1495 var d = function(b) {
1496 this.core = b, this.core.options = a.extend({}, d.Defaults, this.core.options), this.handlers = {
1497 "translated.owl.carousel refreshed.owl.carousel": a.proxy(function() {
1498 this.autoplay()
1499 }, this),
1500 "play.owl.autoplay": a.proxy(function(a, b, c) {
1501 this.play(b, c)
1502 }, this),
1503 "stop.owl.autoplay": a.proxy(function() {
1504 this.stop()
1505 }, this),
1506 "mouseover.owl.autoplay": a.proxy(function() {
1507 this.core.settings.autoplayHoverPause && this.pause()
1508 }, this),
1509 "mouseleave.owl.autoplay": a.proxy(function() {
1510 this.core.settings.autoplayHoverPause && this.autoplay()
1511 }, this)
1512 }, this.core.$element.on(this.handlers)
1513 };
1514 d.Defaults = {
1515 autoplay: !1,
1516 autoplayTimeout: 5e3,
1517 autoplayHoverPause: !1,
1518 autoplaySpeed: !1
1519 }, d.prototype.autoplay = function() {
1520 this.core.settings.autoplay && !this.core.state.videoPlay ? (b.clearInterval(this.interval), this.interval = b.setInterval(a.proxy(function() {
1521 this.play()
1522 }, this), this.core.settings.autoplayTimeout)) : b.clearInterval(this.interval)
1523 }, d.prototype.play = function() {
1524 return c.hidden === !0 || this.core.state.isTouch || this.core.state.isScrolling || this.core.state.isSwiping || this.core.state.inMotion ? void 0 : this.core.settings.autoplay === !1 ? void b.clearInterval(this.interval) : void this.core.next(this.core.settings.autoplaySpeed)
1525 }, d.prototype.stop = function() {
1526 b.clearInterval(this.interval)
1527 }, d.prototype.pause = function() {
1528 b.clearInterval(this.interval)
1529 }, d.prototype.destroy = function() {
1530 var a, c;
1531 b.clearInterval(this.interval);
1532 for (a in this.handlers) this.core.$element.off(a, this.handlers[a]);
1533 for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null)
1534 }, a.fn.owlCarousel.Constructor.Plugins.autoplay = d
1535}(window.Zepto || window.jQuery, window, document),
1536function(a) {
1537 "use strict";
1538 var b = function(c) {
1539 this._core = c, this._initialized = !1, this._pages = [], this._controls = {}, this._templates = [], this.$element = this._core.$element, this._overrides = {
1540 next: this._core.next,
1541 prev: this._core.prev,
1542 to: this._core.to
1543 }, this._handlers = {
1544 "prepared.owl.carousel": a.proxy(function(b) {
1545 this._core.settings.dotsData && this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))
1546 }, this),
1547 "add.owl.carousel": a.proxy(function(b) {
1548 this._core.settings.dotsData && this._templates.splice(b.position, 0, a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))
1549 }, this),
1550 "remove.owl.carousel prepared.owl.carousel": a.proxy(function(a) {
1551 this._core.settings.dotsData && this._templates.splice(a.position, 1)
1552 }, this),
1553 "change.owl.carousel": a.proxy(function(a) {
1554 if ("position" == a.property.name && !this._core.state.revert && !this._core.settings.loop && this._core.settings.navRewind) {
1555 var b = this._core.current(),
1556 c = this._core.maximum(),
1557 d = this._core.minimum();
1558 a.data = a.property.value > c ? b >= c ? d : c : a.property.value < d ? c : a.property.value
1559 }
1560 }, this),
1561 "changed.owl.carousel": a.proxy(function(a) {
1562 "position" == a.property.name && this.draw()
1563 }, this),
1564 "refreshed.owl.carousel": a.proxy(function() {
1565 this._initialized || (this.initialize(), this._initialized = !0), this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation")
1566 }, this)
1567 }, this._core.options = a.extend({}, b.Defaults, this._core.options), this.$element.on(this._handlers)
1568 };
1569 b.Defaults = {
1570 nav: !1,
1571 navRewind: !0,
1572 navText: ["prev", "next"],
1573 navSpeed: !1,
1574 navElement: "div",
1575 navContainer: !1,
1576 navContainerClass: "owl-nav",
1577 navClass: ["owl-prev", "owl-next"],
1578 slideBy: 1,
1579 dotClass: "owl-dot",
1580 dotsClass: "owl-dots",
1581 dots: !0,
1582 dotsEach: !1,
1583 dotData: !1,
1584 dotsSpeed: !1,
1585 dotsContainer: !1,
1586 controlsClass: "owl-controls"
1587 }, b.prototype.initialize = function() {
1588 var b, c, d = this._core.settings;
1589 d.dotsData || (this._templates = [a("<div>").addClass(d.dotClass).append(a("<span>")).prop("outerHTML")]), d.navContainer && d.dotsContainer || (this._controls.$container = a("<div>").addClass(d.controlsClass).appendTo(this.$element)), this._controls.$indicators = d.dotsContainer ? a(d.dotsContainer) : a("<div>").hide().addClass(d.dotsClass).appendTo(this._controls.$container), this._controls.$indicators.on("click", "div", a.proxy(function(b) {
1590 var c = a(b.target).parent().is(this._controls.$indicators) ? a(b.target).index() : a(b.target).parent().index();
1591 b.preventDefault(), this.to(c, d.dotsSpeed)
1592 }, this)), b = d.navContainer ? a(d.navContainer) : a("<div>").addClass(d.navContainerClass).prependTo(this._controls.$container), this._controls.$next = a("<" + d.navElement + ">"), this._controls.$previous = this._controls.$next.clone(), this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click", a.proxy(function() {
1593 this.prev(d.navSpeed)
1594 }, this)), this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click", a.proxy(function() {
1595 this.next(d.navSpeed)
1596 }, this));
1597 for (c in this._overrides) this._core[c] = a.proxy(this[c], this)
1598 }, b.prototype.destroy = function() {
1599 var a, b, c, d;
1600 for (a in this._handlers) this.$element.off(a, this._handlers[a]);
1601 for (b in this._controls) this._controls[b].remove();
1602 for (d in this.overides) this._core[d] = this._overrides[d];
1603 for (c in Object.getOwnPropertyNames(this)) "function" != typeof this[c] && (this[c] = null)
1604 }, b.prototype.update = function() {
1605 var a, b, c, d = this._core.settings,
1606 e = this._core.clones().length / 2,
1607 f = e + this._core.items().length,
1608 g = d.center || d.autoWidth || d.dotData ? 1 : d.dotsEach || d.items;
1609 if ("page" !== d.slideBy && (d.slideBy = Math.min(d.slideBy, d.items)), d.dots || "page" == d.slideBy)
1610 for (this._pages = [], a = e, b = 0, c = 0; f > a; a++)(b >= g || 0 === b) && (this._pages.push({
1611 start: a - e,
1612 end: a - e + g - 1
1613 }), b = 0, ++c), b += this._core.mergers(this._core.relative(a))
1614 }, b.prototype.draw = function() {
1615 var b, c, d = "",
1616 e = this._core.settings,
1617 f = (this._core.$stage.children(), this._core.relative(this._core.current()));
1618 if (!e.nav || e.loop || e.navRewind || (this._controls.$previous.toggleClass("disabled", 0 >= f), this._controls.$next.toggleClass("disabled", f >= this._core.maximum())), this._controls.$previous.toggle(e.nav), this._controls.$next.toggle(e.nav), e.dots) {
1619 if (b = this._pages.length - this._controls.$indicators.children().length, e.dotData && 0 !== b) {
1620 for (c = 0; c < this._controls.$indicators.children().length; c++) d += this._templates[this._core.relative(c)];
1621 this._controls.$indicators.html(d)
1622 } else b > 0 ? (d = new Array(b + 1).join(this._templates[0]), this._controls.$indicators.append(d)) : 0 > b && this._controls.$indicators.children().slice(b).remove();
1623 this._controls.$indicators.find(".active").removeClass("active"), this._controls.$indicators.children().eq(a.inArray(this.current(), this._pages)).addClass("active")
1624 }
1625 this._controls.$indicators.toggle(e.dots)
1626 }, b.prototype.onTrigger = function(b) {
1627 var c = this._core.settings;
1628 b.page = {
1629 index: a.inArray(this.current(), this._pages),
1630 count: this._pages.length,
1631 size: c && (c.center || c.autoWidth || c.dotData ? 1 : c.dotsEach || c.items)
1632 }
1633 }, b.prototype.current = function() {
1634 var b = this._core.relative(this._core.current());
1635 return a.grep(this._pages, function(a) {
1636 return a.start <= b && a.end >= b
1637 }).pop()
1638 }, b.prototype.getPosition = function(b) {
1639 var c, d, e = this._core.settings;
1640 return "page" == e.slideBy ? (c = a.inArray(this.current(), this._pages), d = this._pages.length, b ? ++c : --c, c = this._pages[(c % d + d) % d].start) : (c = this._core.relative(this._core.current()), d = this._core.items().length, b ? c += e.slideBy : c -= e.slideBy), c
1641 }, b.prototype.next = function(b) {
1642 a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b)
1643 }, b.prototype.prev = function(b) {
1644 a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b)
1645 }, b.prototype.to = function(b, c, d) {
1646 var e;
1647 d ? a.proxy(this._overrides.to, this._core)(b, c) : (e = this._pages.length, a.proxy(this._overrides.to, this._core)(this._pages[(b % e + e) % e].start, c))
1648 }, a.fn.owlCarousel.Constructor.Plugins.Navigation = b
1649}(window.Zepto || window.jQuery, window, document),
1650function(a, b) {
1651 "use strict";
1652 var c = function(d) {
1653 this._core = d, this._hashes = {}, this.$element = this._core.$element, this._handlers = {
1654 "initialized.owl.carousel": a.proxy(function() {
1655 "URLHash" == this._core.settings.startPosition && a(b).trigger("hashchange.owl.navigation")
1656 }, this),
1657 "prepared.owl.carousel": a.proxy(function(b) {
1658 var c = a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");
1659 this._hashes[c] = b.content
1660 }, this)
1661 }, this._core.options = a.extend({}, c.Defaults, this._core.options), this.$element.on(this._handlers), a(b).on("hashchange.owl.navigation", a.proxy(function() {
1662 var a = b.location.hash.substring(1),
1663 c = this._core.$stage.children(),
1664 d = this._hashes[a] && c.index(this._hashes[a]) || 0;
1665 return a ? void this._core.to(d, !1, !0) : !1
1666 }, this))
1667 };
1668 c.Defaults = {
1669 URLhashListener: !1
1670 }, c.prototype.destroy = function() {
1671 var c, d;
1672 a(b).off("hashchange.owl.navigation");
1673 for (c in this._handlers) this._core.$element.off(c, this._handlers[c]);
1674 for (d in Object.getOwnPropertyNames(this)) "function" != typeof this[d] && (this[d] = null)
1675 }, a.fn.owlCarousel.Constructor.Plugins.Hash = c
1676}(window.Zepto || window.jQuery, window, document);
1677
1678
1679/*++++++++++++++++++++++++++++++++++++++++++++++++++++
1680 jquery.lwtCountdown-1.0.js
1681++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1682/*!
1683 * jQuery Countdown plugin v1.0
1684 * http://www.littlewebthings.com/projects/countdown/
1685 *
1686 * Copyright 2010, Vassilis Dourdounis
1687 *
1688 * Permission is hereby granted, free of charge, to any person obtaining a copy
1689 * of this software and associated documentation files (the "Software"), to deal
1690 * in the Software without restriction, including without limitation the rights
1691 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1692 * copies of the Software, and to permit persons to whom the Software is
1693 * furnished to do so, subject to the following conditions:
1694 *
1695 * The above copyright notice and this permission notice shall be included in
1696 * all copies or substantial portions of the Software.
1697 *
1698 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1699 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1700 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1701 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1702 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1703 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1704 * THE SOFTWARE.
1705 */
1706(function($) {
1707
1708 $.fn.countDown = function(options) {
1709
1710 config = {};
1711
1712 $.extend(config, options);
1713
1714 diffSecs = this.setCountDown(config);
1715
1716 if (config.onComplete) {
1717 $.data($(this)[0], 'callback', config.onComplete);
1718 }
1719 if (config.omitWeeks) {
1720 $.data($(this)[0], 'omitWeeks', config.omitWeeks);
1721 }
1722
1723 $('#' + $(this).attr('id') + ' .digit').html('<div class="top"></div><div class="bottom"></div>');
1724 $(this).doCountDown($(this).attr('id'), diffSecs, 500);
1725
1726 return this;
1727
1728 };
1729
1730 $.fn.stopCountDown = function() {
1731 clearTimeout($.data(this[0], 'timer'));
1732 };
1733
1734 $.fn.startCountDown = function() {
1735 this.doCountDown($(this).attr('id'), $.data(this[0], 'diffSecs'), 500);
1736 };
1737
1738 $.fn.setCountDown = function(options) {
1739 var targetTime = new Date();
1740 if (options.targetDate) {
1741 targetTime = new Date(options.targetDate.month + '/' + options.targetDate.day + '/' + options.targetDate.year + ' ' + options.targetDate.hour + ':' + options.targetDate.min + ':' + options.targetDate.sec + (options.targetDate.utc ? ' UTC' : ''));
1742 } else if (options.targetOffset) {
1743 targetTime.setFullYear(options.targetOffset.year + targetTime.getFullYear());
1744 targetTime.setMonth(options.targetOffset.month + targetTime.getMonth());
1745 targetTime.setDate(options.targetOffset.day + targetTime.getDate());
1746 targetTime.setHours(options.targetOffset.hour + targetTime.getHours());
1747 targetTime.setMinutes(options.targetOffset.min + targetTime.getMinutes());
1748 targetTime.setSeconds(options.targetOffset.sec + targetTime.getSeconds());
1749 }
1750
1751 var nowTime = new Date();
1752
1753 diffSecs = Math.floor((targetTime.valueOf() - nowTime.valueOf()) / 1000);
1754
1755 $.data(this[0], 'diffSecs', diffSecs);
1756
1757 return diffSecs;
1758 };
1759
1760 $.fn.doCountDown = function(id, diffSecs, duration) {
1761 $this = $('#' + id);
1762 if (diffSecs <= 0) {
1763 diffSecs = 0;
1764 if ($.data($this[0], 'timer')) {
1765 clearTimeout($.data($this[0], 'timer'));
1766 }
1767 }
1768
1769 secs = diffSecs % 60;
1770 mins = Math.floor(diffSecs / 60) % 60;
1771 hours = Math.floor(diffSecs / 60 / 60) % 24;
1772 if ($.data($this[0], 'omitWeeks') == true) {
1773 days = Math.floor(diffSecs / 60 / 60 / 24);
1774 weeks = Math.floor(diffSecs / 60 / 60 / 24 / 7);
1775 } else {
1776 days = Math.floor(diffSecs / 60 / 60 / 24) % 7;
1777 weeks = Math.floor(diffSecs / 60 / 60 / 24 / 7);
1778 }
1779
1780 $this.dashChangeTo(id, 'seconds_dash', secs, duration ? duration : 800);
1781 $this.dashChangeTo(id, 'minutes_dash', mins, duration ? duration : 1200);
1782 $this.dashChangeTo(id, 'hours_dash', hours, duration ? duration : 1200);
1783 $this.dashChangeTo(id, 'days_dash', days, duration ? duration : 1200);
1784 $this.dashChangeTo(id, 'weeks_dash', weeks, duration ? duration : 1200);
1785
1786 $.data($this[0], 'diffSecs', diffSecs);
1787 if (diffSecs > 0) {
1788 e = $this;
1789 t = setTimeout(function() {
1790 e.doCountDown(id, diffSecs - 1)
1791 }, 1000);
1792 $.data(e[0], 'timer', t);
1793 } else if (cb = $.data($this[0], 'callback')) {
1794 $.data($this[0], 'callback')();
1795 }
1796
1797 };
1798
1799 $.fn.dashChangeTo = function(id, dash, n, duration) {
1800 $this = $('#' + id);
1801
1802 for (var i = ($this.find('.' + dash + ' .digit').length - 1); i >= 0; i--) {
1803 var d = n % 10;
1804 n = (n - d) / 10;
1805 $this.digitChangeTo('#' + $this.attr('id') + ' .' + dash + ' .digit:eq(' + i + ')', d, duration);
1806 }
1807 };
1808
1809 $.fn.digitChangeTo = function(digit, n, duration) {
1810 if (!duration) {
1811 duration = 800;
1812 }
1813 if ($(digit + ' div.top').html() != n + '') {
1814 $(digit + ' div.top').css({
1815 'display': 'none'
1816 });
1817 $(digit + ' div.top').html((n ? n : '0')).slideDown(duration);
1818
1819 $(digit + ' div.bottom').animate({}, duration, function() {
1820 $(digit + ' div.bottom').html($(digit + ' div.top').html());
1821 $(digit + ' div.bottom').css({
1822 'display': 'block',
1823 'height': ''
1824 });
1825 $(digit + ' div.top').hide().slideUp(10);
1826 });
1827 }
1828 };
1829
1830})(jQuery);
1831
1832
1833
1834/*++++++++++++++++++++++++++++++++++++++++++++++++++++
1835 notifyMe.js
1836++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1837/*
1838 notifyMe jQuery Plugin v1.0.0
1839 Copyright (c)2014 Sergey Serafimovich
1840 Licensed under The MIT License.
1841*/
1842(function(e) {
1843 e.fn.notifyMe = function(t) {
1844 var n = e.extend({
1845 msgError404: "Service is not available at the moment. Please check your internet connection or try again later.",
1846 msgError503: "Oops. Looks like something went wrong. Please try again later.",
1847 msgErrorValidation: "This email address looks fake or invalid. Please enter a real email address.",
1848 msgErrorFormat: "Your e-mail address is incorrect. Please check it and try again.",
1849 msgSuccess: "Congrats! You are in list. We will inform you as soon as we finish."
1850 }, t);
1851 var r = e(this);
1852 var i = e(this).find("input[name=email]");
1853 var s = e(this).attr("action");
1854 var o = e(this).find(".note");
1855 var u = e("<p class='message error-text'></p>").appendTo(e(this));
1856 var a = e("<i class='error-text'></i>").appendTo(e(this));
1857 var f = "fa fa-spinner fa-spin";
1858 var l = "fa fa-check-circle";
1859 var c = "fa fa-exclamation-circle";
1860 i.after(a);
1861 e(this).off("submit").on("submit", function(t) {
1862 t.preventDefault();
1863 var h = i.val();
1864 var p = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
1865 if (p.test(h) && h != null) {
1866 a.removeClass();
1867 a.addClass(f);
1868 e(this).removeClass("error success");
1869 u.text("");
1870 o.show();
1871 e.ajax({
1872 type: "POST",
1873 url: s,
1874 data: {
1875 email: h
1876 },
1877 dataType: "json",
1878 error: function(e) {
1879 r.addClass("error");
1880 o.hide();
1881 a.removeClass();
1882 a.addClass(c);
1883 if (e.status == 404) {
1884 u.text(n.msgError404)
1885 } else {
1886 u.text(n.msgError503)
1887 }
1888 }
1889 }).done(function(e) {
1890 o.hide();
1891 if (e.status == "success") {
1892 r.addClass("success-full").removeClass("bad-email");
1893 a.removeClass(f);
1894 a.removeClass(c);
1895 a.addClass(l);
1896 u.text(n.msgSuccess);
1897 i.val(null);
1898 } else {
1899 r.addClass("error");
1900 a.removeClass(l);
1901 a.addClass(c);
1902 if (e.type == "ValidationError") {
1903 u.text(n.msgErrorValidation)
1904 } else {
1905 u.text(n.msgError503)
1906 }
1907 }
1908 })
1909 } else {
1910 e(this).addClass("bad-email");
1911 o.hide();
1912 a.removeClass(l);
1913 a.addClass(c);
1914 u.text(n.msgErrorFormat);
1915 }
1916 })
1917 }
1918})(jQuery)
1919
1920
1921/*++++++++++++++++++++++++++++++++++++++++++++++++++++
1922 jquery.magnific-popup.min.js
1923++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1924/*! Magnific Popup - v1.0.0 - 2015-01-03
1925 * http://dimsemenov.com/plugins/magnific-popup/
1926 * Copyright (c) 2015 Dmitry Semenov; */
1927! function(a) {
1928 "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : window.jQuery || window.Zepto)
1929}(function(a) {
1930 var b, c, d, e, f, g, h = "Close",
1931 i = "BeforeClose",
1932 j = "AfterClose",
1933 k = "BeforeAppend",
1934 l = "MarkupParse",
1935 m = "Open",
1936 n = "Change",
1937 o = "mfp",
1938 p = "." + o,
1939 q = "mfp-ready",
1940 r = "mfp-removing",
1941 s = "mfp-prevent-close",
1942 t = function() {},
1943 u = !!window.jQuery,
1944 v = a(window),
1945 w = function(a, c) {
1946 b.ev.on(o + a + p, c)
1947 },
1948 x = function(b, c, d, e) {
1949 var f = document.createElement("div");
1950 return f.className = "mfp-" + b, d && (f.innerHTML = d), e ? c && c.appendChild(f) : (f = a(f), c && f.appendTo(c)), f
1951 },
1952 y = function(c, d) {
1953 b.ev.triggerHandler(o + c, d), b.st.callbacks && (c = c.charAt(0).toLowerCase() + c.slice(1), b.st.callbacks[c] && b.st.callbacks[c].apply(b, a.isArray(d) ? d : [d]))
1954 },
1955 z = function(c) {
1956 return c === g && b.currTemplate.closeBtn || (b.currTemplate.closeBtn = a(b.st.closeMarkup.replace("%title%", b.st.tClose)), g = c), b.currTemplate.closeBtn
1957 },
1958 A = function() {
1959 a.magnificPopup.instance || (b = new t, b.init(), a.magnificPopup.instance = b)
1960 },
1961 B = function() {
1962 var a = document.createElement("p").style,
1963 b = ["ms", "O", "Moz", "Webkit"];
1964 if (void 0 !== a.transition) return !0;
1965 for (; b.length;)
1966 if (b.pop() + "Transition" in a) return !0;
1967 return !1
1968 };
1969 t.prototype = {
1970 constructor: t,
1971 init: function() {
1972 var c = navigator.appVersion;
1973 b.isIE7 = -1 !== c.indexOf("MSIE 7."), b.isIE8 = -1 !== c.indexOf("MSIE 8."), b.isLowIE = b.isIE7 || b.isIE8, b.isAndroid = /android/gi.test(c), b.isIOS = /iphone|ipad|ipod/gi.test(c), b.supportsTransition = B(), b.probablyMobile = b.isAndroid || b.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), d = a(document), b.popupsCache = {}
1974 },
1975 open: function(c) {
1976 var e;
1977 if (c.isObj === !1) {
1978 b.items = c.items.toArray(), b.index = 0;
1979 var g, h = c.items;
1980 for (e = 0; e < h.length; e++)
1981 if (g = h[e], g.parsed && (g = g.el[0]), g === c.el[0]) {
1982 b.index = e;
1983 break
1984 }
1985 } else b.items = a.isArray(c.items) ? c.items : [c.items], b.index = c.index || 0;
1986 if (b.isOpen) return void b.updateItemHTML();
1987 b.types = [], f = "", b.ev = c.mainEl && c.mainEl.length ? c.mainEl.eq(0) : d, c.key ? (b.popupsCache[c.key] || (b.popupsCache[c.key] = {}), b.currTemplate = b.popupsCache[c.key]) : b.currTemplate = {}, b.st = a.extend(!0, {}, a.magnificPopup.defaults, c), b.fixedContentPos = "auto" === b.st.fixedContentPos ? !b.probablyMobile : b.st.fixedContentPos, b.st.modal && (b.st.closeOnContentClick = !1, b.st.closeOnBgClick = !1, b.st.showCloseBtn = !1, b.st.enableEscapeKey = !1), b.bgOverlay || (b.bgOverlay = x("bg").on("click" + p, function() {
1988 b.close()
1989 }), b.wrap = x("wrap").attr("tabindex", -1).on("click" + p, function(a) {
1990 b._checkIfClose(a.target) && b.close()
1991 }), b.container = x("container", b.wrap)), b.contentContainer = x("content"), b.st.preloader && (b.preloader = x("preloader", b.container, b.st.tLoading));
1992 var i = a.magnificPopup.modules;
1993 for (e = 0; e < i.length; e++) {
1994 var j = i[e];
1995 j = j.charAt(0).toUpperCase() + j.slice(1), b["init" + j].call(b)
1996 }
1997 y("BeforeOpen"), b.st.showCloseBtn && (b.st.closeBtnInside ? (w(l, function(a, b, c, d) {
1998 c.close_replaceWith = z(d.type)
1999 }), f += " mfp-close-btn-in") : b.wrap.append(z())), b.st.alignTop && (f += " mfp-align-top"), b.wrap.css(b.fixedContentPos ? {
2000 overflow: b.st.overflowY,
2001 overflowX: "hidden",
2002 overflowY: b.st.overflowY
2003 } : {
2004 top: v.scrollTop(),
2005 position: "absolute"
2006 }), (b.st.fixedBgPos === !1 || "auto" === b.st.fixedBgPos && !b.fixedContentPos) && b.bgOverlay.css({
2007 height: d.height(),
2008 position: "absolute"
2009 }), b.st.enableEscapeKey && d.on("keyup" + p, function(a) {
2010 27 === a.keyCode && b.close()
2011 }), v.on("resize" + p, function() {
2012 b.updateSize()
2013 }), b.st.closeOnContentClick || (f += " mfp-auto-cursor"), f && b.wrap.addClass(f);
2014 var k = b.wH = v.height(),
2015 n = {};
2016 if (b.fixedContentPos && b._hasScrollBar(k)) {
2017 var o = b._getScrollbarSize();
2018 o && (n.marginRight = o)
2019 }
2020 b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : n.overflow = "hidden");
2021 var r = b.st.mainClass;
2022 return b.isIE7 && (r += " mfp-ie7"), r && b._addClassToMFP(r), b.updateItemHTML(), y("BuildControls"), a("html").css(n), b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo || a(document.body)), b._lastFocusedEl = document.activeElement, setTimeout(function() {
2023 b.content ? (b._addClassToMFP(q), b._setFocus()) : b.bgOverlay.addClass(q), d.on("focusin" + p, b._onFocusIn)
2024 }, 16), b.isOpen = !0, b.updateSize(k), y(m), c
2025 },
2026 close: function() {
2027 b.isOpen && (y(i), b.isOpen = !1, b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP(r), setTimeout(function() {
2028 b._close()
2029 }, b.st.removalDelay)) : b._close())
2030 },
2031 _close: function() {
2032 y(h);
2033 var c = r + " " + q + " ";
2034 if (b.bgOverlay.detach(), b.wrap.detach(), b.container.empty(), b.st.mainClass && (c += b.st.mainClass + " "), b._removeClassFromMFP(c), b.fixedContentPos) {
2035 var e = {
2036 marginRight: ""
2037 };
2038 b.isIE7 ? a("body, html").css("overflow", "") : e.overflow = "", a("html").css(e)
2039 }
2040 d.off("keyup" + p + " focusin" + p), b.ev.off(p), b.wrap.attr("class", "mfp-wrap").removeAttr("style"), b.bgOverlay.attr("class", "mfp-bg"), b.container.attr("class", "mfp-container"), !b.st.showCloseBtn || b.st.closeBtnInside && b.currTemplate[b.currItem.type] !== !0 || b.currTemplate.closeBtn && b.currTemplate.closeBtn.detach(), b._lastFocusedEl && a(b._lastFocusedEl).focus(), b.currItem = null, b.content = null, b.currTemplate = null, b.prevHeight = 0, y(j)
2041 },
2042 updateSize: function(a) {
2043 if (b.isIOS) {
2044 var c = document.documentElement.clientWidth / window.innerWidth,
2045 d = window.innerHeight * c;
2046 b.wrap.css("height", d), b.wH = d
2047 } else b.wH = a || v.height();
2048 b.fixedContentPos || b.wrap.css("height", b.wH), y("Resize")
2049 },
2050 updateItemHTML: function() {
2051 var c = b.items[b.index];
2052 b.contentContainer.detach(), b.content && b.content.detach(), c.parsed || (c = b.parseEl(b.index));
2053 var d = c.type;
2054 if (y("BeforeChange", [b.currItem ? b.currItem.type : "", d]), b.currItem = c, !b.currTemplate[d]) {
2055 var f = b.st[d] ? b.st[d].markup : !1;
2056 y("FirstMarkupParse", f), b.currTemplate[d] = f ? a(f) : !0
2057 }
2058 e && e !== c.type && b.container.removeClass("mfp-" + e + "-holder");
2059 var g = b["get" + d.charAt(0).toUpperCase() + d.slice(1)](c, b.currTemplate[d]);
2060 b.appendContent(g, d), c.preloaded = !0, y(n, c), e = c.type, b.container.prepend(b.contentContainer), y("AfterChange")
2061 },
2062 appendContent: function(a, c) {
2063 b.content = a, a ? b.st.showCloseBtn && b.st.closeBtnInside && b.currTemplate[c] === !0 ? b.content.find(".mfp-close").length || b.content.append(z()) : b.content = a : b.content = "", y(k), b.container.addClass("mfp-" + c + "-holder"), b.contentContainer.append(b.content)
2064 },
2065 parseEl: function(c) {
2066 var d, e = b.items[c];
2067 if (e.tagName ? e = {
2068 el: a(e)
2069 } : (d = e.type, e = {
2070 data: e,
2071 src: e.src
2072 }), e.el) {
2073 for (var f = b.types, g = 0; g < f.length; g++)
2074 if (e.el.hasClass("mfp-" + f[g])) {
2075 d = f[g];
2076 break
2077 } e.src = e.el.attr("data-mfp-src"), e.src || (e.src = e.el.attr("href"))
2078 }
2079 return e.type = d || b.st.type || "inline", e.index = c, e.parsed = !0, b.items[c] = e, y("ElementParse", e), b.items[c]
2080 },
2081 addGroup: function(a, c) {
2082 var d = function(d) {
2083 d.mfpEl = this, b._openClick(d, a, c)
2084 };
2085 c || (c = {});
2086 var e = "click.magnificPopup";
2087 c.mainEl = a, c.items ? (c.isObj = !0, a.off(e).on(e, d)) : (c.isObj = !1, c.delegate ? a.off(e).on(e, c.delegate, d) : (c.items = a, a.off(e).on(e, d)))
2088 },
2089 _openClick: function(c, d, e) {
2090 var f = void 0 !== e.midClick ? e.midClick : a.magnificPopup.defaults.midClick;
2091 if (f || 2 !== c.which && !c.ctrlKey && !c.metaKey) {
2092 var g = void 0 !== e.disableOn ? e.disableOn : a.magnificPopup.defaults.disableOn;
2093 if (g)
2094 if (a.isFunction(g)) {
2095 if (!g.call(b)) return !0
2096 } else if (v.width() < g) return !0;
2097 c.type && (c.preventDefault(), b.isOpen && c.stopPropagation()), e.el = a(c.mfpEl), e.delegate && (e.items = d.find(e.delegate)), b.open(e)
2098 }
2099 },
2100 updateStatus: function(a, d) {
2101 if (b.preloader) {
2102 c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading);
2103 var e = {
2104 status: a,
2105 text: d
2106 };
2107 y("UpdateStatus", e), a = e.status, d = e.text, b.preloader.html(d), b.preloader.find("a").on("click", function(a) {
2108 a.stopImmediatePropagation()
2109 }), b.container.addClass("mfp-s-" + a), c = a
2110 }
2111 },
2112 _checkIfClose: function(c) {
2113 if (!a(c).hasClass(s)) {
2114 var d = b.st.closeOnContentClick,
2115 e = b.st.closeOnBgClick;
2116 if (d && e) return !0;
2117 if (!b.content || a(c).hasClass("mfp-close") || b.preloader && c === b.preloader[0]) return !0;
2118 if (c === b.content[0] || a.contains(b.content[0], c)) {
2119 if (d) return !0
2120 } else if (e && a.contains(document, c)) return !0;
2121 return !1
2122 }
2123 },
2124 _addClassToMFP: function(a) {
2125 b.bgOverlay.addClass(a), b.wrap.addClass(a)
2126 },
2127 _removeClassFromMFP: function(a) {
2128 this.bgOverlay.removeClass(a), b.wrap.removeClass(a)
2129 },
2130 _hasScrollBar: function(a) {
2131 return (b.isIE7 ? d.height() : document.body.scrollHeight) > (a || v.height())
2132 },
2133 _setFocus: function() {
2134 (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus()
2135 },
2136 _onFocusIn: function(c) {
2137 return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (b._setFocus(), !1)
2138 },
2139 _parseMarkup: function(b, c, d) {
2140 var e;
2141 d.data && (c = a.extend(d.data, c)), y(l, [b, c, d]), a.each(c, function(a, c) {
2142 if (void 0 === c || c === !1) return !0;
2143 if (e = a.split("_"), e.length > 1) {
2144 var d = b.find(p + "-" + e[0]);
2145 if (d.length > 0) {
2146 var f = e[1];
2147 "replaceWith" === f ? d[0] !== c[0] && d.replaceWith(c) : "img" === f ? d.is("img") ? d.attr("src", c) : d.replaceWith('<img src="' + c + '" class="' + d.attr("class") + '" />') : d.attr(e[1], c)
2148 }
2149 } else b.find(p + "-" + a).html(c)
2150 })
2151 },
2152 _getScrollbarSize: function() {
2153 if (void 0 === b.scrollbarSize) {
2154 var a = document.createElement("div");
2155 a.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(a), b.scrollbarSize = a.offsetWidth - a.clientWidth, document.body.removeChild(a)
2156 }
2157 return b.scrollbarSize
2158 }
2159 }, a.magnificPopup = {
2160 instance: null,
2161 proto: t.prototype,
2162 modules: [],
2163 open: function(b, c) {
2164 return A(), b = b ? a.extend(!0, {}, b) : {}, b.isObj = !0, b.index = c || 0, this.instance.open(b)
2165 },
2166 close: function() {
2167 return a.magnificPopup.instance && a.magnificPopup.instance.close()
2168 },
2169 registerModule: function(b, c) {
2170 c.options && (a.magnificPopup.defaults[b] = c.options), a.extend(this.proto, c.proto), this.modules.push(b)
2171 },
2172 defaults: {
2173 disableOn: 0,
2174 key: null,
2175 midClick: !1,
2176 mainClass: "",
2177 preloader: !0,
2178 focus: "",
2179 closeOnContentClick: !1,
2180 closeOnBgClick: !0,
2181 closeBtnInside: !0,
2182 showCloseBtn: !0,
2183 enableEscapeKey: !0,
2184 modal: !1,
2185 alignTop: !1,
2186 removalDelay: 0,
2187 prependTo: null,
2188 fixedContentPos: "auto",
2189 fixedBgPos: "auto",
2190 overflowY: "auto",
2191 closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>',
2192 tClose: "Close (Esc)",
2193 tLoading: "Loading..."
2194 }
2195 }, a.fn.magnificPopup = function(c) {
2196 A();
2197 var d = a(this);
2198 if ("string" == typeof c)
2199 if ("open" === c) {
2200 var e, f = u ? d.data("magnificPopup") : d[0].magnificPopup,
2201 g = parseInt(arguments[1], 10) || 0;
2202 f.items ? e = f.items[g] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(g)), b._openClick({
2203 mfpEl: e
2204 }, d, f)
2205 } else b.isOpen && b[c].apply(b, Array.prototype.slice.call(arguments, 1));
2206 else c = a.extend(!0, {}, c), u ? d.data("magnificPopup", c) : d[0].magnificPopup = c, b.addGroup(d, c);
2207 return d
2208 };
2209 var C, D, E, F = "inline",
2210 G = function() {
2211 E && (D.after(E.addClass(C)).detach(), E = null)
2212 };
2213 a.magnificPopup.registerModule(F, {
2214 options: {
2215 hiddenClass: "hide",
2216 markup: "",
2217 tNotFound: "Content not found"
2218 },
2219 proto: {
2220 initInline: function() {
2221 b.types.push(F), w(h + "." + F, function() {
2222 G()
2223 })
2224 },
2225 getInline: function(c, d) {
2226 if (G(), c.src) {
2227 var e = b.st.inline,
2228 f = a(c.src);
2229 if (f.length) {
2230 var g = f[0].parentNode;
2231 g && g.tagName && (D || (C = e.hiddenClass, D = x(C), C = "mfp-" + C), E = f.after(D).detach().removeClass(C)), b.updateStatus("ready")
2232 } else b.updateStatus("error", e.tNotFound), f = a("<div>");
2233 return c.inlineElement = f, f
2234 }
2235 return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d
2236 }
2237 }
2238 });
2239 var H, I = "ajax",
2240 J = function() {
2241 H && a(document.body).removeClass(H)
2242 },
2243 K = function() {
2244 J(), b.req && b.req.abort()
2245 };
2246 a.magnificPopup.registerModule(I, {
2247 options: {
2248 settings: null,
2249 cursor: "mfp-ajax-cur",
2250 tError: '<a href="%url%">The content</a> could not be loaded.'
2251 },
2252 proto: {
2253 initAjax: function() {
2254 b.types.push(I), H = b.st.ajax.cursor, w(h + "." + I, K), w("BeforeChange." + I, K)
2255 },
2256 getAjax: function(c) {
2257 H && a(document.body).addClass(H), b.updateStatus("loading");
2258 var d = a.extend({
2259 url: c.src,
2260 success: function(d, e, f) {
2261 var g = {
2262 data: d,
2263 xhr: f
2264 };
2265 y("ParseAjax", g), b.appendContent(a(g.data), I), c.finished = !0, J(), b._setFocus(), setTimeout(function() {
2266 b.wrap.addClass(q)
2267 }, 16), b.updateStatus("ready"), y("AjaxContentAdded")
2268 },
2269 error: function() {
2270 J(), c.finished = c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src))
2271 }
2272 }, b.st.ajax.settings);
2273 return b.req = a.ajax(d), ""
2274 }
2275 }
2276 });
2277 var L, M = function(c) {
2278 if (c.data && void 0 !== c.data.title) return c.data.title;
2279 var d = b.st.image.titleSrc;
2280 if (d) {
2281 if (a.isFunction(d)) return d.call(b, c);
2282 if (c.el) return c.el.attr(d) || ""
2283 }
2284 return ""
2285 };
2286 a.magnificPopup.registerModule("image", {
2287 options: {
2288 markup: '<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',
2289 cursor: "mfp-zoom-out-cur",
2290 titleSrc: "title",
2291 verticalFit: !0,
2292 tError: '<a href="%url%">The image</a> could not be loaded.'
2293 },
2294 proto: {
2295 initImage: function() {
2296 var c = b.st.image,
2297 d = ".image";
2298 b.types.push("image"), w(m + d, function() {
2299 "image" === b.currItem.type && c.cursor && a(document.body).addClass(c.cursor)
2300 }), w(h + d, function() {
2301 c.cursor && a(document.body).removeClass(c.cursor), v.off("resize" + p)
2302 }), w("Resize" + d, b.resizeImage), b.isLowIE && w("AfterChange", b.resizeImage)
2303 },
2304 resizeImage: function() {
2305 var a = b.currItem;
2306 if (a && a.img && b.st.image.verticalFit) {
2307 var c = 0;
2308 b.isLowIE && (c = parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10)), a.img.css("max-height", b.wH - c)
2309 }
2310 },
2311 _onImageHasSize: function(a) {
2312 a.img && (a.hasSize = !0, L && clearInterval(L), a.isCheckingImgSize = !1, y("ImageHasSize", a), a.imgHidden && (b.content && b.content.removeClass("mfp-loading"), a.imgHidden = !1))
2313 },
2314 findImageSize: function(a) {
2315 var c = 0,
2316 d = a.img[0],
2317 e = function(f) {
2318 L && clearInterval(L), L = setInterval(function() {
2319 return d.naturalWidth > 0 ? void b._onImageHasSize(a) : (c > 200 && clearInterval(L), c++, void(3 === c ? e(10) : 40 === c ? e(50) : 100 === c && e(500)))
2320 }, f)
2321 };
2322 e(1)
2323 },
2324 getImage: function(c, d) {
2325 var e = 0,
2326 f = function() {
2327 c && (c.img[0].complete ? (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("ready")), c.hasSize = !0, c.loaded = !0, y("ImageLoadComplete")) : (e++, 200 > e ? setTimeout(f, 100) : g()))
2328 },
2329 g = function() {
2330 c && (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("error", h.tError.replace("%url%", c.src))), c.hasSize = !0, c.loaded = !0, c.loadError = !0)
2331 },
2332 h = b.st.image,
2333 i = d.find(".mfp-img");
2334 if (i.length) {
2335 var j = document.createElement("img");
2336 j.className = "mfp-img", c.el && c.el.find("img").length && (j.alt = c.el.find("img").attr("alt")), c.img = a(j).on("load.mfploader", f).on("error.mfploader", g), j.src = c.src, i.is("img") && (c.img = c.img.clone()), j = c.img[0], j.naturalWidth > 0 ? c.hasSize = !0 : j.width || (c.hasSize = !1)
2337 }
2338 return b._parseMarkup(d, {
2339 title: M(c),
2340 img_replaceWith: c.img
2341 }, c), b.resizeImage(), c.hasSize ? (L && clearInterval(L), c.loadError ? (d.addClass("mfp-loading"), b.updateStatus("error", h.tError.replace("%url%", c.src))) : (d.removeClass("mfp-loading"), b.updateStatus("ready")), d) : (b.updateStatus("loading"), c.loading = !0, c.hasSize || (c.imgHidden = !0, d.addClass("mfp-loading"), b.findImageSize(c)), d)
2342 }
2343 }
2344 });
2345 var N, O = function() {
2346 return void 0 === N && (N = void 0 !== document.createElement("p").style.MozTransform), N
2347 };
2348 a.magnificPopup.registerModule("zoom", {
2349 options: {
2350 enabled: !1,
2351 easing: "ease-in-out",
2352 duration: 300,
2353 opener: function(a) {
2354 return a.is("img") ? a : a.find("img")
2355 }
2356 },
2357 proto: {
2358 initZoom: function() {
2359 var a, c = b.st.zoom,
2360 d = ".zoom";
2361 if (c.enabled && b.supportsTransition) {
2362 var e, f, g = c.duration,
2363 j = function(a) {
2364 var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),
2365 d = "all " + c.duration / 1e3 + "s " + c.easing,
2366 e = {
2367 position: "fixed",
2368 zIndex: 9999,
2369 left: 0,
2370 top: 0,
2371 "-webkit-backface-visibility": "hidden"
2372 },
2373 f = "transition";
2374 return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d, b.css(e), b
2375 },
2376 k = function() {
2377 b.content.css("visibility", "visible")
2378 };
2379 w("BuildControls" + d, function() {
2380 if (b._allowZoom()) {
2381 if (clearTimeout(e), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return void k();
2382 f = j(a), f.css(b._getOffset()), b.wrap.append(f), e = setTimeout(function() {
2383 f.css(b._getOffset(!0)), e = setTimeout(function() {
2384 k(), setTimeout(function() {
2385 f.remove(), a = f = null, y("ZoomAnimationEnded")
2386 }, 16)
2387 }, g)
2388 }, 16)
2389 }
2390 }), w(i + d, function() {
2391 if (b._allowZoom()) {
2392 if (clearTimeout(e), b.st.removalDelay = g, !a) {
2393 if (a = b._getItemToZoom(), !a) return;
2394 f = j(a)
2395 }
2396 f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function() {
2397 f.css(b._getOffset())
2398 }, 16)
2399 }
2400 }), w(h + d, function() {
2401 b._allowZoom() && (k(), f && f.remove(), a = null)
2402 })
2403 }
2404 },
2405 _allowZoom: function() {
2406 return "image" === b.currItem.type
2407 },
2408 _getItemToZoom: function() {
2409 return b.currItem.hasSize ? b.currItem.img : !1
2410 },
2411 _getOffset: function(c) {
2412 var d;
2413 d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem);
2414 var e = d.offset(),
2415 f = parseInt(d.css("padding-top"), 10),
2416 g = parseInt(d.css("padding-bottom"), 10);
2417 e.top -= a(window).scrollTop() - f;
2418 var h = {
2419 width: d.width(),
2420 height: (u ? d.innerHeight() : d[0].offsetHeight) - g - f
2421 };
2422 return O() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left, h.top = e.top), h
2423 }
2424 }
2425 });
2426 var P = "iframe",
2427 Q = "//about:blank",
2428 R = function(a) {
2429 if (b.currTemplate[P]) {
2430 var c = b.currTemplate[P].find("iframe");
2431 c.length && (a || (c[0].src = Q), b.isIE8 && c.css("display", a ? "block" : "none"))
2432 }
2433 };
2434 a.magnificPopup.registerModule(P, {
2435 options: {
2436 markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',
2437 srcAction: "iframe_src",
2438 patterns: {
2439 youtube: {
2440 index: "youtube.com",
2441 id: "v=",
2442 src: "//www.youtube.com/embed/%id%?autoplay=1"
2443 },
2444 vimeo: {
2445 index: "vimeo.com/",
2446 id: "/",
2447 src: "//player.vimeo.com/video/%id%?autoplay=1"
2448 },
2449 gmaps: {
2450 index: "//maps.google.",
2451 src: "%id%&output=embed"
2452 }
2453 }
2454 },
2455 proto: {
2456 initIframe: function() {
2457 b.types.push(P), w("BeforeChange", function(a, b, c) {
2458 b !== c && (b === P ? R() : c === P && R(!0))
2459 }), w(h + "." + P, function() {
2460 R()
2461 })
2462 },
2463 getIframe: function(c, d) {
2464 var e = c.src,
2465 f = b.st.iframe;
2466 a.each(f.patterns, function() {
2467 return e.indexOf(this.index) > -1 ? (this.id && (e = "string" == typeof this.id ? e.substr(e.lastIndexOf(this.id) + this.id.length, e.length) : this.id.call(this, e)), e = this.src.replace("%id%", e), !1) : void 0
2468 });
2469 var g = {};
2470 return f.srcAction && (g[f.srcAction] = e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d
2471 }
2472 }
2473 });
2474 var S = function(a) {
2475 var c = b.items.length;
2476 return a > c - 1 ? a - c : 0 > a ? c + a : a
2477 },
2478 T = function(a, b, c) {
2479 return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c)
2480 };
2481 a.magnificPopup.registerModule("gallery", {
2482 options: {
2483 enabled: !1,
2484 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
2485 preload: [0, 2],
2486 navigateByImgClick: !0,
2487 arrows: !0,
2488 tPrev: "Previous (Left arrow key)",
2489 tNext: "Next (Right arrow key)",
2490 tCounter: "%curr% of %total%"
2491 },
2492 proto: {
2493 initGallery: function() {
2494 var c = b.st.gallery,
2495 e = ".mfp-gallery",
2496 g = Boolean(a.fn.mfpFastClick);
2497 return b.direction = !0, c && c.enabled ? (f += " mfp-gallery", w(m + e, function() {
2498 c.navigateByImgClick && b.wrap.on("click" + e, ".mfp-img", function() {
2499 return b.items.length > 1 ? (b.next(), !1) : void 0
2500 }), d.on("keydown" + e, function(a) {
2501 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next()
2502 })
2503 }), w("UpdateStatus" + e, function(a, c) {
2504 c.text && (c.text = T(c.text, b.currItem.index, b.items.length))
2505 }), w(l + e, function(a, d, e, f) {
2506 var g = b.items.length;
2507 e.counter = g > 1 ? T(c.tCounter, f.index, g) : ""
2508 }), w("BuildControls" + e, function() {
2509 if (b.items.length > 1 && c.arrows && !b.arrowLeft) {
2510 var d = c.arrowMarkup,
2511 e = b.arrowLeft = a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(s),
2512 f = b.arrowRight = a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(s),
2513 h = g ? "mfpFastClick" : "click";
2514 e[h](function() {
2515 b.prev()
2516 }), f[h](function() {
2517 b.next()
2518 }), b.isIE7 && (x("b", e[0], !1, !0), x("a", e[0], !1, !0), x("b", f[0], !1, !0), x("a", f[0], !1, !0)), b.container.append(e.add(f))
2519 }
2520 }), w(n + e, function() {
2521 b._preloadTimeout && clearTimeout(b._preloadTimeout), b._preloadTimeout = setTimeout(function() {
2522 b.preloadNearbyImages(), b._preloadTimeout = null
2523 }, 16)
2524 }), void w(h + e, function() {
2525 d.off(e), b.wrap.off("click" + e), b.arrowLeft && g && b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(), b.arrowRight = b.arrowLeft = null
2526 })) : !1
2527 },
2528 next: function() {
2529 b.direction = !0, b.index = S(b.index + 1), b.updateItemHTML()
2530 },
2531 prev: function() {
2532 b.direction = !1, b.index = S(b.index - 1), b.updateItemHTML()
2533 },
2534 goTo: function(a) {
2535 b.direction = a >= b.index, b.index = a, b.updateItemHTML()
2536 },
2537 preloadNearbyImages: function() {
2538 var a, c = b.st.gallery.preload,
2539 d = Math.min(c[0], b.items.length),
2540 e = Math.min(c[1], b.items.length);
2541 for (a = 1; a <= (b.direction ? e : d); a++) b._preloadItem(b.index + a);
2542 for (a = 1; a <= (b.direction ? d : e); a++) b._preloadItem(b.index - a)
2543 },
2544 _preloadItem: function(c) {
2545 if (c = S(c), !b.items[c].preloaded) {
2546 var d = b.items[c];
2547 d.parsed || (d = b.parseEl(c)), y("LazyLoad", d), "image" === d.type && (d.img = a('<img class="mfp-img" />').on("load.mfploader", function() {
2548 d.hasSize = !0
2549 }).on("error.mfploader", function() {
2550 d.hasSize = !0, d.loadError = !0, y("LazyLoadError", d)
2551 }).attr("src", d.src)), d.preloaded = !0
2552 }
2553 }
2554 }
2555 });
2556 var U = "retina";
2557 a.magnificPopup.registerModule(U, {
2558 options: {
2559 replaceSrc: function(a) {
2560 return a.src.replace(/\.\w+$/, function(a) {
2561 return "@2x" + a
2562 })
2563 },
2564 ratio: 1
2565 },
2566 proto: {
2567 initRetina: function() {
2568 if (window.devicePixelRatio > 1) {
2569 var a = b.st.retina,
2570 c = a.ratio;
2571 c = isNaN(c) ? c() : c, c > 1 && (w("ImageHasSize." + U, function(a, b) {
2572 b.img.css({
2573 "max-width": b.img[0].naturalWidth / c,
2574 width: "100%"
2575 })
2576 }), w("ElementParse." + U, function(b, d) {
2577 d.src = a.replaceSrc(d, c)
2578 }))
2579 }
2580 }
2581 }
2582 }),
2583 function() {
2584 var b = 1e3,
2585 c = "ontouchstart" in window,
2586 d = function() {
2587 v.off("touchmove" + f + " touchend" + f)
2588 },
2589 e = "mfpFastClick",
2590 f = "." + e;
2591 a.fn.mfpFastClick = function(e) {
2592 return a(this).each(function() {
2593 var g, h = a(this);
2594 if (c) {
2595 var i, j, k, l, m, n;
2596 h.on("touchstart" + f, function(a) {
2597 l = !1, n = 1, m = a.originalEvent ? a.originalEvent.touches[0] : a.touches[0], j = m.clientX, k = m.clientY, v.on("touchmove" + f, function(a) {
2598 m = a.originalEvent ? a.originalEvent.touches : a.touches, n = m.length, m = m[0], (Math.abs(m.clientX - j) > 10 || Math.abs(m.clientY - k) > 10) && (l = !0, d())
2599 }).on("touchend" + f, function(a) {
2600 d(), l || n > 1 || (g = !0, a.preventDefault(), clearTimeout(i), i = setTimeout(function() {
2601 g = !1
2602 }, b), e())
2603 })
2604 })
2605 }
2606 h.on("click" + f, function() {
2607 g || e()
2608 })
2609 })
2610 }, a.fn.destroyMfpFastClick = function() {
2611 a(this).off("touchstart" + f + " click" + f), c && v.off("touchmove" + f + " touchend" + f)
2612 }
2613 }(), A()
2614});
2615
2616/*++++++++++++++++++++++++++++++++++++++++++++++++++++
2617 jquery.mCustomScrollbar.concat.min.js
2618++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
2619/* == jquery mousewheel plugin == Version: 3.1.12, License: MIT License (MIT) */
2620! function(a) {
2621 "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof exports ? module.exports = a : a(jQuery)
2622}(function(a) {
2623 function b(b) {
2624 var g = b || window.event,
2625 h = i.call(arguments, 1),
2626 j = 0,
2627 l = 0,
2628 m = 0,
2629 n = 0,
2630 o = 0,
2631 p = 0;
2632 if (b = a.event.fix(g), b.type = "mousewheel", "detail" in g && (m = -1 * g.detail), "wheelDelta" in g && (m = g.wheelDelta), "wheelDeltaY" in g && (m = g.wheelDeltaY), "wheelDeltaX" in g && (l = -1 * g.wheelDeltaX), "axis" in g && g.axis === g.HORIZONTAL_AXIS && (l = -1 * m, m = 0), j = 0 === m ? l : m, "deltaY" in g && (m = -1 * g.deltaY, j = m), "deltaX" in g && (l = g.deltaX, 0 === m && (j = -1 * l)), 0 !== m || 0 !== l) {
2633 if (1 === g.deltaMode) {
2634 var q = a.data(this, "mousewheel-line-height");
2635 j *= q, m *= q, l *= q
2636 } else if (2 === g.deltaMode) {
2637 var r = a.data(this, "mousewheel-page-height");
2638 j *= r, m *= r, l *= r
2639 }
2640 if (n = Math.max(Math.abs(m), Math.abs(l)), (!f || f > n) && (f = n, d(g, n) && (f /= 40)), d(g, n) && (j /= 40, l /= 40, m /= 40), j = Math[j >= 1 ? "floor" : "ceil"](j / f), l = Math[l >= 1 ? "floor" : "ceil"](l / f), m = Math[m >= 1 ? "floor" : "ceil"](m / f), k.settings.normalizeOffset && this.getBoundingClientRect) {
2641 var s = this.getBoundingClientRect();
2642 o = b.clientX - s.left, p = b.clientY - s.top
2643 }
2644 return b.deltaX = l, b.deltaY = m, b.deltaFactor = f, b.offsetX = o, b.offsetY = p, b.deltaMode = 0, h.unshift(b, j, l, m), e && clearTimeout(e), e = setTimeout(c, 200), (a.event.dispatch || a.event.handle).apply(this, h)
2645 }
2646 }
2647
2648 function c() {
2649 f = null
2650 }
2651
2652 function d(a, b) {
2653 return k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 === 0
2654 }
2655 var e, f, g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"],
2656 h = "onwheel" in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"],
2657 i = Array.prototype.slice;
2658 if (a.event.fixHooks)
2659 for (var j = g.length; j;) a.event.fixHooks[g[--j]] = a.event.mouseHooks;
2660 var k = a.event.special.mousewheel = {
2661 version: "3.1.12",
2662 setup: function() {
2663 if (this.addEventListener)
2664 for (var c = h.length; c;) this.addEventListener(h[--c], b, !1);
2665 else this.onmousewheel = b;
2666 a.data(this, "mousewheel-line-height", k.getLineHeight(this)), a.data(this, "mousewheel-page-height", k.getPageHeight(this))
2667 },
2668 teardown: function() {
2669 if (this.removeEventListener)
2670 for (var c = h.length; c;) this.removeEventListener(h[--c], b, !1);
2671 else this.onmousewheel = null;
2672 a.removeData(this, "mousewheel-line-height"), a.removeData(this, "mousewheel-page-height")
2673 },
2674 getLineHeight: function(b) {
2675 var c = a(b),
2676 d = c["offsetParent" in a.fn ? "offsetParent" : "parent"]();
2677 return d.length || (d = a("body")), parseInt(d.css("fontSize"), 10) || parseInt(c.css("fontSize"), 10) || 16
2678 },
2679 getPageHeight: function(b) {
2680 return a(b).height()
2681 },
2682 settings: {
2683 adjustOldDeltas: !0,
2684 normalizeOffset: !0
2685 }
2686 };
2687 a.fn.extend({
2688 mousewheel: function(a) {
2689 return a ? this.bind("mousewheel", a) : this.trigger("mousewheel")
2690 },
2691 unmousewheel: function(a) {
2692 return this.unbind("mousewheel", a)
2693 }
2694 })
2695});
2696/* == malihu jquery custom scrollbar plugin == Version: 3.0.9, License: MIT License (MIT) */
2697! function(e) {
2698 "undefined" != typeof module && module.exports ? module.exports = e : e(jQuery, window, document)
2699}(function(e) {
2700 ! function(t) {
2701 var o = "function" == typeof define && define.amd,
2702 a = "undefined" != typeof module && module.exports,
2703 n = "https:" == document.location.protocol ? "https:" : "http:",
2704 i = "cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js";
2705 o || (a ? require("jquery-mousewheel")(e) : e.event.special.mousewheel || e("head").append(decodeURI("%3Cscript src=" + n + "//" + i + "%3E%3C/script%3E"))), t()
2706 }(function() {
2707 var t, o = "mCustomScrollbar",
2708 a = "mCS",
2709 n = ".mCustomScrollbar",
2710 i = {
2711 setTop: 0,
2712 setLeft: 0,
2713 axis: "y",
2714 scrollbarPosition: "inside",
2715 scrollInertia: 950,
2716 autoDraggerLength: !0,
2717 alwaysShowScrollbar: 0,
2718 snapOffset: 0,
2719 mouseWheel: {
2720 enable: !0,
2721 scrollAmount: "auto",
2722 axis: "y",
2723 deltaFactor: "auto",
2724 disableOver: ["select", "option", "keygen", "datalist", "textarea"]
2725 },
2726 scrollButtons: {
2727 scrollType: "stepless",
2728 scrollAmount: "auto"
2729 },
2730 keyboard: {
2731 enable: !0,
2732 scrollType: "stepless",
2733 scrollAmount: "auto"
2734 },
2735 contentTouchScroll: 25,
2736 advanced: {
2737 autoScrollOnFocus: "input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",
2738 updateOnContentResize: !0,
2739 updateOnImageLoad: !0,
2740 autoUpdateTimeout: 60
2741 },
2742 theme: "light",
2743 callbacks: {
2744 onTotalScrollOffset: 0,
2745 onTotalScrollBackOffset: 0,
2746 alwaysTriggerOffsets: !0
2747 }
2748 },
2749 r = 0,
2750 l = {},
2751 s = window.attachEvent && !window.addEventListener ? 1 : 0,
2752 c = !1,
2753 d = ["mCSB_dragger_onDrag", "mCSB_scrollTools_onDrag", "mCS_img_loaded", "mCS_disabled", "mCS_destroyed", "mCS_no_scrollbar", "mCS-autoHide", "mCS-dir-rtl", "mCS_no_scrollbar_y", "mCS_no_scrollbar_x", "mCS_y_hidden", "mCS_x_hidden", "mCSB_draggerContainer", "mCSB_buttonUp", "mCSB_buttonDown", "mCSB_buttonLeft", "mCSB_buttonRight"],
2754 u = {
2755 init: function(t) {
2756 var t = e.extend(!0, {}, i, t),
2757 o = f.call(this);
2758 if (t.live) {
2759 var s = t.liveSelector || this.selector || n,
2760 c = e(s);
2761 if ("off" === t.live) return void m(s);
2762 l[s] = setTimeout(function() {
2763 c.mCustomScrollbar(t), "once" === t.live && c.length && m(s)
2764 }, 500)
2765 } else m(s);
2766 return t.setWidth = t.set_width ? t.set_width : t.setWidth, t.setHeight = t.set_height ? t.set_height : t.setHeight, t.axis = t.horizontalScroll ? "x" : p(t.axis), t.scrollInertia = t.scrollInertia > 0 && t.scrollInertia < 17 ? 17 : t.scrollInertia, "object" != typeof t.mouseWheel && 1 == t.mouseWheel && (t.mouseWheel = {
2767 enable: !0,
2768 scrollAmount: "auto",
2769 axis: "y",
2770 preventDefault: !1,
2771 deltaFactor: "auto",
2772 normalizeDelta: !1,
2773 invert: !1
2774 }), t.mouseWheel.scrollAmount = t.mouseWheelPixels ? t.mouseWheelPixels : t.mouseWheel.scrollAmount, t.mouseWheel.normalizeDelta = t.advanced.normalizeMouseWheelDelta ? t.advanced.normalizeMouseWheelDelta : t.mouseWheel.normalizeDelta, t.scrollButtons.scrollType = g(t.scrollButtons.scrollType), h(t), e(o).each(function() {
2775 var o = e(this);
2776 if (!o.data(a)) {
2777 o.data(a, {
2778 idx: ++r,
2779 opt: t,
2780 scrollRatio: {
2781 y: null,
2782 x: null
2783 },
2784 overflowed: null,
2785 contentReset: {
2786 y: null,
2787 x: null
2788 },
2789 bindEvents: !1,
2790 tweenRunning: !1,
2791 sequential: {},
2792 langDir: o.css("direction"),
2793 cbOffsets: null,
2794 trigger: null
2795 });
2796 var n = o.data(a),
2797 i = n.opt,
2798 l = o.data("mcs-axis"),
2799 s = o.data("mcs-scrollbar-position"),
2800 c = o.data("mcs-theme");
2801 l && (i.axis = l), s && (i.scrollbarPosition = s), c && (i.theme = c, h(i)), v.call(this), e("#mCSB_" + n.idx + "_container img:not(." + d[2] + ")").addClass(d[2]), u.update.call(null, o)
2802 }
2803 })
2804 },
2805 update: function(t, o) {
2806 var n = t || f.call(this);
2807 return e(n).each(function() {
2808 var t = e(this);
2809 if (t.data(a)) {
2810 var n = t.data(a),
2811 i = n.opt,
2812 r = e("#mCSB_" + n.idx + "_container"),
2813 l = [e("#mCSB_" + n.idx + "_dragger_vertical"), e("#mCSB_" + n.idx + "_dragger_horizontal")];
2814 if (!r.length) return;
2815 n.tweenRunning && V(t), t.hasClass(d[3]) && t.removeClass(d[3]), t.hasClass(d[4]) && t.removeClass(d[4]), S.call(this), _.call(this), "y" === i.axis || i.advanced.autoExpandHorizontalScroll || r.css("width", x(r.children())), n.overflowed = B.call(this), O.call(this), i.autoDraggerLength && b.call(this), C.call(this), k.call(this);
2816 var s = [Math.abs(r[0].offsetTop), Math.abs(r[0].offsetLeft)];
2817 "x" !== i.axis && (n.overflowed[0] ? l[0].height() > l[0].parent().height() ? T.call(this) : (Q(t, s[0].toString(), {
2818 dir: "y",
2819 dur: 0,
2820 overwrite: "none"
2821 }), n.contentReset.y = null) : (T.call(this), "y" === i.axis ? M.call(this) : "yx" === i.axis && n.overflowed[1] && Q(t, s[1].toString(), {
2822 dir: "x",
2823 dur: 0,
2824 overwrite: "none"
2825 }))), "y" !== i.axis && (n.overflowed[1] ? l[1].width() > l[1].parent().width() ? T.call(this) : (Q(t, s[1].toString(), {
2826 dir: "x",
2827 dur: 0,
2828 overwrite: "none"
2829 }), n.contentReset.x = null) : (T.call(this), "x" === i.axis ? M.call(this) : "yx" === i.axis && n.overflowed[0] && Q(t, s[0].toString(), {
2830 dir: "y",
2831 dur: 0,
2832 overwrite: "none"
2833 }))), o && n && (2 === o && i.callbacks.onImageLoad && "function" == typeof i.callbacks.onImageLoad ? i.callbacks.onImageLoad.call(this) : 3 === o && i.callbacks.onSelectorChange && "function" == typeof i.callbacks.onSelectorChange ? i.callbacks.onSelectorChange.call(this) : i.callbacks.onUpdate && "function" == typeof i.callbacks.onUpdate && i.callbacks.onUpdate.call(this)), X.call(this)
2834 }
2835 })
2836 },
2837 scrollTo: function(t, o) {
2838 if ("undefined" != typeof t && null != t) {
2839 var n = f.call(this);
2840 return e(n).each(function() {
2841 var n = e(this);
2842 if (n.data(a)) {
2843 var i = n.data(a),
2844 r = i.opt,
2845 l = {
2846 trigger: "external",
2847 scrollInertia: r.scrollInertia,
2848 scrollEasing: "mcsEaseInOut",
2849 moveDragger: !1,
2850 timeout: 60,
2851 callbacks: !0,
2852 onStart: !0,
2853 onUpdate: !0,
2854 onComplete: !0
2855 },
2856 s = e.extend(!0, {}, l, o),
2857 c = Y.call(this, t),
2858 d = s.scrollInertia > 0 && s.scrollInertia < 17 ? 17 : s.scrollInertia;
2859 c[0] = j.call(this, c[0], "y"), c[1] = j.call(this, c[1], "x"), s.moveDragger && (c[0] *= i.scrollRatio.y, c[1] *= i.scrollRatio.x), s.dur = d, setTimeout(function() {
2860 null !== c[0] && "undefined" != typeof c[0] && "x" !== r.axis && i.overflowed[0] && (s.dir = "y", s.overwrite = "all", Q(n, c[0].toString(), s)), null !== c[1] && "undefined" != typeof c[1] && "y" !== r.axis && i.overflowed[1] && (s.dir = "x", s.overwrite = "none", Q(n, c[1].toString(), s))
2861 }, s.timeout)
2862 }
2863 })
2864 }
2865 },
2866 stop: function() {
2867 var t = f.call(this);
2868 return e(t).each(function() {
2869 var t = e(this);
2870 t.data(a) && V(t)
2871 })
2872 },
2873 disable: function(t) {
2874 var o = f.call(this);
2875 return e(o).each(function() {
2876 var o = e(this);
2877 if (o.data(a)) {
2878 {
2879 o.data(a)
2880 }
2881 X.call(this, "remove"), M.call(this), t && T.call(this), O.call(this, !0), o.addClass(d[3])
2882 }
2883 })
2884 },
2885 destroy: function() {
2886 var t = f.call(this);
2887 return e(t).each(function() {
2888 var n = e(this);
2889 if (n.data(a)) {
2890 var i = n.data(a),
2891 r = i.opt,
2892 l = e("#mCSB_" + i.idx),
2893 s = e("#mCSB_" + i.idx + "_container"),
2894 c = e(".mCSB_" + i.idx + "_scrollbar");
2895 r.live && m(r.liveSelector || e(t).selector), X.call(this, "remove"), M.call(this), T.call(this), n.removeData(a), Z(this, "mcs"), c.remove(), s.find("img." + d[2]).removeClass(d[2]), l.replaceWith(s.contents()), n.removeClass(o + " _" + a + "_" + i.idx + " " + d[6] + " " + d[7] + " " + d[5] + " " + d[3]).addClass(d[4])
2896 }
2897 })
2898 }
2899 },
2900 f = function() {
2901 return "object" != typeof e(this) || e(this).length < 1 ? n : this
2902 },
2903 h = function(t) {
2904 var o = ["rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark"],
2905 a = ["rounded-dots", "rounded-dots-dark", "3d", "3d-dark", "3d-thick", "3d-thick-dark", "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark"],
2906 n = ["minimal", "minimal-dark"],
2907 i = ["minimal", "minimal-dark"],
2908 r = ["minimal", "minimal-dark"];
2909 t.autoDraggerLength = e.inArray(t.theme, o) > -1 ? !1 : t.autoDraggerLength, t.autoExpandScrollbar = e.inArray(t.theme, a) > -1 ? !1 : t.autoExpandScrollbar, t.scrollButtons.enable = e.inArray(t.theme, n) > -1 ? !1 : t.scrollButtons.enable, t.autoHideScrollbar = e.inArray(t.theme, i) > -1 ? !0 : t.autoHideScrollbar, t.scrollbarPosition = e.inArray(t.theme, r) > -1 ? "outside" : t.scrollbarPosition
2910 },
2911 m = function(e) {
2912 l[e] && (clearTimeout(l[e]), Z(l, e))
2913 },
2914 p = function(e) {
2915 return "yx" === e || "xy" === e || "auto" === e ? "yx" : "x" === e || "horizontal" === e ? "x" : "y"
2916 },
2917 g = function(e) {
2918 return "stepped" === e || "pixels" === e || "step" === e || "click" === e ? "stepped" : "stepless"
2919 },
2920 v = function() {
2921 var t = e(this),
2922 n = t.data(a),
2923 i = n.opt,
2924 r = i.autoExpandScrollbar ? " " + d[1] + "_expand" : "",
2925 l = ["<div id='mCSB_" + n.idx + "_scrollbar_vertical' class='mCSB_scrollTools mCSB_" + n.idx + "_scrollbar mCS-" + i.theme + " mCSB_scrollTools_vertical" + r + "'><div class='" + d[12] + "'><div id='mCSB_" + n.idx + "_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>", "<div id='mCSB_" + n.idx + "_scrollbar_horizontal' class='mCSB_scrollTools mCSB_" + n.idx + "_scrollbar mCS-" + i.theme + " mCSB_scrollTools_horizontal" + r + "'><div class='" + d[12] + "'><div id='mCSB_" + n.idx + "_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],
2926 s = "yx" === i.axis ? "mCSB_vertical_horizontal" : "x" === i.axis ? "mCSB_horizontal" : "mCSB_vertical",
2927 c = "yx" === i.axis ? l[0] + l[1] : "x" === i.axis ? l[1] : l[0],
2928 u = "yx" === i.axis ? "<div id='mCSB_" + n.idx + "_container_wrapper' class='mCSB_container_wrapper' />" : "",
2929 f = i.autoHideScrollbar ? " " + d[6] : "",
2930 h = "x" !== i.axis && "rtl" === n.langDir ? " " + d[7] : "";
2931 i.setWidth && t.css("width", i.setWidth), i.setHeight && t.css("height", i.setHeight), i.setLeft = "y" !== i.axis && "rtl" === n.langDir ? "989999px" : i.setLeft, t.addClass(o + " _" + a + "_" + n.idx + f + h).wrapInner("<div id='mCSB_" + n.idx + "' class='mCustomScrollBox mCS-" + i.theme + " " + s + "'><div id='mCSB_" + n.idx + "_container' class='mCSB_container' style='position:relative; top:" + i.setTop + "; left:" + i.setLeft + ";' dir=" + n.langDir + " /></div>");
2932 var m = e("#mCSB_" + n.idx),
2933 p = e("#mCSB_" + n.idx + "_container");
2934 "y" === i.axis || i.advanced.autoExpandHorizontalScroll || p.css("width", x(p.children())), "outside" === i.scrollbarPosition ? ("static" === t.css("position") && t.css("position", "relative"), t.css("overflow", "visible"), m.addClass("mCSB_outside").after(c)) : (m.addClass("mCSB_inside").append(c), p.wrap(u)), w.call(this);
2935 var g = [e("#mCSB_" + n.idx + "_dragger_vertical"), e("#mCSB_" + n.idx + "_dragger_horizontal")];
2936 g[0].css("min-height", g[0].height()), g[1].css("min-width", g[1].width())
2937 },
2938 x = function(t) {
2939 return Math.max.apply(Math, t.map(function() {
2940 return e(this).outerWidth(!0)
2941 }).get())
2942 },
2943 _ = function() {
2944 var t = e(this),
2945 o = t.data(a),
2946 n = o.opt,
2947 i = e("#mCSB_" + o.idx + "_container");
2948 n.advanced.autoExpandHorizontalScroll && "y" !== n.axis && i.css({
2949 position: "absolute",
2950 width: "auto"
2951 }).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({
2952 width: Math.ceil(i[0].getBoundingClientRect().right + .4) - Math.floor(i[0].getBoundingClientRect().left),
2953 position: "relative"
2954 }).unwrap()
2955 },
2956 w = function() {
2957 var t = e(this),
2958 o = t.data(a),
2959 n = o.opt,
2960 i = e(".mCSB_" + o.idx + "_scrollbar:first"),
2961 r = te(n.scrollButtons.tabindex) ? "tabindex='" + n.scrollButtons.tabindex + "'" : "",
2962 l = ["<a href='#' class='" + d[13] + "' oncontextmenu='return false;' " + r + " />", "<a href='#' class='" + d[14] + "' oncontextmenu='return false;' " + r + " />", "<a href='#' class='" + d[15] + "' oncontextmenu='return false;' " + r + " />", "<a href='#' class='" + d[16] + "' oncontextmenu='return false;' " + r + " />"],
2963 s = ["x" === n.axis ? l[2] : l[0], "x" === n.axis ? l[3] : l[1], l[2], l[3]];
2964 n.scrollButtons.enable && i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])
2965 },
2966 S = function() {
2967 var t = e(this),
2968 o = t.data(a),
2969 n = e("#mCSB_" + o.idx),
2970 i = t.css("max-height") || "none",
2971 r = -1 !== i.indexOf("%"),
2972 l = t.css("box-sizing");
2973 if ("none" !== i) {
2974 var s = r ? t.parent().height() * parseInt(i) / 100 : parseInt(i);
2975 "border-box" === l && (s -= t.innerHeight() - t.height() + (t.outerHeight() - t.innerHeight())), n.css("max-height", Math.round(s))
2976 }
2977 },
2978 b = function() {
2979 var t = e(this),
2980 o = t.data(a),
2981 n = e("#mCSB_" + o.idx),
2982 i = e("#mCSB_" + o.idx + "_container"),
2983 r = [e("#mCSB_" + o.idx + "_dragger_vertical"), e("#mCSB_" + o.idx + "_dragger_horizontal")],
2984 l = [n.height() / i.outerHeight(!1), n.width() / i.outerWidth(!1)],
2985 c = [parseInt(r[0].css("min-height")), Math.round(l[0] * r[0].parent().height()), parseInt(r[1].css("min-width")), Math.round(l[1] * r[1].parent().width())],
2986 d = s && c[1] < c[0] ? c[0] : c[1],
2987 u = s && c[3] < c[2] ? c[2] : c[3];
2988 r[0].css({
2989 height: d,
2990 "max-height": r[0].parent().height() - 10
2991 }).find(".mCSB_dragger_bar").css({
2992 "line-height": c[0] + "px"
2993 }), r[1].css({
2994 width: u,
2995 "max-width": r[1].parent().width() - 10
2996 })
2997 },
2998 C = function() {
2999 var t = e(this),
3000 o = t.data(a),
3001 n = e("#mCSB_" + o.idx),
3002 i = e("#mCSB_" + o.idx + "_container"),
3003 r = [e("#mCSB_" + o.idx + "_dragger_vertical"), e("#mCSB_" + o.idx + "_dragger_horizontal")],
3004 l = [i.outerHeight(!1) - n.height(), i.outerWidth(!1) - n.width()],
3005 s = [l[0] / (r[0].parent().height() - r[0].height()), l[1] / (r[1].parent().width() - r[1].width())];
3006 o.scrollRatio = {
3007 y: s[0],
3008 x: s[1]
3009 }
3010 },
3011 y = function(e, t, o) {
3012 var a = o ? d[0] + "_expanded" : "",
3013 n = e.closest(".mCSB_scrollTools");
3014 "active" === t ? (e.toggleClass(d[0] + " " + a), n.toggleClass(d[1]), e[0]._draggable = e[0]._draggable ? 0 : 1) : e[0]._draggable || ("hide" === t ? (e.removeClass(d[0]), n.removeClass(d[1])) : (e.addClass(d[0]), n.addClass(d[1])))
3015 },
3016 B = function() {
3017 var t = e(this),
3018 o = t.data(a),
3019 n = e("#mCSB_" + o.idx),
3020 i = e("#mCSB_" + o.idx + "_container"),
3021 r = null == o.overflowed ? i.height() : i.outerHeight(!1),
3022 l = null == o.overflowed ? i.width() : i.outerWidth(!1);
3023 return [r > n.height(), l > n.width()]
3024 },
3025 T = function() {
3026 var t = e(this),
3027 o = t.data(a),
3028 n = o.opt,
3029 i = e("#mCSB_" + o.idx),
3030 r = e("#mCSB_" + o.idx + "_container"),
3031 l = [e("#mCSB_" + o.idx + "_dragger_vertical"), e("#mCSB_" + o.idx + "_dragger_horizontal")];
3032 if (V(t), ("x" !== n.axis && !o.overflowed[0] || "y" === n.axis && o.overflowed[0]) && (l[0].add(r).css("top", 0), Q(t, "_resetY")), "y" !== n.axis && !o.overflowed[1] || "x" === n.axis && o.overflowed[1]) {
3033 var s = dx = 0;
3034 "rtl" === o.langDir && (s = i.width() - r.outerWidth(!1), dx = Math.abs(s / o.scrollRatio.x)), r.css("left", s), l[1].css("left", dx), Q(t, "_resetX")
3035 }
3036 },
3037 k = function() {
3038 function t() {
3039 r = setTimeout(function() {
3040 e.event.special.mousewheel ? (clearTimeout(r), W.call(o[0])) : t()
3041 }, 100)
3042 }
3043 var o = e(this),
3044 n = o.data(a),
3045 i = n.opt;
3046 if (!n.bindEvents) {
3047 if (R.call(this), i.contentTouchScroll && D.call(this), E.call(this), i.mouseWheel.enable) {
3048 var r;
3049 t()
3050 }
3051 P.call(this), H.call(this), i.advanced.autoScrollOnFocus && z.call(this), i.scrollButtons.enable && U.call(this), i.keyboard.enable && F.call(this), n.bindEvents = !0
3052 }
3053 },
3054 M = function() {
3055 var t = e(this),
3056 o = t.data(a),
3057 n = o.opt,
3058 i = a + "_" + o.idx,
3059 r = ".mCSB_" + o.idx + "_scrollbar",
3060 l = e("#mCSB_" + o.idx + ",#mCSB_" + o.idx + "_container,#mCSB_" + o.idx + "_container_wrapper," + r + " ." + d[12] + ",#mCSB_" + o.idx + "_dragger_vertical,#mCSB_" + o.idx + "_dragger_horizontal," + r + ">a"),
3061 s = e("#mCSB_" + o.idx + "_container");
3062 n.advanced.releaseDraggableSelectors && l.add(e(n.advanced.releaseDraggableSelectors)), o.bindEvents && (e(document).unbind("." + i), l.each(function() {
3063 e(this).unbind("." + i)
3064 }), clearTimeout(t[0]._focusTimeout), Z(t[0], "_focusTimeout"), clearTimeout(o.sequential.step), Z(o.sequential, "step"), clearTimeout(s[0].onCompleteTimeout), Z(s[0], "onCompleteTimeout"), o.bindEvents = !1)
3065 },
3066 O = function(t) {
3067 var o = e(this),
3068 n = o.data(a),
3069 i = n.opt,
3070 r = e("#mCSB_" + n.idx + "_container_wrapper"),
3071 l = r.length ? r : e("#mCSB_" + n.idx + "_container"),
3072 s = [e("#mCSB_" + n.idx + "_scrollbar_vertical"), e("#mCSB_" + n.idx + "_scrollbar_horizontal")],
3073 c = [s[0].find(".mCSB_dragger"), s[1].find(".mCSB_dragger")];
3074 "x" !== i.axis && (n.overflowed[0] && !t ? (s[0].add(c[0]).add(s[0].children("a")).css("display", "block"), l.removeClass(d[8] + " " + d[10])) : (i.alwaysShowScrollbar ? (2 !== i.alwaysShowScrollbar && c[0].css("display", "none"), l.removeClass(d[10])) : (s[0].css("display", "none"), l.addClass(d[10])), l.addClass(d[8]))), "y" !== i.axis && (n.overflowed[1] && !t ? (s[1].add(c[1]).add(s[1].children("a")).css("display", "block"), l.removeClass(d[9] + " " + d[11])) : (i.alwaysShowScrollbar ? (2 !== i.alwaysShowScrollbar && c[1].css("display", "none"), l.removeClass(d[11])) : (s[1].css("display", "none"), l.addClass(d[11])), l.addClass(d[9]))), n.overflowed[0] || n.overflowed[1] ? o.removeClass(d[5]) : o.addClass(d[5])
3075 },
3076 I = function(e) {
3077 var t = e.type;
3078 switch (t) {
3079 case "pointerdown":
3080 case "MSPointerDown":
3081 case "pointermove":
3082 case "MSPointerMove":
3083 case "pointerup":
3084 case "MSPointerUp":
3085 return e.target.ownerDocument !== document ? [e.originalEvent.screenY, e.originalEvent.screenX, !1] : [e.originalEvent.pageY, e.originalEvent.pageX, !1];
3086 case "touchstart":
3087 case "touchmove":
3088 case "touchend":
3089 var o = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0],
3090 a = e.originalEvent.touches.length || e.originalEvent.changedTouches.length;
3091 return e.target.ownerDocument !== document ? [o.screenY, o.screenX, a > 1] : [o.pageY, o.pageX, a > 1];
3092 default:
3093 return [e.pageY, e.pageX, !1]
3094 }
3095 },
3096 R = function() {
3097 function t(e) {
3098 var t = m.find("iframe");
3099 if (t.length) {
3100 var o = e ? "auto" : "none";
3101 t.css("pointer-events", o)
3102 }
3103 }
3104
3105 function o(e, t, o, a) {
3106 if (m[0].idleTimer = u.scrollInertia < 233 ? 250 : 0, n.attr("id") === h[1]) var i = "x",
3107 r = (n[0].offsetLeft - t + a) * d.scrollRatio.x;
3108 else var i = "y",
3109 r = (n[0].offsetTop - e + o) * d.scrollRatio.y;
3110 Q(l, r.toString(), {
3111 dir: i,
3112 drag: !0
3113 })
3114 }
3115 var n, i, r, l = e(this),
3116 d = l.data(a),
3117 u = d.opt,
3118 f = a + "_" + d.idx,
3119 h = ["mCSB_" + d.idx + "_dragger_vertical", "mCSB_" + d.idx + "_dragger_horizontal"],
3120 m = e("#mCSB_" + d.idx + "_container"),
3121 p = e("#" + h[0] + ",#" + h[1]),
3122 g = u.advanced.releaseDraggableSelectors ? p.add(e(u.advanced.releaseDraggableSelectors)) : p;
3123 p.bind("mousedown." + f + " touchstart." + f + " pointerdown." + f + " MSPointerDown." + f, function(o) {
3124 if (o.stopImmediatePropagation(), o.preventDefault(), $(o)) {
3125 c = !0, s && (document.onselectstart = function() {
3126 return !1
3127 }), t(!1), V(l), n = e(this);
3128 var a = n.offset(),
3129 d = I(o)[0] - a.top,
3130 f = I(o)[1] - a.left,
3131 h = n.height() + a.top,
3132 m = n.width() + a.left;
3133 h > d && d > 0 && m > f && f > 0 && (i = d, r = f), y(n, "active", u.autoExpandScrollbar)
3134 }
3135 }).bind("touchmove." + f, function(e) {
3136 e.stopImmediatePropagation(), e.preventDefault();
3137 var t = n.offset(),
3138 a = I(e)[0] - t.top,
3139 l = I(e)[1] - t.left;
3140 o(i, r, a, l)
3141 }), e(document).bind("mousemove." + f + " pointermove." + f + " MSPointerMove." + f, function(e) {
3142 if (n) {
3143 var t = n.offset(),
3144 a = I(e)[0] - t.top,
3145 l = I(e)[1] - t.left;
3146 if (i === a) return;
3147 o(i, r, a, l)
3148 }
3149 }).add(g).bind("mouseup." + f + " touchend." + f + " pointerup." + f + " MSPointerUp." + f, function(e) {
3150 n && (y(n, "active", u.autoExpandScrollbar), n = null), c = !1, s && (document.onselectstart = null), t(!0)
3151 })
3152 },
3153 D = function() {
3154 function o(e) {
3155 if (!ee(e) || c || I(e)[2]) return void(t = 0);
3156 t = 1, S = 0, b = 0, C.removeClass("mCS_touch_action");
3157 var o = M.offset();
3158 d = I(e)[0] - o.top, u = I(e)[1] - o.left, A = [I(e)[0], I(e)[1]]
3159 }
3160
3161 function n(e) {
3162 if (ee(e) && !c && !I(e)[2] && (e.stopImmediatePropagation(), !b || S)) {
3163 p = J();
3164 var t = k.offset(),
3165 o = I(e)[0] - t.top,
3166 a = I(e)[1] - t.left,
3167 n = "mcsLinearOut";
3168 if (R.push(o), D.push(a), A[2] = Math.abs(I(e)[0] - A[0]), A[3] = Math.abs(I(e)[1] - A[1]), y.overflowed[0]) var i = O[0].parent().height() - O[0].height(),
3169 r = d - o > 0 && o - d > -(i * y.scrollRatio.y) && (2 * A[3] < A[2] || "yx" === B.axis);
3170 if (y.overflowed[1]) var l = O[1].parent().width() - O[1].width(),
3171 f = u - a > 0 && a - u > -(l * y.scrollRatio.x) && (2 * A[2] < A[3] || "yx" === B.axis);
3172 r || f ? (e.preventDefault(), S = 1) : (b = 1, C.addClass("mCS_touch_action")), _ = "yx" === B.axis ? [d - o, u - a] : "x" === B.axis ? [null, u - a] : [d - o, null], M[0].idleTimer = 250, y.overflowed[0] && s(_[0], E, n, "y", "all", !0), y.overflowed[1] && s(_[1], E, n, "x", W, !0)
3173 }
3174 }
3175
3176 function i(e) {
3177 if (!ee(e) || c || I(e)[2]) return void(t = 0);
3178 t = 1, e.stopImmediatePropagation(), V(C), m = J();
3179 var o = k.offset();
3180 f = I(e)[0] - o.top, h = I(e)[1] - o.left, R = [], D = []
3181 }
3182
3183 function r(e) {
3184 if (ee(e) && !c && !I(e)[2]) {
3185 e.stopImmediatePropagation(), S = 0, b = 0, g = J();
3186 var t = k.offset(),
3187 o = I(e)[0] - t.top,
3188 a = I(e)[1] - t.left;
3189 if (!(g - p > 30)) {
3190 x = 1e3 / (g - m);
3191 var n = "mcsEaseOut",
3192 i = 2.5 > x,
3193 r = i ? [R[R.length - 2], D[D.length - 2]] : [0, 0];
3194 v = i ? [o - r[0], a - r[1]] : [o - f, a - h];
3195 var d = [Math.abs(v[0]), Math.abs(v[1])];
3196 x = i ? [Math.abs(v[0] / 4), Math.abs(v[1] / 4)] : [x, x];
3197 var u = [Math.abs(M[0].offsetTop) - v[0] * l(d[0] / x[0], x[0]), Math.abs(M[0].offsetLeft) - v[1] * l(d[1] / x[1], x[1])];
3198 _ = "yx" === B.axis ? [u[0], u[1]] : "x" === B.axis ? [null, u[1]] : [u[0], null], w = [4 * d[0] + B.scrollInertia, 4 * d[1] + B.scrollInertia];
3199 var C = parseInt(B.contentTouchScroll) || 0;
3200 _[0] = d[0] > C ? _[0] : 0, _[1] = d[1] > C ? _[1] : 0, y.overflowed[0] && s(_[0], w[0], n, "y", W, !1), y.overflowed[1] && s(_[1], w[1], n, "x", W, !1)
3201 }
3202 }
3203 }
3204
3205 function l(e, t) {
3206 var o = [1.5 * t, 2 * t, t / 1.5, t / 2];
3207 return e > 90 ? t > 4 ? o[0] : o[3] : e > 60 ? t > 3 ? o[3] : o[2] : e > 30 ? t > 8 ? o[1] : t > 6 ? o[0] : t > 4 ? t : o[2] : t > 8 ? t : o[3]
3208 }
3209
3210 function s(e, t, o, a, n, i) {
3211 e && Q(C, e.toString(), {
3212 dur: t,
3213 scrollEasing: o,
3214 dir: a,
3215 overwrite: n,
3216 drag: i
3217 })
3218 }
3219 var d, u, f, h, m, p, g, v, x, _, w, S, b, C = e(this),
3220 y = C.data(a),
3221 B = y.opt,
3222 T = a + "_" + y.idx,
3223 k = e("#mCSB_" + y.idx),
3224 M = e("#mCSB_" + y.idx + "_container"),
3225 O = [e("#mCSB_" + y.idx + "_dragger_vertical"), e("#mCSB_" + y.idx + "_dragger_horizontal")],
3226 R = [],
3227 D = [],
3228 E = 0,
3229 W = "yx" === B.axis ? "none" : "all",
3230 A = [],
3231 P = M.find("iframe"),
3232 z = ["touchstart." + T + " pointerdown." + T + " MSPointerDown." + T, "touchmove." + T + " pointermove." + T + " MSPointerMove." + T, "touchend." + T + " pointerup." + T + " MSPointerUp." + T];
3233 M.bind(z[0], function(e) {
3234 o(e)
3235 }).bind(z[1], function(e) {
3236 n(e)
3237 }), k.bind(z[0], function(e) {
3238 i(e)
3239 }).bind(z[2], function(e) {
3240 r(e)
3241 }), P.length && P.each(function() {
3242 e(this).load(function() {
3243 L(this) && e(this.contentDocument || this.contentWindow.document).bind(z[0], function(e) {
3244 o(e), i(e)
3245 }).bind(z[1], function(e) {
3246 n(e)
3247 }).bind(z[2], function(e) {
3248 r(e)
3249 })
3250 })
3251 })
3252 },
3253 E = function() {
3254 function o() {
3255 return window.getSelection ? window.getSelection().toString() : document.selection && "Control" != document.selection.type ? document.selection.createRange().text : 0
3256 }
3257
3258 function n(e, t, o) {
3259 d.type = o && i ? "stepped" : "stepless", d.scrollAmount = 10, q(r, e, t, "mcsLinearOut", o ? 60 : null)
3260 }
3261 var i, r = e(this),
3262 l = r.data(a),
3263 s = l.opt,
3264 d = l.sequential,
3265 u = a + "_" + l.idx,
3266 f = e("#mCSB_" + l.idx + "_container"),
3267 h = f.parent();
3268 f.bind("mousedown." + u, function(e) {
3269 t || i || (i = 1, c = !0)
3270 }).add(document).bind("mousemove." + u, function(e) {
3271 if (!t && i && o()) {
3272 var a = f.offset(),
3273 r = I(e)[0] - a.top + f[0].offsetTop,
3274 c = I(e)[1] - a.left + f[0].offsetLeft;
3275 r > 0 && r < h.height() && c > 0 && c < h.width() ? d.step && n("off", null, "stepped") : ("x" !== s.axis && l.overflowed[0] && (0 > r ? n("on", 38) : r > h.height() && n("on", 40)), "y" !== s.axis && l.overflowed[1] && (0 > c ? n("on", 37) : c > h.width() && n("on", 39)))
3276 }
3277 }).bind("mouseup." + u, function(e) {
3278 t || (i && (i = 0, n("off", null)), c = !1)
3279 })
3280 },
3281 W = function() {
3282 function t(t, a) {
3283 if (V(o), !A(o, t.target)) {
3284 var r = "auto" !== i.mouseWheel.deltaFactor ? parseInt(i.mouseWheel.deltaFactor) : s && t.deltaFactor < 100 ? 100 : t.deltaFactor || 100;
3285 if ("x" === i.axis || "x" === i.mouseWheel.axis) var d = "x",
3286 u = [Math.round(r * n.scrollRatio.x), parseInt(i.mouseWheel.scrollAmount)],
3287 f = "auto" !== i.mouseWheel.scrollAmount ? u[1] : u[0] >= l.width() ? .9 * l.width() : u[0],
3288 h = Math.abs(e("#mCSB_" + n.idx + "_container")[0].offsetLeft),
3289 m = c[1][0].offsetLeft,
3290 p = c[1].parent().width() - c[1].width(),
3291 g = t.deltaX || t.deltaY || a;
3292 else var d = "y",
3293 u = [Math.round(r * n.scrollRatio.y), parseInt(i.mouseWheel.scrollAmount)],
3294 f = "auto" !== i.mouseWheel.scrollAmount ? u[1] : u[0] >= l.height() ? .9 * l.height() : u[0],
3295 h = Math.abs(e("#mCSB_" + n.idx + "_container")[0].offsetTop),
3296 m = c[0][0].offsetTop,
3297 p = c[0].parent().height() - c[0].height(),
3298 g = t.deltaY || a;
3299 "y" === d && !n.overflowed[0] || "x" === d && !n.overflowed[1] || ((i.mouseWheel.invert || t.webkitDirectionInvertedFromDevice) && (g = -g), i.mouseWheel.normalizeDelta && (g = 0 > g ? -1 : 1), (g > 0 && 0 !== m || 0 > g && m !== p || i.mouseWheel.preventDefault) && (t.stopImmediatePropagation(), t.preventDefault()), Q(o, (h - g * f).toString(), {
3300 dir: d
3301 }))
3302 }
3303 }
3304 if (e(this).data(a)) {
3305 var o = e(this),
3306 n = o.data(a),
3307 i = n.opt,
3308 r = a + "_" + n.idx,
3309 l = e("#mCSB_" + n.idx),
3310 c = [e("#mCSB_" + n.idx + "_dragger_vertical"), e("#mCSB_" + n.idx + "_dragger_horizontal")],
3311 d = e("#mCSB_" + n.idx + "_container").find("iframe");
3312 d.length && d.each(function() {
3313 e(this).load(function() {
3314 L(this) && e(this.contentDocument || this.contentWindow.document).bind("mousewheel." + r, function(e, o) {
3315 t(e, o)
3316 })
3317 })
3318 }), l.bind("mousewheel." + r, function(e, o) {
3319 t(e, o)
3320 })
3321 }
3322 },
3323 L = function(e) {
3324 var t = null;
3325 try {
3326 var o = e.contentDocument || e.contentWindow.document;
3327 t = o.body.innerHTML
3328 } catch (a) {}
3329 return null !== t
3330 },
3331 A = function(t, o) {
3332 var n = o.nodeName.toLowerCase(),
3333 i = t.data(a).opt.mouseWheel.disableOver,
3334 r = ["select", "textarea"];
3335 return e.inArray(n, i) > -1 && !(e.inArray(n, r) > -1 && !e(o).is(":focus"))
3336 },
3337 P = function() {
3338 var t = e(this),
3339 o = t.data(a),
3340 n = a + "_" + o.idx,
3341 i = e("#mCSB_" + o.idx + "_container"),
3342 r = i.parent(),
3343 l = e(".mCSB_" + o.idx + "_scrollbar ." + d[12]);
3344 l.bind("touchstart." + n + " pointerdown." + n + " MSPointerDown." + n, function(e) {
3345 c = !0
3346 }).bind("touchend." + n + " pointerup." + n + " MSPointerUp." + n, function(e) {
3347 c = !1
3348 }).bind("click." + n, function(a) {
3349 if (e(a.target).hasClass(d[12]) || e(a.target).hasClass("mCSB_draggerRail")) {
3350 V(t);
3351 var n = e(this),
3352 l = n.find(".mCSB_dragger");
3353 if (n.parent(".mCSB_scrollTools_horizontal").length > 0) {
3354 if (!o.overflowed[1]) return;
3355 var s = "x",
3356 c = a.pageX > l.offset().left ? -1 : 1,
3357 u = Math.abs(i[0].offsetLeft) - .9 * c * r.width()
3358 } else {
3359 if (!o.overflowed[0]) return;
3360 var s = "y",
3361 c = a.pageY > l.offset().top ? -1 : 1,
3362 u = Math.abs(i[0].offsetTop) - .9 * c * r.height()
3363 }
3364 Q(t, u.toString(), {
3365 dir: s,
3366 scrollEasing: "mcsEaseInOut"
3367 })
3368 }
3369 })
3370 },
3371 z = function() {
3372 var t = e(this),
3373 o = t.data(a),
3374 n = o.opt,
3375 i = a + "_" + o.idx,
3376 r = e("#mCSB_" + o.idx + "_container"),
3377 l = r.parent();
3378 r.bind("focusin." + i, function(o) {
3379 var a = e(document.activeElement),
3380 i = r.find(".mCustomScrollBox").length,
3381 s = 0;
3382 a.is(n.advanced.autoScrollOnFocus) && (V(t), clearTimeout(t[0]._focusTimeout), t[0]._focusTimer = i ? (s + 17) * i : 0, t[0]._focusTimeout = setTimeout(function() {
3383 var e = [oe(a)[0], oe(a)[1]],
3384 o = [r[0].offsetTop, r[0].offsetLeft],
3385 i = [o[0] + e[0] >= 0 && o[0] + e[0] < l.height() - a.outerHeight(!1), o[1] + e[1] >= 0 && o[0] + e[1] < l.width() - a.outerWidth(!1)],
3386 c = "yx" !== n.axis || i[0] || i[1] ? "all" : "none";
3387 "x" === n.axis || i[0] || Q(t, e[0].toString(), {
3388 dir: "y",
3389 scrollEasing: "mcsEaseInOut",
3390 overwrite: c,
3391 dur: s
3392 }), "y" === n.axis || i[1] || Q(t, e[1].toString(), {
3393 dir: "x",
3394 scrollEasing: "mcsEaseInOut",
3395 overwrite: c,
3396 dur: s
3397 })
3398 }, t[0]._focusTimer))
3399 })
3400 },
3401 H = function() {
3402 var t = e(this),
3403 o = t.data(a),
3404 n = a + "_" + o.idx,
3405 i = e("#mCSB_" + o.idx + "_container").parent();
3406 i.bind("scroll." + n, function(t) {
3407 (0 !== i.scrollTop() || 0 !== i.scrollLeft()) && e(".mCSB_" + o.idx + "_scrollbar").css("visibility", "hidden")
3408 })
3409 },
3410 U = function() {
3411 var t = e(this),
3412 o = t.data(a),
3413 n = o.opt,
3414 i = o.sequential,
3415 r = a + "_" + o.idx,
3416 l = ".mCSB_" + o.idx + "_scrollbar",
3417 s = e(l + ">a");
3418 s.bind("mousedown." + r + " touchstart." + r + " pointerdown." + r + " MSPointerDown." + r + " mouseup." + r + " touchend." + r + " pointerup." + r + " MSPointerUp." + r + " mouseout." + r + " pointerout." + r + " MSPointerOut." + r + " click." + r, function(a) {
3419 function r(e, o) {
3420 i.scrollAmount = n.snapAmount || n.scrollButtons.scrollAmount, q(t, e, o)
3421 }
3422 if (a.preventDefault(), $(a)) {
3423 var l = e(this).attr("class");
3424 switch (i.type = n.scrollButtons.scrollType, a.type) {
3425 case "mousedown":
3426 case "touchstart":
3427 case "pointerdown":
3428 case "MSPointerDown":
3429 if ("stepped" === i.type) return;
3430 c = !0, o.tweenRunning = !1, r("on", l);
3431 break;
3432 case "mouseup":
3433 case "touchend":
3434 case "pointerup":
3435 case "MSPointerUp":
3436 case "mouseout":
3437 case "pointerout":
3438 case "MSPointerOut":
3439 if ("stepped" === i.type) return;
3440 c = !1, i.dir && r("off", l);
3441 break;
3442 case "click":
3443 if ("stepped" !== i.type || o.tweenRunning) return;
3444 r("on", l)
3445 }
3446 }
3447 })
3448 },
3449 F = function() {
3450 function t(t) {
3451 function a(e, t) {
3452 r.type = i.keyboard.scrollType, r.scrollAmount = i.snapAmount || i.keyboard.scrollAmount, "stepped" === r.type && n.tweenRunning || q(o, e, t)
3453 }
3454 switch (t.type) {
3455 case "blur":
3456 n.tweenRunning && r.dir && a("off", null);
3457 break;
3458 case "keydown":
3459 case "keyup":
3460 var l = t.keyCode ? t.keyCode : t.which,
3461 s = "on";
3462 if ("x" !== i.axis && (38 === l || 40 === l) || "y" !== i.axis && (37 === l || 39 === l)) {
3463 if ((38 === l || 40 === l) && !n.overflowed[0] || (37 === l || 39 === l) && !n.overflowed[1]) return;
3464 "keyup" === t.type && (s = "off"), e(document.activeElement).is(u) || (t.preventDefault(), t.stopImmediatePropagation(), a(s, l))
3465 } else if (33 === l || 34 === l) {
3466 if ((n.overflowed[0] || n.overflowed[1]) && (t.preventDefault(), t.stopImmediatePropagation()), "keyup" === t.type) {
3467 V(o);
3468 var f = 34 === l ? -1 : 1;
3469 if ("x" === i.axis || "yx" === i.axis && n.overflowed[1] && !n.overflowed[0]) var h = "x",
3470 m = Math.abs(c[0].offsetLeft) - .9 * f * d.width();
3471 else var h = "y",
3472 m = Math.abs(c[0].offsetTop) - .9 * f * d.height();
3473 Q(o, m.toString(), {
3474 dir: h,
3475 scrollEasing: "mcsEaseInOut"
3476 })
3477 }
3478 } else if ((35 === l || 36 === l) && !e(document.activeElement).is(u) && ((n.overflowed[0] || n.overflowed[1]) && (t.preventDefault(), t.stopImmediatePropagation()), "keyup" === t.type)) {
3479 if ("x" === i.axis || "yx" === i.axis && n.overflowed[1] && !n.overflowed[0]) var h = "x",
3480 m = 35 === l ? Math.abs(d.width() - c.outerWidth(!1)) : 0;
3481 else var h = "y",
3482 m = 35 === l ? Math.abs(d.height() - c.outerHeight(!1)) : 0;
3483 Q(o, m.toString(), {
3484 dir: h,
3485 scrollEasing: "mcsEaseInOut"
3486 })
3487 }
3488 }
3489 }
3490 var o = e(this),
3491 n = o.data(a),
3492 i = n.opt,
3493 r = n.sequential,
3494 l = a + "_" + n.idx,
3495 s = e("#mCSB_" + n.idx),
3496 c = e("#mCSB_" + n.idx + "_container"),
3497 d = c.parent(),
3498 u = "input,textarea,select,datalist,keygen,[contenteditable='true']",
3499 f = c.find("iframe"),
3500 h = ["blur." + l + " keydown." + l + " keyup." + l];
3501 f.length && f.each(function() {
3502 e(this).load(function() {
3503 L(this) && e(this.contentDocument || this.contentWindow.document).bind(h[0], function(e) {
3504 t(e)
3505 })
3506 })
3507 }), s.attr("tabindex", "0").bind(h[0], function(e) {
3508 t(e)
3509 })
3510 },
3511 q = function(t, o, n, i, r) {
3512 function l(e) {
3513 var o = "stepped" !== f.type,
3514 a = r ? r : e ? o ? p / 1.5 : g : 1e3 / 60,
3515 n = e ? o ? 7.5 : 40 : 2.5,
3516 s = [Math.abs(h[0].offsetTop), Math.abs(h[0].offsetLeft)],
3517 d = [c.scrollRatio.y > 10 ? 10 : c.scrollRatio.y, c.scrollRatio.x > 10 ? 10 : c.scrollRatio.x],
3518 u = "x" === f.dir[0] ? s[1] + f.dir[1] * d[1] * n : s[0] + f.dir[1] * d[0] * n,
3519 m = "x" === f.dir[0] ? s[1] + f.dir[1] * parseInt(f.scrollAmount) : s[0] + f.dir[1] * parseInt(f.scrollAmount),
3520 v = "auto" !== f.scrollAmount ? m : u,
3521 x = i ? i : e ? o ? "mcsLinearOut" : "mcsEaseInOut" : "mcsLinear",
3522 _ = e ? !0 : !1;
3523 return e && 17 > a && (v = "x" === f.dir[0] ? s[1] : s[0]), Q(t, v.toString(), {
3524 dir: f.dir[0],
3525 scrollEasing: x,
3526 dur: a,
3527 onComplete: _
3528 }), e ? void(f.dir = !1) : (clearTimeout(f.step), void(f.step = setTimeout(function() {
3529 l()
3530 }, a)))
3531 }
3532
3533 function s() {
3534 clearTimeout(f.step), Z(f, "step"), V(t)
3535 }
3536 var c = t.data(a),
3537 u = c.opt,
3538 f = c.sequential,
3539 h = e("#mCSB_" + c.idx + "_container"),
3540 m = "stepped" === f.type ? !0 : !1,
3541 p = u.scrollInertia < 26 ? 26 : u.scrollInertia,
3542 g = u.scrollInertia < 1 ? 17 : u.scrollInertia;
3543 switch (o) {
3544 case "on":
3545 if (f.dir = [n === d[16] || n === d[15] || 39 === n || 37 === n ? "x" : "y", n === d[13] || n === d[15] || 38 === n || 37 === n ? -1 : 1], V(t), te(n) && "stepped" === f.type) return;
3546 l(m);
3547 break;
3548 case "off":
3549 s(), (m || c.tweenRunning && f.dir) && l(!0)
3550 }
3551 },
3552 Y = function(t) {
3553 var o = e(this).data(a).opt,
3554 n = [];
3555 return "function" == typeof t && (t = t()), t instanceof Array ? n = t.length > 1 ? [t[0], t[1]] : "x" === o.axis ? [null, t[0]] : [t[0], null] : (n[0] = t.y ? t.y : t.x || "x" === o.axis ? null : t, n[1] = t.x ? t.x : t.y || "y" === o.axis ? null : t), "function" == typeof n[0] && (n[0] = n[0]()), "function" == typeof n[1] && (n[1] = n[1]()), n
3556 },
3557 j = function(t, o) {
3558 if (null != t && "undefined" != typeof t) {
3559 var n = e(this),
3560 i = n.data(a),
3561 r = i.opt,
3562 l = e("#mCSB_" + i.idx + "_container"),
3563 s = l.parent(),
3564 c = typeof t;
3565 o || (o = "x" === r.axis ? "x" : "y");
3566 var d = "x" === o ? l.outerWidth(!1) : l.outerHeight(!1),
3567 f = "x" === o ? l[0].offsetLeft : l[0].offsetTop,
3568 h = "x" === o ? "left" : "top";
3569 switch (c) {
3570 case "function":
3571 return t();
3572 case "object":
3573 var m = t.jquery ? t : e(t);
3574 if (!m.length) return;
3575 return "x" === o ? oe(m)[1] : oe(m)[0];
3576 case "string":
3577 case "number":
3578 if (te(t)) return Math.abs(t);
3579 if (-1 !== t.indexOf("%")) return Math.abs(d * parseInt(t) / 100);
3580 if (-1 !== t.indexOf("-=")) return Math.abs(f - parseInt(t.split("-=")[1]));
3581 if (-1 !== t.indexOf("+=")) {
3582 var p = f + parseInt(t.split("+=")[1]);
3583 return p >= 0 ? 0 : Math.abs(p)
3584 }
3585 if (-1 !== t.indexOf("px") && te(t.split("px")[0])) return Math.abs(t.split("px")[0]);
3586 if ("top" === t || "left" === t) return 0;
3587 if ("bottom" === t) return Math.abs(s.height() - l.outerHeight(!1));
3588 if ("right" === t) return Math.abs(s.width() - l.outerWidth(!1));
3589 if ("first" === t || "last" === t) {
3590 var m = l.find(":" + t);
3591 return "x" === o ? oe(m)[1] : oe(m)[0]
3592 }
3593 return e(t).length ? "x" === o ? oe(e(t))[1] : oe(e(t))[0] : (l.css(h, t), void u.update.call(null, n[0]))
3594 }
3595 }
3596 },
3597 X = function(t) {
3598 function o() {
3599 return clearTimeout(h[0].autoUpdate), 0 === s.parents("html").length ? void(s = null) : void(h[0].autoUpdate = setTimeout(function() {
3600 return f.advanced.updateOnSelectorChange && (m = r(), m !== w) ? (l(3), void(w = m)) : (f.advanced.updateOnContentResize && (p = [h.outerHeight(!1), h.outerWidth(!1), v.height(), v.width(), _()[0], _()[1]], (p[0] !== S[0] || p[1] !== S[1] || p[2] !== S[2] || p[3] !== S[3] || p[4] !== S[4] || p[5] !== S[5]) && (l(p[0] !== S[0] || p[1] !== S[1]), S = p)), f.advanced.updateOnImageLoad && (g = n(), g !== b && (h.find("img").each(function() {
3601 i(this)
3602 }), b = g)), void((f.advanced.updateOnSelectorChange || f.advanced.updateOnContentResize || f.advanced.updateOnImageLoad) && o()))
3603 }, f.advanced.autoUpdateTimeout))
3604 }
3605
3606 function n() {
3607 var e = 0;
3608 return f.advanced.updateOnImageLoad && (e = h.find("img").length), e
3609 }
3610
3611 function i(t) {
3612 function o(e, t) {
3613 return function() {
3614 return t.apply(e, arguments)
3615 }
3616 }
3617
3618 function a() {
3619 this.onload = null, e(t).addClass(d[2]), l(2)
3620 }
3621 if (e(t).hasClass(d[2])) return void l();
3622 var n = new Image;
3623 n.onload = o(n, a), n.src = t.src
3624 }
3625
3626 function r() {
3627 f.advanced.updateOnSelectorChange === !0 && (f.advanced.updateOnSelectorChange = "*");
3628 var t = 0,
3629 o = h.find(f.advanced.updateOnSelectorChange);
3630 return f.advanced.updateOnSelectorChange && o.length > 0 && o.each(function() {
3631 t += e(this).height() + e(this).width()
3632 }), t
3633 }
3634
3635 function l(e) {
3636 clearTimeout(h[0].autoUpdate), u.update.call(null, s[0], e)
3637 }
3638 var s = e(this),
3639 c = s.data(a),
3640 f = c.opt,
3641 h = e("#mCSB_" + c.idx + "_container");
3642 if (t) return clearTimeout(h[0].autoUpdate), void Z(h[0], "autoUpdate");
3643 var m, p, g, v = h.parent(),
3644 x = [e("#mCSB_" + c.idx + "_scrollbar_vertical"), e("#mCSB_" + c.idx + "_scrollbar_horizontal")],
3645 _ = function() {
3646 return [x[0].is(":visible") ? x[0].outerHeight(!0) : 0, x[1].is(":visible") ? x[1].outerWidth(!0) : 0]
3647 },
3648 w = r(),
3649 S = [h.outerHeight(!1), h.outerWidth(!1), v.height(), v.width(), _()[0], _()[1]],
3650 b = n();
3651 o()
3652 },
3653 N = function(e, t, o) {
3654 return Math.round(e / t) * t - o
3655 },
3656 V = function(t) {
3657 var o = t.data(a),
3658 n = e("#mCSB_" + o.idx + "_container,#mCSB_" + o.idx + "_container_wrapper,#mCSB_" + o.idx + "_dragger_vertical,#mCSB_" + o.idx + "_dragger_horizontal");
3659 n.each(function() {
3660 K.call(this)
3661 })
3662 },
3663 Q = function(t, o, n) {
3664 function i(e) {
3665 return s && c.callbacks[e] && "function" == typeof c.callbacks[e]
3666 }
3667
3668 function r() {
3669 return [c.callbacks.alwaysTriggerOffsets || _ >= w[0] + b, c.callbacks.alwaysTriggerOffsets || -C >= _]
3670 }
3671
3672 function l() {
3673 var e = [h[0].offsetTop, h[0].offsetLeft],
3674 o = [v[0].offsetTop, v[0].offsetLeft],
3675 a = [h.outerHeight(!1), h.outerWidth(!1)],
3676 i = [f.height(), f.width()];
3677 t[0].mcs = {
3678 content: h,
3679 top: e[0],
3680 left: e[1],
3681 draggerTop: o[0],
3682 draggerLeft: o[1],
3683 topPct: Math.round(100 * Math.abs(e[0]) / (Math.abs(a[0]) - i[0])),
3684 leftPct: Math.round(100 * Math.abs(e[1]) / (Math.abs(a[1]) - i[1])),
3685 direction: n.dir
3686 }
3687 }
3688 var s = t.data(a),
3689 c = s.opt,
3690 d = {
3691 trigger: "internal",
3692 dir: "y",
3693 scrollEasing: "mcsEaseOut",
3694 drag: !1,
3695 dur: c.scrollInertia,
3696 overwrite: "all",
3697 callbacks: !0,
3698 onStart: !0,
3699 onUpdate: !0,
3700 onComplete: !0
3701 },
3702 n = e.extend(d, n),
3703 u = [n.dur, n.drag ? 0 : n.dur],
3704 f = e("#mCSB_" + s.idx),
3705 h = e("#mCSB_" + s.idx + "_container"),
3706 m = h.parent(),
3707 p = c.callbacks.onTotalScrollOffset ? Y.call(t, c.callbacks.onTotalScrollOffset) : [0, 0],
3708 g = c.callbacks.onTotalScrollBackOffset ? Y.call(t, c.callbacks.onTotalScrollBackOffset) : [0, 0];
3709 if (s.trigger = n.trigger, (0 !== m.scrollTop() || 0 !== m.scrollLeft()) && (e(".mCSB_" + s.idx + "_scrollbar").css("visibility", "visible"), m.scrollTop(0).scrollLeft(0)), "_resetY" !== o || s.contentReset.y || (i("onOverflowYNone") && c.callbacks.onOverflowYNone.call(t[0]), s.contentReset.y = 1), "_resetX" !== o || s.contentReset.x || (i("onOverflowXNone") && c.callbacks.onOverflowXNone.call(t[0]), s.contentReset.x = 1), "_resetY" !== o && "_resetX" !== o) {
3710 switch (!s.contentReset.y && t[0].mcs || !s.overflowed[0] || (i("onOverflowY") && c.callbacks.onOverflowY.call(t[0]), s.contentReset.x = null), !s.contentReset.x && t[0].mcs || !s.overflowed[1] || (i("onOverflowX") && c.callbacks.onOverflowX.call(t[0]), s.contentReset.x = null), c.snapAmount && (o = N(o, c.snapAmount, c.snapOffset)), n.dir) {
3711 case "x":
3712 var v = e("#mCSB_" + s.idx + "_dragger_horizontal"),
3713 x = "left",
3714 _ = h[0].offsetLeft,
3715 w = [f.width() - h.outerWidth(!1), v.parent().width() - v.width()],
3716 S = [o, 0 === o ? 0 : o / s.scrollRatio.x],
3717 b = p[1],
3718 C = g[1],
3719 B = b > 0 ? b / s.scrollRatio.x : 0,
3720 T = C > 0 ? C / s.scrollRatio.x : 0;
3721 break;
3722 case "y":
3723 var v = e("#mCSB_" + s.idx + "_dragger_vertical"),
3724 x = "top",
3725 _ = h[0].offsetTop,
3726 w = [f.height() - h.outerHeight(!1), v.parent().height() - v.height()],
3727 S = [o, 0 === o ? 0 : o / s.scrollRatio.y],
3728 b = p[0],
3729 C = g[0],
3730 B = b > 0 ? b / s.scrollRatio.y : 0,
3731 T = C > 0 ? C / s.scrollRatio.y : 0
3732 }
3733 S[1] < 0 || 0 === S[0] && 0 === S[1] ? S = [0, 0] : S[1] >= w[1] ? S = [w[0], w[1]] : S[0] = -S[0], t[0].mcs || (l(), i("onInit") && c.callbacks.onInit.call(t[0])), clearTimeout(h[0].onCompleteTimeout), (s.tweenRunning || !(0 === _ && S[0] >= 0 || _ === w[0] && S[0] <= w[0])) && (G(v[0], x, Math.round(S[1]), u[1], n.scrollEasing), G(h[0], x, Math.round(S[0]), u[0], n.scrollEasing, n.overwrite, {
3734 onStart: function() {
3735 n.callbacks && n.onStart && !s.tweenRunning && (i("onScrollStart") && (l(), c.callbacks.onScrollStart.call(t[0])), s.tweenRunning = !0, y(v), s.cbOffsets = r())
3736 },
3737 onUpdate: function() {
3738 n.callbacks && n.onUpdate && i("whileScrolling") && (l(), c.callbacks.whileScrolling.call(t[0]))
3739 },
3740 onComplete: function() {
3741 if (n.callbacks && n.onComplete) {
3742 "yx" === c.axis && clearTimeout(h[0].onCompleteTimeout);
3743 var e = h[0].idleTimer || 0;
3744 h[0].onCompleteTimeout = setTimeout(function() {
3745 i("onScroll") && (l(), c.callbacks.onScroll.call(t[0])), i("onTotalScroll") && S[1] >= w[1] - B && s.cbOffsets[0] && (l(), c.callbacks.onTotalScroll.call(t[0])), i("onTotalScrollBack") && S[1] <= T && s.cbOffsets[1] && (l(), c.callbacks.onTotalScrollBack.call(t[0])), s.tweenRunning = !1, h[0].idleTimer = 0, y(v, "hide")
3746 }, e)
3747 }
3748 }
3749 }))
3750 }
3751 },
3752 G = function(e, t, o, a, n, i, r) {
3753 function l() {
3754 S.stop || (x || m.call(), x = J() - v, s(), x >= S.time && (S.time = x > S.time ? x + f - (x - S.time) : x + f - 1, S.time < x + 1 && (S.time = x + 1)), S.time < a ? S.id = h(l) : g.call())
3755 }
3756
3757 function s() {
3758 a > 0 ? (S.currVal = u(S.time, _, b, a, n), w[t] = Math.round(S.currVal) + "px") : w[t] = o + "px", p.call()
3759 }
3760
3761 function c() {
3762 f = 1e3 / 60, S.time = x + f, h = window.requestAnimationFrame ? window.requestAnimationFrame : function(e) {
3763 return s(), setTimeout(e, .01)
3764 }, S.id = h(l)
3765 }
3766
3767 function d() {
3768 null != S.id && (window.requestAnimationFrame ? window.cancelAnimationFrame(S.id) : clearTimeout(S.id), S.id = null)
3769 }
3770
3771 function u(e, t, o, a, n) {
3772 switch (n) {
3773 case "linear":
3774 case "mcsLinear":
3775 return o * e / a + t;
3776 case "mcsLinearOut":
3777 return e /= a, e--, o * Math.sqrt(1 - e * e) + t;
3778 case "easeInOutSmooth":
3779 return e /= a / 2, 1 > e ? o / 2 * e * e + t : (e--, -o / 2 * (e * (e - 2) - 1) + t);
3780 case "easeInOutStrong":
3781 return e /= a / 2, 1 > e ? o / 2 * Math.pow(2, 10 * (e - 1)) + t : (e--, o / 2 * (-Math.pow(2, -10 * e) + 2) + t);
3782 case "easeInOut":
3783 case "mcsEaseInOut":
3784 return e /= a / 2, 1 > e ? o / 2 * e * e * e + t : (e -= 2, o / 2 * (e * e * e + 2) + t);
3785 case "easeOutSmooth":
3786 return e /= a, e--, -o * (e * e * e * e - 1) + t;
3787 case "easeOutStrong":
3788 return o * (-Math.pow(2, -10 * e / a) + 1) + t;
3789 case "easeOut":
3790 case "mcsEaseOut":
3791 default:
3792 var i = (e /= a) * e,
3793 r = i * e;
3794 return t + o * (.499999999999997 * r * i + -2.5 * i * i + 5.5 * r + -6.5 * i + 4 * e)
3795 }
3796 }
3797 e._mTween || (e._mTween = {
3798 top: {},
3799 left: {}
3800 });
3801 var f, h, r = r || {},
3802 m = r.onStart || function() {},
3803 p = r.onUpdate || function() {},
3804 g = r.onComplete || function() {},
3805 v = J(),
3806 x = 0,
3807 _ = e.offsetTop,
3808 w = e.style,
3809 S = e._mTween[t];
3810 "left" === t && (_ = e.offsetLeft);
3811 var b = o - _;
3812 S.stop = 0, "none" !== i && d(), c()
3813 },
3814 J = function() {
3815 return window.performance && window.performance.now ? window.performance.now() : window.performance && window.performance.webkitNow ? window.performance.webkitNow() : Date.now ? Date.now() : (new Date).getTime()
3816 },
3817 K = function() {
3818 var e = this;
3819 e._mTween || (e._mTween = {
3820 top: {},
3821 left: {}
3822 });
3823 for (var t = ["top", "left"], o = 0; o < t.length; o++) {
3824 var a = t[o];
3825 e._mTween[a].id && (window.requestAnimationFrame ? window.cancelAnimationFrame(e._mTween[a].id) : clearTimeout(e._mTween[a].id), e._mTween[a].id = null, e._mTween[a].stop = 1)
3826 }
3827 },
3828 Z = function(e, t) {
3829 try {
3830 delete e[t]
3831 } catch (o) {
3832 e[t] = null
3833 }
3834 },
3835 $ = function(e) {
3836 return !(e.which && 1 !== e.which)
3837 },
3838 ee = function(e) {
3839 var t = e.originalEvent.pointerType;
3840 return !(t && "touch" !== t && 2 !== t)
3841 },
3842 te = function(e) {
3843 return !isNaN(parseFloat(e)) && isFinite(e)
3844 },
3845 oe = function(e) {
3846 var t = e.parents(".mCSB_container");
3847 return [e.offset().top - t.offset().top, e.offset().left - t.offset().left]
3848 };
3849 e.fn[o] = function(t) {
3850 return u[t] ? u[t].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof t && t ? void e.error("Method " + t + " does not exist") : u.init.apply(this, arguments)
3851 }, e[o] = function(t) {
3852 return u[t] ? u[t].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof t && t ? void e.error("Method " + t + " does not exist") : u.init.apply(this, arguments)
3853 }, e[o].defaults = i, window[o] = !0, e(window).load(function() {
3854 e(n)[o](), e.extend(e.expr[":"], {
3855 mcsInView: e.expr[":"].mcsInView || function(t) {
3856 var o, a, n = e(t),
3857 i = n.parents(".mCSB_container");
3858 if (i.length) return o = i.parent(), a = [i[0].offsetTop, i[0].offsetLeft], a[0] + oe(n)[0] >= 0 && a[0] + oe(n)[0] < o.height() - n.outerHeight(!1) && a[1] + oe(n)[1] >= 0 && a[1] + oe(n)[1] < o.width() - n.outerWidth(!1)
3859 },
3860 mcsOverflow: e.expr[":"].mcsOverflow || function(t) {
3861 var o = e(t).data(a);
3862 if (o) return o.overflowed[0] || o.overflowed[1]
3863 }
3864 })
3865 })
3866 })
3867});