vendor: 5,633 bytes, lines 1-99
1/*! Magnific Popup - v1.1.0 - 2016-02-20 2 * http://dimsemenov.com/plugins/magnific-popup/ 3 * Copyright (c) 2016 Dmitry Semenov; */ 4! function(a) { 5 "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : window.jQuery || window.Zepto) 6}(function(a) { 7 var b, c, d, e, f, g, h = "Close", 8 i = "BeforeClose", 9 j = "AfterClose", 10 k = "BeforeAppend", 11 l = "MarkupParse", 12 m = "Open", 13 n = "Change", 14 o = "mfp", 15 p = "." + o, 16 q = "mfp-ready", 17 r = "mfp-removing", 18 s = "mfp-prevent-close", 19 t = function() {}, 20 u = !!window.jQuery, 21 v = a(window), 22 w = function(a, c) { 23 b.ev.on(o + a + p, c) 24 }, 25 x = function(b, c, d, e) { 26 var f = document.createElement("div"); 27 return f.className = "mfp-" + b, d && (f.innerHTML = d), e ? c && c.appendChild(f) : (f = a(f), c && f.appendTo(c)), f 28 }, 29 y = function(c, d) { 30 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])) 31 }, 32 z = function(c) { 33 return c === g && b.currTemplate.closeBtn || (b.currTemplate.closeBtn = a(b.st.closeMarkup.replace("%title%", b.st.tClose)), g = c), b.currTemplate.closeBtn 34 }, 35 A = function() { 36 a.magnificPopup.instance || (b = new t, b.init(), a.magnificPopup.instance = b) 37 }, 38 B = function() { 39 var a = document.createElement("p").style, 40 b = ["ms", "O", "Moz", "Webkit"]; 41 if (void 0 !== a.transition) return !0; 42 for (; b.length;) 43 if (b.pop() + "Transition" in a) return !0; 44 return !1 45 }; 46 t.prototype = { 47 constructor: t, 48 init: function() { 49 var c = navigator.appVersion; 50 b.isLowIE = b.isIE8 = document.all && !document.addEventListener, 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 = {} 51 }, 52 open: function(c) { 53 var e; 54 if (c.isObj === !1) { 55 b.items = c.items.toArray(), b.index = 0; 56 var g, h = c.items; 57 for (e = 0; e < h.length; e++) 58 if (g = h[e], g.parsed && (g = g.el[0]), g === c.el[0]) { 59 b.index = e; 60 break 61 } 62 } else b.items = a.isArray(c.items) ? c.items : [c.items], b.index = c.index || 0; 63 if (b.isOpen) return void b.updateItemHTML(); 64 b.types = [], f = "", c.mainEl && c.mainEl.length ? b.ev = c.mainEl.eq(0) : b.ev = 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() { 65 b.close() 66 }), b.wrap = x("wrap").attr("tabindex", -1).on("click" + p, function(a) { 67 b._checkIfClose(a.target) && b.close() 68 }), b.container = x("container", b.wrap)), b.contentContainer = x("content"), b.st.preloader && (b.preloader = x("preloader", b.container, b.st.tLoading)); 69 var i = a.magnificPopup.modules; 70 for (e = 0; e < i.length; e++) { 71 var j = i[e]; 72 j = j.charAt(0).toUpperCase() + j.slice(1), b["init" + j].call(b) 73 } 74 y("BeforeOpen"), b.st.showCloseBtn && (b.st.closeBtnInside ? (w(l, function(a, b, c, d) { 75 c.close_replaceWith = z(d.type) 76 }), f += " mfp-close-btn-in") : b.wrap.append(z())), b.st.alignTop && (f += " mfp-align-top"), b.fixedContentPos ? b.wrap.css({ 77 overflow: b.st.overflowY, 78 overflowX: "hidden", 79 overflowY: b.st.overflowY 80 }) : b.wrap.css({ 81 top: v.scrollTop(), 82 position: "absolute" 83 }), (b.st.fixedBgPos === !1 || "auto" === b.st.fixedBgPos && !b.fixedContentPos) && b.bgOverlay.css({ 84 height: d.height(), 85 position: "absolute" 86 }), b.st.enableEscapeKey && d.on("keyup" + p, function(a) { 87 27 === a.keyCode && b.close() 88 }), v.on("resize" + p, function() { 89 b.updateSize() 90 }), b.st.closeOnContentClick || (f += " mfp-auto-cursor"), f && b.wrap.addClass(f); 91 var k = b.wH = v.height(), 92 n = {}; 93 if (b.fixedContentPos && b._hasScrollBar(k)) { 94 var o = b._getScrollbarSize(); 95 o && (n.marginRight = o) 96 } 97 b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : n.overflow = "hidden"); 98 var r = b.st.mainClass; 99 return b.isIE7 && (r += " mfp-ie7"), r && b._addClassToMFP(r), b.updateItemHTML(), y("BuildControls"), a("html").css(n), b.bgOverlay.add(b.
99wrap).prependTo(b.st.prependTo || a(document.body)), b._lastFocusedEl = document.activeElement, setTimeout(function() { 100 b.content ? (b._addClassToMFP(q), b._setFocus()) : b.bgOverlay.addClass(q), d.on("focusin" + p, b._onFocusIn) 101 }, 16), b.isOpen = !0, b.updateSize(k), y(m), c 102 }, 103 close: function() { 104 b.isOpen && (y(i), b.isOpen = !1, b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP(r), setTimeout(function() { 105 b._close() 106 }, b.st.removalDelay)) : b._close()) 107 }, 108 _close: function() { 109 y(h); 110 var c = r + " " + q + " "; 111 if (b.bgOverlay.detach(), b.wrap.detach(), b.container.empty(), b.st.mainClass && (c += b.st.mainClass + " "), b._removeClassFromMFP(c), b.fixedContentPos) { 112 var e = { 113 marginRight: "" 114 }; 115 b.isIE7 ? a("body, html").css("overflow", "") : e.overflow = "", a("html").css(e) 116 } 117 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.st.autoFocusLast && b._lastFocusedEl && a(b._lastFocusedEl).focus(), b.currItem = null, b.content = null, b.currTemplate = null, b.prevHeight = 0, y(j) 118 }, 119 updateSize: function(a) { 120 if (b.isIOS) { 121 var c = document.documentElement.clientWidth / window.innerWidth, 122 d = window.innerHeight * c; 123 b.wrap.css("height", d), b.wH = d 124 } else b.wH = a || v.height(); 125 b.fixedContentPos || b.wrap.css("height", b.wH), y("Resize") 126 }, 127 updateItemHTML: function() { 128 var c = b.items[b.index]; 129 b.contentContainer.detach(), b.content && b.content.detach(), c.parsed || (c = b.parseEl(b.index)); 130 var d = c.type; 131 if (y("BeforeChange", [b.currItem ? b.currItem.type : "", d]), b.currItem = c, !b.currTemplate[d]) { 132 var f = b.st[d] ? b.st[d].markup : !1; 133 y("FirstMarkupParse", f), f ? b.currTemplate[d] = a(f) : b.currTemplate[d] = !0 134 } 135 e && e !== c.type && b.container.removeClass("mfp-" + e + "-holder"); 136 var g = b["get" + d.charAt(0).toUpperCase() + d.slice(1)](c, b.currTemplate[d]); 137 b.appendContent(g, d), c.preloaded = !0, y(n, c), e = c.type, b.container.prepend(b.contentContainer), y("AfterChange") 138 }, 139 appendContent: function(a, c) { 140 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) 141 }, 142 parseEl: function(c) { 143 var d, e = b.items[c]; 144 if (e.tagName ? e = { 145 el: a(e) 146 } : (d = e.type, e = { 147 data: e, 148 src: e.src 149 }), e.el) { 150 for (var f = b.types, g = 0; g < f.length; g++) 151 if (e.el.hasClass("mfp-" + f[g])) { 152 d = f[g]; 153 break 154 } 155 e.src = e.el.attr("data-mfp-src"), e.src || (e.src = e.el.attr("href")) 156 } 157 return e.type = d || b.st.type || "inline", e.index = c, e.parsed = !0, b.items[c] = e, y("ElementParse", e), b.items[c] 158 }, 159 addGroup: function(a, c) { 160 var d = function(d) { 161 d.mfpEl = this, b._openClick(d, a, c) 162 }; 163 c || (c = {}); 164 var e = "click.magnificPopup"; 165 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))) 166 }, 167 _openClick: function(c, d, e) { 168 var f = void 0 !== e.midClick ? e.midClick : a.magnificPopup.defaults.midClick; 169 if (f || !(2 === c.which || c.ctrlKey || c.metaKey || c.altKey || c.shift
169Key)) { 170 var g = void 0 !== e.disableOn ? e.disableOn : a.magnificPopup.defaults.disableOn; 171 if (g) 172 if (a.isFunction(g)) { 173 if (!g.call(b)) return !0 174 } else if (v.width() < g) return !0; 175 c.type && (c.preventDefault(), b.isOpen && c.stopPropagation()), e.el = a(c.mfpEl), e.delegate && (e.items = d.find(e.delegate)), b.open(e) 176 } 177 }, 178 updateStatus: function(a, d) { 179 if (b.preloader) { 180 c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading); 181 var e = { 182 status: a, 183 text: d 184 }; 185 y("UpdateStatus", e), a = e.status, d = e.text, b.preloader.html(d), b.preloader.find("a").on("click", function(a) { 186 a.stopImmediatePropagation() 187 }), b.container.addClass("mfp-s-" + a), c = a 188 } 189 }, 190 _checkIfClose: function(c) { 191 if (!a(c).hasClass(s)) { 192 var d = b.st.closeOnContentClick, 193 e = b.st.closeOnBgClick; 194 if (d && e) return !0; 195 if (!b.content || a(c).hasClass("mfp-close") || b.preloader && c === b.preloader[0]) return !0; 196 if (c === b.content[0] || a.contains(b.content[0], c)) { 197 if (d) return !0 198 } else if (e && a.contains(document, c)) return !0; 199 return !1 200 } 201 }, 202 _addClassToMFP: function(a) { 203 b.bgOverlay.addClass(a), b.wrap.addClass(a) 204 }, 205 _removeClassFromMFP: function(a) { 206 this.bgOverlay.removeClass(a), b.wrap.removeClass(a) 207 }, 208 _hasScrollBar: function(a) { 209 return (b.isIE7 ? d.height() : document.body.scrollHeight) > (a || v.height()) 210 }, 211 _setFocus: function() { 212 (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus() 213 }, 214 _onFocusIn: function(c) { 215 return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (b._setFocus(), !1) 216 }, 217 _parseMarkup: function(b, c, d) { 218 var e; 219 d.data && (c = a.extend(d.data, c)), y(l, [b, c, d]), a.each(c, function(c, d) { 220 if (void 0 === d || d === !1) return !0; 221 if (e = c.split("_"), e.length > 1) { 222 var f = b.find(p + "-" + e[0]); 223 if (f.length > 0) { 224 var g = e[1]; 225 "replaceWith" === g ? f[0] !== d[0] && f.replaceWith(d) : "img" === g ? f.is("img") ? f.attr("src", d) : f.replaceWith(a("<img>").attr("src", d).attr("class", f.attr("class"))) : f.attr(e[1], d) 226 } 227 } else b.find(p + "-" + c).html(d) 228 }) 229 }, 230 _getScrollbarSize: function() { 231 if (void 0 === b.scrollbarSize) { 232 var a = document.createElement("div"); 233 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) 234 } 235 return b.scrollbarSize 236 } 237 }, a.magnificPopup = { 238 instance: null, 239 proto: t.prototype, 240 modules: [], 241 open: function(b, c) { 242 return A(), b = b ? a.extend(!0, {}, b) : {}, b.isObj = !0, b.index = c || 0, this.instance.open(b) 243 }, 244 close: function() { 245 return a.magnificPopup.instance && a.magnificPopup.instance.close() 246 }, 247 registerModule: function(b, c) { 248 c.options && (a.magnificPopup.defaults[b] = c.options), a.extend(this.proto, c.proto), this.modules.push(b) 249 }, 250 defaults: { 251 disableOn: 0, 252 key: null, 253 midClick: !1, 254 mainClass: "", 255 preloader: !0, 256 focus: "", 257 closeOnContentClick: !1, 258 closeOnBgClick: !0, 259 closeBtnInside: !0, 260 showCloseBtn: !0, 261 enableEscapeKey: !0, 262 modal: !1, 263 alignTop: !1, 264 removalDelay: 0, 265 prependTo: null, 266 fixedContentPos: "auto", 267 fixedBgPos: "auto", 268 overflowY: "auto", 269 closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>', 270 tClose: "Close (Esc)", 271 tLoading: "Loading...", 272 autoFocusLast: !0 273 } 274 }, a.fn.magnificPopup = function(c) { 275 A(); 276 var d = a(this); 277 if ("string" == typeof c) 278 if ("open" === c) { 279 var e, f = u ? d.data("magnificPopup") : d[0].magnificPopup, 280 g = parseInt(arguments[1], 10) || 0; 281 f.items ? e = f.items[g] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(g)), b._openClick({ 282 mfpEl: e 283 }, d, f) 284 } else b.isOpen && b[c].apply(b, Array.prototype.slice.call(arguments, 1)); 285 else c = a.extend(!0, {}, c), u ? d.data("magnificPopup", c) : d[0].magnificPopup = c, b.addGroup(d, c); 286 return d 287 }; 288 var C, D, E, F = "inline", 289 G = function() { 290 E && (D.after(E.addClass(C)).detach(), E = null) 291 }; 292 a.magnificPopup.registerModule(F, { 293 options: { 294 hiddenClass: "hide", 295 markup: "", 296 tNotFound: "Content not found" 297 }, 298 proto: { 299 initInline: function() { 300 b.types.push(F), w(h + "." + F, function() { 301 G() 302 }) 303 }, 304 getInline: function(c, d) { 305 if (G(), c.src) { 306 var e = b.st.inline, 307 f = a(c.src); 308 if (f.length) { 309 var g = f[0].parentNode; 310 g && g.tagName && (D || (C = e.hiddenClass, D = x(C), C = "mfp-" + C), E = f.after(D).detach().removeClass(C)), b.updateStatus("ready") 311 } else b.updateStatus("error", e.tNotFound), f = a("<div>"); 312 return c.inlineElement = f, f 313 } 314 return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d 315 } 316 } 317 });
318 var H, I = "ajax", 319 J = function() { 320 H && a(document.body).removeClass(H) 321 }, 322 K = function() { 323 J(), b.req && b.req.abort() 324 }; 325 a.magnificPopup.registerModule(I, { 326 options: { 327 settings: null, 328 cursor: "mfp-ajax-cur", 329 tError: '<a href="%url%">The content</a> could not be loaded.' 330 }, 331 proto: { 332 initAjax: function() { 333 b.types.push(I), H = b.st.ajax.cursor, w(h + "." + I, K), w("BeforeChange." + I, K) 334 }, 335 getAjax: function(c) { 336 H && a(document.body).addClass(H), b.updateStatus("loading"); 337 var d = a.extend({ 338 url: c.src, 339 success: function(d, e, f) { 340 var g = { 341 data: d, 342 xhr: f 343 }; 344 y("ParseAjax", g), b.appendContent(a(g.data), I), c.finished = !0, J(), b._setFocus(), setTimeout(function() { 345 b.wrap.addClass(q) 346 }, 16), b.updateStatus("ready"), y("AjaxContentAdded") 347 }, 348 error: function() { 349 J(), c.finished = c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src)) 350 } 351 }, b.st.ajax.settings); 352 return b.req = a.ajax(d), "" 353 } 354 } 355 }); 356 var L, M = function(c) { 357 if (c.data && void 0 !== c.data.title) return c.data.title; 358 var d = b.st.image.titleSrc; 359 if (d) { 360 if (a.isFunction(d)) return d.call(b, c); 361 if (c.el) return c.el.attr(d) || "" 362 } 363 return "" 364 }; 365 a.magnificPopup.registerModule("image", { 366 options: { 367 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>', 368 cursor: "mfp-zoom-out-cur", 369 titleSrc: "title", 370 verticalFit: !0, 371 tError: '<a href="%url%">The image</a> could not be loaded.' 372 }, 373 proto: { 374 initImage: function() { 375 var c = b.st.image, 376 d = ".image"; 377 b.types.push("image"), w(m + d, function() { 378 "image" === b.currItem.type && c.cursor && a(document.body).addClass(c.cursor) 379 }), w(h + d, function() { 380 c.cursor && a(document.body).removeClass(c.cursor), v.off("resize" + p) 381 }), w("Resize" + d, b.resizeImage), b.isLowIE && w("AfterChange", b.resizeImage) 382 }, 383 resizeImage: function() { 384 var a = b.currItem; 385 if (a && a.img && b.st.image.verticalFit) { 386 var c = 0; 387 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) 388 } 389 }, 390 _onImageHasSize: function(a) { 391 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)) 392 }, 393 findImageSize: function(a) { 394 var c = 0, 395 d = a.img[0], 396 e = function(f) { 397 L && clearInterval(L), L = setInterval(function() { 398 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))) 399 }, f) 400 }; 401 e(1) 402 }, 403 getImage: function(c, d) { 404 var e = 0, 405 f = function() { 406 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())) 407 }, 408 g = function() { 409 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) 410 }, 411 h = b.st.image, 412 i = d.find(".mfp-img"); 413 if (i.length) { 414 var j = document.createElement("img"); 415 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.naturalWi
415dth > 0 ? c.hasSize = !0 : j.width || (c.hasSize = !1) 416 } 417 return b._parseMarkup(d, { 418 title: M(c), 419 img_replaceWith: c.img 420 }, 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) 421 } 422 } 423 }); 424 var N, O = function() { 425 return void 0 === N && (N = void 0 !== document.createElement("p").style.MozTransform), N 426 }; 427 a.magnificPopup.registerModule("zoom", { 428 options: { 429 enabled: !1, 430 easing: "ease-in-out", 431 duration: 300, 432 opener: function(a) { 433 return a.is("img") ? a : a.find("img") 434 } 435 }, 436 proto: { 437 initZoom: function() { 438 var a, c = b.st.zoom, 439 d = ".zoom"; 440 if (c.enabled && b.supportsTransition) { 441 var e, f, g = c.duration, 442 j = function(a) { 443 var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), 444 d = "all " + c.duration / 1e3 + "s " + c.easing, 445 e = { 446 position: "fixed", 447 zIndex: 9999, 448 left: 0, 449 top: 0, 450 "-webkit-backface-visibility": "hidden" 451 }, 452 f = "transition"; 453 return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d, b.css(e), b 454 }, 455 k = function() { 456 b.content.css("visibility", "visible") 457 }; 458 w("BuildControls" + d, function() { 459 if (b._allowZoom()) { 460 if (clearTimeout(e), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return void k(); 461 f = j(a), f.css(b._getOffset()), b.wrap.append(f), e = setTimeout(function() { 462 f.css(b._getOffset(!0)), e = setTimeout(function() { 463 k(), setTimeout(function() { 464 f.remove(), a = f = null, y("ZoomAnimationEnded") 465 }, 16) 466 }, g) 467 }, 16) 468 } 469 }), w(i + d, function() { 470 if (b._allowZoom()) { 471 if (clearTimeout(e), b.st.removalDelay = g, !a) { 472 if (a = b._getItemToZoom(), !a) return; 473 f = j(a) 474 } 475 f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function() { 476 f.css(b._getOffset()) 477 }, 16) 478 } 479 }), w(h + d, function() { 480 b._allowZoom() && (k(), f && f.remove(), a = null) 481 }) 482 } 483 }, 484 _allowZoom: function() { 485 return "image" === b.currItem.type 486 }, 487 _getItemToZoom: function() { 488 return b.currItem.hasSize ? b.currItem.img : !1 489 }, 490 _getOffset: function(c) { 491 var d; 492 d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem); 493 var e = d.offset(), 494 f = parseInt(d.css("padding-top"), 10), 495 g = parseInt(d.css("padding-bottom"), 10); 496 e.top -= a(window).scrollTop() - f; 497 var h = { 498 width: d.width(), 499 height: (u ? d.innerHeight() : d[0].offsetHeight) - g - f 500 }; 501 return O() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left, h.top = e.top), h 502 } 503 } 504 });
505 var P = "iframe", 506 Q = "//about:blank", 507 R = function(a) { 508 if (b.currTemplate[P]) { 509 var c = b.currTemplate[P].find("iframe"); 510 c.length && (a || (c[0].src = Q), b.isIE8 && c.css("display", a ? "block" : "none")) 511 } 512 }; 513 a.magnificPopup.registerModule(P, { 514 options: { 515 markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>', 516 srcAction: "iframe_src", 517 patterns: { 518 youtube: { 519 index: "youtube.com", 520 id: "v=", 521 src: "http://www.youtube.com/embed/%id%?autoplay=1" 522 }, 523 vimeo: { 524 index: "vimeo.com/", 525 id: "/", 526 src: "//player.vimeo.com/video/%id%?autoplay=1" 527 }, 528 gmaps: { 529 index: "//maps.google.", 530 src: "%id%&output=embed" 531 } 532 } 533 }, 534 proto: { 535 initIframe: function() { 536 b.types.push(P), w("BeforeChange", function(a, b, c) { 537 b !== c && (b === P ? R() : c === P && R(!0)) 538 }), w(h + "." + P, function() { 539 R() 540 }) 541 }, 542 getIframe: function(c, d) { 543 var e = c.src, 544 f = b.st.iframe; 545 a.each(f.patterns, function() { 546 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 547 }); 548 var g = {}; 549 return f.srcAction && (g[f.srcAction] = e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d 550 } 551 } 552 }); 553 var S = function(a) { 554 var c = b.items.length; 555 return a > c - 1 ? a - c : 0 > a ? c + a : a 556 }, 557 T = function(a, b, c) { 558 return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c) 559 }; 560 a.magnificPopup.registerModule("gallery", { 561 options: { 562 enabled: !1, 563 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', 564 preload: [0, 2], 565 navigateByImgClick: !0, 566 arrows: !0, 567 tPrev: "Previous (Left arrow key)", 568 tNext: "Next (Right arrow key)", 569 tCounter: "%curr% of %total%" 570 }, 571 proto: { 572 initGallery: function() { 573 var c = b.st.gallery, 574 e = ".mfp-gallery"; 575 return b.direction = !0, c && c.enabled ? (f += " mfp-gallery", w(m + e, function() { 576 c.navigateByImgClick && b.wrap.on("click" + e, ".mfp-img", function() { 577 return b.items.length > 1 ? (b.next(), !1) : void 0 578 }), d.on("keydown" + e, function(a) { 579 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next() 580 }) 581 }), w("UpdateStatus" + e, function(a, c) { 582 c.text && (c.text = T(c.text, b.currItem.index, b.items.length)) 583 }), w(l + e, function(a, d, e, f) { 584 var g = b.items.length; 585 e.counter = g > 1 ? T(c.tCounter, f.index, g) : "" 586 }), w("BuildControls" + e, function() { 587 if (b.items.length > 1 && c.arrows && !b.arrowLeft) { 588 var d = c.arrowMarkup, 589 e = b.arrowLeft = a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(s), 590 f = b.arrowRight = a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(s); 591 e.click(function() { 592 b.prev() 593 }), f.click(function() { 594 b.next() 595 }), b.container.append(e.add(f)) 596 } 597 }), w(n + e, function() { 598 b._preloadTimeout && clearTimeout(b._preloadTimeout), b._preloadTimeout = setTimeout(function() { 599 b.preloadNearbyImages(), b._preloadTimeout = null 600 }, 16) 601 }), void w(h + e, function() { 602 d.off(e), b.wrap.off("click" + e), b.arrowRight = b.arrowLeft = null 603 })) : !1 604 }, 605 next: function() { 606 b.direction = !0, b.index = S(b.index + 1), b.updateItemHTML() 607 }, 608 prev: function() { 609 b.direction = !1, b.index = S(b.index - 1), b.updateItemHTML() 610 }, 611 goTo: function(a) { 612 b.direction = a >= b.index, b.index = a, b.updateItemHTML() 613 }, 614 preloadNearbyImages: function() { 615 var a, c = b.st.gallery.preload, 616 d = Math.min(c[0], b.items.length), 617 e = Math.min(c[1], b.items.length); 618 for (a = 1; a <= (b.direction ? e : d); a++) b._preloadItem(b.index + a); 619 for (a = 1; a <= (b.direction ? d : e); a++) b._preloadItem(b.index - a) 620 }, 621 _preloadItem: function(c) { 622 if (c = S(c), !b.items[c].preloaded) { 623 var d = b.items[c]; 624 d.parsed || (d = b.parseEl(c)), y("LazyLoad", d), "image" === d.t
624ype && (d.img = a('<img class="mfp-img" />').on("load.mfploader", function() { 625 d.hasSize = !0 626 }).on("error.mfploader", function() { 627 d.hasSize = !0, d.loadError = !0, y("LazyLoadError", d) 628 }).attr("src", d.src)), d.preloaded = !0 629 } 630 } 631 } 632 }); 633 var U = "retina"; 634 a.magnificPopup.registerModule(U, { 635 options: { 636 replaceSrc: function(a) { 637 return a.src.replace(/\.\w+$/, function(a) { 638 return "@2x" + a 639 }) 640 }, 641 ratio: 1 642 }, 643 proto: { 644 initRetina: function() { 645 if (window.devicePixelRatio > 1) { 646 var a = b.st.retina, 647 c = a.ratio; 648 c = isNaN(c) ? c() : c, c > 1 && (w("ImageHasSize." + U, function(a, b) { 649 b.img.css({ 650 "max-width": b.img[0].naturalWidth / c, 651 width: "100%" 652 }) 653 }), w("ElementParse." + U, function(b, d) { 654 d.src = a.replaceSrc(d, c) 655 })) 656 } 657 } 658 } 659 }), A() 660});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.