hacks-guide-minimal-mistake.../assets/js/main.min.js

1 line
20 KiB
JavaScript
Raw Normal View History

2013-05-24 16:25:31 +02:00
(function(e){"use strict";e.fn.fitVids=function(t){var n={customSelector:null};var r=document.createElement("div"),i=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];r.className="fit-vids-style";r.innerHTML="­<style> .fluid-width-video-wrapper { width: 100%; position: relative; padding: 0; } .fluid-width-video-wrapper iframe, .fluid-width-video-wrapper object, .fluid-width-video-wrapper embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } </style>";i.parentNode.insertBefore(r,i);if(t){e.extend(n,t)}return this.each(function(){var t=["iframe[src*='player.vimeo.com']","iframe[src*='www.youtube.com']","iframe[src*='www.youtube-nocookie.com']","iframe[src*='www.kickstarter.com']","object","embed"];if(n.customSelector){t.push(n.customSelector)}var r=e(this).find(t.join(","));r.each(function(){var t=e(this);if(this.tagName.toLowerCase()==="embed"&&t.parent("object").length||t.parent(".fluid-width-video-wrapper").length){return}var n=this.tagName.toLowerCase()==="object"||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height(),r=!isNaN(parseInt(t.attr("width"),10))?parseInt(t.attr("width"),10):t.width(),i=n/r;if(!t.attr("id")){var s="fitvid"+Math.floor(Math.random()*999999);t.attr("id",s)}t.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",i*100+"%");t.removeAttr("height").removeAttr("width")})})}})(jQuery);(function(e){var t="Close",n="BeforeAppend",r="MarkupParse",i="Open",s="Change",o="mfp",u="."+o,a="mfp-ready",f="mfp-removing",l="mfp-prevent-close";var c,h=function(){},p=!!window.jQuery,d,v=e(window),m,g,y,b,w;var E=function(e,t){c.ev.on(o+e+u,t)},S=function(t,n,r,i){var s=document.createElement("div");s.className="mfp-"+t;if(r){s.innerHTML=r}if(!i){s=e(s);if(n){s.appendTo(n)}}else if(n){n.appendChild(s)}return s},x=function(t,n){c.ev.triggerHandler(o+t,n);if(c.st.callbacks){t=t.charAt(0).toLowerCase()+t.slice(1);if(c.st.callbacks[t]){c.st.callbacks[t].apply(c,e.isArray(n)?n:[n])}}},T=function(){(c.st.focus?c.content.find(c.st.focus).eq(0):c.wrap).focus()},N=function(t){if(t!==w||!c.currTemplate.closeBtn){c.currTemplate.closeBtn=e(c.st.closeMarkup.replace("%title%",c.st.tClose));w=t}return c.currTemplate.closeBtn},C=function(){if(!e.magnificPopup.instance){c=new h;c.init();e.magnificPopup.instance=c}},k=function(t){if(e(t).hasClass(l)){return}var n=c.st.closeOnContentClick;var r=c.st.closeOnBgClick;if(n&&r){return true}else{if(!c.content||e(t).hasClass("mfp-close")||c.preloader&&t===c.preloader[0]){return true}if(t!==c.content[0]&&!e.contains(c.content[0],t)){if(r){return true}}else if(n){return true}}return false};h.prototype={constructor:h,init:function(){var t=navigator.appVersion;c.isIE7=t.indexOf("MSIE 7.")!==-1;c.isIE8=t.indexOf("MSIE 8.")!==-1,c.isLowIE=c.isIE7||c.isIE8;c.isAndroid=/android/gi.test(t);c.isIOS=/iphone|ipad|ipod/gi.test(t);c.probablyMobile=c.isAndroid||c.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent);m=e(document.body);g=e(document);c.popupsCache={}},open:function(t){c.items=t.items.length?t.items:[t.items];if(c.isOpen){c.updateItemHTML();return}var n;c.types=[];b="";c.ev=t.el||g;if(t.isObj){c.index=t.index||0}else{c.index=0;var s=t.items,o;for(n=0;n<s.length;n++){o=s[n];if(o.parsed){o=o.el[0]}if(o===t.el[0]){c.index=n;break}}}if(t.key){if(!c.popupsCache[t.key]){c.popupsCache[t.key]={}}c.currTemplate=c.popupsCache[t.key]}else{c.currTemplate={}}c.st=e.extend(true,{},e.magnificPopup.defaults,t);c.fixedContentPos=c.st.fixedContentPos==="auto"?!c.probablyMobile:c.st.fixedContentPos;if(!c.bgOverlay){