Version Description
(2014-12-07) = * Add: Add support for hidden controls and YouTube logo in Thumbnail mode. * Change: Rename Magnific Popup function to prevent clash with original Modest Branding that does not have support for disabling related videos, player controls and YouTube logo.
Download this release
Release Info
Developer | urkekg |
Plugin | YouTube Channel |
Version | 2.4.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.4.1.1 to 2.4.1.2
assets/lib/magnific-popup/jquery.magnific-popup.min.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
-
/*! Magnific Popup - v0.9.9.
|
|
|
|
|
2 |
* http://dimsemenov.com/plugins/magnific-popup/
|
3 |
-
* Copyright (c)
|
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",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(r=0;r<l.length;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return void t.updateItemHTML();t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopup.modules;for(r=0;r<c.length;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+=" mfp-align-top"),t.wrap.css(t.fixedContentPos?{overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}:{top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+" focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;a<r.length;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(I.width()<a)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img src="'+n+'" class="'+i.attr("class")+'" />'):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?void t._onImageHasSize(e):(n>200&&clearInterval(j),n++,void(3===n?o(10):40===n?o(50):100===n&&o(500)))},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return void d();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=",rel:"rel=",src:"//www.youtube.com/embed/%id%?autoplay=1&rel=%rel%"},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&&("string"==typeof this.rel&&(embedRel=o.substr(o.lastIndexOf(this.rel)+this.rel.length,o.length)),"string"==typeof this.id?(o=o.substr(o.lastIndexOf(this.id)+this.id.length,o.length),o=o.substr(0,o.indexOf("&"))):o=this.id.call(this,o)),o=this.src.replace("%id%",o).replace("%rel%",embedRel),!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)}),void 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})):!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;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);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);
|
1 |
+
/*! Magnific Popup - v0.9.9.2 - 2014-09-06
|
2 |
+
* Mod v0.9.9.1 - 2014-09-14 Aleksandar Urosevic (YT rel)
|
3 |
+
* Mod v0.9.9.2 - 2014-12-07 Aleksandar Urosevic (YT controls, modestbranding)
|
4 |
* http://dimsemenov.com/plugins/magnific-popup/
|
5 |
+
* Copyright (c) 2014 Dmitry Semenov; */
|
6 |
+
!function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",b=function(){},w=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},O=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},E=function(){e.magnificPopupAU.instance||(t=new b,t.init(),e.magnificPopupAU.instance=t)},_=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};b.prototype={constructor:b,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=_(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(r=0;r<l.length;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return void t.updateItemHTML();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.magnificPopupAU.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopupAU.modules;for(r=0;r<c.length;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=O(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(O())),t.st.alignTop&&(a+=" mfp-align-top"),t.wrap.css(t.fixedContentPos?{overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}:{top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+" focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(O()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;a<r.length;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopupAU";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.magnificPopupAU.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopupAU.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(I.width()<a)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img src="'+n+'" class="'+i.attr("class")+'" />'):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.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.magnificPopupAU={instance:null,proto:b.prototype,modules:[],open:function(t,n){return E(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopupAU.instance&&e.magnificPopupAU.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopupAU.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopupAU=function(n){E();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=w?i.data("magnificPopupAU"):i[0].magnificPopupAU,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),w?i.data("magnificPopupAU",n):i[0].magnificPopupAU=n,t.addGroup(i,n);return i};var S,P,A,z="inline",M=function(){A&&(P.after(A.addClass(S)).detach(),A=null)};e.magnificPopupAU.registerModule(z,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(z),x(l+"."+z,function(){M()})},getInline:function(n,i){if(M(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(P||(S=o.hiddenClass,P=k(S),S="mfp-"+S),A=r.after(P).detach().removeClass(S)),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 B,F="ajax",H=function(){B&&i.removeClass(B)},L=function(){H(),t.req&&t.req.abort()};e.magnificPopupAU.registerModule(F,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(F),B=t.st.ajax.cursor,x(l+"."+F,L),x("BeforeChange."+F,L)},getAjax:function(n){B&&i.addClass(B),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),F),n.finished=!0,H(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){H(),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 U,j=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.magnificPopupAU.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,U&&clearInterval(U),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){U&&clearInterval(U),U=setInterval(function(){return i.naturalWidth>0?void t._onImageHasSize(e):(n>200&&clearInterval(U),n++,void(3===n?o(10):40===n?o(50):100===n&&o(500)))},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:j(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(U&&clearInterval(U),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 N,W=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};e.magnificPopupAU.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 void d();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:(w?i.innerHeight():i[0].offsetHeight)-a-r};return W()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var R="iframe",Z="//about:blank",q=function(e){if(t.currTemplate[R]){var n=t.currTemplate[R].find("iframe");n.length&&(e||(n[0].src=Z),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopupAU.registerModule(R,{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=",rel:"rel=",modestbranding:"modestbranding=",theme:"theme=",controls:"controls=",src:"//www.youtube.com/embed/%id%?autoplay=1&rel=%rel%&modestbranding=%modestbranding%&controls=%controls%"},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(R),x("BeforeChange",function(e,t,n){t!==n&&(t===R?q():n===R&&q(!0))}),x(l+"."+R,function(){q()})},getIframe:function(n,i){var o=n.src,r=n.src,a=n.src,s=n.src,l=t.st.iframe;e.each(l.patterns,function(){return o.indexOf(this.index)>-1?(eSrc=o,this.id&&("string"==typeof this.id?(o=o.substr(o.lastIndexOf(this.id)+this.id.length,o.length),o.indexOf("&")>0&&(o=o.substr(0,o.indexOf("&")))):o=this.id.call(this,o)),this.rel&&("string"==typeof this.rel&&r.indexOf(this.rel)>0?(r=r.substr(r.lastIndexOf(this.rel)+this.rel.length,r.length),r.indexOf("&")>0&&(r=r.substr(0,r.indexOf("&")))):r="1"),this.modestbranding&&("string"==typeof this.modestbranding&&a.indexOf(this.modestbranding)>0?(a=a.substr(a.lastIndexOf(this.modestbranding)+this.modestbranding.length,a.length),a.indexOf("&")>0&&(a=a.substr(0,a.indexOf("&")))):a="0"),this.controls&&("string"==typeof this.controls&&s.indexOf(this.controls)>0?(s=s.substr(s.lastIndexOf(this.controls)+this.controls.length,s.length),s.indexOf("&")>0&&(s=s.substr(0,s.indexOf("&")))):s="1"),o=this.src.replace("%id%",o).replace("%rel%",r).replace("%modestbranding%",a).replace("%controls%",s),!1):void 0});var c={};return l.srcAction&&(c[l.srcAction]=o),t._parseMarkup(i,c,n),t.updateStatus("ready"),i}}});var D=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},K=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopupAU.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=K(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?K(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)}),void 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})):!1},next:function(){t.direction=!0,t.index=D(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=D(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;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=D(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 Y="retina";e.magnificPopupAU.registerModule(Y,{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."+Y,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+Y,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)}}(),E()}(window.jQuery||window.Zepto);
|
assets/lib/magnific-popup/magnific-popup.css
DELETED
@@ -1,370 +0,0 @@
|
|
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 |
-
filter: alpha(opacity=65);
|
133 |
-
padding: 0 0 18px 10px;
|
134 |
-
color: white;
|
135 |
-
font-style: normal;
|
136 |
-
font-size: 28px;
|
137 |
-
font-family: Arial, Baskerville, monospace; }
|
138 |
-
.mfp-close:hover, .mfp-close:focus {
|
139 |
-
opacity: 1;
|
140 |
-
filter: alpha(opacity=100);
|
141 |
-
background: transparent;
|
142 |
-
}
|
143 |
-
.mfp-close:active {
|
144 |
-
top: 1px; }
|
145 |
-
|
146 |
-
.mfp-close-btn-in .mfp-close {
|
147 |
-
color: #333333; }
|
148 |
-
|
149 |
-
.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
|
150 |
-
color: white;
|
151 |
-
right: -6px;
|
152 |
-
text-align: right;
|
153 |
-
padding-right: 6px;
|
154 |
-
width: 100%; }
|
155 |
-
|
156 |
-
.mfp-counter {
|
157 |
-
position: absolute;
|
158 |
-
top: 0;
|
159 |
-
right: 0;
|
160 |
-
color: #cccccc;
|
161 |
-
font-size: 12px;
|
162 |
-
line-height: 18px; }
|
163 |
-
|
164 |
-
.mfp-arrow {
|
165 |
-
position: absolute;
|
166 |
-
opacity: 0.65;
|
167 |
-
filter: alpha(opacity=65);
|
168 |
-
margin: 0;
|
169 |
-
top: 50%;
|
170 |
-
margin-top: -55px;
|
171 |
-
padding: 0;
|
172 |
-
width: 90px;
|
173 |
-
height: 110px;
|
174 |
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
|
175 |
-
.mfp-arrow:active {
|
176 |
-
margin-top: -54px; }
|
177 |
-
.mfp-arrow:hover, .mfp-arrow:focus {
|
178 |
-
opacity: 1;
|
179 |
-
filter: alpha(opacity=100); }
|
180 |
-
.mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
|
181 |
-
content: '';
|
182 |
-
display: block;
|
183 |
-
width: 0;
|
184 |
-
height: 0;
|
185 |
-
position: absolute;
|
186 |
-
left: 0;
|
187 |
-
top: 0;
|
188 |
-
margin-top: 35px;
|
189 |
-
margin-left: 35px;
|
190 |
-
border: medium inset transparent; }
|
191 |
-
.mfp-arrow:after, .mfp-arrow .mfp-a {
|
192 |
-
border-top-width: 13px;
|
193 |
-
border-bottom-width: 13px;
|
194 |
-
top: 8px; }
|
195 |
-
.mfp-arrow:before, .mfp-arrow .mfp-b {
|
196 |
-
border-top-width: 21px;
|
197 |
-
border-bottom-width: 21px;
|
198 |
-
opacity: 0.7; }
|
199 |
-
|
200 |
-
.mfp-arrow-left {
|
201 |
-
left: 0; }
|
202 |
-
.mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
|
203 |
-
border-right: 17px solid white;
|
204 |
-
margin-left: 31px; }
|
205 |
-
.mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
|
206 |
-
margin-left: 25px;
|
207 |
-
border-right: 27px solid #3f3f3f; }
|
208 |
-
|
209 |
-
.mfp-arrow-right {
|
210 |
-
right: 0; }
|
211 |
-
.mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
|
212 |
-
border-left: 17px solid white;
|
213 |
-
margin-left: 39px; }
|
214 |
-
.mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
|
215 |
-
border-left: 27px solid #3f3f3f; }
|
216 |
-
|
217 |
-
.mfp-iframe-holder {
|
218 |
-
padding-top: 40px;
|
219 |
-
padding-bottom: 40px; }
|
220 |
-
.mfp-iframe-holder .mfp-content {
|
221 |
-
line-height: 0;
|
222 |
-
width: 100%;
|
223 |
-
max-width: 900px; }
|
224 |
-
.mfp-iframe-holder .mfp-close {
|
225 |
-
top: -40px; }
|
226 |
-
|
227 |
-
.mfp-iframe-scaler {
|
228 |
-
width: 100%;
|
229 |
-
height: 0;
|
230 |
-
overflow: hidden;
|
231 |
-
padding-top: 56.25%; }
|
232 |
-
.mfp-iframe-scaler iframe {
|
233 |
-
position: absolute;
|
234 |
-
display: block;
|
235 |
-
top: 0;
|
236 |
-
left: 0;
|
237 |
-
width: 100%;
|
238 |
-
height: 100%;
|
239 |
-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
240 |
-
background: black; }
|
241 |
-
|
242 |
-
/* Main image in popup */
|
243 |
-
img.mfp-img {
|
244 |
-
width: auto;
|
245 |
-
max-width: 100%;
|
246 |
-
height: auto;
|
247 |
-
display: block;
|
248 |
-
line-height: 0;
|
249 |
-
-webkit-box-sizing: border-box;
|
250 |
-
-moz-box-sizing: border-box;
|
251 |
-
box-sizing: border-box;
|
252 |
-
padding: 40px 0 40px;
|
253 |
-
margin: 0 auto; }
|
254 |
-
|
255 |
-
/* The shadow behind the image */
|
256 |
-
.mfp-figure {
|
257 |
-
line-height: 0; }
|
258 |
-
.mfp-figure:after {
|
259 |
-
content: '';
|
260 |
-
position: absolute;
|
261 |
-
left: 0;
|
262 |
-
top: 40px;
|
263 |
-
bottom: 40px;
|
264 |
-
display: block;
|
265 |
-
right: 0;
|
266 |
-
width: auto;
|
267 |
-
height: auto;
|
268 |
-
z-index: -1;
|
269 |
-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
270 |
-
background: #444444; }
|
271 |
-
.mfp-figure small {
|
272 |
-
color: #bdbdbd;
|
273 |
-
display: block;
|
274 |
-
font-size: 12px;
|
275 |
-
line-height: 14px; }
|
276 |
-
.mfp-figure figure {
|
277 |
-
margin: 0; }
|
278 |
-
|
279 |
-
.mfp-bottom-bar {
|
280 |
-
margin-top: -36px;
|
281 |
-
position: absolute;
|
282 |
-
top: 100%;
|
283 |
-
left: 0;
|
284 |
-
width: 100%;
|
285 |
-
cursor: auto; }
|
286 |
-
|
287 |
-
.mfp-title {
|
288 |
-
text-align: left;
|
289 |
-
line-height: 18px;
|
290 |
-
color: #f3f3f3;
|
291 |
-
word-wrap: break-word;
|
292 |
-
padding-right: 36px; }
|
293 |
-
|
294 |
-
.mfp-image-holder .mfp-content {
|
295 |
-
max-width: 100%; }
|
296 |
-
|
297 |
-
.mfp-gallery .mfp-image-holder .mfp-figure {
|
298 |
-
cursor: pointer; }
|
299 |
-
|
300 |
-
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
301 |
-
/**
|
302 |
-
* Remove all paddings around the image on small screen
|
303 |
-
*/
|
304 |
-
.mfp-img-mobile .mfp-image-holder {
|
305 |
-
padding-left: 0;
|
306 |
-
padding-right: 0; }
|
307 |
-
.mfp-img-mobile img.mfp-img {
|
308 |
-
padding: 0; }
|
309 |
-
.mfp-img-mobile .mfp-figure:after {
|
310 |
-
top: 0;
|
311 |
-
bottom: 0; }
|
312 |
-
.mfp-img-mobile .mfp-figure small {
|
313 |
-
display: inline;
|
314 |
-
margin-left: 5px; }
|
315 |
-
.mfp-img-mobile .mfp-bottom-bar {
|
316 |
-
background: rgba(0, 0, 0, 0.6);
|
317 |
-
bottom: 0;
|
318 |
-
margin: 0;
|
319 |
-
top: auto;
|
320 |
-
padding: 3px 5px;
|
321 |
-
position: fixed;
|
322 |
-
-webkit-box-sizing: border-box;
|
323 |
-
-moz-box-sizing: border-box;
|
324 |
-
box-sizing: border-box; }
|
325 |
-
.mfp-img-mobile .mfp-bottom-bar:empty {
|
326 |
-
padding: 0; }
|
327 |
-
.mfp-img-mobile .mfp-counter {
|
328 |
-
right: 5px;
|
329 |
-
top: 3px; }
|
330 |
-
.mfp-img-mobile .mfp-close {
|
331 |
-
top: 0;
|
332 |
-
right: 0;
|
333 |
-
width: 35px;
|
334 |
-
height: 35px;
|
335 |
-
line-height: 35px;
|
336 |
-
background: rgba(0, 0, 0, 0.6);
|
337 |
-
position: fixed;
|
338 |
-
text-align: center;
|
339 |
-
padding: 0; } }
|
340 |
-
|
341 |
-
@media all and (max-width: 900px) {
|
342 |
-
.mfp-arrow {
|
343 |
-
-webkit-transform: scale(0.75);
|
344 |
-
transform: scale(0.75); }
|
345 |
-
.mfp-arrow-left {
|
346 |
-
-webkit-transform-origin: 0;
|
347 |
-
transform-origin: 0; }
|
348 |
-
.mfp-arrow-right {
|
349 |
-
-webkit-transform-origin: 100%;
|
350 |
-
transform-origin: 100%; }
|
351 |
-
.mfp-container {
|
352 |
-
padding-left: 6px;
|
353 |
-
padding-right: 6px; } }
|
354 |
-
|
355 |
-
.mfp-ie7 .mfp-img {
|
356 |
-
padding: 0; }
|
357 |
-
.mfp-ie7 .mfp-bottom-bar {
|
358 |
-
width: 600px;
|
359 |
-
left: 50%;
|
360 |
-
margin-left: -300px;
|
361 |
-
margin-top: 5px;
|
362 |
-
padding-bottom: 5px; }
|
363 |
-
.mfp-ie7 .mfp-container {
|
364 |
-
padding: 0; }
|
365 |
-
.mfp-ie7 .mfp-content {
|
366 |
-
padding-top: 44px; }
|
367 |
-
.mfp-ie7 .mfp-close {
|
368 |
-
top: 0;
|
369 |
-
right: 0;
|
370 |
-
padding-top: 0; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5, responsive
|
5 |
Requires at least: 3.9.0
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 2.4.1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -41,7 +41,7 @@ You can use `style.css` from theme to style `YouTube Video` widget content.
|
|
41 |
* `.ytc_video_1`, `.ytc_video_2`, ... - class of container for single item with ordering number of item in widget
|
42 |
* `.ytc_video_first` - class of first container for single item
|
43 |
* `.ytc_video_last` - class of last container for single item
|
44 |
-
* `.ytc_video_mid` - class of all other containers for single item
|
45 |
* `.ytc_description` - class for video description text
|
46 |
* `.ytc_link` - class of container for link to channel
|
47 |
|
@@ -53,7 +53,6 @@ You can use `style.css` from theme to style `YouTube Video` widget content.
|
|
53 |
* Async HTML5 video does not work for 2nd same video on same page (two YTC blocks set to Async HTML5)
|
54 |
* Chromeless video could not be used as responsive player
|
55 |
* Thumbnail and opening video in lightbox does not work with `Responz` theme by `Thenify.me` if you wish to hide related videos, because this theme uses original `Magnific Popup` library that does not support `rel` parameter.
|
56 |
-
* Thumbnail mode does not support hidden playback controls and hidden YouTube logo.
|
57 |
|
58 |
If WordFence or other malware scan tool detect YouTube Channel fule youtube-channel.php as potential risk because `base64_encode()` and `base64_decode()` functions, remember that we use this two functions to store and restore JSON feeds to transient cache, so potential detection is false positive.
|
59 |
|
@@ -123,11 +122,16 @@ If you does not see your latest video in your uplaods feed (which you can access
|
|
123 |
|
124 |
= I enabled option `Hide YT Logo` but YouTube logo is still visible =
|
125 |
|
126 |
-
Modestbranding option does not work for all videos, so a lot of videos will still have YouTube logo in control bar. I recommend to enable option `Hide player controls` instead.
|
127 |
|
128 |
Also, even when hidding logo works for your video, on hover or when video is paused in upper right corner will be displayed YouTube link/logo. [Read more here](https://developers.google.com/youtube/player_parameters#modestbranding)
|
129 |
|
130 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
131 |
= 2.4.1.1 (2014-12-07) =
|
132 |
* Change: Remove parameter `&rel=1` from thumbnail link because that is a default value and can prevent some lightboxes to load video.
|
133 |
|
@@ -168,7 +172,7 @@ Also, even when hidding logo works for your video, on hover or when video is pau
|
|
168 |
|
169 |
= 2.2.3 (2014-09-14) =
|
170 |
* Add: option to disable related videos (not supported by chromeless player)
|
171 |
-
* Enhance: added support for YouTube `rel` parameter in Magnific PopUp IFRAME module
|
172 |
* Minified assets
|
173 |
* Add plugin icon for WordPress 4.x plugin installer
|
174 |
* Update plugin banner
|
4 |
Tags: youtube, channel, playlist, single, widget, widgets, youtube player, flash player, rss, feed, video, thumbnail, embed, sidebar, chromeless, iframe, html5, responsive
|
5 |
Requires at least: 3.9.0
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 2.4.1.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
41 |
* `.ytc_video_1`, `.ytc_video_2`, ... - class of container for single item with ordering number of item in widget
|
42 |
* `.ytc_video_first` - class of first container for single item
|
43 |
* `.ytc_video_last` - class of last container for single item
|
44 |
+
* `.ytc_video_mid` - class of all other containers for single item
|
45 |
* `.ytc_description` - class for video description text
|
46 |
* `.ytc_link` - class of container for link to channel
|
47 |
|
53 |
* Async HTML5 video does not work for 2nd same video on same page (two YTC blocks set to Async HTML5)
|
54 |
* Chromeless video could not be used as responsive player
|
55 |
* Thumbnail and opening video in lightbox does not work with `Responz` theme by `Thenify.me` if you wish to hide related videos, because this theme uses original `Magnific Popup` library that does not support `rel` parameter.
|
|
|
56 |
|
57 |
If WordFence or other malware scan tool detect YouTube Channel fule youtube-channel.php as potential risk because `base64_encode()` and `base64_decode()` functions, remember that we use this two functions to store and restore JSON feeds to transient cache, so potential detection is false positive.
|
58 |
|
122 |
|
123 |
= I enabled option `Hide YT Logo` but YouTube logo is still visible =
|
124 |
|
125 |
+
Modestbranding option does not work for all videos, so a lot of videos will still have YouTube logo in control bar. I recommend to enable option `Hide player controls` instead.
|
126 |
|
127 |
Also, even when hidding logo works for your video, on hover or when video is paused in upper right corner will be displayed YouTube link/logo. [Read more here](https://developers.google.com/youtube/player_parameters#modestbranding)
|
128 |
|
129 |
== Changelog ==
|
130 |
+
|
131 |
+
= 2.4.1.2 (2014-12-07) =
|
132 |
+
* Add: Add support for hidden controls and YouTube logo in Thumbnail mode.
|
133 |
+
* Change: Rename Magnific Popup function to prevent clash with original Modest Branding that does not have support for disabling related videos, player controls and YouTube logo.
|
134 |
+
|
135 |
= 2.4.1.1 (2014-12-07) =
|
136 |
* Change: Remove parameter `&rel=1` from thumbnail link because that is a default value and can prevent some lightboxes to load video.
|
137 |
|
172 |
|
173 |
= 2.2.3 (2014-09-14) =
|
174 |
* Add: option to disable related videos (not supported by chromeless player)
|
175 |
+
* Enhance: added support for YouTube `rel` parameter in Magnific PopUp IFRAME module
|
176 |
* Minified assets
|
177 |
* Add plugin icon for WordPress 4.x plugin installer
|
178 |
* Update plugin banner
|
youtube-channel.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: YouTube Channel
|
|
4 |
Plugin URI: http://urosevic.net/wordpress/plugins/youtube-channel/
|
5 |
Description: <a href="widgets.php">Widget</a> that display latest video thumbnail, iframe (HTML5 video), object (Flash video) or chromeless video from YouTube Channel or Playlist.
|
6 |
Author: Aleksandar Urošević
|
7 |
-
Version: 2.4.1.
|
8 |
Author URI: http://urosevic.net/
|
9 |
*/
|
10 |
// @TODO make FitViedo optional
|
@@ -17,7 +17,7 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
|
|
17 |
class WPAU_YOUTUBE_CHANNEL
|
18 |
{
|
19 |
|
20 |
-
public $plugin_version = "2.4.1.
|
21 |
public $plugin_name = "YouTube Channel";
|
22 |
public $plugin_slug = "youtube-channel";
|
23 |
public $plugin_option = "youtube_channel_defaults";
|
@@ -265,8 +265,8 @@ if ( !class_exists('WPAU_YOUTUBE_CHANNEL') )
|
|
265 |
wp_enqueue_script( 'fitvids', plugins_url('assets/js/jquery.fitvids.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
|
266 |
|
267 |
// enqueue magnific-popup
|
268 |
-
wp_enqueue_script( 'magnific-popup', plugins_url('assets/lib/magnific-popup/jquery.magnific-popup.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
|
269 |
-
wp_enqueue_style( 'magnific-popup', plugins_url('assets/lib/magnific-popup/magnific-popup.min.css', __FILE__), array(), $this->plugin_version );
|
270 |
wp_enqueue_script( 'youtube-channel', plugins_url('assets/js/youtube-channel.min.js', __FILE__), array(), $this->plugin_version, true );
|
271 |
} // end function enqueue_scripts
|
272 |
|
@@ -668,8 +668,12 @@ function ytc_mute(event){
|
|
668 |
default: $arclass = 'ar16_9';
|
669 |
}
|
670 |
$title = sprintf( __('Watch video %1$s published on %2$s', 'youtube-channel' ), $yt_title, $yt_date );
|
671 |
-
$
|
672 |
-
|
|
|
|
|
|
|
|
|
673 |
} else if ( $to_show == "chromeless" ) {
|
674 |
ob_start();
|
675 |
?>
|
4 |
Plugin URI: http://urosevic.net/wordpress/plugins/youtube-channel/
|
5 |
Description: <a href="widgets.php">Widget</a> that display latest video thumbnail, iframe (HTML5 video), object (Flash video) or chromeless video from YouTube Channel or Playlist.
|
6 |
Author: Aleksandar Urošević
|
7 |
+
Version: 2.4.1.2
|
8 |
Author URI: http://urosevic.net/
|
9 |
*/
|
10 |
// @TODO make FitViedo optional
|
17 |
class WPAU_YOUTUBE_CHANNEL
|
18 |
{
|
19 |
|
20 |
+
public $plugin_version = "2.4.1.2";
|
21 |
public $plugin_name = "YouTube Channel";
|
22 |
public $plugin_slug = "youtube-channel";
|
23 |
public $plugin_option = "youtube_channel_defaults";
|
265 |
wp_enqueue_script( 'fitvids', plugins_url('assets/js/jquery.fitvids.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
|
266 |
|
267 |
// enqueue magnific-popup
|
268 |
+
wp_enqueue_script( 'magnific-popup-au', plugins_url('assets/lib/magnific-popup/jquery.magnific-popup.min.js', __FILE__), array('jquery'), $this->plugin_version, true );
|
269 |
+
wp_enqueue_style( 'magnific-popup-au', plugins_url('assets/lib/magnific-popup/magnific-popup.min.css', __FILE__), array(), $this->plugin_version );
|
270 |
wp_enqueue_script( 'youtube-channel', plugins_url('assets/js/youtube-channel.min.js', __FILE__), array(), $this->plugin_version, true );
|
271 |
} // end function enqueue_scripts
|
272 |
|
668 |
default: $arclass = 'ar16_9';
|
669 |
}
|
670 |
$title = sprintf( __('Watch video %1$s published on %2$s', 'youtube-channel' ), $yt_title, $yt_date );
|
671 |
+
$p = '';
|
672 |
+
if ( $norel ) $p .= '&rel=0';
|
673 |
+
if ( $modestbranding ) $p .= "&modestbranding=1";
|
674 |
+
if ( $controls ) $p .= "&controls=0";
|
675 |
+
// if ( $themelight ) $p .= "&theme=light";
|
676 |
+
$output[] = '<a href="'.$yt_video.$p.'" title="'.$yt_title.'" class="ytc_thumb ytc-lightbox '.$arclass.'"><span style="background-image: url('.$yt_thumb.');" title="'.$title.'" id="'.$ytc_vid.'"></span></a>';
|
677 |
} else if ( $to_show == "chromeless" ) {
|
678 |
ob_start();
|
679 |
?>
|