/* * Note: While Microsoft is not the author of this file, Microsoft is * offering you a license subject to the terms of the Microsoft Software * License Terms for Microsoft ASP.NET Model View Controller 3. * Microsoft reserves all other rights. The notices below are provided * for informational purposes only and are not the license terms under * which Microsoft distributed this file. * * Modernizr v1.7 * http://www.modernizr.com * * Developed by: * - Faruk Ates http://farukat.es/ * - Paul Irish http://paulirish.com/ * * Copyright (c) 2009-2011 */ window.Modernizr=function(f,b,h){var G="1.7",d={},y=true,e=b.documentElement,B=b.head||b.getElementsByTagName("head")[0],H="modernizr",v=b.createElement(H),i=v.style,c=b.createElement("input"),w=":)",z=Object.prototype.toString,j=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),s="Webkit Moz O ms Khtml".split(" "),o={svg:"http://www.w3.org/2000/svg"},a={},C={},D={},A=[],n,x=function(f){var c=b.createElement("style"),a=b.createElement("div"),d;c.textContent=f+"{#modernizr{height:3px}}";B.appendChild(c);a.id="modernizr";e.appendChild(a);d=a.offsetHeight===3;c.parentNode.removeChild(c);a.parentNode.removeChild(a);return!!d},p=function(){var c={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function a(d,a){a=a||b.createElement(c[d]||"div");d="on"+d;var e=d in a;if(!e){if(!a.setAttribute)a=b.createElement("div");if(a.setAttribute&&a.removeAttribute){a.setAttribute(d,"");e=l(a[d],"function");if(!l(a[d],h))a[d]=h;a.removeAttribute(d)}}a=null;return e}return a}(),q={}.hasOwnProperty,r;if(!l(q,h)&&!l(q.call,h))r=function(b,a){return q.call(b,a)};else r=function(b,a){return a in b&&l(b.constructor.prototype[a],h)};function k(a){i.cssText=a}function E(a,b){return k(j.join(a+";")+(b||""))}function l(b,a){return typeof b===a}function m(b,a){return(""+b).indexOf(a)!==-1}function t(a,b){for(var c in a)if(i[a[c]]!==h&&(!b||b(a[c],v)))return true}function g(a,c){var b=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+s.join(b+" ")+b).split(" ");return!!t(d,c)}a.flexbox=function(){function f(b,a,d,c){a+=":";b.style.cssText=(a+j.join(d+";"+a)).slice(0,-a.length)+(c||"")}function d(b,a,d,c){b.style.cssText=j.join(a+":"+d+";")+(c||"")}var a=b.createElement("div"),c=b.createElement("div");f(a,"display","box","width:42px;padding:0;");d(c,"box-flex","1","width:10px;");a.appendChild(c);e.appendChild(a);var g=c.offsetWidth===42;a.removeChild(c);e.removeChild(a);return g};a.canvas=function(){var a=b.createElement("canvas");return!!(a.getContext&&a.getContext("2d"))};a.canvastext=function(){return!!(d.canvas&&l(b.createElement("canvas").getContext("2d").fillText,"function"))};a.webgl=function(){return!!f.WebGLRenderingContext};a.touch=function(){return"ontouchstart"in f||x("@media ("+j.join("touch-enabled),(")+"modernizr)")};a.geolocation=function(){return!!navigator.geolocation};a.postmessage=function(){return!!f.postMessage};a.websqldatabase=function(){return!!f.openDatabase};a.indexedDB=function(){for(var b=-1,c=s.length;++b7)};a.history=function(){return!!(f.history&&history.pushState)};a.draganddrop=function(){return p("dragstart")&&p("drop")};a.websockets=function(){return"WebSocket"in f};a.rgba=function(){k("background-color:rgba(150,255,150,.5)");return m(i.backgroundColor,"rgba")};a.hsla=function(){k("background-color:hsla(120,40%,100%,.5)");return m(i.backgroundColor,"rgba")||m(i.backgroundColor,"hsla")};a.multiplebgs=function(){k("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(i.background)};a.backgroundsize=function(){return g("backgroundSize")};a.borderimage=function(){return g("borderImage")};a.borderradius=function(){return g("borderRadius","",function(a){return m(a,"orderRadius")})};a.boxshadow=function(){return g("boxShadow")};a.textshadow=function(){return b.createElement("div").style.textShadow===""};a.opacity=function(){E("opacity:.55");return/^0.55$/.test(i.opacity)};a.cssanimations=function(){return g("animationName")};a.csscolumns=function(){return g("columnCount")};a.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";k((a+j.join(b+a)+j.join(c+a)).slice(0,-a.length));return m(i.backgroundImage,"gradient")};a.cssreflections=function(){return g("boxReflect")};a.csstransforms=function(){return!!t(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};a.csstransforms3d=function(){var a=!!t(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a&&"webkitPerspective"in e.style)a=x("@media ("+j.join("transform-3d),(")+"modernizr)");return a};a.csstransitions=function(){return g("transitionProperty")};a.fontface=function(){var a,f,d=B||e,c=b.createElement("style"),h=b.implementation||{hasFeature:function(){return false}};c.type="text/css";d.insertBefore(c,d.firstChild);a=c.sheet||c.styleSheet;var g=h.hasFeature("CSS2","")?function(c){if(!(a&&c))return false;var b=false;try{a.insertRule(c,0);b=/src/i.test(a.cssRules[0].cssText);a.deleteRule(a.cssRules.length-1)}catch(d){}return b}:function(b){if(!(a&&b))return false;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};f=g('@font-face { font-family: "font"; src: url(data:,); }');d.removeChild(c);return f};a.video=function(){var c=b.createElement("video"),a=!!c.canPlayType;if(a){a=new Boolean(a);a.ogg=c.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';a.h264=c.canPlayType(d+'"')||c.canPlayType(d+', mp4a.40.2"');a.webm=c.canPlayType('video/webm; codecs="vp8, vorbis"')}return a};a.audio=function(){var c=b.createElement("audio"),a=!!c.canPlayType;if(a){a=new Boolean(a);a.ogg=c.canPlayType('audio/ogg; codecs="vorbis"');a.mp3=c.canPlayType("audio/mpeg;");a.wav=c.canPlayType('audio/wav; codecs="1"');a.m4a=c.canPlayType("audio/x-m4a;")||c.canPlayType("audio/aac;")}return a};a.localstorage=function(){try{return!!localStorage.getItem}catch(a){return false}};a.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return false}};a.webWorkers=function(){return!!f.Worker};a.applicationcache=function(){return!!f.applicationCache};a.svg=function(){return!!b.createElementNS&&!!b.createElementNS(o.svg,"svg").createSVGRect};a.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="";return(a.firstChild&&a.firstChild.namespaceURI)==o.svg};a.smil=function(){return!!b.createElementNS&&/SVG/.test(z.call(b.createElementNS(o.svg,"animate")))};a.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(z.call(b.createElementNS(o.svg,"clipPath")))};function F(){d.input=function(b){for(var a=0,d=b.length;a";return a.childNodes.length!==1}()&&(function(m,a){var f="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",e=f.split("|"),h=e.length,n=new RegExp("(^|\\s)("+f+")","gi"),p=new RegExp("<(/*)("+f+")","gi"),o=new RegExp("(^|[^\\n]*?\\s)("+f+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=a.createDocumentFragment(),g=a.documentElement,k=g.firstChild,c=a.createElement("body"),d=a.createElement("style"),b;function l(b){var a=-1;while(++a