|
From: <luc...@us...> - 2015-02-16 19:00:49
|
Revision: 12984
http://sourceforge.net/p/xoops/svn/12984
Author: luciorota
Date: 2015-02-16 19:00:46 +0000 (Mon, 16 Feb 2015)
Log Message:
-----------
code cleanup in templates/wfdownloads_singlefile.tpl
update Magnific Plugin
move Magnific Plugin from php script to template
Modified Paths:
--------------
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/magnific-popup.css
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/include/common.php
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/newlist.php
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/singlefile.php
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/admin/wfdownloads_am_categorieslist.tpl
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_newlistindex.tpl
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_singlefile.tpl
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/templates/wfdownloads_viewcat.tpl
XoopsModules/wfdownloads/branches/luciorota/wfdownloads/viewcat.php
Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js
===================================================================
--- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js 2015-02-16 14:09:28 UTC (rev 12983)
+++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/jquery.magnific-popup.min.js 2015-02-16 19:00:46 UTC (rev 12984)
@@ -1,430 +1,4 @@
-/*! Magnific Popup - v0.9.9 - 2013-12-27
- * http://dimsemenov.com/plugins/magnific-popup/
- * Copyright (c) 2013 Dmitry Semenov; */
-(function (e) {
- var t, n, i, o, r, a, s, l = "Close", c = "BeforeClose", d = "AfterClose", u = "BeforeAppend", p = "MarkupParse", f = "Open", m = "Change", g = "mfp", h = "." + g, v = "mfp-ready", C = "mfp-removing", y = "mfp-prevent-close", w = function () {
- }, b = !!window.jQuery, I = e(window), x = function (e, n) {
- t.ev.on(g + e + h, n)
- }, k = function (t, n, i, o) {
- var r = document.createElement("div");
- return r.className = "mfp-" + t, i && (r.innerHTML = i), o ? n && n.appendChild(r) : (r = e(r), n && r.appendTo(n)), r
- }, T = function (n, i) {
- t.ev.triggerHandler(g + n, i), t.st.callbacks && (n = n.charAt(0).toLowerCase() + n.slice(1), t.st.callbacks[n] && t.st.callbacks[n].apply(t, e.isArray(i) ? i : [i]))
- }, E = function (n) {
- return n === s && t.currTemplate.closeBtn || (t.currTemplate.closeBtn = e(t.st.closeMarkup.replace("%title%", t.st.tClose)), s = n), t.currTemplate.closeBtn
- }, _ = function () {
- e.magnificPopup.instance || (t = new w, t.init(), e.magnificPopup.instance = t)
- }, S = function () {
- var e = document.createElement("p").style, t = ["ms", "O", "Moz", "Webkit"];
- if (void 0 !== e.transition)return!0;
- for (; t.length;)if (t.pop() + "Transition"in e)return!0;
- return!1
- };
- w.prototype = {constructor: w, init: function () {
- var n = navigator.appVersion;
- t.isIE7 = -1 !== n.indexOf("MSIE 7."), t.isIE8 = -1 !== n.indexOf("MSIE 8."), t.isLowIE = t.isIE7 || t.isIE8, t.isAndroid = /android/gi.test(n), t.isIOS = /iphone|ipad|ipod/gi.test(n), t.supportsTransition = S(), t.probablyMobile = t.isAndroid || t.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), o = e(document), t.popupsCache = {}
- }, open : function (n) {
- i || (i = e(document.body));
- var r;
- if (n.isObj === !1) {
- t.items = n.items.toArray(), t.index = 0;
- var s, l = n.items;
- for (r = 0; l.length > r; r++)if (s = l[r], s.parsed && (s = s.el[0]), s === n.el[0]) {
- t.index = r;
- break
- }
- } else t.items = e.isArray(n.items) ? n.items : [n.items], t.index = n.index || 0;
- if (t.isOpen)return t.updateItemHTML(), void 0;
- t.types = [], a = "", t.ev = n.mainEl && n.mainEl.length ? n.mainEl.eq(0) : o, n.key ? (t.popupsCache[n.key] || (t.popupsCache[n.key] = {}), t.currTemplate = t.popupsCache[n.key]) : t.currTemplate = {}, t.st = e.extend(!0, {}, e.magnificPopup.defaults, n), t.fixedContentPos = "auto" === t.st.fixedContentPos ? !t.probablyMobile : t.st.fixedContentPos, t.st.modal && (t.st.closeOnContentClick = !1, t.st.closeOnBgClick = !1, t.st.showCloseBtn = !1, t.st.enableEscapeKey = !1), t.bgOverlay || (t.bgOverlay = k("bg").on("click" + h, function () {
- t.close()
- }), t.wrap = k("wrap").attr("tabindex", -1).on("click" + h, function (e) {
- t._checkIfClose(e.target) && t.close()
- }), t.container = k("container", t.wrap)), t.contentContainer = k("content"), t.st.preloader && (t.preloader = k("preloader", t.container, t.st.tLoading));
- var c = e.magnificPopup.modules;
- for (r = 0; c.length > r; r++) {
- var d = c[r];
- d = d.charAt(0).toUpperCase() + d.slice(1), t["init" + d].call(t)
- }
- T("BeforeOpen"), t.st.showCloseBtn && (t.st.closeBtnInside ? (x(p, function (e, t, n, i) {
- n.close_replaceWith = E(i.type)
- }), a += " mfp-close-btn-in") : t.wrap.append(E())), t.st.alignTop && (a += " mfp-align-top"), t.fixedContentPos ? t.wrap.css({overflow: t.st.overflowY, overflowX: "hidden", overflowY: t.st.overflowY}) : t.wrap.css({top: I.scrollTop(), position: "absolute"}), (t.st.fixedBgPos === !1 || "auto" === t.st.fixedBgPos && !t.fixedContentPos) && t.bgOverlay.css({height: o.height(), position: "absolute"}), t.st.enableEscapeKey && o.on("keyup" + h, function (e) {
- 27 === e.keyCode && t.close()
- }), I.on("resize" + h, function () {
- t.updateSize()
- }), t.st.closeOnContentClick || (a += " mfp-auto-cursor"), a && t.wrap.addClass(a);
- var u = t.wH = I.height(), m = {};
- if (t.fixedContentPos && t._hasScrollBar(u)) {
- var g = t._getScrollbarSize();
- g && (m.marginRight = g)
- }
- t.fixedContentPos && (t.isIE7 ? e("body, html").css("overflow", "hidden") : m.overflow = "hidden");
- var C = t.st.mainClass;
- return t.isIE7 && (C += " mfp-ie7"), C && t._addClassToMFP(C), t.updateItemHTML(), T("BuildControls"), e("html").css(m), t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo || i), t._lastFocusedEl = document.activeElement, setTimeout(function () {
- t.content ? (t._addClassToMFP(v), t._setFocus()) : t.bgOverlay.addClass(v), o.on("focusin" + h, t._onFocusIn)
- }, 16), t.isOpen = !0, t.updateSize(u), T(f), n
- }, close : function () {
- t.isOpen && (T(c), t.isOpen = !1, t.st.removalDelay && !t.isLowIE && t.supportsTransition ? (t._addClassToMFP(C), setTimeout(function () {
- t._close()
- }, t.st.removalDelay)) : t._close())
- }, _close : function () {
- T(l);
- var n = C + " " + v + " ";
- if (t.bgOverlay.detach(), t.wrap.detach(), t.container.empty(), t.st.mainClass && (n += t.st.mainClass + " "), t._removeClassFromMFP(n), t.fixedContentPos) {
- var i = {marginRight: ""};
- t.isIE7 ? e("body, html").css("overflow", "") : i.overflow = "", e("html").css(i)
- }
- o.off("keyup" + h + " focusin" + h), t.ev.off(h), t.wrap.attr("class", "mfp-wrap").removeAttr("style"), t.bgOverlay.attr("class", "mfp-bg"), t.container.attr("class", "mfp-container"), !t.st.showCloseBtn || t.st.closeBtnInside && t.currTemplate[t.currItem.type] !== !0 || t.currTemplate.closeBtn && t.currTemplate.closeBtn.detach(), t._lastFocusedEl && e(t._lastFocusedEl).focus(), t.currItem = null, t.content = null, t.currTemplate = null, t.prevHeight = 0, T(d)
- }, updateSize : function (e) {
- if (t.isIOS) {
- var n = document.documentElement.clientWidth / window.innerWidth, i = window.innerHeight * n;
- t.wrap.css("height", i), t.wH = i
- } else t.wH = e || I.height();
- t.fixedContentPos || t.wrap.css("height", t.wH), T("Resize")
- }, updateItemHTML : function () {
- var n = t.items[t.index];
- t.contentContainer.detach(), t.content && t.content.detach(), n.parsed || (n = t.parseEl(t.index));
- var i = n.type;
- if (T("BeforeChange", [t.currItem ? t.currItem.type : "", i]), t.currItem = n, !t.currTemplate[i]) {
- var o = t.st[i] ? t.st[i].markup : !1;
- T("FirstMarkupParse", o), t.currTemplate[i] = o ? e(o) : !0
- }
- r && r !== n.type && t.container.removeClass("mfp-" + r + "-holder");
- var a = t["get" + i.charAt(0).toUpperCase() + i.slice(1)](n, t.currTemplate[i]);
- t.appendContent(a, i), n.preloaded = !0, T(m, n), r = n.type, t.container.prepend(t.contentContainer), T("AfterChange")
- }, appendContent : function (e, n) {
- t.content = e, e ? t.st.showCloseBtn && t.st.closeBtnInside && t.currTemplate[n] === !0 ? t.content.find(".mfp-close").length || t.content.append(E()) : t.content = e : t.content = "", T(u), t.container.addClass("mfp-" + n + "-holder"), t.contentContainer.append(t.content)
- }, parseEl : function (n) {
- var i, o = t.items[n];
- if (o.tagName ? o = {el: e(o)} : (i = o.type, o = {data: o, src: o.src}), o.el) {
- for (var r = t.types, a = 0; r.length > a; a++)if (o.el.hasClass("mfp-" + r[a])) {
- i = r[a];
- break
- }
- o.src = o.el.attr("data-mfp-src"), o.src || (o.src = o.el.attr("href"))
- }
- return o.type = i || t.st.type || "inline", o.index = n, o.parsed = !0, t.items[n] = o, T("ElementParse", o), t.items[n]
- }, addGroup : function (e, n) {
- var i = function (i) {
- i.mfpEl = this, t._openClick(i, e, n)
- };
- n || (n = {});
- var o = "click.magnificPopup";
- n.mainEl = e, n.items ? (n.isObj = !0, e.off(o).on(o, i)) : (n.isObj = !1, n.delegate ? e.off(o).on(o, n.delegate, i) : (n.items = e, e.off(o).on(o, i)))
- }, _openClick : function (n, i, o) {
- var r = void 0 !== o.midClick ? o.midClick : e.magnificPopup.defaults.midClick;
- if (r || 2 !== n.which && !n.ctrlKey && !n.metaKey) {
- var a = void 0 !== o.disableOn ? o.disableOn : e.magnificPopup.defaults.disableOn;
- if (a)if (e.isFunction(a)) {
- if (!a.call(t))return!0
- } else if (a > I.width())return!0;
- n.type && (n.preventDefault(), t.isOpen && n.stopPropagation()), o.el = e(n.mfpEl), o.delegate && (o.items = i.find(o.delegate)), t.open(o)
- }
- }, updateStatus : function (e, i) {
- if (t.preloader) {
- n !== e && t.container.removeClass("mfp-s-" + n), i || "loading" !== e || (i = t.st.tLoading);
- var o = {status: e, text: i};
- T("UpdateStatus", o), e = o.status, i = o.text, t.preloader.html(i), t.preloader.find("a").on("click", function (e) {
- e.stopImmediatePropagation()
- }), t.container.addClass("mfp-s-" + e), n = e
- }
- }, _checkIfClose : function (n) {
- if (!e(n).hasClass(y)) {
- var i = t.st.closeOnContentClick, o = t.st.closeOnBgClick;
- if (i && o)return!0;
- if (!t.content || e(n).hasClass("mfp-close") || t.preloader && n === t.preloader[0])return!0;
- if (n === t.content[0] || e.contains(t.content[0], n)) {
- if (i)return!0
- } else if (o && e.contains(document, n))return!0;
- return!1
- }
- }, _addClassToMFP : function (e) {
- t.bgOverlay.addClass(e), t.wrap.addClass(e)
- }, _removeClassFromMFP : function (e) {
- this.bgOverlay.removeClass(e), t.wrap.removeClass(e)
- }, _hasScrollBar : function (e) {
- return(t.isIE7 ? o.height() : document.body.scrollHeight) > (e || I.height())
- }, _setFocus : function () {
- (t.st.focus ? t.content.find(t.st.focus).eq(0) : t.wrap).focus()
- }, _onFocusIn : function (n) {
- return n.target === t.wrap[0] || e.contains(t.wrap[0], n.target) ? void 0 : (t._setFocus(), !1)
- }, _parseMarkup : function (t, n, i) {
- var o;
- i.data && (n = e.extend(i.data, n)), T(p, [t, n, i]), e.each(n, function (e, n) {
- if (void 0 === n || n === !1)return!0;
- if (o = e.split("_"), o.length > 1) {
- var i = t.find(h + "-" + o[0]);
- if (i.length > 0) {
- var r = o[1];
- "replaceWith" === r ? i[0] !== n[0] && i.replaceWith(n) : "img" === r ? i.is("img") ? i.attr("src", n) : i.replaceWith('<img src="' + n + '" class="' + i.attr("class") + '" />') : i.attr(o[1], n)
- }
- } else t.find(h + "-" + e).html(n)
- })
- }, _getScrollbarSize : function () {
- if (void 0 === t.scrollbarSize) {
- var e = document.createElement("div");
- e.id = "mfp-sbm", e.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(e), t.scrollbarSize = e.offsetWidth - e.clientWidth, document.body.removeChild(e)
- }
- return t.scrollbarSize
- }}, e.magnificPopup = {instance: null, proto: w.prototype, modules: [], open: function (t, n) {
- return _(), t = t ? e.extend(!0, {}, t) : {}, t.isObj = !0, t.index = n || 0, this.instance.open(t)
- }, close : function () {
- return e.magnificPopup.instance && e.magnificPopup.instance.close()
- }, registerModule : function (t, n) {
- n.options && (e.magnificPopup.defaults[t] = n.options), e.extend(this.proto, n.proto), this.modules.push(t)
- }, 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..."}}, e.fn.magnificPopup = function (n) {
- _();
- var i = e(this);
- if ("string" == typeof n)if ("open" === n) {
- var o, r = b ? i.data("magnificPopup") : i[0].magnificPopup, a = parseInt(arguments[1], 10) || 0;
- r.items ? o = r.items[a] : (o = i, r.delegate && (o = o.find(r.delegate)), o = o.eq(a)), t._openClick({mfpEl: o}, i, r)
- } else t.isOpen && t[n].apply(t, Array.prototype.slice.call(arguments, 1)); else n = e.extend(!0, {}, n), b ? i.data("magnificPopup", n) : i[0].magnificPopup = n, t.addGroup(i, n);
- return i
- };
- var P, O, z, M = "inline", B = function () {
- z && (O.after(z.addClass(P)).detach(), z = null)
- };
- e.magnificPopup.registerModule(M, {options: {hiddenClass: "hide", markup: "", tNotFound: "Content not found"}, proto: {initInline: function () {
- t.types.push(M), x(l + "." + M, function () {
- B()
- })
- }, getInline : function (n, i) {
- if (B(), n.src) {
- var o = t.st.inline, r = e(n.src);
- if (r.length) {
- var a = r[0].parentNode;
- a && a.tagName && (O || (P = o.hiddenClass, O = k(P), P = "mfp-" + P), z = r.after(O).detach().removeClass(P)), t.updateStatus("ready")
- } else t.updateStatus("error", o.tNotFound), r = e("<div>");
- return n.inlineElement = r, r
- }
- return t.updateStatus("ready"), t._parseMarkup(i, {}, n), i
- }}});
- var F, H = "ajax", L = function () {
- F && i.removeClass(F)
- }, A = function () {
- L(), t.req && t.req.abort()
- };
- e.magnificPopup.registerModule(H, {options: {settings: null, cursor: "mfp-ajax-cur", tError: '<a href="%url%">The content</a> could not be loaded.'}, proto: {initAjax: function () {
- t.types.push(H), F = t.st.ajax.cursor, x(l + "." + H, A), x("BeforeChange." + H, A)
- }, getAjax : function (n) {
- F && i.addClass(F), t.updateStatus("loading");
- var o = e.extend({url: n.src, success: function (i, o, r) {
- var a = {data: i, xhr: r};
- T("ParseAjax", a), t.appendContent(e(a.data), H), n.finished = !0, L(), t._setFocus(), setTimeout(function () {
- t.wrap.addClass(v)
- }, 16), t.updateStatus("ready"), T("AjaxContentAdded")
- }, error : function () {
- L(), n.finished = n.loadError = !0, t.updateStatus("error", t.st.ajax.tError.replace("%url%", n.src))
- }}, t.st.ajax.settings);
- return t.req = e.ajax(o), ""
- }}});
- var j, N = function (n) {
- if (n.data && void 0 !== n.data.title)return n.data.title;
- var i = t.st.image.titleSrc;
- if (i) {
- if (e.isFunction(i))return i.call(t, n);
- if (n.el)return n.el.attr(i) || ""
- }
- return""
- };
- e.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 e = t.st.image, n = ".image";
- t.types.push("image"), x(f + n, function () {
- "image" === t.currItem.type && e.cursor && i.addClass(e.cursor)
- }), x(l + n, function () {
- e.cursor && i.removeClass(e.cursor), I.off("resize" + h)
- }), x("Resize" + n, t.resizeImage), t.isLowIE && x("AfterChange", t.resizeImage)
- }, resizeImage : function () {
- var e = t.currItem;
- if (e && e.img && t.st.image.verticalFit) {
- var n = 0;
- t.isLowIE && (n = parseInt(e.img.css("padding-top"), 10) + parseInt(e.img.css("padding-bottom"), 10)), e.img.css("max-height", t.wH - n)
- }
- }, _onImageHasSize : function (e) {
- e.img && (e.hasSize = !0, j && clearInterval(j), e.isCheckingImgSize = !1, T("ImageHasSize", e), e.imgHidden && (t.content && t.content.removeClass("mfp-loading"), e.imgHidden = !1))
- }, findImageSize : function (e) {
- var n = 0, i = e.img[0], o = function (r) {
- j && clearInterval(j), j = setInterval(function () {
- return i.naturalWidth > 0 ? (t._onImageHasSize(e), void 0) : (n > 200 && clearInterval(j), n++, 3 === n ? o(10) : 40 === n ? o(50) : 100 === n && o(500), void 0)
- }, r)
- };
- o(1)
- }, getImage : function (n, i) {
- var o = 0, r = function () {
- n && (n.img[0].complete ? (n.img.off(".mfploader"), n === t.currItem && (t._onImageHasSize(n), t.updateStatus("ready")), n.hasSize = !0, n.loaded = !0, T("ImageLoadComplete")) : (o++, 200 > o ? setTimeout(r, 100) : a()))
- }, a = function () {
- n && (n.img.off(".mfploader"), n === t.currItem && (t._onImageHasSize(n), t.updateStatus("error", s.tError.replace("%url%", n.src))), n.hasSize = !0, n.loaded = !0, n.loadError = !0)
- }, s = t.st.image, l = i.find(".mfp-img");
- if (l.length) {
- var c = document.createElement("img");
- c.className = "mfp-img", n.img = e(c).on("load.mfploader", r).on("error.mfploader", a), c.src = n.src, l.is("img") && (n.img = n.img.clone()), c = n.img[0], c.naturalWidth > 0 ? n.hasSize = !0 : c.width || (n.hasSize = !1)
- }
- return t._parseMarkup(i, {title: N(n), img_replaceWith: n.img}, n), t.resizeImage(), n.hasSize ? (j && clearInterval(j), n.loadError ? (i.addClass("mfp-loading"), t.updateStatus("error", s.tError.replace("%url%", n.src))) : (i.removeClass("mfp-loading"), t.updateStatus("ready")), i) : (t.updateStatus("loading"), n.loading = !0, n.hasSize || (n.imgHidden = !0, i.addClass("mfp-loading"), t.findImageSize(n)), i)
- }}});
- var W, R = function () {
- return void 0 === W && (W = void 0 !== document.createElement("p").style.MozTransform), W
- };
- e.magnificPopup.registerModule("zoom", {options: {enabled: !1, easing: "ease-in-out", duration: 300, opener: function (e) {
- return e.is("img") ? e : e.find("img")
- }}, proto : {initZoom: function () {
- var e, n = t.st.zoom, i = ".zoom";
- if (n.enabled && t.supportsTransition) {
- var o, r, a = n.duration, s = function (e) {
- var t = e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), i = "all " + n.duration / 1e3 + "s " + n.easing, o = {position: "fixed", zIndex: 9999, left: 0, top: 0, "-webkit-backface-visibility": "hidden"}, r = "transition";
- return o["-webkit-" + r] = o["-moz-" + r] = o["-o-" + r] = o[r] = i, t.css(o), t
- }, d = function () {
- t.content.css("visibility", "visible")
- };
- x("BuildControls" + i, function () {
- if (t._allowZoom()) {
- if (clearTimeout(o), t.content.css("visibility", "hidden"), e = t._getItemToZoom(), !e)return d(), void 0;
- r = s(e), r.css(t._getOffset()), t.wrap.append(r), o = setTimeout(function () {
- r.css(t._getOffset(!0)), o = setTimeout(function () {
- d(), setTimeout(function () {
- r.remove(), e = r = null, T("ZoomAnimationEnded")
- }, 16)
- }, a)
- }, 16)
- }
- }), x(c + i, function () {
- if (t._allowZoom()) {
- if (clearTimeout(o), t.st.removalDelay = a, !e) {
- if (e = t._getItemToZoom(), !e)return;
- r = s(e)
- }
- r.css(t._getOffset(!0)), t.wrap.append(r), t.content.css("visibility", "hidden"), setTimeout(function () {
- r.css(t._getOffset())
- }, 16)
- }
- }), x(l + i, function () {
- t._allowZoom() && (d(), r && r.remove(), e = null)
- })
- }
- }, _allowZoom : function () {
- return"image" === t.currItem.type
- }, _getItemToZoom : function () {
- return t.currItem.hasSize ? t.currItem.img : !1
- }, _getOffset : function (n) {
- var i;
- i = n ? t.currItem.img : t.st.zoom.opener(t.currItem.el || t.currItem);
- var o = i.offset(), r = parseInt(i.css("padding-top"), 10), a = parseInt(i.css("padding-bottom"), 10);
- o.top -= e(window).scrollTop() - r;
- var s = {width: i.width(), height: (b ? i.innerHeight() : i[0].offsetHeight) - a - r};
- return R() ? s["-moz-transform"] = s.transform = "translate(" + o.left + "px," + o.top + "px)" : (s.left = o.left, s.top = o.top), s
- }}});
- var Z = "iframe", q = "//about:blank", D = function (e) {
- if (t.currTemplate[Z]) {
- var n = t.currTemplate[Z].find("iframe");
- n.length && (e || (n[0].src = q), t.isIE8 && n.css("display", e ? "block" : "none"))
- }
- };
- e.magnificPopup.registerModule(Z, {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 () {
- t.types.push(Z), x("BeforeChange", function (e, t, n) {
- t !== n && (t === Z ? D() : n === Z && D(!0))
- }), x(l + "." + Z, function () {
- D()
- })
- }, getIframe : function (n, i) {
- var o = n.src, r = t.st.iframe;
- e.each(r.patterns, function () {
- return o.indexOf(this.index) > -1 ? (this.id && (o = "string" == typeof this.id ? o.substr(o.lastIndexOf(this.id) + this.id.length, o.length) : this.id.call(this, o)), o = this.src.replace("%id%", o), !1) : void 0
- });
- var a = {};
- return r.srcAction && (a[r.srcAction] = o), t._parseMarkup(i, a, n), t.updateStatus("ready"), i
- }}});
- var K = function (e) {
- var n = t.items.length;
- return e > n - 1 ? e - n : 0 > e ? n + e : e
- }, Y = function (e, t, n) {
- return e.replace(/%curr%/gi, t + 1).replace(/%total%/gi, n)
- };
- e.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 n = t.st.gallery, i = ".mfp-gallery", r = Boolean(e.fn.mfpFastClick);
- return t.direction = !0, n && n.enabled ? (a += " mfp-gallery", x(f + i, function () {
- n.navigateByImgClick && t.wrap.on("click" + i, ".mfp-img", function () {
- return t.items.length > 1 ? (t.next(), !1) : void 0
- }), o.on("keydown" + i, function (e) {
- 37 === e.keyCode ? t.prev() : 39 === e.keyCode && t.next()
- })
- }), x("UpdateStatus" + i, function (e, n) {
- n.text && (n.text = Y(n.text, t.currItem.index, t.items.length))
- }), x(p + i, function (e, i, o, r) {
- var a = t.items.length;
- o.counter = a > 1 ? Y(n.tCounter, r.index, a) : ""
- }), x("BuildControls" + i, function () {
- if (t.items.length > 1 && n.arrows && !t.arrowLeft) {
- var i = n.arrowMarkup, o = t.arrowLeft = e(i.replace(/%title%/gi, n.tPrev).replace(/%dir%/gi, "left")).addClass(y), a = t.arrowRight = e(i.replace(/%title%/gi, n.tNext).replace(/%dir%/gi, "right")).addClass(y), s = r ? "mfpFastClick" : "click";
- o[s](function () {
- t.prev()
- }), a[s](function () {
- t.next()
- }), t.isIE7 && (k("b", o[0], !1, !0), k("a", o[0], !1, !0), k("b", a[0], !1, !0), k("a", a[0], !1, !0)), t.container.append(o.add(a))
- }
- }), x(m + i, function () {
- t._preloadTimeout && clearTimeout(t._preloadTimeout), t._preloadTimeout = setTimeout(function () {
- t.preloadNearbyImages(), t._preloadTimeout = null
- }, 16)
- }), x(l + i, function () {
- o.off(i), t.wrap.off("click" + i), t.arrowLeft && r && t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(), t.arrowRight = t.arrowLeft = null
- }), void 0) : !1
- }, next : function () {
- t.direction = !0, t.index = K(t.index + 1), t.updateItemHTML()
- }, prev : function () {
- t.direction = !1, t.index = K(t.index - 1), t.updateItemHTML()
- }, goTo : function (e) {
- t.direction = e >= t.index, t.index = e, t.updateItemHTML()
- }, preloadNearbyImages : function () {
- var e, n = t.st.gallery.preload, i = Math.min(n[0], t.items.length), o = Math.min(n[1], t.items.length);
- for (e = 1; (t.direction ? o : i) >= e; e++)t._preloadItem(t.index + e);
- for (e = 1; (t.direction ? i : o) >= e; e++)t._preloadItem(t.index - e)
- }, _preloadItem : function (n) {
- if (n = K(n), !t.items[n].preloaded) {
- var i = t.items[n];
- i.parsed || (i = t.parseEl(n)), T("LazyLoad", i), "image" === i.type && (i.img = e('<img class="mfp-img" />').on("load.mfploader", function () {
- i.hasSize = !0
- }).on("error.mfploader", function () {
- i.hasSize = !0, i.loadError = !0, T("LazyLoadError", i)
- }).attr("src", i.src)), i.preloaded = !0
- }
- }}});
- var U = "retina";
- e.magnificPopup.registerModule(U, {options: {replaceSrc: function (e) {
- return e.src.replace(/\.\w+$/, function (e) {
- return"@2x" + e
- })
- }, ratio : 1}, proto: {initRetina: function () {
- if (window.devicePixelRatio > 1) {
- var e = t.st.retina, n = e.ratio;
- n = isNaN(n) ? n() : n, n > 1 && (x("ImageHasSize." + U, function (e, t) {
- t.img.css({"max-width": t.img[0].naturalWidth / n, width: "100%"})
- }), x("ElementParse." + U, function (t, i) {
- i.src = e.replaceSrc(i, n)
- }))
- }
- }}}), function () {
- var t = 1e3, n = "ontouchstart"in window, i = function () {
- I.off("touchmove" + r + " touchend" + r)
- }, o = "mfpFastClick", r = "." + o;
- e.fn.mfpFastClick = function (o) {
- return e(this).each(function () {
- var a, s = e(this);
- if (n) {
- var l, c, d, u, p, f;
- s.on("touchstart" + r, function (e) {
- u = !1, f = 1, p = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0], c = p.clientX, d = p.clientY, I.on("touchmove" + r, function (e) {
- p = e.originalEvent ? e.originalEvent.touches : e.touches, f = p.length, p = p[0], (Math.abs(p.clientX - c) > 10 || Math.abs(p.clientY - d) > 10) && (u = !0, i())
- }).on("touchend" + r, function (e) {
- i(), u || f > 1 || (a = !0, e.preventDefault(), clearTimeout(l), l = setTimeout(function () {
- a = !1
- }, t), o())
- })
- })
- }
- s.on("click" + r, function () {
- a || o()
- })
- })
- }, e.fn.destroyMfpFastClick = function () {
- e(this).off("touchstart" + r + " click" + r), n && I.off("touchmove" + r + " touchend" + r)
- }
- }(), _()
-})(window.jQuery || window.Zepto);
+/*! Magnific Popup - v1.0.0 - 2015-01-03
+* http://dimsemenov.com/plugins/magnific-popup/
+* Copyright (c) 2015 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.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={}},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="",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(){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.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{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._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),b.currTemplate[d]=f?a(f):!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){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(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"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)}}else b.find(p+"-"+a).html(c)})},_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..."}},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;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)+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",g=Boolean(a.fn.mfpFastClick);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),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),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))}}),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.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),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)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){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){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())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
\ No newline at end of file
Modified: XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/magnific-popup.css
===================================================================
--- XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/magnific-popup.css 2015-02-16 14:09:28 UTC (rev 12983)
+++ XoopsModules/wfdownloads/branches/luciorota/wfdownloads/assets/js/magnific/magnific-popup.css 2015-02-16 19:00:46 UTC (rev 12984)
@@ -1,219 +1,182 @@
/* Magnific Popup CSS */
.mfp-bg {
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 1042;
- overflow: hidden;
- position: fixed;
- background: #0b0b0b;
- opacity: 0.8;
- filter: alpha(opacity=80);
-}
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1042;
+ overflow: hidden;
+ position: fixed;
+ background: #0b0b0b;
+ opacity: 0.8;
+ filter: alpha(opacity=80); }
.mfp-wrap {
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 1043;
- position: fixed;
- outline: none !important;
- -webkit-backface-visibility: hidden;
-}
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1043;
+ position: fixed;
+ outline: none !important;
+ -webkit-backface-visibility: hidden; }
.mfp-container {
- text-align: center;
- position: absolute;
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- padding: 0 8px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
+ text-align: center;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
+ padding: 0 8px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box; }
.mfp-container:before {
- content: '';
- display: inline-block;
- height: 100%;
- vertical-align: middle;
-}
+ content: '';
+ display: inline-block;
+ height: 100%;
+ vertical-align: middle; }
.mfp-align-top .mfp-container:before {
- display: none;
-}
+ display: none; }
.mfp-content {
- position: relative;
- display: inline-block;
- vertical-align: middle;
- margin: 0 auto;
- text-align: left;
- z-index: 1045;
-}
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+ margin: 0 auto;
+ text-align: left;
+ z-index: 1045; }
.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
- width: 100%;
- cursor: auto;
-}
+ width: 100%;
+ cursor: auto; }
.mfp-ajax-cur {
- cursor: progress;
-}
+ cursor: progress; }
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
- cursor: -moz-zoom-out;
- cursor: -webkit-zoom-out;
- cursor: zoom-out;
-}
+ cursor: -moz-zoom-out;
+ cursor: -webkit-zoom-out;
+ cursor: zoom-out; }
.mfp-zoom {
- cursor: pointer;
- cursor: -webkit-zoom-in;
- cursor: -moz-zoom-in;
- cursor: zoom-in;
-}
+ cursor: pointer;
+ cursor: -webkit-zoom-in;
+ cursor: -moz-zoom-in;
+ cursor: zoom-in; }
.mfp-auto-cursor .mfp-content {
- cursor: auto;
-}
+ cursor: auto; }
.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter {
- -webkit-user-select: none;
- -moz-user-select: none;
- user-select: none;
-}
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none; }
.mfp-loading.mfp-figure {
- display: none;
-}
+ display: none; }
.mfp-hide {
- display: none !important;
-}
+ display: none !important; }
.mfp-preloader {
- color: #cccccc;
- position: absolute;
- top: 50%;
- width: auto;
- text-align: center;
- margin-top: -0.8em;
- left: 8px;
- right: 8px;
- z-index: 1044;
-}
+ color: #CCC;
+ position: absolute;
+ top: 50%;
+ width: auto;
+ text-align: center;
+ margin-top: -0.8em;
+ left: 8px;
+ right: 8px;
+ z-index: 1044; }
+ .mfp-preloader a {
+ color: #CCC; }
+ .mfp-preloader a:hover {
+ color: #FFF; }
-.mfp-preloader a {
- color: #cccccc;
-}
-
-.mfp-preloader a:hover {
- color: white;
-}
-
.mfp-s-ready .mfp-preloader {
- display: none;
-}
+ display: none; }
.mfp-s-error .mfp-content {
- display: none;
-}
+ display: none; }
button.mfp-close, button.mfp-arrow {
- overflow: visible;
- cursor: pointer;
- background: transparent;
- b...
[truncated message content] |