modernizr.2.5.3.min.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. /* Modernizr 2.5.3 (Custom Build) | MIT & BSD
  2. * Build: http://www.modernizr.com/download/#-csstransforms-csstransforms3d-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
  3. */
  4. ;
  5. window.Modernizr = function(a, b, c) {
  6. function z(a) {
  7. j.cssText = a
  8. }
  9. function A(a, b) {
  10. return z(m.join(a + ";") + (b || ""))
  11. }
  12. function B(a, b) {
  13. return typeof a === b
  14. }
  15. function C(a, b) {
  16. return !!~("" + a).indexOf(b)
  17. }
  18. function D(a, b) {
  19. for (var d in a)
  20. if (j[a[d]] !== c) return b == "pfx" ? a[d] : !0;
  21. return !1
  22. }
  23. function E(a, b, d) {
  24. for (var e in a) {
  25. var f = b[a[e]];
  26. if (f !== c) return d === !1 ? a[e] : B(f, "function") ? f.bind(d || b) : f
  27. }
  28. return !1
  29. }
  30. function F(a, b, c) {
  31. var d = a.charAt(0).toUpperCase() + a.substr(1),
  32. e = (a + " " + o.join(d + " ") + d).split(" ");
  33. return B(b, "string") || B(b, "undefined") ? D(e, b) : (e = (a + " " + p.join(d + " ") + d).split(" "), E(e, b, c))
  34. }
  35. var d = "2.5.3",
  36. e = {},
  37. f = !0,
  38. g = b.documentElement,
  39. h = "modernizr",
  40. i = b.createElement(h),
  41. j = i.style,
  42. k, l = {}.toString,
  43. m = " -webkit- -moz- -o- -ms- ".split(" "),
  44. n = "Webkit Moz O ms",
  45. o = n.split(" "),
  46. p = n.toLowerCase().split(" "),
  47. q = {},
  48. r = {},
  49. s = {},
  50. t = [],
  51. u = t.slice,
  52. v, w = function(a, c, d, e) {
  53. var f, i, j, k = b.createElement("div"),
  54. l = b.body,
  55. m = l ? l : b.createElement("body");
  56. if (parseInt(d, 10))
  57. while (d--) j = b.createElement("div"), j.id = e ? e[d] : h + (d + 1), k.appendChild(j);
  58. return f = ["&#173;", "<style>", a, "</style>"].join(""), k.id = h, (l ? k : m).innerHTML += f, m.appendChild(k), l || (m.style.background = "", g.appendChild(m)), i = c(k, a), l ? k.parentNode.removeChild(k) : m.parentNode.removeChild(m), !!i
  59. },
  60. x = {}.hasOwnProperty,
  61. y;
  62. !B(x, "undefined") && !B(x.call, "undefined") ? y = function(a, b) {
  63. return x.call(a, b)
  64. } : y = function(a, b) {
  65. return b in a && B(a.constructor.prototype[b], "undefined")
  66. }, Function.prototype.bind || (Function.prototype.bind = function(b) {
  67. var c = this;
  68. if (typeof c != "function") throw new TypeError;
  69. var d = u.call(arguments, 1),
  70. e = function() {
  71. if (this instanceof e) {
  72. var a = function() {};
  73. a.prototype = c.prototype;
  74. var f = new a,
  75. g = c.apply(f, d.concat(u.call(arguments)));
  76. return Object(g) === g ? g : f
  77. }
  78. return c.apply(b, d.concat(u.call(arguments)))
  79. };
  80. return e
  81. });
  82. var G = function(a, c) {
  83. var d = a.join(""),
  84. f = c.length;
  85. w(d, function(a, c) {
  86. var d = b.styleSheets[b.styleSheets.length - 1],
  87. g = d ? d.cssRules && d.cssRules[0] ? d.cssRules[0].cssText : d.cssText || "" : "",
  88. h = a.childNodes,
  89. i = {};
  90. while (f--) i[h[f].id] = h[f];
  91. e.csstransforms3d = (i.csstransforms3d && i.csstransforms3d.offsetLeft) === 9 && i.csstransforms3d.offsetHeight === 3
  92. }, f, c)
  93. }([, ["@media (", m.join("transform-3d),("), h, ")", "{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join("")], [, "csstransforms3d"]);
  94. q.csstransforms = function() {
  95. return !!F("transform")
  96. }, q.csstransforms3d = function() {
  97. var a = !!F("perspective");
  98. return a && "webkitPerspective" in g.style && (a = e.csstransforms3d), a
  99. };
  100. for (var H in q) y(q, H) && (v = H.toLowerCase(), e[v] = q[H](), t.push((e[v] ? "" : "no-") + v));
  101. return z(""), i = k = null,
  102. function(a, b) {
  103. function g(a, b) {
  104. var c = a.createElement("p"),
  105. d = a.getElementsByTagName("head")[0] || a.documentElement;
  106. return c.innerHTML = "x<style>" + b + "</style>", d.insertBefore(c.lastChild, d.firstChild)
  107. }
  108. function h() {
  109. var a = k.elements;
  110. return typeof a == "string" ? a.split(" ") : a
  111. }
  112. function i(a) {
  113. var b = {},
  114. c = a.createElement,
  115. e = a.createDocumentFragment,
  116. f = e();
  117. a.createElement = function(a) {
  118. var e = (b[a] || (b[a] = c(a))).cloneNode();
  119. return k.shivMethods && e.canHaveChildren && !d.test(a) ? f.appendChild(e) : e
  120. }, a.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + h().join().replace(/\w+/g, function(a) {
  121. return b[a] = c(a), f.createElement(a), 'c("' + a + '")'
  122. }) + ");return n}")(k, f)
  123. }
  124. function j(a) {
  125. var b;
  126. return a.documentShived ? a : (k.shivCSS && !e && (b = !!g(a, "article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")), f || (b = !i(a)), b && (a.documentShived = b), a)
  127. }
  128. var c = a.html5 || {},
  129. d = /^<|^(?:button|form|map|select|textarea)$/i,
  130. e, f;
  131. (function() {
  132. var a = b.createElement("a");
  133. a.innerHTML = "<xyz></xyz>", e = "hidden" in a, f = a.childNodes.length == 1 || function() {
  134. try {
  135. b.createElement("a")
  136. } catch (a) {
  137. return !0
  138. }
  139. var c = b.createDocumentFragment();
  140. return typeof c.cloneNode == "undefined" || typeof c.createDocumentFragment == "undefined" || typeof c.createElement == "undefined"
  141. }()
  142. })();
  143. var k = {
  144. elements: c.elements || "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",
  145. shivCSS: c.shivCSS !== !1,
  146. shivMethods: c.shivMethods !== !1,
  147. type: "default",
  148. shivDocument: j
  149. };
  150. a.html5 = k, j(b)
  151. }(this, b), e._version = d, e._prefixes = m, e._domPrefixes = p, e._cssomPrefixes = o, e.testProp = function(a) {
  152. return D([a])
  153. }, e.testAllProps = F, e.testStyles = w, g.className = g.className.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (f ? " js " + t.join(" ") : ""), e
  154. }(this, this.document),
  155. function(a, b, c) {
  156. function d(a) {
  157. return o.call(a) == "[object Function]"
  158. }
  159. function e(a) {
  160. return typeof a == "string"
  161. }
  162. function f() {}
  163. function g(a) {
  164. return !a || a == "loaded" || a == "complete" || a == "uninitialized"
  165. }
  166. function h() {
  167. var a = p.shift();
  168. q = 1, a ? a.t ? m(function() {
  169. (a.t == "c" ? B.injectCss : B.injectJs)(a.s, 0, a.a, a.x, a.e, 1)
  170. }, 0) : (a(), h()) : q = 0
  171. }
  172. function i(a, c, d, e, f, i, j) {
  173. function k(b) {
  174. if (!o && g(l.readyState) && (u.r = o = 1, !q && h(), l.onload = l.onreadystatechange = null, b)) {
  175. a != "img" && m(function() {
  176. t.removeChild(l)
  177. }, 50);
  178. for (var d in y[c]) y[c].hasOwnProperty(d) && y[c][d].onload()
  179. }
  180. }
  181. var j = j || B.errorTimeout,
  182. l = {},
  183. o = 0,
  184. r = 0,
  185. u = {
  186. t: d,
  187. s: c,
  188. e: f,
  189. a: i,
  190. x: j
  191. };
  192. y[c] === 1 && (r = 1, y[c] = [], l = b.createElement(a)), a == "object" ? l.data = c : (l.src = c, l.type = a), l.width = l.height = "0", l.onerror = l.onload = l.onreadystatechange = function() {
  193. k.call(this, r)
  194. }, p.splice(e, 0, u), a != "img" && (r || y[c] === 2 ? (t.insertBefore(l, s ? null : n), m(k, j)) : y[c].push(l))
  195. }
  196. function j(a, b, c, d, f) {
  197. return q = 0, b = b || "j", e(a) ? i(b == "c" ? v : u, a, b, this.i++, c, d, f) : (p.splice(this.i++, 0, a), p.length == 1 && h()), this
  198. }
  199. function k() {
  200. var a = B;
  201. return a.loader = {
  202. load: j,
  203. i: 0
  204. }, a
  205. }
  206. var l = b.documentElement,
  207. m = a.setTimeout,
  208. n = b.getElementsByTagName("script")[0],
  209. o = {}.toString,
  210. p = [],
  211. q = 0,
  212. r = "MozAppearance" in l.style,
  213. s = r && !!b.createRange().compareNode,
  214. t = s ? l : n.parentNode,
  215. l = a.opera && o.call(a.opera) == "[object Opera]",
  216. l = !!b.attachEvent && !l,
  217. u = r ? "object" : l ? "script" : "img",
  218. v = l ? "script" : u,
  219. w = Array.isArray || function(a) {
  220. return o.call(a) == "[object Array]"
  221. },
  222. x = [],
  223. y = {},
  224. z = {
  225. timeout: function(a, b) {
  226. return b.length && (a.timeout = b[0]), a
  227. }
  228. },
  229. A, B;
  230. B = function(a) {
  231. function b(a) {
  232. var a = a.split("!"),
  233. b = x.length,
  234. c = a.pop(),
  235. d = a.length,
  236. c = {
  237. url: c,
  238. origUrl: c,
  239. prefixes: a
  240. },
  241. e, f, g;
  242. for (f = 0; f < d; f++) g = a[f].split("="), (e = z[g.shift()]) && (c = e(c, g));
  243. for (f = 0; f < b; f++) c = x[f](c);
  244. return c
  245. }
  246. function g(a, e, f, g, i) {
  247. var j = b(a),
  248. l = j.autoCallback;
  249. j.url.split(".").pop().split("?").shift(), j.bypass || (e && (e = d(e) ? e : e[a] || e[g] || e[a.split("/").pop().split("?")[0]] || h), j.instead ? j.instead(a, e, f, g, i) : (y[j.url] ? j.noexec = !0 : y[j.url] = 1, f.load(j.url, j.forceCSS || !j.forceJS && "css" == j.url.split(".").pop().split("?").shift() ? "c" : c, j.noexec, j.attrs, j.timeout), (d(e) || d(l)) && f.load(function() {
  250. k(), e && e(j.origUrl, i, g), l && l(j.origUrl, i, g), y[j.url] = 2
  251. })))
  252. }
  253. function i(a, b) {
  254. function c(a, c) {
  255. if (a) {
  256. if (e(a)) c || (j = function() {
  257. var a = [].slice.call(arguments);
  258. k.apply(this, a), l()
  259. }), g(a, j, b, 0, h);
  260. else if (Object(a) === a)
  261. for (n in m = function() {
  262. var b = 0,
  263. c;
  264. for (c in a) a.hasOwnProperty(c) && b++;
  265. return b
  266. }(), a) a.hasOwnProperty(n) && (!c && !--m && (d(j) ? j = function() {
  267. var a = [].slice.call(arguments);
  268. k.apply(this, a), l()
  269. } : j[n] = function(a) {
  270. return function() {
  271. var b = [].slice.call(arguments);
  272. a && a.apply(this, b), l()
  273. }
  274. }(k[n])), g(a[n], j, b, n, h))
  275. } else !c && l()
  276. }
  277. var h = !!a.test,
  278. i = a.load || a.both,
  279. j = a.callback || f,
  280. k = j,
  281. l = a.complete || f,
  282. m, n;
  283. c(h ? a.yep : a.nope, !!i), i && c(i)
  284. }
  285. var j, l, m = this.yepnope.loader;
  286. if (e(a)) g(a, 0, m, 0);
  287. else if (w(a))
  288. for (j = 0; j < a.length; j++) l = a[j], e(l) ? g(l, 0, m, 0) : w(l) ? B(l) : Object(l) === l && i(l, m);
  289. else Object(a) === a && i(a, m)
  290. }, B.addPrefix = function(a, b) {
  291. z[a] = b
  292. }, B.addFilter = function(a) {
  293. x.push(a)
  294. }, B.errorTimeout = 1e4, b.readyState == null && b.addEventListener && (b.readyState = "loading", b.addEventListener("DOMContentLoaded", A = function() {
  295. b.removeEventListener("DOMContentLoaded", A, 0), b.readyState = "complete"
  296. }, 0)), a.yepnope = k(), a.yepnope.executeStack = h, a.yepnope.injectJs = function(a, c, d, e, i, j) {
  297. var k = b.createElement("script"),
  298. l, o, e = e || B.errorTimeout;
  299. k.src = a;
  300. for (o in d) k.setAttribute(o, d[o]);
  301. c = j ? h : c || f, k.onreadystatechange = k.onload = function() {
  302. !l && g(k.readyState) && (l = 1, c(), k.onload = k.onreadystatechange = null)
  303. }, m(function() {
  304. l || (l = 1, c(1))
  305. }, e), i ? k.onload() : n.parentNode.insertBefore(k, n)
  306. }, a.yepnope.injectCss = function(a, c, d, e, g, i) {
  307. var e = b.createElement("link"),
  308. j, c = i ? h : c || f;
  309. e.href = a, e.rel = "stylesheet", e.type = "text/css";
  310. for (j in d) e.setAttribute(j, d[j]);
  311. g || (n.parentNode.insertBefore(e, n), m(c, 0))
  312. }
  313. }(this, document), Modernizr.load = function() {
  314. yepnope.apply(window, [].slice.call(arguments, 0))
  315. }; /* |xGv00|e817b489850c8fc3ff11fcd4f0837418 */