Files
ystavakylaecard/assets/js/custom.modernizr.min.js
2013-07-11 07:49:27 +03:00

1 line
8.6 KiB
JavaScript

window.Modernizr=function(t,e,i){function s(t){g.cssText=t}function n(t,e){return typeof t===e}var o,a,r,l="2.6.2",c={},d=!0,h=e.documentElement,p="modernizr",f=e.createElement(p),g=f.style,u={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),v={svg:"http://www.w3.org/2000/svg"},_={},b=[],x=b.slice,y=function(t,i,s,n){var o,a,r,l,c=e.createElement("div"),d=e.body,f=d||e.createElement("body");if(parseInt(s,10))for(;s--;)r=e.createElement("div"),r.id=n?n[s]:p+(s+1),c.appendChild(r);return o=["&#173;",'<style id="s',p,'">',t,"</style>"].join(""),c.id=p,(d?c:f).innerHTML+=o,f.appendChild(c),d||(f.style.background="",f.style.overflow="hidden",l=h.style.overflow,h.style.overflow="hidden",h.appendChild(f)),a=i(c,t),d?c.parentNode.removeChild(c):(f.parentNode.removeChild(f),h.style.overflow=l),!!a},C=function(e){var i=t.matchMedia||t.msMatchMedia;if(i)return i(e).matches;var s;return y("@media "+e+" { #"+p+" { position: absolute; } }",function(e){s="absolute"==(t.getComputedStyle?getComputedStyle(e,null):e.currentStyle).position}),s},w={}.hasOwnProperty;r=n(w,"undefined")||n(w.call,"undefined")?function(t,e){return e in t&&n(t.constructor.prototype[e],"undefined")}:function(t,e){return w.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var i=x.call(arguments,1),s=function(){if(this instanceof s){var n=function(){};n.prototype=e.prototype;var o=new n,a=e.apply(o,i.concat(x.call(arguments)));return Object(a)===a?a:o}return e.apply(t,i.concat(x.call(arguments)))};return s}),_.touch=function(){var i;return"ontouchstart"in t||t.DocumentTouch&&e instanceof DocumentTouch?i=!0:y(["@media (",m.join("touch-enabled),("),p,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(t){i=9===t.offsetTop}),i},_.svg=function(){return!!e.createElementNS&&!!e.createElementNS(v.svg,"svg").createSVGRect},_.inlinesvg=function(){var t=e.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==v.svg},_.svgclippaths=function(){return!!e.createElementNS&&/SVGClipPath/.test(u.call(e.createElementNS(v.svg,"clipPath")))};for(var k in _)r(_,k)&&(a=k.toLowerCase(),c[a]=_[k](),b.push((c[a]?"":"no-")+a));return c.addTest=function(t,e){if("object"==typeof t)for(var s in t)r(t,s)&&c.addTest(s,t[s]);else{if(t=t.toLowerCase(),c[t]!==i)return c;e="function"==typeof e?e():e,d!==void 0&&d&&(h.className+=" "+(e?"":"no-")+t),c[t]=e}return c},s(""),f=o=null,function(t,e){function i(t,e){var i=t.createElement("p"),s=t.getElementsByTagName("head")[0]||t.documentElement;return i.innerHTML="x<style>"+e+"</style>",s.insertBefore(i.lastChild,s.firstChild)}function s(){var t=v.elements;return"string"==typeof t?t.split(" "):t}function n(t){var e=m[t[g]];return e||(e={},u++,t[g]=u,m[u]=e),e}function o(t,i,s){if(i||(i=e),d)return i.createElement(t);s||(s=n(i));var o;return o=s.cache[t]?s.cache[t].cloneNode():f.test(t)?(s.cache[t]=s.createElem(t)).cloneNode():s.createElem(t),o.canHaveChildren&&!p.test(t)?s.frag.appendChild(o):o}function a(t,i){if(t||(t=e),d)return t.createDocumentFragment();i=i||n(t);for(var o=i.frag.cloneNode(),a=0,r=s(),l=r.length;l>a;a++)o.createElement(r[a]);return o}function r(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(i){return v.shivMethods?o(i,t,e):e.createElem(i)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+s().join().replace(/\w+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(v,e.frag)}function l(t){t||(t=e);var s=n(t);return v.shivCSS&&!c&&!s.hasCSS&&(s.hasCSS=!!i(t,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),d||r(t,s),t}var c,d,h=t.html5||{},p=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g="_html5shiv",u=0,m={};(function(){try{var t=e.createElement("a");t.innerHTML="<xyz></xyz>",c="hidden"in t,d=1==t.childNodes.length||function(){e.createElement("a");var t=e.createDocumentFragment();return t.cloneNode===void 0||t.createDocumentFragment===void 0||t.createElement===void 0}()}catch(i){c=!0,d=!0}})();var v={elements:h.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:h.shivCSS!==!1,supportsUnknownElements:d,shivMethods:h.shivMethods!==!1,type:"default",shivDocument:l,createElement:o,createDocumentFragment:a};t.html5=v,l(e)}(this,e),c._version=l,c._prefixes=m,c.mq=C,c.testStyles=y,h.className=h.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(d?" js "+b.join(" "):""),c}(this,this.document),function(t,e,i){function s(t){return"[object Function]"==m.call(t)}function n(t){return"string"==typeof t}function o(){}function a(t){return!t||"loaded"==t||"complete"==t||"uninitialized"==t}function r(){var t=v.shift();_=1,t?t.t?g(function(){("c"==t.t?p.injectCss:p.injectJs)(t.s,0,t.a,t.x,t.e,1)},0):(t(),r()):_=0}function l(t,i,s,n,o,l,c){function d(e){if(!f&&a(h.readyState)&&(b.r=f=1,!_&&r(),h.onload=h.onreadystatechange=null,e)){"img"!=t&&g(function(){y.removeChild(h)},50);for(var s in j[i])j[i].hasOwnProperty(s)&&j[i][s].onload()}}var c=c||p.errorTimeout,h=e.createElement(t),f=0,m=0,b={t:s,s:i,e:o,a:l,x:c};1===j[i]&&(m=1,j[i]=[]),"object"==t?h.data=i:(h.src=i,h.type=t),h.width=h.height="0",h.onerror=h.onload=h.onreadystatechange=function(){d.call(this,m)},v.splice(n,0,b),"img"!=t&&(m||2===j[i]?(y.insertBefore(h,x?null:u),g(d,c)):j[i].push(h))}function c(t,e,i,s,o){return _=0,e=e||"j",n(t)?l("c"==e?w:C,t,e,this.i++,i,s,o):(v.splice(this.i++,0,t),1==v.length&&r()),this}function d(){var t=p;return t.loader={load:c,i:0},t}var h,p,f=e.documentElement,g=t.setTimeout,u=e.getElementsByTagName("script")[0],m={}.toString,v=[],_=0,b="MozAppearance"in f.style,x=b&&!!e.createRange().compareNode,y=x?f:u.parentNode,f=t.opera&&"[object Opera]"==m.call(t.opera),f=!!e.attachEvent&&!f,C=b?"object":f?"script":"img",w=f?"script":C,k=Array.isArray||function(t){return"[object Array]"==m.call(t)},$=[],j={},T={timeout:function(t,e){return e.length&&(t.timeout=e[0]),t}};p=function(t){function e(t){var e,i,s,t=t.split("!"),n=$.length,o=t.pop(),a=t.length,o={url:o,origUrl:o,prefixes:t};for(i=0;a>i;i++)s=t[i].split("="),(e=T[s.shift()])&&(o=e(o,s));for(i=0;n>i;i++)o=$[i](o);return o}function a(t,n,o,a,r){var l=e(t),c=l.autoCallback;l.url.split(".").pop().split("?").shift(),l.bypass||(n&&(n=s(n)?n:n[t]||n[a]||n[t.split("/").pop().split("?")[0]]),l.instead?l.instead(t,n,o,a,r):(j[l.url]?l.noexec=!0:j[l.url]=1,o.load(l.url,l.forceCSS||!l.forceJS&&"css"==l.url.split(".").pop().split("?").shift()?"c":i,l.noexec,l.attrs,l.timeout),(s(n)||s(c))&&o.load(function(){d(),n&&n(l.origUrl,r,a),c&&c(l.origUrl,r,a),j[l.url]=2})))}function r(t,e){function i(t,i){if(t){if(n(t))i||(h=function(){var t=[].slice.call(arguments);p.apply(this,t),f()}),a(t,h,e,0,c);else if(Object(t)===t)for(l in r=function(){var e,i=0;for(e in t)t.hasOwnProperty(e)&&i++;return i}(),t)t.hasOwnProperty(l)&&(!i&&!--r&&(s(h)?h=function(){var t=[].slice.call(arguments);p.apply(this,t),f()}:h[l]=function(t){return function(){var e=[].slice.call(arguments);t&&t.apply(this,e),f()}}(p[l])),a(t[l],h,e,l,c))}else!i&&f()}var r,l,c=!!t.test,d=t.load||t.both,h=t.callback||o,p=h,f=t.complete||o;i(c?t.yep:t.nope,!!d),d&&i(d)}var l,c,h=this.yepnope.loader;if(n(t))a(t,0,h,0);else if(k(t))for(l=0;t.length>l;l++)c=t[l],n(c)?a(c,0,h,0):k(c)?p(c):Object(c)===c&&r(c,h);else Object(t)===t&&r(t,h)},p.addPrefix=function(t,e){T[t]=e},p.addFilter=function(t){$.push(t)},p.errorTimeout=1e4,null==e.readyState&&e.addEventListener&&(e.readyState="loading",e.addEventListener("DOMContentLoaded",h=function(){e.removeEventListener("DOMContentLoaded",h,0),e.readyState="complete"},0)),t.yepnope=d(),t.yepnope.executeStack=r,t.yepnope.injectJs=function(t,i,s,n,l,c){var d,h,f=e.createElement("script"),n=n||p.errorTimeout;f.src=t;for(h in s)f.setAttribute(h,s[h]);i=c?r:i||o,f.onreadystatechange=f.onload=function(){!d&&a(f.readyState)&&(d=1,i(),f.onload=f.onreadystatechange=null)},g(function(){d||(d=1,i(1))},n),l?f.onload():u.parentNode.insertBefore(f,u)},t.yepnope.injectCss=function(t,i,s,n,a,l){var c,n=e.createElement("link"),i=l?r:i||o;n.href=t,n.rel="stylesheet",n.type="text/css";for(c in s)n.setAttribute(c,s[c]);a||(u.parentNode.insertBefore(n,u),g(i,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("ie8compat",function(){return!window.addEventListener&&document.documentMode&&7===document.documentMode});