Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update Magnific Popup to version 0.9.9

  • Loading branch information...
commit 68337171fe3f28f1e1b6f787af54cccac57868a2 1 parent 741854a
Matt authored
4 ajax/libs/magnific-popup.js/0.9.9/jquery.magnific-popup.min.js
... ... @@ -0,0 +1,4 @@
  1 +/*! Magnific Popup - v0.9.9 - 2013-11-15
  2 +* http://dimsemenov.com/plugins/magnific-popup/
  3 +* Copyright (c) 2013 Dmitry Semenov; */
  4 +(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",v="."+g,h="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+v,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),i=e(document.body),o=e(document),t.popupsCache={}},open:function(n){var i;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var r,s=n.items;for(i=0;s.length>i;i++)if(r=s[i],r.parsed&&(r=r.el[0]),r===n.el[0]){t.index=i;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"+v,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+v,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 l=e.magnificPopup.modules;for(i=0;l.length>i;i++){var c=l[i];c=c.charAt(0).toUpperCase()+c.slice(1),t["init"+c].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"+v,function(e){27===e.keyCode&&t.close()}),I.on("resize"+v,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var d=t.wH=I.height(),u={};if(t.fixedContentPos&&t._hasScrollBar(d)){var m=t._getScrollbarSize();m&&(u.marginRight=m)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):u.overflow="hidden");var g=t.st.mainClass;return t.isIE7&&(g+=" mfp-ie7"),g&&t._addClassToMFP(g),t.updateItemHTML(),T("BuildControls"),e("html").css(u),t.bgOverlay.add(t.wrap).prependTo(document.body),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(h),t._setFocus()):t.bgOverlay.addClass(h),o.on("focusin"+v,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(d),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+" "+h+" ";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"+v+" focusin"+v),t.ev.off(v),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=t.items[n],o=i.type;if(i=i.tagName?{el:e(i)}:{data:i,src:i.src},i.el){for(var r=t.types,a=0;r.length>a;a++)if(i.el.hasClass("mfp-"+r[a])){o=r[a];break}i.src=i.el.attr("data-mfp-src"),i.src||(i.src=i.el.attr("href"))}return i.type=o||t.st.type||"inline",i.index=n,i.parsed=!0,t.items[n]=i,T("ElementParse",i),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(v+"-"+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(v+"-"+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,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</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(h)},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"+v)}),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()),n.img[0].naturalWidth>0&&(n.hasSize=!0)}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);
363 ajax/libs/magnific-popup.js/0.9.9/magnific-popup.css
... ... @@ -0,0 +1,363 @@
  1 +/* Magnific Popup CSS */
  2 +.mfp-bg {
  3 + top: 0;
  4 + left: 0;
  5 + width: 100%;
  6 + height: 100%;
  7 + z-index: 1042;
  8 + overflow: hidden;
  9 + position: fixed;
  10 + background: #0b0b0b;
  11 + opacity: 0.8;
  12 + filter: alpha(opacity=80); }
  13 +
  14 +.mfp-wrap {
  15 + top: 0;
  16 + left: 0;
  17 + width: 100%;
  18 + height: 100%;
  19 + z-index: 1043;
  20 + position: fixed;
  21 + outline: none !important;
  22 + -webkit-backface-visibility: hidden; }
  23 +
  24 +.mfp-container {
  25 + text-align: center;
  26 + position: absolute;
  27 + width: 100%;
  28 + height: 100%;
  29 + left: 0;
  30 + top: 0;
  31 + padding: 0 8px;
  32 + -webkit-box-sizing: border-box;
  33 + -moz-box-sizing: border-box;
  34 + box-sizing: border-box; }
  35 +
  36 +.mfp-container:before {
  37 + content: '';
  38 + display: inline-block;
  39 + height: 100%;
  40 + vertical-align: middle; }
  41 +
  42 +.mfp-align-top .mfp-container:before {
  43 + display: none; }
  44 +
  45 +.mfp-content {
  46 + position: relative;
  47 + display: inline-block;
  48 + vertical-align: middle;
  49 + margin: 0 auto;
  50 + text-align: left;
  51 + z-index: 1045; }
  52 +
  53 +.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
  54 + width: 100%;
  55 + cursor: auto; }
  56 +
  57 +.mfp-ajax-cur {
  58 + cursor: progress; }
  59 +
  60 +.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
  61 + cursor: -moz-zoom-out;
  62 + cursor: -webkit-zoom-out;
  63 + cursor: zoom-out; }
  64 +
  65 +.mfp-zoom {
  66 + cursor: pointer;
  67 + cursor: -webkit-zoom-in;
  68 + cursor: -moz-zoom-in;
  69 + cursor: zoom-in; }
  70 +
  71 +.mfp-auto-cursor .mfp-content {
  72 + cursor: auto; }
  73 +
  74 +.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter {
  75 + -webkit-user-select: none;
  76 + -moz-user-select: none;
  77 + user-select: none; }
  78 +
  79 +.mfp-loading.mfp-figure {
  80 + display: none; }
  81 +
  82 +.mfp-hide {
  83 + display: none !important; }
  84 +
  85 +.mfp-preloader {
  86 + color: #cccccc;
  87 + position: absolute;
  88 + top: 50%;
  89 + width: auto;
  90 + text-align: center;
  91 + margin-top: -0.8em;
  92 + left: 8px;
  93 + right: 8px;
  94 + z-index: 1044; }
  95 + .mfp-preloader a {
  96 + color: #cccccc; }
  97 + .mfp-preloader a:hover {
  98 + color: white; }
  99 +
  100 +.mfp-s-ready .mfp-preloader {
  101 + display: none; }
  102 +
  103 +.mfp-s-error .mfp-content {
  104 + display: none; }
  105 +
  106 +button.mfp-close, button.mfp-arrow {
  107 + overflow: visible;
  108 + cursor: pointer;
  109 + background: transparent;
  110 + border: 0;
  111 + -webkit-appearance: none;
  112 + display: block;
  113 + outline: none;
  114 + padding: 0;
  115 + z-index: 1046;
  116 + -webkit-box-shadow: none;
  117 + box-shadow: none; }
  118 +button::-moz-focus-inner {
  119 + padding: 0;
  120 + border: 0; }
  121 +
  122 +.mfp-close {
  123 + width: 44px;
  124 + height: 44px;
  125 + line-height: 44px;
  126 + position: absolute;
  127 + right: 0;
  128 + top: 0;
  129 + text-decoration: none;
  130 + text-align: center;
  131 + opacity: 0.65;
  132 + padding: 0 0 18px 10px;
  133 + color: white;
  134 + font-style: normal;
  135 + font-size: 28px;
  136 + font-family: Arial, Baskerville, monospace; }
  137 + .mfp-close:hover, .mfp-close:focus {
  138 + opacity: 1; }
  139 + .mfp-close:active {
  140 + top: 1px; }
  141 +
  142 +.mfp-close-btn-in .mfp-close {
  143 + color: #333333; }
  144 +
  145 +.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
  146 + color: white;
  147 + right: -6px;
  148 + text-align: right;
  149 + padding-right: 6px;
  150 + width: 100%; }
  151 +
  152 +.mfp-counter {
  153 + position: absolute;
  154 + top: 0;
  155 + right: 0;
  156 + color: #cccccc;
  157 + font-size: 12px;
  158 + line-height: 18px; }
  159 +
  160 +.mfp-arrow {
  161 + position: absolute;
  162 + opacity: 0.65;
  163 + margin: 0;
  164 + top: 50%;
  165 + margin-top: -55px;
  166 + padding: 0;
  167 + width: 90px;
  168 + height: 110px;
  169 + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
  170 + .mfp-arrow:active {
  171 + margin-top: -54px; }
  172 + .mfp-arrow:hover, .mfp-arrow:focus {
  173 + opacity: 1; }
  174 + .mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
  175 + content: '';
  176 + display: block;
  177 + width: 0;
  178 + height: 0;
  179 + position: absolute;
  180 + left: 0;
  181 + top: 0;
  182 + margin-top: 35px;
  183 + margin-left: 35px;
  184 + border: medium inset transparent; }
  185 + .mfp-arrow:after, .mfp-arrow .mfp-a {
  186 + border-top-width: 13px;
  187 + border-bottom-width: 13px;
  188 + top: 8px; }
  189 + .mfp-arrow:before, .mfp-arrow .mfp-b {
  190 + border-top-width: 21px;
  191 + border-bottom-width: 21px; }
  192 +
  193 +.mfp-arrow-left {
  194 + left: 0; }
  195 + .mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
  196 + border-right: 17px solid white;
  197 + margin-left: 31px; }
  198 + .mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
  199 + margin-left: 25px;
  200 + border-right: 27px solid #3f3f3f; }
  201 +
  202 +.mfp-arrow-right {
  203 + right: 0; }
  204 + .mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
  205 + border-left: 17px solid white;
  206 + margin-left: 39px; }
  207 + .mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
  208 + border-left: 27px solid #3f3f3f; }
  209 +
  210 +.mfp-iframe-holder {
  211 + padding-top: 40px;
  212 + padding-bottom: 40px; }
  213 + .mfp-iframe-holder .mfp-content {
  214 + line-height: 0;
  215 + width: 100%;
  216 + max-width: 900px; }
  217 + .mfp-iframe-holder .mfp-close {
  218 + top: -40px; }
  219 +
  220 +.mfp-iframe-scaler {
  221 + width: 100%;
  222 + height: 0;
  223 + overflow: hidden;
  224 + padding-top: 56.25%; }
  225 + .mfp-iframe-scaler iframe {
  226 + position: absolute;
  227 + display: block;
  228 + top: 0;
  229 + left: 0;
  230 + width: 100%;
  231 + height: 100%;
  232 + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  233 + background: black; }
  234 +
  235 +/* Main image in popup */
  236 +img.mfp-img {
  237 + width: auto;
  238 + max-width: 100%;
  239 + height: auto;
  240 + display: block;
  241 + line-height: 0;
  242 + -webkit-box-sizing: border-box;
  243 + -moz-box-sizing: border-box;
  244 + box-sizing: border-box;
  245 + padding: 40px 0 40px;
  246 + margin: 0 auto; }
  247 +
  248 +/* The shadow behind the image */
  249 +.mfp-figure {
  250 + line-height: 0; }
  251 + .mfp-figure:after {
  252 + content: '';
  253 + position: absolute;
  254 + left: 0;
  255 + top: 40px;
  256 + bottom: 40px;
  257 + display: block;
  258 + right: 0;
  259 + width: auto;
  260 + height: auto;
  261 + z-index: -1;
  262 + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  263 + background: #444444; }
  264 + .mfp-figure small {
  265 + color: #bdbdbd;
  266 + display: block;
  267 + font-size: 12px;
  268 + line-height: 14px; }
  269 +
  270 +.mfp-bottom-bar {
  271 + margin-top: -36px;
  272 + position: absolute;
  273 + top: 100%;
  274 + left: 0;
  275 + width: 100%;
  276 + cursor: auto; }
  277 +
  278 +.mfp-title {
  279 + text-align: left;
  280 + line-height: 18px;
  281 + color: #f3f3f3;
  282 + word-wrap: break-word;
  283 + padding-right: 36px; }
  284 +
  285 +.mfp-image-holder .mfp-content {
  286 + max-width: 100%; }
  287 +
  288 +.mfp-gallery .mfp-image-holder .mfp-figure {
  289 + cursor: pointer; }
  290 +
  291 +@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
  292 + /**
  293 + * Remove all paddings around the image on small screen
  294 + */
  295 + .mfp-img-mobile .mfp-image-holder {
  296 + padding-left: 0;
  297 + padding-right: 0; }
  298 + .mfp-img-mobile img.mfp-img {
  299 + padding: 0; }
  300 + .mfp-img-mobile .mfp-figure {
  301 + /* The shadow behind the image */ }
  302 + .mfp-img-mobile .mfp-figure:after {
  303 + top: 0;
  304 + bottom: 0; }
  305 + .mfp-img-mobile .mfp-figure small {
  306 + display: inline;
  307 + margin-left: 5px; }
  308 + .mfp-img-mobile .mfp-bottom-bar {
  309 + background: rgba(0, 0, 0, 0.6);
  310 + bottom: 0;
  311 + margin: 0;
  312 + top: auto;
  313 + padding: 3px 5px;
  314 + position: fixed;
  315 + -webkit-box-sizing: border-box;
  316 + -moz-box-sizing: border-box;
  317 + box-sizing: border-box; }
  318 + .mfp-img-mobile .mfp-bottom-bar:empty {
  319 + padding: 0; }
  320 + .mfp-img-mobile .mfp-counter {
  321 + right: 5px;
  322 + top: 3px; }
  323 + .mfp-img-mobile .mfp-close {
  324 + top: 0;
  325 + right: 0;
  326 + width: 35px;
  327 + height: 35px;
  328 + line-height: 35px;
  329 + background: rgba(0, 0, 0, 0.6);
  330 + position: fixed;
  331 + text-align: center;
  332 + padding: 0; } }
  333 +
  334 +@media all and (max-width: 900px) {
  335 + .mfp-arrow {
  336 + -webkit-transform: scale(0.75);
  337 + transform: scale(0.75); }
  338 + .mfp-arrow-left {
  339 + -webkit-transform-origin: 0;
  340 + transform-origin: 0; }
  341 + .mfp-arrow-right {
  342 + -webkit-transform-origin: 100%;
  343 + transform-origin: 100%; }
  344 + .mfp-container {
  345 + padding-left: 6px;
  346 + padding-right: 6px; } }
  347 +
  348 +.mfp-ie7 .mfp-img {
  349 + padding: 0; }
  350 +.mfp-ie7 .mfp-bottom-bar {
  351 + width: 600px;
  352 + left: 50%;
  353 + margin-left: -300px;
  354 + margin-top: 5px;
  355 + padding-bottom: 5px; }
  356 +.mfp-ie7 .mfp-container {
  357 + padding: 0; }
  358 +.mfp-ie7 .mfp-content {
  359 + padding-top: 44px; }
  360 +.mfp-ie7 .mfp-close {
  361 + top: 0;
  362 + right: 0;
  363 + padding-top: 0; }
2  ajax/libs/magnific-popup.js/package.json
... ... @@ -1,7 +1,7 @@
1 1 {
2 2 "name": "magnific-popup.js",
3 3 "filename": "jquery.magnific-popup.min.js",
4   - "version": "0.8.9",
  4 + "version": "0.9.9",
5 5 "author": "Dmitry Semenov",
6 6 "description": "Fast, light, mobile-friendly and responsive lightbox plugin with focus on performance. Open inline HTML, ajax loaded content, image, form, iframe (YouTube and Vimeo video, Google Maps), photo gallery. Easily add in/out animation effects with help of CSS3 transitions.",
7 7 "homepage": "http://dimsemenov.com/plugins/magnific-popup/",

0 comments on commit 6833717

Please sign in to comment.
Something went wrong with that request. Please try again.