modernizr.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. /* Modernizr 2.7.1 (Custom Build) | MIT & BSD
  2. * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
  3. */
  4. ;
  5. window.Modernizr = (function( window, document, undefined ) {
  6. var version = '2.7.1',
  7. Modernizr = {},
  8. enableClasses = true,
  9. docElement = document.documentElement,
  10. mod = 'modernizr',
  11. modElem = document.createElement(mod),
  12. mStyle = modElem.style,
  13. inputElem = document.createElement('input') ,
  14. smile = ':)',
  15. toString = {}.toString,
  16. prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
  17. omPrefixes = 'Webkit Moz O ms',
  18. cssomPrefixes = omPrefixes.split(' '),
  19. domPrefixes = omPrefixes.toLowerCase().split(' '),
  20. ns = {'svg': 'http://www.w3.org/2000/svg'},
  21. tests = {},
  22. inputs = {},
  23. attrs = {},
  24. classes = [],
  25. slice = classes.slice,
  26. featureName,
  27. injectElementWithStyles = function( rule, callback, nodes, testnames ) {
  28. var style, ret, node, docOverflow,
  29. div = document.createElement('div'),
  30. body = document.body,
  31. fakeBody = body || document.createElement('body');
  32. if ( parseInt(nodes, 10) ) {
  33. while ( nodes-- ) {
  34. node = document.createElement('div');
  35. node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
  36. div.appendChild(node);
  37. }
  38. }
  39. style = ['&#173;','<style id="s', mod, '">', rule, '</style>'].join('');
  40. div.id = mod;
  41. (body ? div : fakeBody).innerHTML += style;
  42. fakeBody.appendChild(div);
  43. if ( !body ) {
  44. fakeBody.style.background = '';
  45. fakeBody.style.overflow = 'hidden';
  46. docOverflow = docElement.style.overflow;
  47. docElement.style.overflow = 'hidden';
  48. docElement.appendChild(fakeBody);
  49. }
  50. ret = callback(div, rule);
  51. if ( !body ) {
  52. fakeBody.parentNode.removeChild(fakeBody);
  53. docElement.style.overflow = docOverflow;
  54. } else {
  55. div.parentNode.removeChild(div);
  56. }
  57. return !!ret;
  58. },
  59. isEventSupported = (function() {
  60. var TAGNAMES = {
  61. 'select': 'input', 'change': 'input',
  62. 'submit': 'form', 'reset': 'form',
  63. 'error': 'img', 'load': 'img', 'abort': 'img'
  64. };
  65. function isEventSupported( eventName, element ) {
  66. element = element || document.createElement(TAGNAMES[eventName] || 'div');
  67. eventName = 'on' + eventName;
  68. var isSupported = eventName in element;
  69. if ( !isSupported ) {
  70. if ( !element.setAttribute ) {
  71. element = document.createElement('div');
  72. }
  73. if ( element.setAttribute && element.removeAttribute ) {
  74. element.setAttribute(eventName, '');
  75. isSupported = is(element[eventName], 'function');
  76. if ( !is(element[eventName], 'undefined') ) {
  77. element[eventName] = undefined;
  78. }
  79. element.removeAttribute(eventName);
  80. }
  81. }
  82. element = null;
  83. return isSupported;
  84. }
  85. return isEventSupported;
  86. })(),
  87. _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
  88. if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
  89. hasOwnProp = function (object, property) {
  90. return _hasOwnProperty.call(object, property);
  91. };
  92. }
  93. else {
  94. hasOwnProp = function (object, property) {
  95. return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
  96. };
  97. }
  98. if (!Function.prototype.bind) {
  99. Function.prototype.bind = function bind(that) {
  100. var target = this;
  101. if (typeof target != "function") {
  102. throw new TypeError();
  103. }
  104. var args = slice.call(arguments, 1),
  105. bound = function () {
  106. if (this instanceof bound) {
  107. var F = function(){};
  108. F.prototype = target.prototype;
  109. var self = new F();
  110. var result = target.apply(
  111. self,
  112. args.concat(slice.call(arguments))
  113. );
  114. if (Object(result) === result) {
  115. return result;
  116. }
  117. return self;
  118. } else {
  119. return target.apply(
  120. that,
  121. args.concat(slice.call(arguments))
  122. );
  123. }
  124. };
  125. return bound;
  126. };
  127. }
  128. function setCss( str ) {
  129. mStyle.cssText = str;
  130. }
  131. function setCssAll( str1, str2 ) {
  132. return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
  133. }
  134. function is( obj, type ) {
  135. return typeof obj === type;
  136. }
  137. function contains( str, substr ) {
  138. return !!~('' + str).indexOf(substr);
  139. }
  140. function testProps( props, prefixed ) {
  141. for ( var i in props ) {
  142. var prop = props[i];
  143. if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
  144. return prefixed == 'pfx' ? prop : true;
  145. }
  146. }
  147. return false;
  148. }
  149. function testDOMProps( props, obj, elem ) {
  150. for ( var i in props ) {
  151. var item = obj[props[i]];
  152. if ( item !== undefined) {
  153. if (elem === false) return props[i];
  154. if (is(item, 'function')){
  155. return item.bind(elem || obj);
  156. }
  157. return item;
  158. }
  159. }
  160. return false;
  161. }
  162. function testPropsAll( prop, prefixed, elem ) {
  163. var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
  164. props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
  165. if(is(prefixed, "string") || is(prefixed, "undefined")) {
  166. return testProps(props, prefixed);
  167. } else {
  168. props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
  169. return testDOMProps(props, prefixed, elem);
  170. }
  171. } tests['flexbox'] = function() {
  172. return testPropsAll('flexWrap');
  173. }; tests['canvas'] = function() {
  174. var elem = document.createElement('canvas');
  175. return !!(elem.getContext && elem.getContext('2d'));
  176. };
  177. tests['canvastext'] = function() {
  178. return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
  179. };
  180. tests['webgl'] = function() {
  181. return !!window.WebGLRenderingContext;
  182. };
  183. tests['touch'] = function() {
  184. var bool;
  185. if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
  186. bool = true;
  187. } else {
  188. injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
  189. bool = node.offsetTop === 9;
  190. });
  191. }
  192. return bool;
  193. };
  194. tests['geolocation'] = function() {
  195. return 'geolocation' in navigator;
  196. };
  197. tests['postmessage'] = function() {
  198. return !!window.postMessage;
  199. };
  200. tests['websqldatabase'] = function() {
  201. return !!window.openDatabase;
  202. };
  203. tests['indexedDB'] = function() {
  204. return !!testPropsAll("indexedDB", window);
  205. };
  206. tests['hashchange'] = function() {
  207. return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
  208. };
  209. tests['history'] = function() {
  210. return !!(window.history && history.pushState);
  211. };
  212. tests['draganddrop'] = function() {
  213. var div = document.createElement('div');
  214. return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
  215. };
  216. tests['websockets'] = function() {
  217. return 'WebSocket' in window || 'MozWebSocket' in window;
  218. };
  219. tests['rgba'] = function() {
  220. setCss('background-color:rgba(150,255,150,.5)');
  221. return contains(mStyle.backgroundColor, 'rgba');
  222. };
  223. tests['hsla'] = function() {
  224. setCss('background-color:hsla(120,40%,100%,.5)');
  225. return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
  226. };
  227. tests['multiplebgs'] = function() {
  228. setCss('background:url(https://),url(https://),red url(https://)');
  229. return (/(url\s*\(.*?){3}/).test(mStyle.background);
  230. }; tests['backgroundsize'] = function() {
  231. return testPropsAll('backgroundSize');
  232. };
  233. tests['borderimage'] = function() {
  234. return testPropsAll('borderImage');
  235. };
  236. tests['borderradius'] = function() {
  237. return testPropsAll('borderRadius');
  238. };
  239. tests['boxshadow'] = function() {
  240. return testPropsAll('boxShadow');
  241. };
  242. tests['textshadow'] = function() {
  243. return document.createElement('div').style.textShadow === '';
  244. };
  245. tests['opacity'] = function() {
  246. setCssAll('opacity:.55');
  247. return (/^0.55$/).test(mStyle.opacity);
  248. };
  249. tests['cssanimations'] = function() {
  250. return testPropsAll('animationName');
  251. };
  252. tests['csscolumns'] = function() {
  253. return testPropsAll('columnCount');
  254. };
  255. tests['cssgradients'] = function() {
  256. var str1 = 'background-image:',
  257. str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
  258. str3 = 'linear-gradient(left top,#9f9, white);';
  259. setCss(
  260. (str1 + '-webkit- '.split(' ').join(str2 + str1) +
  261. prefixes.join(str3 + str1)).slice(0, -str1.length)
  262. );
  263. return contains(mStyle.backgroundImage, 'gradient');
  264. };
  265. tests['cssreflections'] = function() {
  266. return testPropsAll('boxReflect');
  267. };
  268. tests['csstransforms'] = function() {
  269. return !!testPropsAll('transform');
  270. };
  271. tests['csstransforms3d'] = function() {
  272. var ret = !!testPropsAll('perspective');
  273. if ( ret && 'webkitPerspective' in docElement.style ) {
  274. injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
  275. ret = node.offsetLeft === 9 && node.offsetHeight === 3;
  276. });
  277. }
  278. return ret;
  279. };
  280. tests['csstransitions'] = function() {
  281. return testPropsAll('transition');
  282. };
  283. tests['fontface'] = function() {
  284. var bool;
  285. injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
  286. var style = document.getElementById('smodernizr'),
  287. sheet = style.sheet || style.styleSheet,
  288. cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
  289. bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
  290. });
  291. return bool;
  292. };
  293. tests['generatedcontent'] = function() {
  294. var bool;
  295. injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
  296. bool = node.offsetHeight >= 3;
  297. });
  298. return bool;
  299. };
  300. tests['video'] = function() {
  301. var elem = document.createElement('video'),
  302. bool = false;
  303. try {
  304. if ( bool = !!elem.canPlayType ) {
  305. bool = new Boolean(bool);
  306. bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,'');
  307. bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
  308. bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
  309. }
  310. } catch(e) { }
  311. return bool;
  312. };
  313. tests['audio'] = function() {
  314. var elem = document.createElement('audio'),
  315. bool = false;
  316. try {
  317. if ( bool = !!elem.canPlayType ) {
  318. bool = new Boolean(bool);
  319. bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
  320. bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,'');
  321. bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
  322. bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
  323. elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
  324. }
  325. } catch(e) { }
  326. return bool;
  327. };
  328. tests['localstorage'] = function() {
  329. try {
  330. localStorage.setItem(mod, mod);
  331. localStorage.removeItem(mod);
  332. return true;
  333. } catch(e) {
  334. return false;
  335. }
  336. };
  337. tests['sessionstorage'] = function() {
  338. try {
  339. sessionStorage.setItem(mod, mod);
  340. sessionStorage.removeItem(mod);
  341. return true;
  342. } catch(e) {
  343. return false;
  344. }
  345. };
  346. tests['webworkers'] = function() {
  347. return !!window.Worker;
  348. };
  349. tests['applicationcache'] = function() {
  350. return !!window.applicationCache;
  351. };
  352. tests['svg'] = function() {
  353. return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
  354. };
  355. tests['inlinesvg'] = function() {
  356. var div = document.createElement('div');
  357. div.innerHTML = '<svg/>';
  358. return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
  359. };
  360. tests['smil'] = function() {
  361. return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
  362. };
  363. tests['svgclippaths'] = function() {
  364. return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
  365. };
  366. function webforms() {
  367. Modernizr['input'] = (function( props ) {
  368. for ( var i = 0, len = props.length; i < len; i++ ) {
  369. attrs[ props[i] ] = !!(props[i] in inputElem);
  370. }
  371. if (attrs.list){
  372. attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
  373. }
  374. return attrs;
  375. })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
  376. Modernizr['inputtypes'] = (function(props) {
  377. for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
  378. inputElem.setAttribute('type', inputElemType = props[i]);
  379. bool = inputElem.type !== 'text';
  380. if ( bool ) {
  381. inputElem.value = smile;
  382. inputElem.style.cssText = 'position:absolute;visibility:hidden;';
  383. if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
  384. docElement.appendChild(inputElem);
  385. defaultView = document.defaultView;
  386. bool = defaultView.getComputedStyle &&
  387. defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
  388. (inputElem.offsetHeight !== 0);
  389. docElement.removeChild(inputElem);
  390. } else if ( /^(search|tel)$/.test(inputElemType) ){
  391. } else if ( /^(url|email)$/.test(inputElemType) ) {
  392. bool = inputElem.checkValidity && inputElem.checkValidity() === false;
  393. } else {
  394. bool = inputElem.value != smile;
  395. }
  396. }
  397. inputs[ props[i] ] = !!bool;
  398. }
  399. return inputs;
  400. })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
  401. }
  402. for ( var feature in tests ) {
  403. if ( hasOwnProp(tests, feature) ) {
  404. featureName = feature.toLowerCase();
  405. Modernizr[featureName] = tests[feature]();
  406. classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
  407. }
  408. }
  409. Modernizr.input || webforms();
  410. Modernizr.addTest = function ( feature, test ) {
  411. if ( typeof feature == 'object' ) {
  412. for ( var key in feature ) {
  413. if ( hasOwnProp( feature, key ) ) {
  414. Modernizr.addTest( key, feature[ key ] );
  415. }
  416. }
  417. } else {
  418. feature = feature.toLowerCase();
  419. if ( Modernizr[feature] !== undefined ) {
  420. return Modernizr;
  421. }
  422. test = typeof test == 'function' ? test() : test;
  423. if (typeof enableClasses !== "undefined" && enableClasses) {
  424. docElement.className += ' ' + (test ? '' : 'no-') + feature;
  425. }
  426. Modernizr[feature] = test;
  427. }
  428. return Modernizr;
  429. };
  430. setCss('');
  431. modElem = inputElem = null;
  432. ;(function(window, document) {
  433. var version = '3.7.0';
  434. var options = window.html5 || {};
  435. var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
  436. var saveClones = /^(?: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;
  437. var supportsHtml5Styles;
  438. var expando = '_html5shiv';
  439. var expanID = 0;
  440. var expandoData = {};
  441. var supportsUnknownElements;
  442. (function() {
  443. try {
  444. var a = document.createElement('a');
  445. a.innerHTML = '<xyz></xyz>';
  446. supportsHtml5Styles = ('hidden' in a);
  447. supportsUnknownElements = a.childNodes.length == 1 || (function() {
  448. (document.createElement)('a');
  449. var frag = document.createDocumentFragment();
  450. return (
  451. typeof frag.cloneNode == 'undefined' ||
  452. typeof frag.createDocumentFragment == 'undefined' ||
  453. typeof frag.createElement == 'undefined'
  454. );
  455. }());
  456. } catch(e) {
  457. supportsHtml5Styles = true;
  458. supportsUnknownElements = true;
  459. }
  460. }());
  461. function addStyleSheet(ownerDocument, cssText) {
  462. var p = ownerDocument.createElement('p'),
  463. parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
  464. p.innerHTML = 'x<style>' + cssText + '</style>';
  465. return parent.insertBefore(p.lastChild, parent.firstChild);
  466. }
  467. function getElements() {
  468. var elements = html5.elements;
  469. return typeof elements == 'string' ? elements.split(' ') : elements;
  470. }
  471. function getExpandoData(ownerDocument) {
  472. var data = expandoData[ownerDocument[expando]];
  473. if (!data) {
  474. data = {};
  475. expanID++;
  476. ownerDocument[expando] = expanID;
  477. expandoData[expanID] = data;
  478. }
  479. return data;
  480. }
  481. function createElement(nodeName, ownerDocument, data){
  482. if (!ownerDocument) {
  483. ownerDocument = document;
  484. }
  485. if(supportsUnknownElements){
  486. return ownerDocument.createElement(nodeName);
  487. }
  488. if (!data) {
  489. data = getExpandoData(ownerDocument);
  490. }
  491. var node;
  492. if (data.cache[nodeName]) {
  493. node = data.cache[nodeName].cloneNode();
  494. } else if (saveClones.test(nodeName)) {
  495. node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
  496. } else {
  497. node = data.createElem(nodeName);
  498. }
  499. return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
  500. }
  501. function createDocumentFragment(ownerDocument, data){
  502. if (!ownerDocument) {
  503. ownerDocument = document;
  504. }
  505. if(supportsUnknownElements){
  506. return ownerDocument.createDocumentFragment();
  507. }
  508. data = data || getExpandoData(ownerDocument);
  509. var clone = data.frag.cloneNode(),
  510. i = 0,
  511. elems = getElements(),
  512. l = elems.length;
  513. for(;i<l;i++){
  514. clone.createElement(elems[i]);
  515. }
  516. return clone;
  517. }
  518. function shivMethods(ownerDocument, data) {
  519. if (!data.cache) {
  520. data.cache = {};
  521. data.createElem = ownerDocument.createElement;
  522. data.createFrag = ownerDocument.createDocumentFragment;
  523. data.frag = data.createFrag();
  524. }
  525. ownerDocument.createElement = function(nodeName) {
  526. if (!html5.shivMethods) {
  527. return data.createElem(nodeName);
  528. }
  529. return createElement(nodeName, ownerDocument, data);
  530. };
  531. ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
  532. 'var n=f.cloneNode(),c=n.createElement;' +
  533. 'h.shivMethods&&(' +
  534. getElements().join().replace(/[\w\-]+/g, function(nodeName) {
  535. data.createElem(nodeName);
  536. data.frag.createElement(nodeName);
  537. return 'c("' + nodeName + '")';
  538. }) +
  539. ');return n}'
  540. )(html5, data.frag);
  541. }
  542. function shivDocument(ownerDocument) {
  543. if (!ownerDocument) {
  544. ownerDocument = document;
  545. }
  546. var data = getExpandoData(ownerDocument);
  547. if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
  548. data.hasCSS = !!addStyleSheet(ownerDocument,
  549. 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
  550. 'mark{background:#FF0;color:#000}' +
  551. 'template{display:none}'
  552. );
  553. }
  554. if (!supportsUnknownElements) {
  555. shivMethods(ownerDocument, data);
  556. }
  557. return ownerDocument;
  558. }
  559. var html5 = {
  560. 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
  561. 'version': version,
  562. 'shivCSS': (options.shivCSS !== false),
  563. 'supportsUnknownElements': supportsUnknownElements,
  564. 'shivMethods': (options.shivMethods !== false),
  565. 'type': 'default',
  566. 'shivDocument': shivDocument,
  567. createElement: createElement,
  568. createDocumentFragment: createDocumentFragment
  569. };
  570. window.html5 = html5;
  571. shivDocument(document);
  572. }(this, document));
  573. Modernizr._version = version;
  574. Modernizr._prefixes = prefixes;
  575. Modernizr._domPrefixes = domPrefixes;
  576. Modernizr._cssomPrefixes = cssomPrefixes;
  577. Modernizr.hasEvent = isEventSupported;
  578. Modernizr.testProp = function(prop){
  579. return testProps([prop]);
  580. };
  581. Modernizr.testAllProps = testPropsAll;
  582. Modernizr.testStyles = injectElementWithStyles;
  583. Modernizr.prefixed = function(prop, obj, elem){
  584. if(!obj) {
  585. return testPropsAll(prop, 'pfx');
  586. } else {
  587. return testPropsAll(prop, obj, elem);
  588. }
  589. };
  590. docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
  591. (enableClasses ? ' js ' + classes.join(' ') : '');
  592. return Modernizr;
  593. })(this, this.document);
  594. /*yepnope1.5.4|WTFPL*/
  595. (function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}})(this,document);
  596. Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0));};
  597. ;