ok
Direktori : /home/importfo/public_html/bosonphysics.com/assets/js/vendor/ |
Current File : /home/importfo/public_html/bosonphysics.com/assets/js/vendor/magnifypopup.min.js |
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(c){function e(){}function d(e,t){p.ev.on(n+e+g,t)}function v(e,t,n,o){var i=document.createElement("div");return i.className="mfp-"+e,n&&(i.innerHTML=n),o?t&&t.appendChild(i):(i=c(i),t&&i.appendTo(t)),i}function u(e,t){p.ev.triggerHandler(n+e,t),p.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),p.st.callbacks[e]&&p.st.callbacks[e].apply(p,c.isArray(t)?t:[t]))}function y(e){return e===t&&p.currTemplate.closeBtn||(p.currTemplate.closeBtn=c(p.st.closeMarkup.replace("%title%",p.st.tClose)),t=e),p.currTemplate.closeBtn}function a(){c.magnificPopup.instance||((p=new e).init(),c.magnificPopup.instance=p)}var p,o,m,i,f,t,l="Close",C="BeforeClose",w="MarkupParse",b="Open",r="Change",n="mfp",g="."+n,I="mfp-ready",x="mfp-removing",k="mfp-prevent-close",T=!!window.jQuery,h=c(window);function _(){E&&(S.after(E.addClass(P)).detach(),E=null)}c.magnificPopup={instance:null,proto:e.prototype={constructor:e,init:function(){var e=navigator.appVersion;p.isLowIE=p.isIE8=document.all&&!document.addEventListener,p.isAndroid=/android/gi.test(e),p.isIOS=/iphone|ipad|ipod/gi.test(e),p.supportsTransition=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}(),p.probablyMobile=p.isAndroid||p.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),m=c(document),p.popupsCache={}},open:function(e){if(!1===e.isObj){p.items=e.items.toArray(),p.index=0;for(var t,n=e.items,o=0;o<n.length;o++)if((t=(t=n[o]).parsed?t.el[0]:t)===e.el[0]){p.index=o;break}}else p.items=c.isArray(e.items)?e.items:[e.items],p.index=e.index||0;if(!p.isOpen){p.types=[],f="",e.mainEl&&e.mainEl.length?p.ev=e.mainEl.eq(0):p.ev=m,e.key?(p.popupsCache[e.key]||(p.popupsCache[e.key]={}),p.currTemplate=p.popupsCache[e.key]):p.currTemplate={},p.st=c.extend(!0,{},c.magnificPopup.defaults,e),p.fixedContentPos="auto"===p.st.fixedContentPos?!p.probablyMobile:p.st.fixedContentPos,p.st.modal&&(p.st.closeOnContentClick=!1,p.st.closeOnBgClick=!1,p.st.showCloseBtn=!1,p.st.enableEscapeKey=!1),p.bgOverlay||(p.bgOverlay=v("bg").on("click"+g,function(){p.close()}),p.wrap=v("wrap").attr("tabindex",-1).on("click"+g,function(e){p._checkIfClose(e.target)&&p.close()}),p.container=v("container",p.wrap)),p.contentContainer=v("content"),p.st.preloader&&(p.preloader=v("preloader",p.container,p.st.tLoading));for(var i=c.magnificPopup.modules,o=0;o<i.length;o++){var a=(a=i[o]).charAt(0).toUpperCase()+a.slice(1);p["init"+a].call(p)}u("BeforeOpen"),p.st.showCloseBtn&&(p.st.closeBtnInside?(d(w,function(e,t,n,o){n.close_replaceWith=y(o.type)}),f+=" mfp-close-btn-in"):p.wrap.append(y())),p.st.alignTop&&(f+=" mfp-align-top"),p.fixedContentPos?p.wrap.css({overflow:p.st.overflowY,overflowX:"hidden",overflowY:p.st.overflowY}):p.wrap.css({top:h.scrollTop(),position:"absolute"}),!1!==p.st.fixedBgPos&&("auto"!==p.st.fixedBgPos||p.fixedContentPos)||p.bgOverlay.css({height:m.height(),position:"absolute"}),p.st.enableEscapeKey&&m.on("keyup"+g,function(e){27===e.keyCode&&p.close()}),h.on("resize"+g,function(){p.updateSize()}),p.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&p.wrap.addClass(f);var r=p.wH=h.height(),s={},l=(p.fixedContentPos&&p._hasScrollBar(r)&&(l=p._getScrollbarSize())&&(s.marginRight=l),p.fixedContentPos&&(p.isIE7?c("body, html").css("overflow","hidden"):s.overflow="hidden"),p.st.mainClass);return p.isIE7&&(l+=" mfp-ie7"),l&&p._addClassToMFP(l),p.updateItemHTML(),u("BuildControls"),c("html").css(s),p.bgOverlay.add(p.wrap).prependTo(p.st.prependTo||c(document.body)),p._lastFocusedEl=document.activeElement,setTimeout(function(){p.content?(p._addClassToMFP(I),p._setFocus()):p.bgOverlay.addClass(I),m.on("focusin"+g,p._onFocusIn)},16),p.isOpen=!0,p.updateSize(r),u(b),e}p.updateItemHTML()},close:function(){p.isOpen&&(u(C),p.isOpen=!1,p.st.removalDelay&&!p.isLowIE&&p.supportsTransition?(p._addClassToMFP(x),setTimeout(function(){p._close()},p.st.removalDelay)):p._close())},_close:function(){u(l);var e=x+" "+I+" ";p.bgOverlay.detach(),p.wrap.detach(),p.container.empty(),p.st.mainClass&&(e+=p.st.mainClass+" "),p._removeClassFromMFP(e),p.fixedContentPos&&(e={marginRight:""},p.isIE7?c("body, html").css("overflow",""):e.overflow="",c("html").css(e)),m.off("keyup.mfp focusin"+g),p.ev.off(g),p.wrap.attr("class","mfp-wrap").removeAttr("style"),p.bgOverlay.attr("class","mfp-bg"),p.container.attr("class","mfp-container"),!p.st.showCloseBtn||p.st.closeBtnInside&&!0!==p.currTemplate[p.currItem.type]||p.currTemplate.closeBtn&&p.currTemplate.closeBtn.detach(),p.st.autoFocusLast&&p._lastFocusedEl&&c(p._lastFocusedEl).focus(),p.currItem=null,p.content=null,p.currTemplate=null,p.prevHeight=0,u("AfterClose")},updateSize:function(e){var t;p.isIOS?(t=document.documentElement.clientWidth/window.innerWidth,t=window.innerHeight*t,p.wrap.css("height",t),p.wH=t):p.wH=e||h.height(),p.fixedContentPos||p.wrap.css("height",p.wH),u("Resize")},updateItemHTML:function(){var e=p.items[p.index],t=(p.contentContainer.detach(),p.content&&p.content.detach(),(e=e.parsed?e:p.parseEl(p.index)).type),n=(u("BeforeChange",[p.currItem?p.currItem.type:"",t]),p.currItem=e,p.currTemplate[t]||(u("FirstMarkupParse",n=!!p.st[t]&&p.st[t].markup),p.currTemplate[t]=!n||c(n)),i&&i!==e.type&&p.container.removeClass("mfp-"+i+"-holder"),p["get"+t.charAt(0).toUpperCase()+t.slice(1)](e,p.currTemplate[t]));p.appendContent(n,t),e.preloaded=!0,u(r,e),i=e.type,p.container.prepend(p.contentContainer),u("AfterChange")},appendContent:function(e,t){(p.content=e)?p.st.showCloseBtn&&p.st.closeBtnInside&&!0===p.currTemplate[t]?p.content.find(".mfp-close").length||p.content.append(y()):p.content=e:p.content="",u("BeforeAppend"),p.container.addClass("mfp-"+t+"-holder"),p.contentContainer.append(p.content)},parseEl:function(e){var t,n=p.items[e];if((n=n.tagName?{el:c(n)}:(t=n.type,{data:n,src:n.src})).el){for(var o=p.types,i=0;i<o.length;i++)if(n.el.hasClass("mfp-"+o[i])){t=o[i];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=t||p.st.type||"inline",n.index=e,n.parsed=!0,p.items[e]=n,u("ElementParse",n),p.items[e]},addGroup:function(t,n){function e(e){e.mfpEl=this,p._openClick(e,t,n)}var o="click.magnificPopup";(n=n||{}).mainEl=t,n.items?(n.isObj=!0,t.off(o).on(o,e)):(n.isObj=!1,n.delegate?t.off(o).on(o,n.delegate,e):(n.items=t).off(o).on(o,e))},_openClick:function(e,t,n){if((void 0!==n.midClick?n:c.magnificPopup.defaults).midClick||!(2===e.which||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){var o=(void 0!==n.disableOn?n:c.magnificPopup.defaults).disableOn;if(o)if(c.isFunction(o)){if(!o.call(p))return!0}else if(h.width()<o)return!0;e.type&&(e.preventDefault(),p.isOpen&&e.stopPropagation()),n.el=c(e.mfpEl),n.delegate&&(n.items=t.find(n.delegate)),p.open(n)}},updateStatus:function(e,t){var n;p.preloader&&(o!==e&&p.container.removeClass("mfp-s-"+o),u("UpdateStatus",n={status:e,text:t=t||"loading"!==e?t:p.st.tLoading}),e=n.status,p.preloader.html(t=n.text),p.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),p.container.addClass("mfp-s-"+e),o=e)},_checkIfClose:function(e){if(!c(e).hasClass(k)){var t=p.st.closeOnContentClick,n=p.st.closeOnBgClick;if(t&&n)return!0;if(!p.content||c(e).hasClass("mfp-close")||p.preloader&&e===p.preloader[0])return!0;if(e===p.content[0]||c.contains(p.content[0],e)){if(t)return!0}else if(n&&c.contains(document,e))return!0;return!1}},_addClassToMFP:function(e){p.bgOverlay.addClass(e),p.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),p.wrap.removeClass(e)},_hasScrollBar:function(e){return(p.isIE7?m.height():document.body.scrollHeight)>(e||h.height())},_setFocus:function(){(p.st.focus?p.content.find(p.st.focus).eq(0):p.wrap).focus()},_onFocusIn:function(e){return e.target===p.wrap[0]||c.contains(p.wrap[0],e.target)?void 0:(p._setFocus(),!1)},_parseMarkup:function(i,e,t){var a;t.data&&(e=c.extend(t.data,e)),u(w,[i,e,t]),c.each(e,function(e,t){return void 0===t||!1===t||void(1<(a=e.split("_")).length?0<(n=i.find(g+"-"+a[0])).length&&("replaceWith"===(o=a[1])?n[0]!==t[0]&&n.replaceWith(t):"img"===o?n.is("img")?n.attr("src",t):n.replaceWith(c("<img>").attr("src",t).attr("class",n.attr("class"))):n.attr(a[1],t)):i.find(g+"-"+e).html(t));var n,o})},_getScrollbarSize:function(){var e;return void 0===p.scrollbarSize&&((e=document.createElement("div")).style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),p.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),p.scrollbarSize}},modules:[],open:function(e,t){return a(),(e=e?c.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return c.magnificPopup.instance&&c.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(c.magnificPopup.defaults[e]=t.options),c.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},c.fn.magnificPopup=function(e){a();var t,n,o,i=c(this);return"string"==typeof e?"open"===e?(t=T?i.data("magnificPopup"):i[0].magnificPopup,n=parseInt(arguments[1],10)||0,o=t.items?t.items[n]:(o=i,(o=t.delegate?o.find(t.delegate):o).eq(n)),p._openClick({mfpEl:o},i,t)):p.isOpen&&p[e].apply(p,Array.prototype.slice.call(arguments,1)):(e=c.extend(!0,{},e),T?i.data("magnificPopup",e):i[0].magnificPopup=e,p.addGroup(i,e)),i};var P,S,E,z="inline";function O(){B&&c(document.body).removeClass(B)}function M(){O(),p.req&&p.req.abort()}c.magnificPopup.registerModule(z,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){p.types.push(z),d(l+"."+z,function(){_()})},getInline:function(e,t){var n,o,i;return _(),e.src?(o=p.st.inline,(i=c(e.src)).length?((n=i[0].parentNode)&&n.tagName&&(S||(P=o.hiddenClass,S=v(P),P="mfp-"+P),E=i.after(S).detach().removeClass(P)),p.updateStatus("ready")):(p.updateStatus("error",o.tNotFound),i=c("<div>")),e.inlineElement=i):(p.updateStatus("ready"),p._parseMarkup(t,{},e),t)}}});var B,s,L,H="ajax";function A(e){var t;!p.currTemplate[F]||(t=p.currTemplate[F].find("iframe")).length&&(e||(t[0].src="//about:blank"),p.isIE8&&t.css("display",e?"block":"none"))}c.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){p.types.push(H),B=p.st.ajax.cursor,d(l+"."+H,M),d("BeforeChange."+H,M)},getAjax:function(o){B&&c(document.body).addClass(B),p.updateStatus("loading");var e=c.extend({url:o.src,success:function(e,t,n){u("ParseAjax",n={data:e,xhr:n}),p.appendContent(c(n.data),H),o.finished=!0,O(),p._setFocus(),setTimeout(function(){p.wrap.addClass(I)},16),p.updateStatus("ready"),u("AjaxContentAdded")},error:function(){O(),o.finished=o.loadError=!0,p.updateStatus("error",p.st.ajax.tError.replace("%url%",o.src))}},p.st.ajax.settings);return p.req=c.ajax(e),""}}}),c.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=p.st.image,t=".image";p.types.push("image"),d(b+t,function(){"image"===p.currItem.type&&e.cursor&&c(document.body).addClass(e.cursor)}),d(l+t,function(){e.cursor&&c(document.body).removeClass(e.cursor),h.off("resize"+g)}),d("Resize"+t,p.resizeImage),p.isLowIE&&d("AfterChange",p.resizeImage)},resizeImage:function(){var e,t=p.currItem;t&&t.img&&p.st.image.verticalFit&&(e=0,p.isLowIE&&(e=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",p.wH-e))},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,s&&clearInterval(s),e.isCheckingImgSize=!1,u("ImageHasSize",e),e.imgHidden&&(p.content&&p.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(n){var o=0,i=n.img[0];!function e(t){s&&clearInterval(s),s=setInterval(function(){return 0<i.naturalWidth?void p._onImageHasSize(n):(200<o&&clearInterval(s),void(3==++o?e(10):40===o?e(50):100===o&&e(500)))},t)}(1)},getImage:function(t,e){function n(){t&&(t.img.off(".mfploader"),t===p.currItem&&(p._onImageHasSize(t),p.updateStatus("error",a.tError.replace("%url%",t.src))),t.hasSize=!0,t.loaded=!0,t.loadError=!0)}var o,i=0,a=p.st.image,r=e.find(".mfp-img");return r.length&&((o=document.createElement("img")).className="mfp-img",t.el&&t.el.find("img").length&&(o.alt=t.el.find("img").attr("alt")),t.img=c(o).on("load.mfploader",function e(){t&&(t.img[0].complete?(t.img.off(".mfploader"),t===p.currItem&&(p._onImageHasSize(t),p.updateStatus("ready")),t.hasSize=!0,t.loaded=!0,u("ImageLoadComplete")):++i<200?setTimeout(e,100):n())}).on("error.mfploader",n),o.src=t.src,r.is("img")&&(t.img=t.img.clone()),0<(o=t.img[0]).naturalWidth?t.hasSize=!0:o.width||(t.hasSize=!1)),p._parseMarkup(e,{title:function(e){if(e.data&&void 0!==e.data.title)return e.data.title;var t=p.st.image.titleSrc;if(t){if(c.isFunction(t))return t.call(p,e);if(e.el)return e.el.attr(t)||""}return""}(t),img_replaceWith:t.img},t),p.resizeImage(),t.hasSize?(s&&clearInterval(s),t.loadError?(e.addClass("mfp-loading"),p.updateStatus("error",a.tError.replace("%url%",t.src))):(e.removeClass("mfp-loading"),p.updateStatus("ready"))):(p.updateStatus("loading"),t.loading=!0,t.hasSize||(t.imgHidden=!0,e.addClass("mfp-loading"),p.findImageSize(t))),e}}}),c.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,t,n,o,i,a,r=p.st.zoom,s=".zoom";r.enabled&&p.supportsTransition&&(o=r.duration,i=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+r.duration/1e3+"s "+r.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"};return o["-webkit-"+(e="transition")]=o["-moz-"+e]=o["-o-"+e]=o[e]=n,t.css(o),t},a=function(){p.content.css("visibility","visible")},d("BuildControls"+s,function(){p._allowZoom()&&(clearTimeout(t),p.content.css("visibility","hidden"),(e=p._getItemToZoom())?((n=i(e)).css(p._getOffset()),p.wrap.append(n),t=setTimeout(function(){n.css(p._getOffset(!0)),t=setTimeout(function(){a(),setTimeout(function(){n.remove(),e=n=null,u("ZoomAnimationEnded")},16)},o)},16)):a())}),d(C+s,function(){if(p._allowZoom()){if(clearTimeout(t),p.st.removalDelay=o,!e){if(!(e=p._getItemToZoom()))return;n=i(e)}n.css(p._getOffset(!0)),p.wrap.append(n),p.content.css("visibility","hidden"),setTimeout(function(){n.css(p._getOffset())},16)}}),d(l+s,function(){p._allowZoom()&&(a(),n&&n.remove(),e=null)}))},_allowZoom:function(){return"image"===p.currItem.type},_getItemToZoom:function(){return!!p.currItem.hasSize&&p.currItem.img},_getOffset:function(e){var t=e?p.currItem.img:p.st.zoom.opener(p.currItem.el||p.currItem),n=t.offset(),o=parseInt(t.css("padding-top"),10),e=parseInt(t.css("padding-bottom"),10);return n.top-=c(window).scrollTop()-o,o={width:t.width(),height:(T?t.innerHeight():t[0].offsetHeight)-e-o},(L=void 0===L?void 0!==document.createElement("p").style.MozTransform:L)?o["-moz-transform"]=o.transform="translate("+n.left+"px,"+n.top+"px)":(o.left=n.left,o.top=n.top),o}}});var F="iframe";function j(e){var t=p.items.length;return t-1<e?e-t:e<0?t+e:e}function N(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)}c.magnificPopup.registerModule(F,{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(){p.types.push(F),d("BeforeChange",function(e,t,n){t!==n&&(t===F?A():n===F&&A(!0))}),d(l+"."+F,function(){A()})},getIframe:function(e,t){var n=e.src,o=p.st.iframe,i=(c.each(o.patterns,function(){return-1<n.indexOf(this.index)?(this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1):void 0}),{});return o.srcAction&&(i[o.srcAction]=n),p._parseMarkup(t,i,e),p.updateStatus("ready"),t}}}),c.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 a=p.st.gallery,e=".mfp-gallery";return p.direction=!0,!(!a||!a.enabled)&&(f+=" mfp-gallery",d(b+e,function(){a.navigateByImgClick&&p.wrap.on("click"+e,".mfp-img",function(){return 1<p.items.length?(p.next(),!1):void 0}),m.on("keydown"+e,function(e){37===e.keyCode?p.prev():39===e.keyCode&&p.next()})}),d("UpdateStatus"+e,function(e,t){t.text&&(t.text=N(t.text,p.currItem.index,p.items.length))}),d(w+e,function(e,t,n,o){var i=p.items.length;n.counter=1<i?N(a.tCounter,o.index,i):""}),d("BuildControls"+e,function(){var e,t;1<p.items.length&&a.arrows&&!p.arrowLeft&&(t=a.arrowMarkup,e=p.arrowLeft=c(t.replace(/%title%/gi,a.tPrev).replace(/%dir%/gi,"left")).addClass(k),t=p.arrowRight=c(t.replace(/%title%/gi,a.tNext).replace(/%dir%/gi,"right")).addClass(k),e.click(function(){p.prev()}),t.click(function(){p.next()}),p.container.append(e.add(t)))}),d(r+e,function(){p._preloadTimeout&&clearTimeout(p._preloadTimeout),p._preloadTimeout=setTimeout(function(){p.preloadNearbyImages(),p._preloadTimeout=null},16)}),void d(l+e,function(){m.off(e),p.wrap.off("click"+e),p.arrowRight=p.arrowLeft=null}))},next:function(){p.direction=!0,p.index=j(p.index+1),p.updateItemHTML()},prev:function(){p.direction=!1,p.index=j(p.index-1),p.updateItemHTML()},goTo:function(e){p.direction=e>=p.index,p.index=e,p.updateItemHTML()},preloadNearbyImages:function(){for(var e=p.st.gallery.preload,t=Math.min(e[0],p.items.length),n=Math.min(e[1],p.items.length),o=1;o<=(p.direction?n:t);o++)p._preloadItem(p.index+o);for(o=1;o<=(p.direction?t:n);o++)p._preloadItem(p.index-o)},_preloadItem:function(e){var t;e=j(e),p.items[e].preloaded||(u("LazyLoad",t=!(t=p.items[e]).parsed?p.parseEl(e):t),"image"===t.type&&(t.img=c('<img class="mfp-img" />').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,u("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0)}}});var W="retina";c.magnificPopup.registerModule(W,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){var n,o;1<window.devicePixelRatio&&(n=p.st.retina,o=n.ratio,1<(o=isNaN(o)?o():o)&&(d("ImageHasSize."+W,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/o,width:"100%"})}),d("ElementParse."+W,function(e,t){t.src=n.replaceSrc(t,o)})))}}}),a()});