/*! Magnific Popup - v1.1.0 - 2016-02-20 * http://dimsemenov.com/plugins/magnific-popup/ * Copyright (c) 2016 Dmitry Semenov; */ !(function (a) { "function" == typeof define && define.amd ? define(["jquery"], a) : a( "object" == typeof exports ? require("jquery") : window.jQuery || window.Zepto ); })(function (a) { var b, c, d, e, f, g, h = "Close", i = "BeforeClose", j = "AfterClose", k = "BeforeAppend", l = "MarkupParse", m = "Open", n = "Change", o = "mfp", p = "." + o, q = "mfp-ready", r = "mfp-removing", s = "mfp-prevent-close", t = function () {}, u = !!window.jQuery, v = a(window), w = function (a, c) { b.ev.on(o + a + p, c); }, x = function (b, c, d, e) { var f = document.createElement("div"); return ( (f.className = "mfp-" + b), d && (f.innerHTML = d), e ? c && c.appendChild(f) : ((f = a(f)), c && f.appendTo(c)), f ); }, y = function (c, d) { 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])); }, z = function (c) { return ( (c === g && b.currTemplate.closeBtn) || ((b.currTemplate.closeBtn = a( b.st.closeMarkup.replace("%title%", b.st.tClose) )), (g = c)), b.currTemplate.closeBtn ); }, A = function () { a.magnificPopup.instance || ((b = new t()), b.init(), (a.magnificPopup.instance = b)); }, B = function () { var a = document.createElement("p").style, b = ["ms", "O", "Moz", "Webkit"]; if (void 0 !== a.transition) return !0; for (; b.length; ) if (b.pop() + "Transition" in a) return !0; return !1; }; (t.prototype = { constructor: t, init: function () { var c = navigator.appVersion; (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 = {}); }, open: function (c) { var e; if (c.isObj === !1) { (b.items = c.items.toArray()), (b.index = 0); var g, h = c.items; for (e = 0; e < h.length; e++) if (((g = h[e]), g.parsed && (g = g.el[0]), g === c.el[0])) { b.index = e; break; } } else (b.items = a.isArray(c.items) ? c.items : [c.items]), (b.index = c.index || 0); if (b.isOpen) return void b.updateItemHTML(); (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 () { b.close(); })), (b.wrap = x("wrap") .attr("tabindex", -1) .on("click" + p, function (a) { b._checkIfClose(a.target) && b.close(); })), (b.container = x("container", b.wrap))), (b.contentContainer = x("content")), b.st.preloader && (b.preloader = x("preloader", b.container, b.st.tLoading)); var i = a.magnificPopup.modules; for (e = 0; e < i.length; e++) { var j = i[e]; (j = j.charAt(0).toUpperCase() + j.slice(1)), b["init" + j].call(b); } y("BeforeOpen"), b.st.showCloseBtn && (b.st.closeBtnInside ? (w(l, function (a, b, c, d) { c.close_replaceWith = z(d.type); }), (f += " mfp-close-btn-in")) : b.wrap.append(z())), b.st.alignTop && (f += " mfp-align-top"), b.fixedContentPos ? b.wrap.css({ overflow: b.st.overflowY, overflowX: "hidden", overflowY: b.st.overflowY, }) : b.wrap.css({ top: v.scrollTop(), position: "absolute" }), (b.st.fixedBgPos === !1 || ("auto" === b.st.fixedBgPos && !b.fixedContentPos)) && b.bgOverlay.css({ height: d.height(), position: "absolute" }), b.st.enableEscapeKey && d.on("keyup" + p, function (a) { 27 === a.keyCode && b.close(); }), v.on("resize" + p, function () { b.updateSize(); }), b.st.closeOnContentClick || (f += " mfp-auto-cursor"), f && b.wrap.addClass(f); var k = (b.wH = v.height()), n = {}; if (b.fixedContentPos && b._hasScrollBar(k)) { var o = b._getScrollbarSize(); o && (n.marginRight = o); } b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : (n.overflow = "hidden")); var r = b.st.mainClass; 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 () { b.content ? (b._addClassToMFP(q), b._setFocus()) : b.bgOverlay.addClass(q), d.on("focusin" + p, b._onFocusIn); }, 16), (b.isOpen = !0), b.updateSize(k), y(m), c ); }, close: function () { b.isOpen && (y(i), (b.isOpen = !1), b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP(r), setTimeout(function () { b._close(); }, b.st.removalDelay)) : b._close()); }, _close: function () { y(h); var c = r + " " + q + " "; if ( (b.bgOverlay.detach(), b.wrap.detach(), b.container.empty(), b.st.mainClass && (c += b.st.mainClass + " "), b._removeClassFromMFP(c), b.fixedContentPos) ) { var e = { marginRight: "" }; b.isIE7 ? a("body, html").css("overflow", "") : (e.overflow = ""), a("html").css(e); } 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); }, updateSize: function (a) { if (b.isIOS) { var c = document.documentElement.clientWidth / window.innerWidth, d = window.innerHeight * c; b.wrap.css("height", d), (b.wH = d); } else b.wH = a || v.height(); b.fixedContentPos || b.wrap.css("height", b.wH), y("Resize"); }, updateItemHTML: function () { var c = b.items[b.index]; b.contentContainer.detach(), b.content && b.content.detach(), c.parsed || (c = b.parseEl(b.index)); var d = c.type; if ( (y("BeforeChange", [b.currItem ? b.currItem.type : "", d]), (b.currItem = c), !b.currTemplate[d]) ) { var f = b.st[d] ? b.st[d].markup : !1; y("FirstMarkupParse", f), f ? (b.currTemplate[d] = a(f)) : (b.currTemplate[d] = !0); } e && e !== c.type && b.container.removeClass("mfp-" + e + "-holder"); var g = b["get" + d.charAt(0).toUpperCase() + d.slice(1)]( c, b.currTemplate[d] ); b.appendContent(g, d), (c.preloaded = !0), y(n, c), (e = c.type), b.container.prepend(b.contentContainer), y("AfterChange"); }, appendContent: function (a, c) { (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); }, parseEl: function (c) { var d, e = b.items[c]; if ( (e.tagName ? (e = { el: a(e) }) : ((d = e.type), (e = { data: e, src: e.src })), e.el) ) { for (var f = b.types, g = 0; g < f.length; g++) if (e.el.hasClass("mfp-" + f[g])) { d = f[g]; break; } (e.src = e.el.attr("data-mfp-src")), e.src || (e.src = e.el.attr("href")); } return ( (e.type = d || b.st.type || "inline"), (e.index = c), (e.parsed = !0), (b.items[c] = e), y("ElementParse", e), b.items[c] ); }, addGroup: function (a, c) { var d = function (d) { (d.mfpEl = this), b._openClick(d, a, c); }; c || (c = {}); var e = "click.magnificPopup"; (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))); }, _openClick: function (c, d, e) { var f = void 0 !== e.midClick ? e.midClick : a.magnificPopup.defaults.midClick; if ( f || !(2 === c.which || c.ctrlKey || c.metaKey || c.altKey || c.shiftKey) ) { var g = void 0 !== e.disableOn ? e.disableOn : a.magnificPopup.defaults.disableOn; if (g) if (a.isFunction(g)) { if (!g.call(b)) return !0; } else if (v.width() < g) return !0; c.type && (c.preventDefault(), b.isOpen && c.stopPropagation()), (e.el = a(c.mfpEl)), e.delegate && (e.items = d.find(e.delegate)), b.open(e); } }, updateStatus: function (a, d) { if (b.preloader) { c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading); var e = { status: a, text: d }; y("UpdateStatus", e), (a = e.status), (d = e.text), b.preloader.html(d), b.preloader.find("a").on("click", function (a) { a.stopImmediatePropagation(); }), b.container.addClass("mfp-s-" + a), (c = a); } }, _checkIfClose: function (c) { if (!a(c).hasClass(s)) { var d = b.st.closeOnContentClick, e = b.st.closeOnBgClick; if (d && e) return !0; if ( !b.content || a(c).hasClass("mfp-close") || (b.preloader && c === b.preloader[0]) ) return !0; if (c === b.content[0] || a.contains(b.content[0], c)) { if (d) return !0; } else if (e && a.contains(document, c)) return !0; return !1; } }, _addClassToMFP: function (a) { b.bgOverlay.addClass(a), b.wrap.addClass(a); }, _removeClassFromMFP: function (a) { this.bgOverlay.removeClass(a), b.wrap.removeClass(a); }, _hasScrollBar: function (a) { return ( (b.isIE7 ? d.height() : document.body.scrollHeight) > (a || v.height()) ); }, _setFocus: function () { (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus(); }, _onFocusIn: function (c) { return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (b._setFocus(), !1); }, _parseMarkup: function (b, c, d) { var e; d.data && (c = a.extend(d.data, c)), y(l, [b, c, d]), a.each(c, function (c, d) { if (void 0 === d || d === !1) return !0; if (((e = c.split("_")), e.length > 1)) { var f = b.find(p + "-" + e[0]); if (f.length > 0) { var g = e[1]; "replaceWith" === g ? f[0] !== d[0] && f.replaceWith(d) : "img" === g ? f.is("img") ? f.attr("src", d) : f.replaceWith( a("").attr("src", d).attr("class", f.attr("class")) ) : f.attr(e[1], d); } } else b.find(p + "-" + c).html(d); }); }, _getScrollbarSize: function () { if (void 0 === b.scrollbarSize) { var a = document.createElement("div"); (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); } return b.scrollbarSize; }, }), (a.magnificPopup = { instance: null, proto: t.prototype, modules: [], open: function (b, c) { return ( A(), (b = b ? a.extend(!0, {}, b) : {}), (b.isObj = !0), (b.index = c || 0), this.instance.open(b) ); }, close: function () { return a.magnificPopup.instance && a.magnificPopup.instance.close(); }, registerModule: function (b, c) { c.options && (a.magnificPopup.defaults[b] = c.options), a.extend(this.proto, c.proto), this.modules.push(b); }, defaults: { disableOn: 0, key: null, midClick: !1, mainClass: "", preloader: !0, focus: "", closeOnContentClick: !1, closeOnBgClick: !0, closeBtnInside: !0, showCloseBtn: !0, enableEscapeKey: !0, modal: !1, alignTop: !1, removalDelay: 0, prependTo: null, fixedContentPos: "auto", fixedBgPos: "auto", overflowY: "auto", closeMarkup: '', tClose: "Close (Esc)", tLoading: "Loading...", autoFocusLast: !0, }, }), (a.fn.magnificPopup = function (c) { A(); var d = a(this); if ("string" == typeof c) if ("open" === c) { var e, f = u ? d.data("magnificPopup") : d[0].magnificPopup, g = parseInt(arguments[1], 10) || 0; f.items ? (e = f.items[g]) : ((e = d), f.delegate && (e = e.find(f.delegate)), (e = e.eq(g))), b._openClick({ mfpEl: e }, d, f); } else b.isOpen && b[c].apply(b, Array.prototype.slice.call(arguments, 1)); else (c = a.extend(!0, {}, c)), u ? d.data("magnificPopup", c) : (d[0].magnificPopup = c), b.addGroup(d, c); return d; }); var C, D, E, F = "inline", G = function () { E && (D.after(E.addClass(C)).detach(), (E = null)); }; a.magnificPopup.registerModule(F, { options: { hiddenClass: "hide", markup: "", tNotFound: "Content not found", }, proto: { initInline: function () { b.types.push(F), w(h + "." + F, function () { G(); }); }, getInline: function (c, d) { if ((G(), c.src)) { var e = b.st.inline, f = a(c.src); if (f.length) { var g = f[0].parentNode; g && g.tagName && (D || ((C = e.hiddenClass), (D = x(C)), (C = "mfp-" + C)), (E = f.after(D).detach().removeClass(C))), b.updateStatus("ready"); } else b.updateStatus("error", e.tNotFound), (f = a("