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) { "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.
4wrap).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("<img>").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: '<button title="%title%" type="button" class="mfp-close">×</button>', 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("<div>"); return c.inlineElement = f, f } return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d } } }); var H, I = "ajax", J = function () { H && a(document.body).removeClass(H) }, K = function () { J(), b.req && b.req.abort() }; a.magnificPopup.registerModule(I, { options: { settings: null, cursor: "mfp-ajax-cur", tError: '<a href="%url%">The content</a> could not be loaded.' }, proto: { initAjax: function () { b.types.push(I), H = b.st.ajax.cursor, w(h + "." + I, K), w("BeforeChange." + I, K) }, getAjax: function (c) { H && a(document.body).addClass(H), b.updateStatus("loading"); var d = a.extend({ url: c.src, success: function (d, e, f) { var g = { data: d, xhr: f }; y("ParseAjax", g), b.appendContent(a(g.data), I), c.finished = !0, J(), b._setFocus(), setTimeout(function () { b.wrap.addClass(q) }, 16), b.updateStatus("ready"), y("AjaxContentAdded") }, error: function () { J(), c.finished = c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src)) } }, b.st.ajax.settings); return b.req = a.ajax(d), "" } } }); var L, M = function (c) { if (c.data && void 0 !== c.data.title) return c.data.title;
4 var d = b.st.image.titleSrc; if (d) { if (a.isFunction(d)) return d.call(b, c); if (c.el) return c.el.attr(d) || "" } return "" }; a.magnificPopup.registerModule("image", { options: { 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>', cursor: "mfp-zoom-out-cur", titleSrc: "title", verticalFit: !0, tError: '<a href="%url%">The image</a> could not be loaded.' }, proto: { initImage: function () { var c = b.st.image, d = ".image"; b.types.push("image"), w(m + d, function () { "image" === b.currItem.type && c.cursor && a(document.body).addClass(c.cursor) }), w(h + d, function () { c.cursor && a(document.body).removeClass(c.cursor), v.off("resize" + p) }), w("Resize" + d, b.resizeImage), b.isLowIE && w("AfterChange", b.resizeImage) }, resizeImage: function () { var a = b.currItem; if (a && a.img && b.st.image.verticalFit) { var c = 0; 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) } }, _onImageHasSize: function (a) { 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)) }, findImageSize: function (a) { var c = 0, d = a.img[0], e = function (f) { L && clearInterval(L), L = setInterval(function () { 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))) }, f) }; e(1) }, getImage: function (c, d) { var e = 0, f = function () { 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())) }, g = function () { 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) }, h = b.st.image, i = d.find(".mfp-img"); if (i.length) { var j = document.createElement("img"); 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) } return b._parseMarkup(d, { title: M(c), img_replaceWith: c.img }, 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) } } }); var N, O = function () { return void 0 === N && (N = void 0 !== document.createElement("p").style.MozTransform), N }; a.magnificPopup.registerModule("zoom", { options: { enabled: !1, easing: "ease-in-out", duration: 300, opener: function (a) { return a.is("img") ? a : a.find("img") } }, proto: { initZoom: function () { var a, c = b.st.zoom, d = ".zoom"; if (c.enabled && b.supportsTransition) { var e, f, g = c.duration, j = function (a) { var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), d = "all " + c.duration / 1e3 + "s " + c.easing, e = { position: "fixed", zIndex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden" }, f = "transition"; return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d, b.css(e), b }, k = function () { b.content.css("visibility", "visible") }; w("BuildControls" + d, function () { if (b._allowZoom()) { if (clearTimeout(e), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return void k(); f = j(a), f.css(b._getOffset()), b.wrap.append(f), e = setTimeout(function () { f.css(b._getOffset(!0)), e = setTimeout(function () { k(), setTimeout(function () { f.remove(), a = f = null, y("ZoomAnimationEnded") }, 16) }, g) }, 16) } }), w(i + d, function () { if (b._allowZoom()) { if (clearTimeout(e), b.st.removalDelay = g, !a) { if (a = b._getItemToZoom(), !a) return; f = j(a) } f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function () { f.css(b._getOffset()) }, 16) } }), w(h + d, function () { b._allowZoom() && (k(), f && f.remove(), a = null) }) } }, _allowZoom: function () { return "image" === b.currItem.type }, _getItemToZoom: function () { return b.currItem.hasSize ? b.currItem.img : !1 }, _getOffset: function (c) { var d; d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem); var e = d.offset(), f = parseInt(d.css("padding-top"), 10), g = parseInt(d.css("padding-bottom"), 10); e.top -= a(window).scrollTop() - f; var h = { width: d.width(), height: (u ? d.innerHeight() : d[0].offsetHeight) - g - f }; return O() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left, h.top = e.top), h } } }); var P = "iframe", Q = "//about:blank", R = function (a) { if (b.currTemplate[P]) { var c = b.currTemplate[P].find("iframe"); c.length && (a || (c[0].src = Q), b.isIE8 && c.css("display", a ? "block" : "none")) } }; a.magnificPopup.registerModule(P, { options: { markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>', srcAction: "iframe_src", patterns: { youtube: { index: "youtube.com", id: "v=", src: "//www.youtube.com/embed/%id%?autoplay=1" }, vimeo: { index: "vimeo.com/", id: "/", src: "//player.vimeo.com/video/%id%?autoplay=1" }, gmaps: { index: "//maps.google.", src: "%id%&output=embed" } } }, proto: { initIframe: function () { b.types.push(P), w("BeforeChange", function (a, b, c) { b !== c && (b === P ? R() : c === P && R(!0)) }), w(h + "." + P, function () { R() }) }, getIframe: function (c, d) { var e = c.src, f = b.st.iframe; a.each(f.patterns, function () { return e.indexOf(this.index) > -1 ? (this.id && (e = "string" == typeof this.id ? e.substr(e.lastIndexOf(this.id
4) + this.id.length, e.length) : this.id.call(this, e)), e = this.src.replace("%id%", e), !1) : void 0 }); var g = {}; return f.srcAction && (g[f.srcAction] = e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d } } }); var S = function (a) { var c = b.items.length; return a > c - 1 ? a - c : 0 > a ? c + a : a }, T = function (a, b, c) { return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c) }; a.magnificPopup.registerModule("gallery", { options: { enabled: !1, arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', preload: [0, 2], navigateByImgClick: !0, arrows: !0, tPrev: "Previous (Left arrow key)", tNext: "Next (Right arrow key)", tCounter: "%curr% of %total%" }, proto: { initGallery: function () { var c = b.st.gallery, e = ".mfp-gallery"; return b.direction = !0, c && c.enabled ? (f += " mfp-gallery", w(m + e, function () { c.navigateByImgClick && b.wrap.on("click" + e, ".mfp-img", function () { return b.items.length > 1 ? (b.next(), !1) : void 0 }), d.on("keydown" + e, function (a) { 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next() }) }), w("UpdateStatus" + e, function (a, c) { c.text && (c.text = T(c.text, b.currItem.index, b.items.length)) }), w(l + e, function (a, d, e, f) { var g = b.items.length; e.counter = g > 1 ? T(c.tCounter, f.index, g) : "" }), w("BuildControls" + e, function () { if (b.items.length > 1 && c.arrows && !b.arrowLeft) { var d = c.arrowMarkup, e = b.arrowLeft = a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(s), f = b.arrowRight = a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(s); e.click(function () { b.prev() }), f.click(function () { b.next() }), b.container.append(e.add(f)) } }), w(n + e, function () { b._preloadTimeout && clearTimeout(b._preloadTimeout), b._preloadTimeout = setTimeout(function () { b.preloadNearbyImages(), b._preloadTimeout = null }, 16) }), void w(h + e, function () { d.off(e), b.wrap.off("click" + e), b.arrowRight = b.arrowLeft = null })) : !1 }, next: function () { b.direction = !0, b.index = S(b.index + 1), b.updateItemHTML() }, prev: function () { b.direction = !1, b.index = S(b.index - 1), b.updateItemHTML() }, goTo: function (a) { b.direction = a >= b.index, b.index = a, b.updateItemHTML() }, preloadNearbyImages: function () { var a, c = b.st.gallery.preload, d = Math.min(c[0], b.items.length), e = Math.min(c[1], b.items.length); for (a = 1; a <= (b.direction ? e : d); a++)b._preloadItem(b.index + a); for (a = 1; a <= (b.direction ? d : e); a++)b._preloadItem(b.index - a) }, _preloadItem: function (c) { if (c = S(c), !b.items[c].preloaded) { var d = b.items[c]; d.parsed || (d = b.parseEl(c)), y("LazyLoad", d), "image" === d.type && (d.img = a('<img class="mfp-img" />').on("load.mfploader", function () { d.hasSize = !0 }).on("error.mfploader", function () { d.hasSize = !0, d.loadError = !0, y("LazyLoadError", d) }).attr("src", d.src)), d.preloaded = !0 } } } }); var U = "retina"; a.magnificPopup.registerModule(U, { options: { replaceSrc: function (a) { return a.src.replace(/\.\w+$/, function (a) { return "@2x" + a }) }, ratio: 1 }, proto: { initRetina: function () { if (window.devicePixelRatio > 1) { var a = b.st.retina, c = a.ratio; c = isNaN(c) ? c() : c, c > 1 && (w("ImageHasSize." + U, function (a, b) { b.img.css({ "max-width": b.img[0].naturalWidth / c, width: "100%" }) }), w("ElementParse." + U, function (b, d) { d.src = a.replaceSrc(d, c) })) } } } }), A() }); 5 6 7/*! jRespond.js v 0.10 | Author: Jeremy Fields [[email protected]], 2013 | License: MIT */ 8!function (a, b, c) { "object" == typeof module && module && "object" == typeof module.exports ? module.exports = c : (a[b] = c, "function" == typeof define && define.amd && define(b, [], function () { return c })) }(this, "jRespond", function (a, b, c) { "use strict"; return function (a) { var b = [], d = [], e = a, f = "", g = "", i = 0, j = 100, k = 500, l = k, m = function () { var a = 0; return a = "number" != typeof window.innerWidth ? 0 !== document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth : window.innerWidth }, n = function (a) { if (a.length === c) o(a); else for (var b = 0; b < a.length; b++)o(a[b]) }, o = function (a) { var e = a.breakpoint, h = a.enter || c; b.push(a), d.push(!1), r(e) && (h !== c && h.call(null, { entering: f, exiting: g }), d[b.length - 1] = !0) }
8, p = function () { for (var a = [], e = [], h = 0; h < b.length; h++) { var i = b[h].breakpoint, j = b[h].enter || c, k = b[h].exit || c; "*" === i ? (j !== c && a.push(j), k !== c && e.push(k)) : r(i) ? (j === c || d[h] || a.push(j), d[h] = !0) : (k !== c && d[h] && e.push(k), d[h] = !1) } for (var l = { entering: f, exiting: g }, m = 0; m < e.length; m++)e[m].call(null, l); for (var n = 0; n < a.length; n++)a[n].call(null, l) }, q = function (a) { for (var b = !1, c = 0; c < e.length; c++)if (a >= e[c].enter && a <= e[c].exit) { b = !0; break } b && f !== e[c].label ? (g = f, f = e[c].label, p()) : b || "" === f || (f = "", p()) }, r = function (a) { if ("object" == typeof a) { if (a.join().indexOf(f) >= 0) return !0 } else { if ("*" === a) return !0; if ("string" == typeof a && f === a) return !0 } }, s = function () { var a = m(); a !== i ? (l = j, q(a)) : l = k, i = a, setTimeout(s, l) }; return s(), { addFunc: function (a) { n(a) }, getBreakpoint: function () { return f } } } }(this, this.document)); 9 10 11 12 13var $masonryContainer; 14var blnMasonryScroll = false; 15$(document).ready(function () { 16 $masonryContainer = $("#masonry-container"); 17 18 $(".basic").fancySelect(); 19 $("path").click(function () { 20 if ($(this).hasClass("default")) { 21 //do nothing 22 } else { 23 $("path").attr("class", ""); 24 $(this).attr("class", "pathactive"); 25 var target = $(this).attr("data-target"); 26 $("#cities" + target).attr("style", ""); 27 $(".main_cities.active").fadeOut("fast").queue(function () { 28 $(".main_cities").removeClass("active"); 29 $("#cities" + target).fadeIn("medium"); 30 $("#cities" + target).addClass("active"); 31 $(this).dequeue(); 32 }); 33 } 34 }); 35 36 $(".experience").slick({ 37 dots: true, 38 autoplay: true, 39 autoplaySpeed: 5000 40 }); 41 42 $(".sea").slick({ 43 infinite: true, 44 slidesToShow: 4, 45 slidesToScroll: 1, 46 responsive: [ 47 { 48 breakpoint: 768, 49 settings: { 50 arrows: true, 51 centerMode: true, 52 slidesToShow: 2 53 } 54 }, 55 { 56 breakpoint: 480, 57 settings: { 58 arrows: true, 59 centerMode: true, 60 slidesToShow: 1 61 } 62 } 63 ] 64 } 65 ); 66 $(".slide_destinations").slick({ 67 infinite: true, 68 slidesToShow: 1, 69 slidesToScroll: 1 70 }); 71 72 // tab function 73 $("ul.tabs li").click(function (event) { 74 event.preventDefault(); 75 var tabId = $(this).attr("data-tab"); 76 77 $("ul.tabs li").removeClass("current"); 78 $(".tab-content").removeClass("current"); 79 80 $(this).addClass("current"); 81 $("#" + tabId).addClass("current"); 82 }); 83 84 85 // magnific popup 86 $('[data-lightbox-type="image"]').magnificPopup({ type: "image" }); 87 88 89 90 91 // MK Pagination 92 //$("#pagination-mk").twbsPagination({ 93 // totalPages: parseInt(MKSayfaSayisi), 94 // visiblePages: 10, 95 // first: FirstPageText, 96 // next: NextPageText, 97 // prev: PrevPageText, 98 // last: LastPageText, 99 // onPageClick: function (event, page) { 100 // console.log("Clicked to page#" + page); 101 // if (page != 1) { 102 // blnMasonryScroll = true; 103 // $("html, body").animate({ 104 // scrollTop: $masonryContainer.offset().top - 100 105 // }, 500); 106 // } 107 // setTimeout(function () { 108 // //getPhotos(page); 109 // }, 750); 110 // } 111 //}); 112 113 114 $('#txtMkArama').keypress(function (e) { 115 var key = e.which; 116 if (key == 13) // the enter key code 117 { 118 var keyword = $("#txtMkArama").val(); 119 if (!keyword || !keyword.length) return false; 120 location.href = "/medya/fotograf/arama/" + encodeURIComponent(keyword); 121 return false; 122 } 123 });
124 125}); 126 127 128function appendPhotos(yanit) { 129 $(".pagiWrap").addClass("opacity-30"); 130 $(".se-pre-con") 131 .clone() 132 .attr("id", "masonryloader") 133 .attr("style", "position: relative;padding: 50px;background-color:transparent;z-index: 99998;") 134 .appendTo($masonryContainer) 135 .fadeIn("slow", 136 function () { 137 // Append items 138 var $items = $(yanit); 139 $masonryContainer.append($items); 140 $items.hide(); 141 $masonryContainer.imagesLoaded() 142 .done(function (instance) { 143 console.log('all images successfully loaded'); 144 setTimeout(function () { 145 $("#masonryloader") 146 .fadeOut("slow", 147 function () { 148 $(this).remove(); 149 var newIndex = 0; 150 $items.fadeIn("slow", 151 function () { 152 newIndex++; 153 if (newIndex == $items.filter(".portfolio-item").length && blnMasonryScroll) { 154 $("html, body") 155 .animate({ 156 scrollTop: $masonryContainer.offset().top - 100 157 }, 158 500); 159 } 160 161 }); 162 INSPIRO.masonryIsotope(); 163 console.log('called INSPIRO.masonryIsotope()'); 164 }); 165 $(".pagiWrap").removeClass("opacity-30"); 166 }, 167 1000); 168 // magnific popup init 169 $('[data-lightbox-type="image"]') 170 .magnificPopup({ 171 type: "image", 172 gallery: { 173 enabled: true 174 } 175 }); 176 }); 177 }); 178 179} 180 181 182function getPhotos(pageNumber) { 183 function osMkFotografGetir(yanit) { 184 if (yanit == null || yanit == "") { 185 console.log("Response was empty."); 186 } 187 else { 188 // Clear items and loading 189 var itemInd = 0; 190 var itemCount = $(".portfolio-item", $masonryContainer).length; 191 $(".portfolio-item", $masonryContainer).fadeOut("slow", function () { 192 itemInd++; 193 $(this).remove(); 194 //console.log("fadedOut#" + itemInd); 195 if (itemCount == itemInd) { 196 $masonryContainer.empty().attr("style", ""); 197 //console.log("$masonryContainer.empty()"); 198 appendPhotos(yanit); 199 } 200 }); 201 202 if (itemCount == 0) { 203 appendPhotos(yanit); 204 } 205 } 206 } 207 function oeMkFotografGetir(errMsg) { 208 console.log(errMsg); 209 } 210 // Get WebMethod 211 var sayfa = parseInt(pageNumber); 212 PageMethods.set_path("/Default.aspx"); 213 //PageMethods.ResimleriGetir(pageNumber, keyWord, pageCount, tipkod, osResimleriGetir, oeResimleriGetir); 214 PageMethods.MkFotografGetir(sayfa, GosterilenIcerikSayisi, MKRandomConstant, osMkFotografGetir, oeMkFotografGetir); 215} 216 217function myFunction(x) { 218 x.classList.toggle("change"); 219 $(".main_menu").slideToggle(); 220} 221 222// preloader 223$(window) 224 .on("load", 225 function () { 226 setTimeout(function () { $(".se-pre-con").fadeOut("slow"); }, 0); 227 228 // Masonry Images Loaded 229 $.fn.masonryImagesReveal = function ($items) { 230 var msnry = this.data("masonry"); 231 var itemSelector = msnry.options.itemSelector; 232 // hide by default 233 $items.hide(); 234 // append to container 235 this.append($items); 236 $items.imagesLoaded().progress(function (imgLoad, image) { 237 // get item 238 // image is imagesLoaded class, not <img>, <img> is image.img 239 var $item = $(image.img).parents(itemSelector); 240 // un-hide item 241 $item.show(); 242 // masonry does its thing 243 msnry.appended($item); 244 }); 245 246 return this; 247 }; 248 249 }); 250 251//Global var 252var INSPIRO = {}; 253 254(function ($) { 255 256 // USE STRICT 257 "use strict"; 258 259 260 //----------------------------------------------------/ 261 // Predefined Variables 262 //----------------------------------------------------/ 263 var $window = $(window), 264 $document = $(document), 265 $body = $("body"), 266 $wrapper = $(".wrapper"); 267 268 269 //----------------------------------------------------/ 270 // UTILITIES 271 //----------------------------------------------------/ 272 273 //Check if function exists 274 $.fn.exists = function () { 275 return this.length > 0;
276 }; 277 278 279 //----------------------------------------------------/ 280 // MOBILE CHECK 281 //----------------------------------------------------/ 282 var isMobile = { 283 Android: function () { 284 return navigator.userAgent.match(/Android/i); 285 }, 286 BlackBerry: function () { 287 return navigator.userAgent.match(/BlackBerry/i); 288 }, 289 iOS: function () { 290 return navigator.userAgent.match(/iPhone|iPad|iPod/i); 291 }, 292 Opera: function () { 293 return navigator.userAgent.match(/Opera Mini/i); 294 }, 295 Windows: function () { 296 return navigator.userAgent.match(/IEMobile/i); 297 }, 298 any: function () { 299 return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); 300 } 301 }; 302 303 304 //----------------------------------------------------/ 305 // RESPONSIVE CLASSES 306 //----------------------------------------------------/ 307 INSPIRO.responsiveClasses = function () { 308 309 var jRes = jRespond([ 310 { 311 label: 'smallest', 312 enter: 0, 313 exit: 479 314 }, { 315 label: 'handheld', 316 enter: 480, 317 exit: 767 318 }, { 319 label: 'tablet', 320 enter: 768, 321 exit: 991 322 }, { 323 label: 'laptop', 324 enter: 992, 325 exit: 1199 326 }, { 327 label: 'desktop', 328 enter: 1200, 329 exit: 10000 330 } 331 ]); 332 jRes.addFunc([ 333 { 334 breakpoint: 'desktop', 335 enter: function () { 336 $body.addClass('device-lg'); 337 }, 338 exit: function () { 339 $body.removeClass('device-lg'); 340 } 341 }, { 342 breakpoint: 'laptop', 343 enter: function () { 344 $body.addClass('device-md'); 345 }, 346 exit: function () { 347 $body.removeClass('device-md'); 348 } 349 }, { 350 breakpoint: 'tablet', 351 enter: function () { 352 $body.addClass('device-sm'); 353 }, 354 exit: function () { 355 $body.removeClass('device-sm'); 356 } 357 }, { 358 breakpoint: 'handheld', 359 enter: function () { 360 $body.addClass('device-xs'); 361 }, 362 exit: function () { 363 $body.removeClass('device-xs'); 364 } 365 }, { 366 breakpoint: 'smallest', 367 enter: function () { 368 $body.addClass('device-xxs'); 369 }, 370 exit: function () { 371 $body.removeClass('device-xxs'); 372 } 373 } 374 ]); 375 }; 376 377 378 //----------------------------------------------------/ 379 // PAGE LOADER 380 //----------------------------------------------------/ 381 INSPIRO.loader = function () { 382 383 if (!$body.hasClass('no-page-loader')) { 384 385 var pageInAnimation = $body.attr('data-animation-in') || "fadeIn", 386 pageOutAnimation = $body.attr('data-animation-out') || "fadeOut", 387 pageLoaderStylePath = $body.attr('data-animation-icon-path') || "images/svg-loaders/", 388 pageLoaderStyle = $body.attr('data-animation-icon') || "ring.svg", 389 pageInDuration = $body.attr('data-speed-in') || 1000, 390 pageOutDuration = $body.attr('data-speed-out') || 500; 391 392 $wrapper.animsition({ 393 inClass: pageInAnimation, 394 outClass: pageOutAnimation, 395 inDuration: pageInDuration, 396 outDuration: pageOutDuration, 397 linkElement: '#mainMenu a:not([target="_blank"]):not([href^=#]), .animsition-link', 398 loading: true, 399 loadingParentElement: 'body', //animsition wrapper element 400 loadingClass: 'animsition-loading', 401 loadingInner: '<img src="' + pageLoaderStylePath + pageLoaderStyle + '">', // e.g '<img src="loading.svg" />' 402 timeout: false, 403 timeoutCountdown: 5000, 404 onLoadEvent: true, 405 browser: ['animation-duration', '-webkit-animation-duration'], 406 // "browser" option allows you to disable the "animsition" in case the css property in the array is not supported by your browser. 407 // The default setting is to disable the "animsition" in a browser that does not support "animation-duration".
408 overlay: false, 409 overlayClass: 'animsition-overlay-slide', 410 overlayParentElement: 'body', 411 transition: function (url) { 412 window.location.href = url; 413 } 414 415 }); 416 417 //Skip loader if page has an js error or not loading for more than 5 seconds! 418 setTimeout(function () { 419 if ($(".animsition-loading").length) { 420 $body.addClass("no-page-loader"); 421 $(".animsition-loading").hide(); 422 } 423 }, 5000); 424 } 425 }; 426 427 428 429 430 /* --------------------------------------------------------------------------- 431 * MASONRY ISOTOPE 432 * --------------------------------------------------------------------------- */ 433 INSPIRO.masonryIsotope = function () { 434 435 var $isotops = $(".isotope"); 436 $isotops.each(function () { 437 var isotopeTime, 438 $elem = $(this), 439 defaultFilter = $elem.data("isotopeDefaultFilter") || 0, 440 id = $elem.attr("id"), 441 mode = $elem.attr('data-isotope-mode') || "masonry", 442 columns = $elem.attr('data-isotope-col') || "4", 443 $elemContainer = $elem, 444 itemElement = $elem.attr('data-isotope-item') || ".isotope-item", 445 itemElementSpace = $elem.attr('data-isotope-item-space') || 0; 446 447 $elem.isotope('destroy'); 448 $elem.isotope({ 449 filter: defaultFilter, 450 itemSelector: itemElement, 451 layoutMode: mode, 452 transitionDuration: '0.6s', 453 resizesContainer: true, 454 resizable: true, 455 isOriginTop: true, 456 animationOptions: { 457 duration: 400, 458 queue: !1 459 } 460 461 }), 462 $window.resize(function () { 463 $elemContainer.css('margin-right', '-' + itemElementSpace + '%'); 464 var masonryColumns = columns; 465 466 if ($body.hasClass('device-sm') || $body.hasClass('device-xs')) { 467 masonryColumns = 3; 468 } else if ($body.hasClass('device-xxs')) { 469 masonryColumns = 2; 470 } else if ($body.hasClass('device-md')) { 471 masonryColumns = 4; 472 } 473 itemWidth(masonryColumns, $elemContainer, itemElement, itemElementSpace); 474 475 if (columns == 1 && $body.hasClass('device-sm') || columns == 1 && $body.hasClass('device-xs')) { 476 itemWidth(1, $elemContainer, itemElement, itemElementSpace); 477 } 478 479 clearTimeout(isotopeTime), isotopeTime = setTimeout(function () { 480 $elem.isotope("layout"); 481 }, 482 300); 483 }); 484 485 486 487 488 var $menu = $('[data-isotope-nav="' + id + '"]'); 489 490 $menu.length && $menu.find("li:not('.link-only')").on("click", function (e) { 491 var $link = $(this); 492 493 $(".filter-active-title").empty().append($link.text()); 494 495 if (!$link.hasClass("ptf-active")) { 496 var selector = $link.attr("data-filter"); 497 $link.parents(".portfolio-filter").eq(0).find(".ptf-active").removeClass("ptf-active"), $link.addClass("ptf-active"), $elem.isotope({ 498 filter: selector 499 }); 500 } 501 502 e.preventDefault(); 503 return false; 504 }), $window.resize(); 505 506 507 }); 508 509 }; 510 511 // Intellegent Grid 512 var itemWidth = function (columns, $elemContainer, itemElement, itemElementSpace) { 513 514 var $findElement = $elemContainer.find(itemElement); 515 var $findElementLarge = $elemContainer.find(".large-item"); 516 517 var itemElementMargins = { 518 "margin-right": itemElementSpace + "%", 519 "margin-bottom": itemElementSpace + "%", 520 }; 521 522 if (columns == 1) { 523 $findElement.width('100%'); 524 $findElementLarge.width('100%'); 525 } 526 527 if (columns == 2) { 528 $findElement.width(50 - itemElementSpace + '%').css(itemElementMargins); 529 $findElementLarge.width(50 - itemElementSpace + '%').css(itemElementMargins); 530 } 531 532 if (columns == 3) { 533 $findElement.width(33.33 - itemElementSpace + '%').css(itemElementMargins); 534 $findElementLarge.width(66.66 - itemElementSpace + '%').css(itemElementMargins); 535 } 536 537 if (columns == 4) { 538 $findElement.width(25 - itemElementSpace + '%').css(itemElementMargins); 539 $findElementLarge.width(50 - itemElementSpace + '%').css(itemElementMargins); 540 } 541 542 if (columns == 5) { 543 $findElement.width(20 - itemElementSpace + '%').css(itemElementMargins); 544 $findElementLarge.width(40 - itemElementSpace + '%').css(itemElementMargins); 545 } 546 547 if (columns == 6) { 548 $findElement.width(16.666666 - itemElementSpace + '%').css(itemElementMargins); 549 $findElementLarge.width(33.333333 - itemElementSpace + '%').css(itemElementMargins); 550 } 551 552 553 554 }; 555 556 557 558 559 //Window load functions 560 $window.load(function () { 561 //INSPIRO.masonryIsotope(); 562 //INSPIRO.progressBar(), 563 // INSPIRO.pieChart(), 564 // INSPIRO.carouselInspiro(), 565 // INSPIRO.animations(), 566 // INSPIRO.menuFix() 567 });
568 569 570 //Document ready functions 571 $document.ready( 572 INSPIRO.loader(), 573 INSPIRO.responsiveClasses() 574 ); 575 576})(jQuery); 577 578 579 580 581 582/* 583MORPHSEARCH FORM 584*/ 585(function () { 586 var morphSearch = document.getElementById('morphsearch'), 587 morphSearchContainer = document.getElementById('morphsearch-container'), 588 input = morphSearch.querySelector('input.morphsearch-input'), 589 ctrlClose = morphSearch.querySelector('span.morphsearch-close'), 590 isOpen = isAnimating = false, 591 // show/hide search area 592 toggleSearch = function (evt) { 593 // return if open and the input gets focused 594 if (evt.type.toLowerCase() === 'focus' && isOpen) return false; 595 596 var offsets = morphsearch.getBoundingClientRect(); 597 if (isOpen) { 598 classie.remove(morphSearch, 'open'); 599 classie.remove(morphSearchContainer, 'open'); 600 601 602 // trick to hide input text once the search overlay closes 603 // todo: hardcoded times, should be done after transition ends 604 if (input.value !== '') { 605 setTimeout(function () { 606 classie.add(morphSearch, 'hideInput'); 607 setTimeout(function () { 608 classie.remove(morphSearch, 'hideInput'); 609 input.value = ''; 610 }, 300); 611 }, 500); 612 } 613 614 input.blur(); 615 } 616 else { 617 classie.add(morphSearch, 'open'); 618 classie.add(morphSearchContainer, 'open'); 619 } 620 isOpen = !isOpen; 621 }; 622 623 // events 624 input.addEventListener('focus', toggleSearch); 625 ctrlClose.addEventListener('click', toggleSearch); 626 // esc key closes search overlay 627 // keyboard navigation events 628 document.addEventListener('keydown', function (ev) { 629 var keyCode = ev.keyCode || ev.which; 630 if (keyCode === 27 && isOpen) { 631 toggleSearch(ev); 632 } 633 }); 634 635 636 /***** for demo purposes only: don't allow to submit the form *****/ 637 //morphSearch.querySelector('button[type="submit"]').addEventListener('click', function (ev) { ev.preventDefault(); }); 638})(); 639 640
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.