diff --git a/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.css b/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.css old mode 100755 new mode 100644 index 6bb5a664..8561e181 --- a/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.css +++ b/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.css @@ -8,8 +8,7 @@ overflow: hidden; position: fixed; background: #0b0b0b; - opacity: 0.8; - filter: alpha(opacity=80); } + opacity: 0.8; } .mfp-wrap { top: 0; @@ -29,8 +28,6 @@ left: 0; top: 0; padding: 0 8px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; } .mfp-container:before { @@ -118,8 +115,8 @@ button.mfp-arrow { outline: none; padding: 0; z-index: 1046; - -webkit-box-shadow: none; - box-shadow: none; } + box-shadow: none; + touch-action: manipulation; } button::-moz-focus-inner { padding: 0; @@ -135,7 +132,6 @@ button::-moz-focus-inner { text-decoration: none; text-align: center; opacity: 0.65; - filter: alpha(opacity=65); padding: 0 0 18px 10px; color: #FFF; font-style: normal; @@ -143,8 +139,7 @@ button::-moz-focus-inner { font-family: Arial, Baskerville, monospace; } .mfp-close:hover, .mfp-close:focus { - opacity: 1; - filter: alpha(opacity=100); } + opacity: 1; } .mfp-close:active { top: 1px; } @@ -171,7 +166,6 @@ button::-moz-focus-inner { .mfp-arrow { position: absolute; opacity: 0.65; - filter: alpha(opacity=65); margin: 0; top: 50%; margin-top: -55px; @@ -183,12 +177,9 @@ button::-moz-focus-inner { margin-top: -54px; } .mfp-arrow:hover, .mfp-arrow:focus { - opacity: 1; - filter: alpha(opacity=100); } + opacity: 1; } .mfp-arrow:before, - .mfp-arrow:after, - .mfp-arrow .mfp-b, - .mfp-arrow .mfp-a { + .mfp-arrow:after { content: ''; display: block; width: 0; @@ -199,36 +190,30 @@ button::-moz-focus-inner { margin-top: 35px; margin-left: 35px; border: medium inset transparent; } - .mfp-arrow:after, - .mfp-arrow .mfp-a { + .mfp-arrow:after { border-top-width: 13px; border-bottom-width: 13px; top: 8px; } - .mfp-arrow:before, - .mfp-arrow .mfp-b { + .mfp-arrow:before { border-top-width: 21px; border-bottom-width: 21px; opacity: 0.7; } .mfp-arrow-left { left: 0; } - .mfp-arrow-left:after, - .mfp-arrow-left .mfp-a { + .mfp-arrow-left:after { border-right: 17px solid #FFF; margin-left: 31px; } - .mfp-arrow-left:before, - .mfp-arrow-left .mfp-b { + .mfp-arrow-left:before { margin-left: 25px; border-right: 27px solid #3F3F3F; } .mfp-arrow-right { right: 0; } - .mfp-arrow-right:after, - .mfp-arrow-right .mfp-a { + .mfp-arrow-right:after { border-left: 17px solid #FFF; margin-left: 39px; } - .mfp-arrow-right:before, - .mfp-arrow-right .mfp-b { + .mfp-arrow-right:before { border-left: 27px solid #3F3F3F; } .mfp-iframe-holder { @@ -263,8 +248,6 @@ img.mfp-img { height: auto; display: block; line-height: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; padding: 40px 0 40px; margin: 0 auto; } @@ -336,8 +319,6 @@ img.mfp-img { top: auto; padding: 3px 5px; position: fixed; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; } .mfp-img-mobile .mfp-bottom-bar:empty { padding: 0; } @@ -368,24 +349,3 @@ img.mfp-img { .mfp-container { padding-left: 6px; padding-right: 6px; } } - -.mfp-ie7 .mfp-img { - padding: 0; } - -.mfp-ie7 .mfp-bottom-bar { - width: 600px; - left: 50%; - margin-left: -300px; - margin-top: 5px; - padding-bottom: 5px; } - -.mfp-ie7 .mfp-container { - padding: 0; } - -.mfp-ie7 .mfp-content { - padding-top: 44px; } - -.mfp-ie7 .mfp-close { - top: 0; - right: 0; - padding-top: 0; } diff --git a/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.js b/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.js old mode 100755 new mode 100644 index afab0bc4..eecc5050 --- a/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.js +++ b/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.js @@ -1,6 +1,6 @@ -/*! Magnific Popup - v1.0.0 - 2015-09-17 +/*! Magnific Popup - v1.1.0 - 2016-02-20 * http://dimsemenov.com/plugins/magnific-popup/ -* Copyright (c) 2015 Dmitry Semenov; */ +* Copyright (c) 2016 Dmitry Semenov; */ ;(function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. @@ -83,7 +83,7 @@ var _mfpOn = function(name, f) { // converts "mfpEventName" to "eventName" callback and triggers it if it's present e = e.charAt(0).toLowerCase() + e.slice(1); if(mfp.st.callbacks[e]) { - mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]); + mfp.st.callbacks[e].apply(mfp, Array.isArray(data) ? data : [data]); } } }, @@ -136,9 +136,7 @@ MagnificPopup.prototype = { */ init: function() { var appVersion = navigator.appVersion; - mfp.isIE7 = appVersion.indexOf("MSIE 7.") !== -1; - mfp.isIE8 = appVersion.indexOf("MSIE 8.") !== -1; - mfp.isLowIE = mfp.isIE7 || mfp.isIE8; + mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener; mfp.isAndroid = (/android/gi).test(appVersion); mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion); mfp.supportsTransition = supportsTransitions(); @@ -177,7 +175,7 @@ MagnificPopup.prototype = { } } } else { - mfp.items = $.isArray(data.items) ? data.items : [data.items]; + mfp.items = Array.isArray(data.items) ? data.items : [data.items]; mfp.index = data.index || 0; } @@ -446,8 +444,8 @@ MagnificPopup.prototype = { } - if(mfp._lastFocusedEl) { - $(mfp._lastFocusedEl).focus(); // put tab focus back + if(mfp.st.autoFocusLast && mfp._lastFocusedEl) { + $(mfp._lastFocusedEl).trigger('focus'); // put tab focus back } mfp.currItem = null; mfp.content = null; @@ -501,10 +499,6 @@ MagnificPopup.prototype = { mfp.currItem = item; - - - - if(!mfp.currTemplate[type]) { var markup = mfp.st[type] ? mfp.st[type].markup : false; @@ -565,8 +559,6 @@ MagnificPopup.prototype = { }, - - /** * Creates Magnific Popup data object based on given data * @param {int} index Index of item to parse @@ -649,7 +641,7 @@ MagnificPopup.prototype = { var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn; if(disableOn) { - if($.isFunction(disableOn)) { + if(typeof disableOn === 'function') { if( !disableOn.call(mfp) ) { return true; } @@ -668,7 +660,6 @@ MagnificPopup.prototype = { e.stopPropagation(); } } - options.el = $(e.mfpEl); if(options.delegate) { @@ -764,7 +755,7 @@ MagnificPopup.prototype = { return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) ); }, _setFocus: function() { - (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus(); + (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).trigger('focus'); }, _onFocusIn: function(e) { if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) { @@ -797,7 +788,7 @@ MagnificPopup.prototype = { if(el.is('img')) { el.attr('src', value); } else { - el.replaceWith( '' ); + el.replaceWith( $('').attr('src', value).attr('class', el.attr('class')) ); } } else { el.attr(arr[1], value); @@ -843,7 +834,6 @@ $.magnificPopup = { } else { options = $.extend(true, {}, options); } - options.isObj = true; options.index = index || 0; @@ -907,7 +897,9 @@ $.magnificPopup = { tClose: 'Close (Esc)', - tLoading: 'Loading...' + tLoading: 'Loading...', + + autoFocusLast: true } }; @@ -963,26 +955,6 @@ $.fn.magnificPopup = function(options) { return jqEl; }; - -//Quick benchmark -/* -var start = performance.now(), - i, - rounds = 1000; - -for(i = 0; i < rounds; i++) { - -} -console.log('Test #1:', performance.now() - start); - -start = performance.now(); -for(i = 0; i < rounds; i++) { - -} -console.log('Test #2:', performance.now() - start); -*/ - - /*>>core*/ /*>>inline*/ @@ -1134,12 +1106,6 @@ $.magnificPopup.registerModule(AJAX_NS, { } }); - - - - - - /*>>ajax*/ /*>>image*/ @@ -1151,7 +1117,7 @@ var _imgInterval, var src = mfp.st.image.titleSrc; if(src) { - if($.isFunction(src)) { + if(typeof src === 'function') { return src.call(mfp, item); } else if(item.el) { return item.el.attr(src) || ''; @@ -1388,8 +1354,6 @@ $.magnificPopup.registerModule('image', { } }); - - /*>>image*/ /*>>zoom*/ @@ -1723,8 +1687,7 @@ $.magnificPopup.registerModule('gallery', { initGallery: function() { var gSt = mfp.st.gallery, - ns = '.mfp-gallery', - supportsFastClick = Boolean($.fn.mfpFastClick); + ns = '.mfp-gallery'; mfp.direction = true; // true - next, false - prev @@ -1769,22 +1732,13 @@ $.magnificPopup.registerModule('gallery', { arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS), arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS); - var eName = supportsFastClick ? 'mfpFastClick' : 'click'; - arrowLeft[eName](function() { + arrowLeft.on('click', function() { mfp.prev(); - }); - arrowRight[eName](function() { + }); + arrowRight.on('click', function() { mfp.next(); }); - // Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b) - if(mfp.isIE7) { - _getEl('b', arrowLeft[0], false, true); - _getEl('a', arrowLeft[0], false, true); - _getEl('b', arrowRight[0], false, true); - _getEl('a', arrowRight[0], false, true); - } - mfp.container.append(arrowLeft.add(arrowRight)); } }); @@ -1802,10 +1756,6 @@ $.magnificPopup.registerModule('gallery', { _mfpOn(CLOSE_EVENT+ns, function() { _document.off(ns); mfp.wrap.off('click'+ns); - - if(mfp.arrowLeft && supportsFastClick) { - mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick(); - } mfp.arrowRight = mfp.arrowLeft = null; }); @@ -1868,58 +1818,6 @@ $.magnificPopup.registerModule('gallery', { } }); -/* -Touch Support that might be implemented some day - -addSwipeGesture: function() { - var startX, - moved, - multipleTouches; - - return; - - var namespace = '.mfp', - addEventNames = function(pref, down, move, up, cancel) { - mfp._tStart = pref + down + namespace; - mfp._tMove = pref + move + namespace; - mfp._tEnd = pref + up + namespace; - mfp._tCancel = pref + cancel + namespace; - }; - - if(window.navigator.msPointerEnabled) { - addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel'); - } else if('ontouchstart' in window) { - addEventNames('touch', 'start', 'move', 'end', 'cancel'); - } else { - return; - } - _window.on(mfp._tStart, function(e) { - var oE = e.originalEvent; - multipleTouches = moved = false; - startX = oE.pageX || oE.changedTouches[0].pageX; - }).on(mfp._tMove, function(e) { - if(e.originalEvent.touches.length > 1) { - multipleTouches = e.originalEvent.touches.length; - } else { - //e.preventDefault(); - moved = true; - } - }).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) { - if(moved && !multipleTouches) { - var oE = e.originalEvent, - diff = startX - (oE.pageX || oE.changedTouches[0].pageX); - - if(diff > 20) { - mfp.next(); - } else if(diff < -20) { - mfp.prev(); - } - } - }); -}, -*/ - - /*>>gallery*/ /*>>retina*/ @@ -1960,101 +1858,4 @@ $.magnificPopup.registerModule(RETINA_NS, { }); /*>>retina*/ - -/*>>fastclick*/ -/** - * FastClick event implementation. (removes 300ms delay on touch devices) - * Based on https://developers.google.com/mobile/articles/fast_buttons - * - * You may use it outside the Magnific Popup by calling just: - * - * $('.your-el').mfpFastClick(function() { - * console.log('Clicked!'); - * }); - * - * To unbind: - * $('.your-el').destroyMfpFastClick(); - * - * - * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound. - * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick - * - */ - -(function() { - var ghostClickDelay = 1000, - supportsTouch = 'ontouchstart' in window, - unbindTouchMove = function() { - _window.off('touchmove'+ns+' touchend'+ns); - }, - eName = 'mfpFastClick', - ns = '.'+eName; - - - // As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way - $.fn.mfpFastClick = function(callback) { - - return $(this).each(function() { - - var elem = $(this), - lock; - - if( supportsTouch ) { - - var timeout, - startX, - startY, - pointerMoved, - point, - numPointers; - - elem.on('touchstart' + ns, function(e) { - pointerMoved = false; - numPointers = 1; - - point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0]; - startX = point.clientX; - startY = point.clientY; - - _window.on('touchmove'+ns, function(e) { - point = e.originalEvent ? e.originalEvent.touches : e.touches; - numPointers = point.length; - point = point[0]; - if (Math.abs(point.clientX - startX) > 10 || - Math.abs(point.clientY - startY) > 10) { - pointerMoved = true; - unbindTouchMove(); - } - }).on('touchend'+ns, function(e) { - unbindTouchMove(); - if(pointerMoved || numPointers > 1) { - return; - } - lock = true; - e.preventDefault(); - clearTimeout(timeout); - timeout = setTimeout(function() { - lock = false; - }, ghostClickDelay); - callback(); - }); - }); - - } - - elem.on('click' + ns, function() { - if(!lock) { - callback(); - } - }); - }); - }; - - $.fn.destroyMfpFastClick = function() { - $(this).off('touchstart' + ns + ' click' + ns); - if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns); - }; -})(); - -/*>>fastclick*/ - _checkInstance(); })); \ No newline at end of file + _checkInstance(); })); diff --git a/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.min.js b/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.min.js index 7c95ef9a..0f69cfc2 100644 --- a/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.min.js +++ b/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.min.js @@ -1,4 +1 @@ -/*! Magnific Popup - v1.0.0 - 2015-09-17 -* http://dimsemenov.com/plugins/magnific-popup/ -* Copyright (c) 2015 Dmitry Semenov; */ -;(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof exports==="object"){a(require("jquery"))}else{a(window.jQuery||window.Zepto)}}}(function(B){var x="Close",G="BeforeClose",v="AfterClose",M="BeforeAppend",f="MarkupParse",k="Open",h="Change",C="mfp",d="."+C,H="mfp-ready",J="mfp-removing",e="mfp-prevent-close";var R,y=function(){},I=!!(window.jQuery),A,a=B(window),z,E,b,K;var i=function(V,W){R.ev.on(C+V+d,W)},n=function(Z,W,X,V){var Y=document.createElement("div");Y.className="mfp-"+Z;if(X){Y.innerHTML=X}if(!V){Y=B(Y);if(W){Y.appendTo(W)}}else{if(W){W.appendChild(Y)}}return Y},O=function(W,V){R.ev.triggerHandler(C+W,V);if(R.st.callbacks){W=W.charAt(0).toLowerCase()+W.slice(1);if(R.st.callbacks[W]){R.st.callbacks[W].apply(R,B.isArray(V)?V:[V])}}},D=function(V){if(V!==K||!R.currTemplate.closeBtn){R.currTemplate.closeBtn=B(R.st.closeMarkup.replace("%title%",R.st.tClose));K=V}return R.currTemplate.closeBtn},s=function(){if(!B.magnificPopup.instance){R=new y();R.init();B.magnificPopup.instance=R}},U=function(){var W=document.createElement("p").style,V=["ms","O","Moz","Webkit"];if(W.transition!==undefined){return true}while(V.length){if(V.pop()+"Transition" in W){return true}}return false};y.prototype={constructor:y,init:function(){var V=navigator.appVersion;R.isIE7=V.indexOf("MSIE 7.")!==-1;R.isIE8=V.indexOf("MSIE 8.")!==-1;R.isLowIE=R.isIE7||R.isIE8;R.isAndroid=(/android/gi).test(V);R.isIOS=(/iphone|ipad|ipod/gi).test(V);R.supportsTransition=U();R.probablyMobile=(R.isAndroid||R.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent));z=B(document);R.popupsCache={}},open:function(aa){var ab;if(aa.isObj===false){R.items=aa.items.toArray();R.index=0;var ac=aa.items,ad;for(ab=0;ab(V||a.height()))},_setFocus:function(){(R.st.focus?R.content.find(R.st.focus).eq(0):R.wrap).focus()},_onFocusIn:function(V){if(V.target!==R.wrap[0]&&!B.contains(R.wrap[0],V.target)){R._setFocus();return false}},_parseMarkup:function(X,W,Y){var V;if(Y.data){W=B.extend(Y.data,W)}O(f,[X,W,Y]);B.each(W,function(aa,ac){if(ac===undefined||ac===false){return true}V=aa.split("_");if(V.length>1){var ab=X.find(d+"-"+V[0]);if(ab.length>0){var Z=V[1];if(Z==="replaceWith"){if(ab[0]!==ac[0]){ab.replaceWith(ac)}}else{if(Z==="img"){if(ab.is("img")){ab.attr("src",ac)}else{ab.replaceWith('')}}else{ab.attr(V[1],ac)}}}}else{X.find(d+"-"+aa).html(ac)}})},_getScrollbarSize:function(){if(R.scrollbarSize===undefined){var V=document.createElement("div");V.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;";document.body.appendChild(V);R.scrollbarSize=V.offsetWidth-V.clientWidth;document.body.removeChild(V)}return R.scrollbarSize}};B.magnificPopup={instance:null,proto:y.prototype,modules:[],open:function(W,V){s();if(!W){W={}}else{W=B.extend(true,{},W)}W.isObj=true;W.index=V||0;return this.instance.open(W)},close:function(){return B.magnificPopup.instance&&B.magnificPopup.instance.close()},registerModule:function(V,W){if(W.options){B.magnificPopup.defaults[V]=W.options}B.extend(this.proto,W.proto);this.modules.push(V)},defaults:{disableOn:0,key:null,midClick:false,mainClass:"",preloader:true,focus:"",closeOnContentClick:false,closeOnBgClick:true,closeBtnInside:true,showCloseBtn:true,enableEscapeKey:true,modal:false,alignTop:false,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}};B.fn.magnificPopup=function(X){s();var Y=B(this);if(typeof X==="string"){if(X==="open"){var V,Z=I?Y.data("magnificPopup"):Y[0].magnificPopup,W=parseInt(arguments[1],10)||0;if(Z.items){V=Z.items[W]}else{V=Y;if(Z.delegate){V=V.find(Z.delegate)}V=V.eq(W)}R._openClick({mfpEl:V},Y,Z)}else{if(R.isOpen){R[X].apply(R,Array.prototype.slice.call(arguments,1))}}}else{X=B.extend(true,{},X);if(I){Y.data("magnificPopup",X)}else{Y[0].magnificPopup=X}R.addGroup(Y,X)}return Y};var F="inline",Q,N,r,l=function(){if(r){N.after(r.addClass(Q)).detach();r=null}};B.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){R.types.push(F);i(x+"."+F,function(){l()})},getInline:function(Z,Y){l();if(Z.src){var V=R.st.inline,X=B(Z.src);if(X.length){var W=X[0].parentNode;if(W&&W.tagName){if(!N){Q=V.hiddenClass;N=n(Q);Q="mfp-"+Q}r=X.after(N).detach().removeClass(Q)}R.updateStatus("ready")}else{R.updateStatus("error",V.tNotFound);X=B("
")}Z.inlineElement=X;return X}R.updateStatus("ready");R._parseMarkup(Y,{},Z);return Y}}});var t="ajax",T,u=function(){if(T){B(document.body).removeClass(T)}},S=function(){u();if(R.req){R.req.abort()}};B.magnificPopup.registerModule(t,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){R.types.push(t);T=R.st.ajax.cursor;i(x+"."+t,S);i("BeforeChange."+t,S)},getAjax:function(W){if(T){B(document.body).addClass(T)}R.updateStatus("loading");var V=B.extend({url:W.src,success:function(Z,aa,Y){var X={data:Z,xhr:Y};O("ParseAjax",X);R.appendContent(B(X.data),t);W.finished=true;u();R._setFocus();setTimeout(function(){R.wrap.addClass(H)},16);R.updateStatus("ready");O("AjaxContentAdded")},error:function(){u();W.finished=W.loadError=true;R.updateStatus("error",R.st.ajax.tError.replace("%url%",W.src))}},R.st.ajax.settings);R.req=B.ajax(V);return""}}});var g,c=function(V){if(V.data&&V.data.title!==undefined){return V.data.title}var W=R.st.image.titleSrc;if(W){if(B.isFunction(W)){return W.call(R,V)}else{if(V.el){return V.el.attr(W)||""}}}return""};B.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:true,tError:'The image could not be loaded.'},proto:{initImage:function(){var W=R.st.image,V=".image";R.types.push("image");i(k+V,function(){if(R.currItem.type==="image"&&W.cursor){B(document.body).addClass(W.cursor)}});i(x+V,function(){if(W.cursor){B(document.body).removeClass(W.cursor)}a.off("resize"+d)});i("Resize"+V,R.resizeImage);if(R.isLowIE){i("AfterChange",R.resizeImage)}},resizeImage:function(){var W=R.currItem;if(!W||!W.img){return}if(R.st.image.verticalFit){var V=0;if(R.isLowIE){V=parseInt(W.img.css("padding-top"),10)+parseInt(W.img.css("padding-bottom"),10)}W.img.css("max-height",R.wH-V)}},_onImageHasSize:function(V){if(V.img){V.hasSize=true;if(g){clearInterval(g)}V.isCheckingImgSize=false;O("ImageHasSize",V);if(V.imgHidden){if(R.content){R.content.removeClass("mfp-loading")}V.imgHidden=false}}},findImageSize:function(Y){var V=0,W=Y.img[0],X=function(Z){if(g){clearInterval(g)}g=setInterval(function(){if(W.naturalWidth>0){R._onImageHasSize(Y);return}if(V>200){clearInterval(g)}V++;if(V===3){X(10)}else{if(V===40){X(50)}else{if(V===100){X(500)}}}},Z)};X(1)},getImage:function(ab,Y){var aa=0,ac=function(){if(ab){if(ab.img[0].complete){ab.img.off(".mfploader");if(ab===R.currItem){R._onImageHasSize(ab);R.updateStatus("ready")}ab.hasSize=true;ab.loaded=true;O("ImageLoadComplete")}else{aa++;if(aa<200){setTimeout(ac,100)}else{V()}}}},V=function(){if(ab){ab.img.off(".mfploader");if(ab===R.currItem){R._onImageHasSize(ab);R.updateStatus("error",Z.tError.replace("%url%",ab.src))}ab.hasSize=true;ab.loaded=true;ab.loadError=true}},Z=R.st.image;var X=Y.find(".mfp-img");if(X.length){var W=document.createElement("img");W.className="mfp-img";if(ab.el&&ab.el.find("img").length){W.alt=ab.el.find("img").attr("alt")}ab.img=B(W).on("load.mfploader",ac).on("error.mfploader",V);W.src=ab.src;if(X.is("img")){ab.img=ab.img.clone()}W=ab.img[0];if(W.naturalWidth>0){ab.hasSize=true}else{if(!W.width){ab.hasSize=false}}}R._parseMarkup(Y,{title:c(ab),img_replaceWith:ab.img},ab);R.resizeImage();if(ab.hasSize){if(g){clearInterval(g)}if(ab.loadError){Y.addClass("mfp-loading");R.updateStatus("error",Z.tError.replace("%url%",ab.src))}else{Y.removeClass("mfp-loading");R.updateStatus("ready")}return Y}R.updateStatus("loading");ab.loading=true;if(!ab.hasSize){ab.imgHidden=true;Y.addClass("mfp-loading");R.findImageSize(ab)}return Y}}});var j,L=function(){if(j===undefined){j=document.createElement("p").style.MozTransform!==undefined}return j};B.magnificPopup.registerModule("zoom",{options:{enabled:false,easing:"ease-in-out",duration:300,opener:function(V){return V.is("img")?V:V.find("img")}},proto:{initZoom:function(){var W=R.st.zoom,Z=".zoom",ac;if(!W.enabled||!R.supportsTransition){return}var ab=W.duration,aa=function(af){var ae=af.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),ag="all "+(W.duration/1000)+"s "+W.easing,ah={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},ad="transition";ah["-webkit-"+ad]=ah["-moz-"+ad]=ah["-o-"+ad]=ah[ad]=ag;ae.css(ah);return ae},V=function(){R.content.css("visibility","visible")},X,Y;i("BuildControls"+Z,function(){if(R._allowZoom()){clearTimeout(X);R.content.css("visibility","hidden");ac=R._getItemToZoom();if(!ac){V();return}Y=aa(ac);Y.css(R._getOffset());R.wrap.append(Y);X=setTimeout(function(){Y.css(R._getOffset(true));X=setTimeout(function(){V();setTimeout(function(){Y.remove();ac=Y=null;O("ZoomAnimationEnded")},16)},ab)},16)}});i(G+Z,function(){if(R._allowZoom()){clearTimeout(X);R.st.removalDelay=ab;if(!ac){ac=R._getItemToZoom();if(!ac){return}Y=aa(ac)}Y.css(R._getOffset(true));R.wrap.append(Y);R.content.css("visibility","hidden");setTimeout(function(){Y.css(R._getOffset())},16)}});i(x+Z,function(){if(R._allowZoom()){V();if(Y){Y.remove()}ac=null}})},_allowZoom:function(){return R.currItem.type==="image"},_getItemToZoom:function(){if(R.currItem.hasSize){return R.currItem.img}else{return false}},_getOffset:function(X){var V;if(X){V=R.currItem.img}else{V=R.st.zoom.opener(R.currItem.el||R.currItem)}var aa=V.offset();var W=parseInt(V.css("padding-top"),10);var Z=parseInt(V.css("padding-bottom"),10);aa.top-=(B(window).scrollTop()-W);var Y={width:V.width(),height:(I?V.innerHeight():V[0].offsetHeight)-Z-W};if(L()){Y["-moz-transform"]=Y.transform="translate("+aa.left+"px,"+aa.top+"px)"}else{Y.left=aa.left;Y.top=aa.top}return Y}}});var q="iframe",p="//about:blank",P=function(V){if(R.currTemplate[q]){var W=R.currTemplate[q].find("iframe");if(W.length){if(!V){W[0].src=p}if(R.isIE8){W.css("display",V?"block":"none")}}}};B.magnificPopup.registerModule(q,{options:{markup:'
',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(){R.types.push(q);i("BeforeChange",function(X,V,W){if(V!==W){if(V===q){P()}else{if(W===q){P(true)}}}});i(x+"."+q,function(){P()})},getIframe:function(Z,Y){var V=Z.src;var X=R.st.iframe;B.each(X.patterns,function(){if(V.indexOf(this.index)>-1){if(this.id){if(typeof this.id==="string"){V=V.substr(V.lastIndexOf(this.id)+this.id.length,V.length)}else{V=this.id.call(this,V)}}V=this.src.replace("%id%",V);return false}});var W={};if(X.srcAction){W[X.srcAction]=V}R._parseMarkup(Y,W,Z);R.updateStatus("ready");return Y}}});var w=function(V){var W=R.items.length;if(V>W-1){return V-W}else{if(V<0){return W+V}}return V},o=function(X,W,V){return X.replace(/%curr%/gi,W+1).replace(/%total%/gi,V)};B.magnificPopup.registerModule("gallery",{options:{enabled:false,arrowMarkup:'',preload:[0,2],navigateByImgClick:true,arrows:true,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var V=R.st.gallery,X=".mfp-gallery",W=Boolean(B.fn.mfpFastClick);R.direction=true;if(!V||!V.enabled){return false}b+=" mfp-gallery";i(k+X,function(){if(V.navigateByImgClick){R.wrap.on("click"+X,".mfp-img",function(){if(R.items.length>1){R.next();return false}})}z.on("keydown"+X,function(Y){if(Y.keyCode===37){R.prev()}else{if(Y.keyCode===39){R.next()}}})});i("UpdateStatus"+X,function(Z,Y){if(Y.text){Y.text=o(Y.text,R.currItem.index,R.items.length)}});i(f+X,function(ac,aa,Z,ab){var Y=R.items.length;Z.counter=Y>1?o(V.tCounter,ab.index,Y):""});i("BuildControls"+X,function(){if(R.items.length>1&&V.arrows&&!R.arrowLeft){var aa=V.arrowMarkup,ab=R.arrowLeft=B(aa.replace(/%title%/gi,V.tPrev).replace(/%dir%/gi,"left")).addClass(e),Z=R.arrowRight=B(aa.replace(/%title%/gi,V.tNext).replace(/%dir%/gi,"right")).addClass(e);var Y=W?"mfpFastClick":"click";ab[Y](function(){R.prev()});Z[Y](function(){R.next()});if(R.isIE7){n("b",ab[0],false,true);n("a",ab[0],false,true);n("b",Z[0],false,true);n("a",Z[0],false,true)}R.container.append(ab.add(Z))}});i(h+X,function(){if(R._preloadTimeout){clearTimeout(R._preloadTimeout)}R._preloadTimeout=setTimeout(function(){R.preloadNearbyImages();R._preloadTimeout=null},16)});i(x+X,function(){z.off(X);R.wrap.off("click"+X);if(R.arrowLeft&&W){R.arrowLeft.add(R.arrowRight).destroyMfpFastClick()}R.arrowRight=R.arrowLeft=null})},next:function(){R.direction=true;R.index=w(R.index+1);R.updateItemHTML()},prev:function(){R.direction=false;R.index=w(R.index-1);R.updateItemHTML()},goTo:function(V){R.direction=(V>=R.index);R.index=V;R.updateItemHTML()},preloadNearbyImages:function(){var Y=R.st.gallery.preload,W=Math.min(Y[0],R.items.length),X=Math.min(Y[1],R.items.length),V;for(V=1;V<=(R.direction?X:W);V++){R._preloadItem(R.index+V)}for(V=1;V<=(R.direction?W:X);V++){R._preloadItem(R.index-V)}},_preloadItem:function(V){V=w(V);if(R.items[V].preloaded){return}var W=R.items[V];if(!W.parsed){W=R.parseEl(V)}O("LazyLoad",W);if(W.type==="image"){W.img=B('').on("load.mfploader",function(){W.hasSize=true}).on("error.mfploader",function(){W.hasSize=true;W.loadError=true;O("LazyLoadError",W)}).attr("src",W.src)}W.preloaded=true}}});var m="retina";B.magnificPopup.registerModule(m,{options:{replaceSrc:function(V){return V.src.replace(/\.\w+$/,function(W){return"@2x"+W})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var V=R.st.retina,W=V.ratio;W=!isNaN(W)?W:W();if(W>1){i("ImageHasSize."+m,function(Y,X){X.img.css({"max-width":X.img[0].naturalWidth/W,width:"100%"})});i("ElementParse."+m,function(Y,X){X.src=V.replaceSrc(X,W)})}}}}});(function(){var W=1000,Y="ontouchstart" in window,Z=function(){a.off("touchmove"+X+" touchend"+X)},V="mfpFastClick",X="."+V;B.fn.mfpFastClick=function(aa){return B(this).each(function(){var ah=B(this),ag;if(Y){var ai,ad,ac,af,ab,ae;ah.on("touchstart"+X,function(aj){af=false;ae=1;ab=aj.originalEvent?aj.originalEvent.touches[0]:aj.touches[0];ad=ab.clientX;ac=ab.clientY;a.on("touchmove"+X,function(ak){ab=ak.originalEvent?ak.originalEvent.touches:ak.touches;ae=ab.length;ab=ab[0];if(Math.abs(ab.clientX-ad)>10||Math.abs(ab.clientY-ac)>10){af=true;Z()}}).on("touchend"+X,function(ak){Z();if(af||ae>1){return}ag=true;ak.preventDefault();clearTimeout(ai);ai=setTimeout(function(){ag=false},W);aa()})})}ah.on("click"+X,function(){if(!ag){aa()}})})};B.fn.destroyMfpFastClick=function(){B(this).off("touchstart"+X+" click"+X);if(Y){a.off("touchmove"+X+" touchend"+X)}}})();s()})); \ No newline at end of file +(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports==="object"){factory(require("jquery"))}else{factory(window.jQuery||window.Zepto)}})(function($){var CLOSE_EVENT="Close",BEFORE_CLOSE_EVENT="BeforeClose",AFTER_CLOSE_EVENT="AfterClose",BEFORE_APPEND_EVENT="BeforeAppend",MARKUP_PARSE_EVENT="MarkupParse",OPEN_EVENT="Open",CHANGE_EVENT="Change",NS="mfp",EVENT_NS="."+NS,READY_CLASS="mfp-ready",REMOVING_CLASS="mfp-removing",PREVENT_CLOSE_CLASS="mfp-prevent-close";var mfp,MagnificPopup=function(){},_isJQ=!!window.jQuery,_prevStatus,_window=$(window),_document,_prevContentType,_wrapClasses,_currPopupType;var _mfpOn=function(name,f){mfp.ev.on(NS+name+EVENT_NS,f)},_getEl=function(className,appendTo,html,raw){var el=document.createElement("div");el.className="mfp-"+className;if(html){el.innerHTML=html}if(!raw){el=$(el);if(appendTo){el.appendTo(appendTo)}}else if(appendTo){appendTo.appendChild(el)}return el},_mfpTrigger=function(e,data){mfp.ev.triggerHandler(NS+e,data);if(mfp.st.callbacks){e=e.charAt(0).toLowerCase()+e.slice(1);if(mfp.st.callbacks[e]){mfp.st.callbacks[e].apply(mfp,Array.isArray(data)?data:[data])}}},_getCloseBtn=function(type){if(type!==_currPopupType||!mfp.currTemplate.closeBtn){mfp.currTemplate.closeBtn=$(mfp.st.closeMarkup.replace("%title%",mfp.st.tClose));_currPopupType=type}return mfp.currTemplate.closeBtn},_checkInstance=function(){if(!$.magnificPopup.instance){mfp=new MagnificPopup;mfp.init();$.magnificPopup.instance=mfp}},supportsTransitions=function(){var s=document.createElement("p").style,v=["ms","O","Moz","Webkit"];if(s["transition"]!==undefined){return true}while(v.length){if(v.pop()+"Transition"in s){return true}}return false};MagnificPopup.prototype={constructor:MagnificPopup,init:function(){var appVersion=navigator.appVersion;mfp.isLowIE=mfp.isIE8=document.all&&!document.addEventListener;mfp.isAndroid=/android/gi.test(appVersion);mfp.isIOS=/iphone|ipad|ipod/gi.test(appVersion);mfp.supportsTransition=supportsTransitions();mfp.probablyMobile=mfp.isAndroid||mfp.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent);_document=$(document);mfp.popupsCache={}},open:function(data){var i;if(data.isObj===false){mfp.items=data.items.toArray();mfp.index=0;var items=data.items,item;for(i=0;i(winHeight||_window.height())},_setFocus:function(){(mfp.st.focus?mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).trigger("focus")},_onFocusIn:function(e){if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0],e.target)){mfp._setFocus();return false}},_parseMarkup:function(template,values,item){var arr;if(item.data){values=$.extend(item.data,values)}_mfpTrigger(MARKUP_PARSE_EVENT,[template,values,item]);$.each(values,function(key,value){if(value===undefined||value===false){return true}arr=key.split("_");if(arr.length>1){var el=template.find(EVENT_NS+"-"+arr[0]);if(el.length>0){var attr=arr[1];if(attr==="replaceWith"){if(el[0]!==value[0]){el.replaceWith(value)}}else if(attr==="img"){if(el.is("img")){el.attr("src",value)}else{el.replaceWith($("").attr("src",value).attr("class",el.attr("class")))}}else{el.attr(arr[1],value)}}}else{template.find(EVENT_NS+"-"+key).html(value)}})},_getScrollbarSize:function(){if(mfp.scrollbarSize===undefined){var scrollDiv=document.createElement("div");scrollDiv.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;";document.body.appendChild(scrollDiv);mfp.scrollbarSize=scrollDiv.offsetWidth-scrollDiv.clientWidth;document.body.removeChild(scrollDiv)}return mfp.scrollbarSize}};$.magnificPopup={instance:null,proto:MagnificPopup.prototype,modules:[],open:function(options,index){_checkInstance();if(!options){options={}}else{options=$.extend(true,{},options)}options.isObj=true;options.index=index||0;return this.instance.open(options)},close:function(){return $.magnificPopup.instance&&$.magnificPopup.instance.close()},registerModule:function(name,module){if(module.options){$.magnificPopup.defaults[name]=module.options}$.extend(this.proto,module.proto);this.modules.push(name)},defaults:{disableOn:0,key:null,midClick:false,mainClass:"",preloader:true,focus:"",closeOnContentClick:false,closeOnBgClick:true,closeBtnInside:true,showCloseBtn:true,enableEscapeKey:true,modal:false,alignTop:false,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:true}};$.fn.magnificPopup=function(options){_checkInstance();var jqEl=$(this);if(typeof options==="string"){if(options==="open"){var items,itemOpts=_isJQ?jqEl.data("magnificPopup"):jqEl[0].magnificPopup,index=parseInt(arguments[1],10)||0;if(itemOpts.items){items=itemOpts.items[index]}else{items=jqEl;if(itemOpts.delegate){items=items.find(itemOpts.delegate)}items=items.eq(index)}mfp._openClick({mfpEl:items},jqEl,itemOpts)}else{if(mfp.isOpen)mfp[options].apply(mfp,Array.prototype.slice.call(arguments,1))}}else{options=$.extend(true,{},options);if(_isJQ){jqEl.data("magnificPopup",options)}else{jqEl[0].magnificPopup=options}mfp.addGroup(jqEl,options)}return jqEl};var INLINE_NS="inline",_hiddenClass,_inlinePlaceholder,_lastInlineElement,_putInlineElementsBack=function(){if(_lastInlineElement){_inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach();_lastInlineElement=null}};$.magnificPopup.registerModule(INLINE_NS,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){mfp.types.push(INLINE_NS);_mfpOn(CLOSE_EVENT+"."+INLINE_NS,function(){_putInlineElementsBack()})},getInline:function(item,template){_putInlineElementsBack();if(item.src){var inlineSt=mfp.st.inline,el=$(item.src);if(el.length){var parent=el[0].parentNode;if(parent&&parent.tagName){if(!_inlinePlaceholder){_hiddenClass=inlineSt.hiddenClass;_inlinePlaceholder=_getEl(_hiddenClass);_hiddenClass="mfp-"+_hiddenClass}_lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass)}mfp.updateStatus("ready")}else{mfp.updateStatus("error",inlineSt.tNotFound);el=$("
")}item.inlineElement=el;return el}mfp.updateStatus("ready");mfp._parseMarkup(template,{},item);return template}}});var AJAX_NS="ajax",_ajaxCur,_removeAjaxCursor=function(){if(_ajaxCur){$(document.body).removeClass(_ajaxCur)}},_destroyAjaxRequest=function(){_removeAjaxCursor();if(mfp.req){mfp.req.abort()}};$.magnificPopup.registerModule(AJAX_NS,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){mfp.types.push(AJAX_NS);_ajaxCur=mfp.st.ajax.cursor;_mfpOn(CLOSE_EVENT+"."+AJAX_NS,_destroyAjaxRequest);_mfpOn("BeforeChange."+AJAX_NS,_destroyAjaxRequest)},getAjax:function(item){if(_ajaxCur){$(document.body).addClass(_ajaxCur)}mfp.updateStatus("loading");var opts=$.extend({url:item.src,success:function(data,textStatus,jqXHR){var temp={data:data,xhr:jqXHR};_mfpTrigger("ParseAjax",temp);mfp.appendContent($(temp.data),AJAX_NS);item.finished=true;_removeAjaxCursor();mfp._setFocus();setTimeout(function(){mfp.wrap.addClass(READY_CLASS)},16);mfp.updateStatus("ready");_mfpTrigger("AjaxContentAdded")},error:function(){_removeAjaxCursor();item.finished=item.loadError=true;mfp.updateStatus("error",mfp.st.ajax.tError.replace("%url%",item.src))}},mfp.st.ajax.settings);mfp.req=$.ajax(opts);return""}}});var _imgInterval,_getTitle=function(item){if(item.data&&item.data.title!==undefined)return item.data.title;var src=mfp.st.image.titleSrc;if(src){if(typeof src==="function"){return src.call(mfp,item)}else if(item.el){return item.el.attr(src)||""}}return""};$.magnificPopup.registerModule("image",{options:{markup:'
'+'
'+"
"+'
'+"
"+'
'+'
'+'
'+"
"+"
"+"
"+"
",cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:true,tError:'The image could not be loaded.'},proto:{initImage:function(){var imgSt=mfp.st.image,ns=".image";mfp.types.push("image");_mfpOn(OPEN_EVENT+ns,function(){if(mfp.currItem.type==="image"&&imgSt.cursor){$(document.body).addClass(imgSt.cursor)}});_mfpOn(CLOSE_EVENT+ns,function(){if(imgSt.cursor){$(document.body).removeClass(imgSt.cursor)}_window.off("resize"+EVENT_NS)});_mfpOn("Resize"+ns,mfp.resizeImage);if(mfp.isLowIE){_mfpOn("AfterChange",mfp.resizeImage)}},resizeImage:function(){var item=mfp.currItem;if(!item||!item.img)return;if(mfp.st.image.verticalFit){var decr=0;if(mfp.isLowIE){decr=parseInt(item.img.css("padding-top"),10)+parseInt(item.img.css("padding-bottom"),10)}item.img.css("max-height",mfp.wH-decr)}},_onImageHasSize:function(item){if(item.img){item.hasSize=true;if(_imgInterval){clearInterval(_imgInterval)}item.isCheckingImgSize=false;_mfpTrigger("ImageHasSize",item);if(item.imgHidden){if(mfp.content)mfp.content.removeClass("mfp-loading");item.imgHidden=false}}},findImageSize:function(item){var counter=0,img=item.img[0],mfpSetInterval=function(delay){if(_imgInterval){clearInterval(_imgInterval)}_imgInterval=setInterval(function(){if(img.naturalWidth>0){mfp._onImageHasSize(item);return}if(counter>200){clearInterval(_imgInterval)}counter++;if(counter===3){mfpSetInterval(10)}else if(counter===40){mfpSetInterval(50)}else if(counter===100){mfpSetInterval(500)}},delay)};mfpSetInterval(1)},getImage:function(item,template){var guard=0,onLoadComplete=function(){if(item){if(item.img[0].complete){item.img.off(".mfploader");if(item===mfp.currItem){mfp._onImageHasSize(item);mfp.updateStatus("ready")}item.hasSize=true;item.loaded=true;_mfpTrigger("ImageLoadComplete")}else{guard++;if(guard<200){setTimeout(onLoadComplete,100)}else{onLoadError()}}}},onLoadError=function(){if(item){item.img.off(".mfploader");if(item===mfp.currItem){mfp._onImageHasSize(item);mfp.updateStatus("error",imgSt.tError.replace("%url%",item.src))}item.hasSize=true;item.loaded=true;item.loadError=true}},imgSt=mfp.st.image;var el=template.find(".mfp-img");if(el.length){var img=document.createElement("img");img.className="mfp-img";if(item.el&&item.el.find("img").length){img.alt=item.el.find("img").attr("alt")}item.img=$(img).on("load.mfploader",onLoadComplete).on("error.mfploader",onLoadError);img.src=item.src;if(el.is("img")){item.img=item.img.clone()}img=item.img[0];if(img.naturalWidth>0){item.hasSize=true}else if(!img.width){item.hasSize=false}}mfp._parseMarkup(template,{title:_getTitle(item),img_replaceWith:item.img},item);mfp.resizeImage();if(item.hasSize){if(_imgInterval)clearInterval(_imgInterval);if(item.loadError){template.addClass("mfp-loading");mfp.updateStatus("error",imgSt.tError.replace("%url%",item.src))}else{template.removeClass("mfp-loading");mfp.updateStatus("ready")}return template}mfp.updateStatus("loading");item.loading=true;if(!item.hasSize){item.imgHidden=true;template.addClass("mfp-loading");mfp.findImageSize(item)}return template}}});var hasMozTransform,getHasMozTransform=function(){if(hasMozTransform===undefined){hasMozTransform=document.createElement("p").style.MozTransform!==undefined}return hasMozTransform};$.magnificPopup.registerModule("zoom",{options:{enabled:false,easing:"ease-in-out",duration:300,opener:function(element){return element.is("img")?element:element.find("img")}},proto:{initZoom:function(){var zoomSt=mfp.st.zoom,ns=".zoom",image;if(!zoomSt.enabled||!mfp.supportsTransition){return}var duration=zoomSt.duration,getElToAnimate=function(image){var newImg=image.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),transition="all "+zoomSt.duration/1e3+"s "+zoomSt.easing,cssObj={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},t="transition";cssObj["-webkit-"+t]=cssObj["-moz-"+t]=cssObj["-o-"+t]=cssObj[t]=transition;newImg.css(cssObj);return newImg},showMainContent=function(){mfp.content.css("visibility","visible")},openTimeout,animatedImg;_mfpOn("BuildControls"+ns,function(){if(mfp._allowZoom()){clearTimeout(openTimeout);mfp.content.css("visibility","hidden");image=mfp._getItemToZoom();if(!image){showMainContent();return}animatedImg=getElToAnimate(image);animatedImg.css(mfp._getOffset());mfp.wrap.append(animatedImg);openTimeout=setTimeout(function(){animatedImg.css(mfp._getOffset(true));openTimeout=setTimeout(function(){showMainContent();setTimeout(function(){animatedImg.remove();image=animatedImg=null;_mfpTrigger("ZoomAnimationEnded")},16)},duration)},16)}});_mfpOn(BEFORE_CLOSE_EVENT+ns,function(){if(mfp._allowZoom()){clearTimeout(openTimeout);mfp.st.removalDelay=duration;if(!image){image=mfp._getItemToZoom();if(!image){return}animatedImg=getElToAnimate(image)}animatedImg.css(mfp._getOffset(true));mfp.wrap.append(animatedImg);mfp.content.css("visibility","hidden");setTimeout(function(){animatedImg.css(mfp._getOffset())},16)}});_mfpOn(CLOSE_EVENT+ns,function(){if(mfp._allowZoom()){showMainContent();if(animatedImg){animatedImg.remove()}image=null}})},_allowZoom:function(){return mfp.currItem.type==="image"},_getItemToZoom:function(){if(mfp.currItem.hasSize){return mfp.currItem.img}else{return false}},_getOffset:function(isLarge){var el;if(isLarge){el=mfp.currItem.img}else{el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem)}var offset=el.offset();var paddingTop=parseInt(el.css("padding-top"),10);var paddingBottom=parseInt(el.css("padding-bottom"),10);offset.top-=$(window).scrollTop()-paddingTop;var obj={width:el.width(),height:(_isJQ?el.innerHeight():el[0].offsetHeight)-paddingBottom-paddingTop};if(getHasMozTransform()){obj["-moz-transform"]=obj["transform"]="translate("+offset.left+"px,"+offset.top+"px)"}else{obj.left=offset.left;obj.top=offset.top}return obj}}});var IFRAME_NS="iframe",_emptyPage="//about:blank",_fixIframeBugs=function(isShowing){if(mfp.currTemplate[IFRAME_NS]){var el=mfp.currTemplate[IFRAME_NS].find("iframe");if(el.length){if(!isShowing){el[0].src=_emptyPage}if(mfp.isIE8){el.css("display",isShowing?"block":"none")}}}};$.magnificPopup.registerModule(IFRAME_NS,{options:{markup:'
'+'
'+''+"
",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(){mfp.types.push(IFRAME_NS);_mfpOn("BeforeChange",function(e,prevType,newType){if(prevType!==newType){if(prevType===IFRAME_NS){_fixIframeBugs()}else if(newType===IFRAME_NS){_fixIframeBugs(true)}}});_mfpOn(CLOSE_EVENT+"."+IFRAME_NS,function(){_fixIframeBugs()})},getIframe:function(item,template){var embedSrc=item.src;var iframeSt=mfp.st.iframe;$.each(iframeSt.patterns,function(){if(embedSrc.indexOf(this.index)>-1){if(this.id){if(typeof this.id==="string"){embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length,embedSrc.length)}else{embedSrc=this.id.call(this,embedSrc)}}embedSrc=this.src.replace("%id%",embedSrc);return false}});var dataObj={};if(iframeSt.srcAction){dataObj[iframeSt.srcAction]=embedSrc}mfp._parseMarkup(template,dataObj,item);mfp.updateStatus("ready");return template}}});var _getLoopedId=function(index){var numSlides=mfp.items.length;if(index>numSlides-1){return index-numSlides}else if(index<0){return numSlides+index}return index},_replaceCurrTotal=function(text,curr,total){return text.replace(/%curr%/gi,curr+1).replace(/%total%/gi,total)};$.magnificPopup.registerModule("gallery",{options:{enabled:false,arrowMarkup:'',preload:[0,2],navigateByImgClick:true,arrows:true,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var gSt=mfp.st.gallery,ns=".mfp-gallery";mfp.direction=true;if(!gSt||!gSt.enabled)return false;_wrapClasses+=" mfp-gallery";_mfpOn(OPEN_EVENT+ns,function(){if(gSt.navigateByImgClick){mfp.wrap.on("click"+ns,".mfp-img",function(){if(mfp.items.length>1){mfp.next();return false}})}_document.on("keydown"+ns,function(e){if(e.keyCode===37){mfp.prev()}else if(e.keyCode===39){mfp.next()}})});_mfpOn("UpdateStatus"+ns,function(e,data){if(data.text){data.text=_replaceCurrTotal(data.text,mfp.currItem.index,mfp.items.length)}});_mfpOn(MARKUP_PARSE_EVENT+ns,function(e,element,values,item){var l=mfp.items.length;values.counter=l>1?_replaceCurrTotal(gSt.tCounter,item.index,l):""});_mfpOn("BuildControls"+ns,function(){if(mfp.items.length>1&&gSt.arrows&&!mfp.arrowLeft){var markup=gSt.arrowMarkup,arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi,gSt.tPrev).replace(/%dir%/gi,"left")).addClass(PREVENT_CLOSE_CLASS),arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi,gSt.tNext).replace(/%dir%/gi,"right")).addClass(PREVENT_CLOSE_CLASS);arrowLeft.on("click",function(){mfp.prev()});arrowRight.on("click",function(){mfp.next()});mfp.container.append(arrowLeft.add(arrowRight))}});_mfpOn(CHANGE_EVENT+ns,function(){if(mfp._preloadTimeout)clearTimeout(mfp._preloadTimeout);mfp._preloadTimeout=setTimeout(function(){mfp.preloadNearbyImages();mfp._preloadTimeout=null},16)});_mfpOn(CLOSE_EVENT+ns,function(){_document.off(ns);mfp.wrap.off("click"+ns);mfp.arrowRight=mfp.arrowLeft=null})},next:function(){mfp.direction=true;mfp.index=_getLoopedId(mfp.index+1);mfp.updateItemHTML()},prev:function(){mfp.direction=false;mfp.index=_getLoopedId(mfp.index-1);mfp.updateItemHTML()},goTo:function(newIndex){mfp.direction=newIndex>=mfp.index;mfp.index=newIndex;mfp.updateItemHTML()},preloadNearbyImages:function(){var p=mfp.st.gallery.preload,preloadBefore=Math.min(p[0],mfp.items.length),preloadAfter=Math.min(p[1],mfp.items.length),i;for(i=1;i<=(mfp.direction?preloadAfter:preloadBefore);i++){mfp._preloadItem(mfp.index+i)}for(i=1;i<=(mfp.direction?preloadBefore:preloadAfter);i++){mfp._preloadItem(mfp.index-i)}},_preloadItem:function(index){index=_getLoopedId(index);if(mfp.items[index].preloaded){return}var item=mfp.items[index];if(!item.parsed){item=mfp.parseEl(index)}_mfpTrigger("LazyLoad",item);if(item.type==="image"){item.img=$('').on("load.mfploader",function(){item.hasSize=true}).on("error.mfploader",function(){item.hasSize=true;item.loadError=true;_mfpTrigger("LazyLoadError",item)}).attr("src",item.src)}item.preloaded=true}}});var RETINA_NS="retina";$.magnificPopup.registerModule(RETINA_NS,{options:{replaceSrc:function(item){return item.src.replace(/\.\w+$/,function(m){return"@2x"+m})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var st=mfp.st.retina,ratio=st.ratio;ratio=!isNaN(ratio)?ratio:ratio();if(ratio>1){_mfpOn("ImageHasSize"+"."+RETINA_NS,function(e,item){item.img.css({"max-width":item.img[0].naturalWidth/ratio,width:"100%"})});_mfpOn("ElementParse"+"."+RETINA_NS,function(e,item){item.src=st.replaceSrc(item,ratio)})}}}}});_checkInstance()}); \ No newline at end of file diff --git a/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.module b/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.module index 6e1e3128..203b331b 100644 --- a/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.module +++ b/wire/modules/Jquery/JqueryMagnific/JqueryMagnific.module @@ -5,9 +5,9 @@ class JqueryMagnific extends ModuleJS { public static function getModuleInfo() { return array( 'title' => 'jQuery Magnific Popup', - 'version' => 1, + 'version' => '1.1.0', 'summary' => 'Provides lightbox capability for image galleries. Replacement for FancyBox. Uses Magnific Popup by @dimsemenov.', - 'href' => 'http://dimsemenov.com/plugins/magnific-popup/', + 'href' => 'https://github.com/dimsemenov/Magnific-Popup/' ); }