\");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:'
The content 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:'
',cursor:\"mfp-zoom-out-cur\",titleSrc:\"title\",verticalFit:!0,tError:'
The image 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:'
',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:'
',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:\"Previous (Left arrow key)\",tNext:\"Next (Right arrow key)\",tCounter:\"%curr% of %total%\"},proto:{initGallery:function(){var c=b.st.gallery,e=\".mfp-gallery\";return b.direction=!0,c&&c.enabled?(f+=\" mfp-gallery\",w(m+e,function(){c.navigateByImgClick&&b.wrap.on(\"click\"+e,\".mfp-img\",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on(\"keydown\"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w(\"UpdateStatus\"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):\"\"}),w(\"BuildControls\"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,\"left\")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,\"right\")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off(\"click\"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y(\"LazyLoad\",d),\"image\"===d.type&&(d.img=a('
![]()
').on(\"load.mfploader\",function(){d.hasSize=!0}).on(\"error.mfploader\",function(){d.hasSize=!0,d.loadError=!0,y(\"LazyLoadError\",d)}).attr(\"src\",d.src)),d.preloaded=!0}}}});var U=\"retina\";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\\.\\w+$/,function(a){return\"@2x\"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w(\"ImageHasSize.\"+U,function(a,b){b.img.css({\"max-width\":b.img[0].naturalWidth/c,width:\"100%\"})}),w(\"ElementParse.\"+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});"]}