styleus 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/app/assets/fonts/calluna_license.txt +26 -0
  2. data/app/assets/fonts/calluna_regular.eot +0 -0
  3. data/app/assets/fonts/calluna_regular.ttf +0 -0
  4. data/app/assets/fonts/calluna_regular.woff +0 -0
  5. data/app/assets/fonts/raphaelicons-webfont.eot +0 -0
  6. data/app/assets/fonts/raphaelicons-webfont.svg +149 -0
  7. data/app/assets/fonts/raphaelicons-webfont.ttf +0 -0
  8. data/app/assets/fonts/raphaelicons-webfont.woff +0 -0
  9. data/app/assets/fonts/raphaelicons.txt +17 -0
  10. data/app/assets/images/styleus/themes/base/noise.png +0 -0
  11. data/app/assets/images/styleus/themes/base/noise_dark.png +0 -0
  12. data/app/assets/javascripts/modernizr.custom.js +812 -0
  13. data/app/assets/javascripts/namespace.js.coffee +20 -0
  14. data/app/assets/javascripts/styleus/base.js.coffee +3 -0
  15. data/app/assets/javascripts/styleus/behaviors/toggle.js.coffee +12 -0
  16. data/app/assets/javascripts/styleus.js +15 -0
  17. data/app/assets/javascripts/styleus_prerender.js +13 -0
  18. data/app/assets/stylesheets/styleus/themes/base/behaviors/_component.css.scss +11 -0
  19. data/app/assets/stylesheets/styleus/themes/base/behaviors/_positioning.css.scss +10 -0
  20. data/app/assets/stylesheets/styleus/themes/base/behaviors/_text.css.scss +10 -0
  21. data/app/assets/stylesheets/styleus/themes/base/coderay.css.scss +37 -7
  22. data/app/assets/stylesheets/styleus/themes/base/components/_article.css.scss +21 -23
  23. data/app/assets/stylesheets/styleus/themes/base/components/_component_index.css.scss +53 -0
  24. data/app/assets/stylesheets/styleus/themes/base/components/_option_bar.css.scss +31 -0
  25. data/app/assets/stylesheets/styleus/themes/base/fonts/calluna.css.scss +26 -0
  26. data/app/assets/stylesheets/styleus/themes/base/fonts/raphael.css.scss +22 -0
  27. data/app/assets/stylesheets/styleus/themes/base/layout/main.css.scss +36 -4
  28. data/app/assets/stylesheets/styleus/themes/base/settings/_colors.css.scss +6 -1
  29. data/app/assets/stylesheets/styleus/themes/base.css.scss +13 -2
  30. data/app/controllers/components_controller.rb +6 -4
  31. data/app/helpers/path_helper.rb +8 -0
  32. data/app/helpers/styleus_helper.rb +51 -24
  33. data/app/models/styleus/view_component.rb +6 -2
  34. data/app/views/components/index.html.erb +9 -0
  35. data/app/views/components/show.html.erb +1 -0
  36. data/app/views/layouts/_styleus.html.erb +7 -2
  37. data/config/locales/en.yml +10 -0
  38. data/config/routes.rb +1 -1
  39. data/lib/styleus/version.rb +1 -1
  40. metadata +30 -3
  41. data/app/assets/stylesheets/styleus/themes/base/components/_representation_helpers.css.scss +0 -24
@@ -0,0 +1,812 @@
1
+ /* Modernizr 2.6.2 (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
+
6
+
7
+
8
+ window.Modernizr = (function( window, document, undefined ) {
9
+
10
+ var version = '2.6.2',
11
+
12
+ Modernizr = {},
13
+
14
+ enableClasses = true,
15
+
16
+ docElement = document.documentElement,
17
+
18
+ mod = 'modernizr',
19
+ modElem = document.createElement(mod),
20
+ mStyle = modElem.style,
21
+
22
+ inputElem = document.createElement('input') ,
23
+
24
+ smile = ':)',
25
+
26
+ toString = {}.toString,
27
+
28
+ prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
29
+
30
+
31
+
32
+ omPrefixes = 'Webkit Moz O ms',
33
+
34
+ cssomPrefixes = omPrefixes.split(' '),
35
+
36
+ domPrefixes = omPrefixes.toLowerCase().split(' '),
37
+
38
+ ns = {'svg': 'http://www.w3.org/2000/svg'},
39
+
40
+ tests = {},
41
+ inputs = {},
42
+ attrs = {},
43
+
44
+ classes = [],
45
+
46
+ slice = classes.slice,
47
+
48
+ featureName,
49
+
50
+
51
+ injectElementWithStyles = function( rule, callback, nodes, testnames ) {
52
+
53
+ var style, ret, node, docOverflow,
54
+ div = document.createElement('div'),
55
+ body = document.body,
56
+ fakeBody = body || document.createElement('body');
57
+
58
+ if ( parseInt(nodes, 10) ) {
59
+ while ( nodes-- ) {
60
+ node = document.createElement('div');
61
+ node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
62
+ div.appendChild(node);
63
+ }
64
+ }
65
+
66
+ style = ['&#173;','<style id="s', mod, '">', rule, '</style>'].join('');
67
+ div.id = mod;
68
+ (body ? div : fakeBody).innerHTML += style;
69
+ fakeBody.appendChild(div);
70
+ if ( !body ) {
71
+ fakeBody.style.background = '';
72
+ fakeBody.style.overflow = 'hidden';
73
+ docOverflow = docElement.style.overflow;
74
+ docElement.style.overflow = 'hidden';
75
+ docElement.appendChild(fakeBody);
76
+ }
77
+
78
+ ret = callback(div, rule);
79
+ if ( !body ) {
80
+ fakeBody.parentNode.removeChild(fakeBody);
81
+ docElement.style.overflow = docOverflow;
82
+ } else {
83
+ div.parentNode.removeChild(div);
84
+ }
85
+
86
+ return !!ret;
87
+
88
+ },
89
+
90
+
91
+
92
+ isEventSupported = (function() {
93
+
94
+ var TAGNAMES = {
95
+ 'select': 'input', 'change': 'input',
96
+ 'submit': 'form', 'reset': 'form',
97
+ 'error': 'img', 'load': 'img', 'abort': 'img'
98
+ };
99
+
100
+ function isEventSupported( eventName, element ) {
101
+
102
+ element = element || document.createElement(TAGNAMES[eventName] || 'div');
103
+ eventName = 'on' + eventName;
104
+
105
+ var isSupported = eventName in element;
106
+
107
+ if ( !isSupported ) {
108
+ if ( !element.setAttribute ) {
109
+ element = document.createElement('div');
110
+ }
111
+ if ( element.setAttribute && element.removeAttribute ) {
112
+ element.setAttribute(eventName, '');
113
+ isSupported = is(element[eventName], 'function');
114
+
115
+ if ( !is(element[eventName], 'undefined') ) {
116
+ element[eventName] = undefined;
117
+ }
118
+ element.removeAttribute(eventName);
119
+ }
120
+ }
121
+
122
+ element = null;
123
+ return isSupported;
124
+ }
125
+ return isEventSupported;
126
+ })(),
127
+
128
+
129
+ _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
130
+
131
+ if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
132
+ hasOwnProp = function (object, property) {
133
+ return _hasOwnProperty.call(object, property);
134
+ };
135
+ }
136
+ else {
137
+ hasOwnProp = function (object, property) {
138
+ return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
139
+ };
140
+ }
141
+
142
+
143
+ if (!Function.prototype.bind) {
144
+ Function.prototype.bind = function bind(that) {
145
+
146
+ var target = this;
147
+
148
+ if (typeof target != "function") {
149
+ throw new TypeError();
150
+ }
151
+
152
+ var args = slice.call(arguments, 1),
153
+ bound = function () {
154
+
155
+ if (this instanceof bound) {
156
+
157
+ var F = function(){};
158
+ F.prototype = target.prototype;
159
+ var self = new F();
160
+
161
+ var result = target.apply(
162
+ self,
163
+ args.concat(slice.call(arguments))
164
+ );
165
+ if (Object(result) === result) {
166
+ return result;
167
+ }
168
+ return self;
169
+
170
+ } else {
171
+
172
+ return target.apply(
173
+ that,
174
+ args.concat(slice.call(arguments))
175
+ );
176
+
177
+ }
178
+
179
+ };
180
+
181
+ return bound;
182
+ };
183
+ }
184
+
185
+ function setCss( str ) {
186
+ mStyle.cssText = str;
187
+ }
188
+
189
+ function setCssAll( str1, str2 ) {
190
+ return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
191
+ }
192
+
193
+ function is( obj, type ) {
194
+ return typeof obj === type;
195
+ }
196
+
197
+ function contains( str, substr ) {
198
+ return !!~('' + str).indexOf(substr);
199
+ }
200
+
201
+ function testProps( props, prefixed ) {
202
+ for ( var i in props ) {
203
+ var prop = props[i];
204
+ if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
205
+ return prefixed == 'pfx' ? prop : true;
206
+ }
207
+ }
208
+ return false;
209
+ }
210
+
211
+ function testDOMProps( props, obj, elem ) {
212
+ for ( var i in props ) {
213
+ var item = obj[props[i]];
214
+ if ( item !== undefined) {
215
+
216
+ if (elem === false) return props[i];
217
+
218
+ if (is(item, 'function')){
219
+ return item.bind(elem || obj);
220
+ }
221
+
222
+ return item;
223
+ }
224
+ }
225
+ return false;
226
+ }
227
+
228
+ function testPropsAll( prop, prefixed, elem ) {
229
+
230
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
231
+ props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
232
+
233
+ if(is(prefixed, "string") || is(prefixed, "undefined")) {
234
+ return testProps(props, prefixed);
235
+
236
+ } else {
237
+ props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
238
+ return testDOMProps(props, prefixed, elem);
239
+ }
240
+ } tests['flexbox'] = function() {
241
+ return testPropsAll('flexWrap');
242
+ }; tests['canvas'] = function() {
243
+ var elem = document.createElement('canvas');
244
+ return !!(elem.getContext && elem.getContext('2d'));
245
+ };
246
+
247
+ tests['canvastext'] = function() {
248
+ return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
249
+ };
250
+
251
+
252
+
253
+ tests['webgl'] = function() {
254
+ return !!window.WebGLRenderingContext;
255
+ };
256
+
257
+
258
+ tests['touch'] = function() {
259
+ var bool;
260
+
261
+ if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
262
+ bool = true;
263
+ } else {
264
+ injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
265
+ bool = node.offsetTop === 9;
266
+ });
267
+ }
268
+
269
+ return bool;
270
+ };
271
+
272
+
273
+
274
+ tests['geolocation'] = function() {
275
+ return 'geolocation' in navigator;
276
+ };
277
+
278
+
279
+ tests['postmessage'] = function() {
280
+ return !!window.postMessage;
281
+ };
282
+
283
+
284
+ tests['websqldatabase'] = function() {
285
+ return !!window.openDatabase;
286
+ };
287
+
288
+ tests['indexedDB'] = function() {
289
+ return !!testPropsAll("indexedDB", window);
290
+ };
291
+
292
+ tests['hashchange'] = function() {
293
+ return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
294
+ };
295
+
296
+ tests['history'] = function() {
297
+ return !!(window.history && history.pushState);
298
+ };
299
+
300
+ tests['draganddrop'] = function() {
301
+ var div = document.createElement('div');
302
+ return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
303
+ };
304
+
305
+ tests['websockets'] = function() {
306
+ return 'WebSocket' in window || 'MozWebSocket' in window;
307
+ };
308
+
309
+
310
+ tests['rgba'] = function() {
311
+ setCss('background-color:rgba(150,255,150,.5)');
312
+
313
+ return contains(mStyle.backgroundColor, 'rgba');
314
+ };
315
+
316
+ tests['hsla'] = function() {
317
+ setCss('background-color:hsla(120,40%,100%,.5)');
318
+
319
+ return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
320
+ };
321
+
322
+ tests['multiplebgs'] = function() {
323
+ setCss('background:url(https://),url(https://),red url(https://)');
324
+
325
+ return (/(url\s*\(.*?){3}/).test(mStyle.background);
326
+ }; tests['backgroundsize'] = function() {
327
+ return testPropsAll('backgroundSize');
328
+ };
329
+
330
+ tests['borderimage'] = function() {
331
+ return testPropsAll('borderImage');
332
+ };
333
+
334
+
335
+
336
+ tests['borderradius'] = function() {
337
+ return testPropsAll('borderRadius');
338
+ };
339
+
340
+ tests['boxshadow'] = function() {
341
+ return testPropsAll('boxShadow');
342
+ };
343
+
344
+ tests['textshadow'] = function() {
345
+ return document.createElement('div').style.textShadow === '';
346
+ };
347
+
348
+
349
+ tests['opacity'] = function() {
350
+ setCssAll('opacity:.55');
351
+
352
+ return (/^0.55$/).test(mStyle.opacity);
353
+ };
354
+
355
+
356
+ tests['cssanimations'] = function() {
357
+ return testPropsAll('animationName');
358
+ };
359
+
360
+
361
+ tests['csscolumns'] = function() {
362
+ return testPropsAll('columnCount');
363
+ };
364
+
365
+
366
+ tests['cssgradients'] = function() {
367
+ var str1 = 'background-image:',
368
+ str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
369
+ str3 = 'linear-gradient(left top,#9f9, white);';
370
+
371
+ setCss(
372
+ (str1 + '-webkit- '.split(' ').join(str2 + str1) +
373
+ prefixes.join(str3 + str1)).slice(0, -str1.length)
374
+ );
375
+
376
+ return contains(mStyle.backgroundImage, 'gradient');
377
+ };
378
+
379
+
380
+ tests['cssreflections'] = function() {
381
+ return testPropsAll('boxReflect');
382
+ };
383
+
384
+
385
+ tests['csstransforms'] = function() {
386
+ return !!testPropsAll('transform');
387
+ };
388
+
389
+
390
+ tests['csstransforms3d'] = function() {
391
+
392
+ var ret = !!testPropsAll('perspective');
393
+
394
+ if ( ret && 'webkitPerspective' in docElement.style ) {
395
+
396
+ injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
397
+ ret = node.offsetLeft === 9 && node.offsetHeight === 3;
398
+ });
399
+ }
400
+ return ret;
401
+ };
402
+
403
+
404
+ tests['csstransitions'] = function() {
405
+ return testPropsAll('transition');
406
+ };
407
+
408
+
409
+
410
+ tests['fontface'] = function() {
411
+ var bool;
412
+
413
+ injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
414
+ var style = document.getElementById('smodernizr'),
415
+ sheet = style.sheet || style.styleSheet,
416
+ cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
417
+
418
+ bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
419
+ });
420
+
421
+ return bool;
422
+ };
423
+
424
+ tests['generatedcontent'] = function() {
425
+ var bool;
426
+
427
+ injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
428
+ bool = node.offsetHeight >= 3;
429
+ });
430
+
431
+ return bool;
432
+ };
433
+ tests['video'] = function() {
434
+ var elem = document.createElement('video'),
435
+ bool = false;
436
+
437
+ try {
438
+ if ( bool = !!elem.canPlayType ) {
439
+ bool = new Boolean(bool);
440
+ bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,'');
441
+
442
+ bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
443
+
444
+ bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
445
+ }
446
+
447
+ } catch(e) { }
448
+
449
+ return bool;
450
+ };
451
+
452
+ tests['audio'] = function() {
453
+ var elem = document.createElement('audio'),
454
+ bool = false;
455
+
456
+ try {
457
+ if ( bool = !!elem.canPlayType ) {
458
+ bool = new Boolean(bool);
459
+ bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
460
+ bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,'');
461
+
462
+ bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
463
+ bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
464
+ elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
465
+ }
466
+ } catch(e) { }
467
+
468
+ return bool;
469
+ };
470
+
471
+
472
+ tests['localstorage'] = function() {
473
+ try {
474
+ localStorage.setItem(mod, mod);
475
+ localStorage.removeItem(mod);
476
+ return true;
477
+ } catch(e) {
478
+ return false;
479
+ }
480
+ };
481
+
482
+ tests['sessionstorage'] = function() {
483
+ try {
484
+ sessionStorage.setItem(mod, mod);
485
+ sessionStorage.removeItem(mod);
486
+ return true;
487
+ } catch(e) {
488
+ return false;
489
+ }
490
+ };
491
+
492
+
493
+ tests['webworkers'] = function() {
494
+ return !!window.Worker;
495
+ };
496
+
497
+
498
+ tests['applicationcache'] = function() {
499
+ return !!window.applicationCache;
500
+ };
501
+
502
+
503
+ tests['svg'] = function() {
504
+ return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
505
+ };
506
+
507
+ tests['inlinesvg'] = function() {
508
+ var div = document.createElement('div');
509
+ div.innerHTML = '<svg/>';
510
+ return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
511
+ };
512
+
513
+ tests['smil'] = function() {
514
+ return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
515
+ };
516
+
517
+
518
+ tests['svgclippaths'] = function() {
519
+ return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
520
+ };
521
+
522
+ function webforms() {
523
+ Modernizr['input'] = (function( props ) {
524
+ for ( var i = 0, len = props.length; i < len; i++ ) {
525
+ attrs[ props[i] ] = !!(props[i] in inputElem);
526
+ }
527
+ if (attrs.list){
528
+ attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
529
+ }
530
+ return attrs;
531
+ })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
532
+ Modernizr['inputtypes'] = (function(props) {
533
+
534
+ for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
535
+
536
+ inputElem.setAttribute('type', inputElemType = props[i]);
537
+ bool = inputElem.type !== 'text';
538
+
539
+ if ( bool ) {
540
+
541
+ inputElem.value = smile;
542
+ inputElem.style.cssText = 'position:absolute;visibility:hidden;';
543
+
544
+ if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
545
+
546
+ docElement.appendChild(inputElem);
547
+ defaultView = document.defaultView;
548
+
549
+ bool = defaultView.getComputedStyle &&
550
+ defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
551
+ (inputElem.offsetHeight !== 0);
552
+
553
+ docElement.removeChild(inputElem);
554
+
555
+ } else if ( /^(search|tel)$/.test(inputElemType) ){
556
+ } else if ( /^(url|email)$/.test(inputElemType) ) {
557
+ bool = inputElem.checkValidity && inputElem.checkValidity() === false;
558
+
559
+ } else {
560
+ bool = inputElem.value != smile;
561
+ }
562
+ }
563
+
564
+ inputs[ props[i] ] = !!bool;
565
+ }
566
+ return inputs;
567
+ })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
568
+ }
569
+ for ( var feature in tests ) {
570
+ if ( hasOwnProp(tests, feature) ) {
571
+ featureName = feature.toLowerCase();
572
+ Modernizr[featureName] = tests[feature]();
573
+
574
+ classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
575
+ }
576
+ }
577
+
578
+ Modernizr.input || webforms();
579
+
580
+
581
+ Modernizr.addTest = function ( feature, test ) {
582
+ if ( typeof feature == 'object' ) {
583
+ for ( var key in feature ) {
584
+ if ( hasOwnProp( feature, key ) ) {
585
+ Modernizr.addTest( key, feature[ key ] );
586
+ }
587
+ }
588
+ } else {
589
+
590
+ feature = feature.toLowerCase();
591
+
592
+ if ( Modernizr[feature] !== undefined ) {
593
+ return Modernizr;
594
+ }
595
+
596
+ test = typeof test == 'function' ? test() : test;
597
+
598
+ if (typeof enableClasses !== "undefined" && enableClasses) {
599
+ docElement.className += ' ' + (test ? '' : 'no-') + feature;
600
+ }
601
+ Modernizr[feature] = test;
602
+
603
+ }
604
+
605
+ return Modernizr;
606
+ };
607
+
608
+
609
+ setCss('');
610
+ modElem = inputElem = null;
611
+
612
+ ;(function(window, document) {
613
+ var options = window.html5 || {};
614
+
615
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
616
+
617
+ 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;
618
+
619
+ var supportsHtml5Styles;
620
+
621
+ var expando = '_html5shiv';
622
+
623
+ var expanID = 0;
624
+
625
+ var expandoData = {};
626
+
627
+ var supportsUnknownElements;
628
+
629
+ (function() {
630
+ try {
631
+ var a = document.createElement('a');
632
+ a.innerHTML = '<xyz></xyz>';
633
+ supportsHtml5Styles = ('hidden' in a);
634
+
635
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
636
+ (document.createElement)('a');
637
+ var frag = document.createDocumentFragment();
638
+ return (
639
+ typeof frag.cloneNode == 'undefined' ||
640
+ typeof frag.createDocumentFragment == 'undefined' ||
641
+ typeof frag.createElement == 'undefined'
642
+ );
643
+ }());
644
+ } catch(e) {
645
+ supportsHtml5Styles = true;
646
+ supportsUnknownElements = true;
647
+ }
648
+
649
+ }()); function addStyleSheet(ownerDocument, cssText) {
650
+ var p = ownerDocument.createElement('p'),
651
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
652
+
653
+ p.innerHTML = 'x<style>' + cssText + '</style>';
654
+ return parent.insertBefore(p.lastChild, parent.firstChild);
655
+ }
656
+
657
+ function getElements() {
658
+ var elements = html5.elements;
659
+ return typeof elements == 'string' ? elements.split(' ') : elements;
660
+ }
661
+
662
+ function getExpandoData(ownerDocument) {
663
+ var data = expandoData[ownerDocument[expando]];
664
+ if (!data) {
665
+ data = {};
666
+ expanID++;
667
+ ownerDocument[expando] = expanID;
668
+ expandoData[expanID] = data;
669
+ }
670
+ return data;
671
+ }
672
+
673
+ function createElement(nodeName, ownerDocument, data){
674
+ if (!ownerDocument) {
675
+ ownerDocument = document;
676
+ }
677
+ if(supportsUnknownElements){
678
+ return ownerDocument.createElement(nodeName);
679
+ }
680
+ if (!data) {
681
+ data = getExpandoData(ownerDocument);
682
+ }
683
+ var node;
684
+
685
+ if (data.cache[nodeName]) {
686
+ node = data.cache[nodeName].cloneNode();
687
+ } else if (saveClones.test(nodeName)) {
688
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
689
+ } else {
690
+ node = data.createElem(nodeName);
691
+ }
692
+
693
+ return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
694
+ }
695
+
696
+ function createDocumentFragment(ownerDocument, data){
697
+ if (!ownerDocument) {
698
+ ownerDocument = document;
699
+ }
700
+ if(supportsUnknownElements){
701
+ return ownerDocument.createDocumentFragment();
702
+ }
703
+ data = data || getExpandoData(ownerDocument);
704
+ var clone = data.frag.cloneNode(),
705
+ i = 0,
706
+ elems = getElements(),
707
+ l = elems.length;
708
+ for(;i<l;i++){
709
+ clone.createElement(elems[i]);
710
+ }
711
+ return clone;
712
+ }
713
+
714
+ function shivMethods(ownerDocument, data) {
715
+ if (!data.cache) {
716
+ data.cache = {};
717
+ data.createElem = ownerDocument.createElement;
718
+ data.createFrag = ownerDocument.createDocumentFragment;
719
+ data.frag = data.createFrag();
720
+ }
721
+
722
+
723
+ ownerDocument.createElement = function(nodeName) {
724
+ if (!html5.shivMethods) {
725
+ return data.createElem(nodeName);
726
+ }
727
+ return createElement(nodeName, ownerDocument, data);
728
+ };
729
+
730
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
731
+ 'var n=f.cloneNode(),c=n.createElement;' +
732
+ 'h.shivMethods&&(' +
733
+ getElements().join().replace(/\w+/g, function(nodeName) {
734
+ data.createElem(nodeName);
735
+ data.frag.createElement(nodeName);
736
+ return 'c("' + nodeName + '")';
737
+ }) +
738
+ ');return n}'
739
+ )(html5, data.frag);
740
+ } function shivDocument(ownerDocument) {
741
+ if (!ownerDocument) {
742
+ ownerDocument = document;
743
+ }
744
+ var data = getExpandoData(ownerDocument);
745
+
746
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
747
+ data.hasCSS = !!addStyleSheet(ownerDocument,
748
+ 'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
749
+ 'mark{background:#FF0;color:#000}'
750
+ );
751
+ }
752
+ if (!supportsUnknownElements) {
753
+ shivMethods(ownerDocument, data);
754
+ }
755
+ return ownerDocument;
756
+ } var html5 = {
757
+
758
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
759
+
760
+ 'shivCSS': (options.shivCSS !== false),
761
+
762
+ 'supportsUnknownElements': supportsUnknownElements,
763
+
764
+ 'shivMethods': (options.shivMethods !== false),
765
+
766
+ 'type': 'default',
767
+
768
+ 'shivDocument': shivDocument,
769
+
770
+ createElement: createElement,
771
+
772
+ createDocumentFragment: createDocumentFragment
773
+ }; window.html5 = html5;
774
+
775
+ shivDocument(document);
776
+
777
+ }(this, document));
778
+
779
+ Modernizr._version = version;
780
+
781
+ Modernizr._prefixes = prefixes;
782
+ Modernizr._domPrefixes = domPrefixes;
783
+ Modernizr._cssomPrefixes = cssomPrefixes;
784
+
785
+
786
+ Modernizr.hasEvent = isEventSupported;
787
+
788
+ Modernizr.testProp = function(prop){
789
+ return testProps([prop]);
790
+ };
791
+
792
+ Modernizr.testAllProps = testPropsAll;
793
+
794
+
795
+ Modernizr.testStyles = injectElementWithStyles;
796
+ Modernizr.prefixed = function(prop, obj, elem){
797
+ if(!obj) {
798
+ return testPropsAll(prop, 'pfx');
799
+ } else {
800
+ return testPropsAll(prop, obj, elem);
801
+ }
802
+ };
803
+
804
+ docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') + (enableClasses ? ' js ' + classes.join(' ') : '');
805
+
806
+ return Modernizr;
807
+
808
+ })(this, this.document);
809
+ /*yepnope1.5.4|WTFPL*/
810
+ (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);
811
+ Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0));};
812
+ ;