slippery 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +15 -0
  2. data/.travis.yml +27 -0
  3. data/Gemfile +10 -0
  4. data/Gemfile.devtools +59 -0
  5. data/Gemfile.lock +220 -0
  6. data/LICENSE +9 -0
  7. data/README.md +122 -0
  8. data/Rakefile +2 -0
  9. data/assets/impress.js/css/impress-demo.css +703 -0
  10. data/assets/impress.js/js/impress.js +800 -0
  11. data/assets/reveal.js/css/print/paper.css +176 -0
  12. data/assets/reveal.js/css/print/pdf.css +190 -0
  13. data/assets/reveal.js/css/reveal.css +1616 -0
  14. data/assets/reveal.js/css/reveal.min.css +7 -0
  15. data/assets/reveal.js/css/theme/README.md +23 -0
  16. data/assets/reveal.js/css/theme/beige.css +142 -0
  17. data/assets/reveal.js/css/theme/default.css +142 -0
  18. data/assets/reveal.js/css/theme/moon.css +142 -0
  19. data/assets/reveal.js/css/theme/night.css +130 -0
  20. data/assets/reveal.js/css/theme/serif.css +132 -0
  21. data/assets/reveal.js/css/theme/simple.css +132 -0
  22. data/assets/reveal.js/css/theme/sky.css +139 -0
  23. data/assets/reveal.js/css/theme/solarized.css +142 -0
  24. data/assets/reveal.js/css/theme/source/beige.scss +50 -0
  25. data/assets/reveal.js/css/theme/source/default.scss +42 -0
  26. data/assets/reveal.js/css/theme/source/moon.scss +68 -0
  27. data/assets/reveal.js/css/theme/source/night.scss +35 -0
  28. data/assets/reveal.js/css/theme/source/serif.scss +35 -0
  29. data/assets/reveal.js/css/theme/source/simple.scss +38 -0
  30. data/assets/reveal.js/css/theme/source/sky.scss +46 -0
  31. data/assets/reveal.js/css/theme/source/solarized.scss +74 -0
  32. data/assets/reveal.js/css/theme/template/mixins.scss +29 -0
  33. data/assets/reveal.js/css/theme/template/settings.scss +33 -0
  34. data/assets/reveal.js/css/theme/template/theme.scss +163 -0
  35. data/assets/reveal.js/js/head.min.js +8 -0
  36. data/assets/reveal.js/js/reveal.js +2577 -0
  37. data/assets/reveal.js/js/reveal.min.js +8 -0
  38. data/assets/reveal.js/lib/css/zenburn.css +115 -0
  39. data/assets/reveal.js/lib/font/league_gothic-webfont.eot +0 -0
  40. data/assets/reveal.js/lib/font/league_gothic-webfont.svg +230 -0
  41. data/assets/reveal.js/lib/font/league_gothic-webfont.ttf +0 -0
  42. data/assets/reveal.js/lib/font/league_gothic-webfont.woff +0 -0
  43. data/assets/reveal.js/lib/font/league_gothic_license +2 -0
  44. data/assets/reveal.js/lib/js/classList.js +2 -0
  45. data/assets/reveal.js/lib/js/head.min.js +8 -0
  46. data/assets/reveal.js/lib/js/html5shiv.js +7 -0
  47. data/assets/reveal.js/plugin/highlight/highlight.js +31 -0
  48. data/assets/reveal.js/plugin/leap/leap.js +154 -0
  49. data/assets/reveal.js/plugin/markdown/example.html +97 -0
  50. data/assets/reveal.js/plugin/markdown/example.md +29 -0
  51. data/assets/reveal.js/plugin/markdown/markdown.js +190 -0
  52. data/assets/reveal.js/plugin/markdown/marked.js +37 -0
  53. data/assets/reveal.js/plugin/multiplex/client.js +13 -0
  54. data/assets/reveal.js/plugin/multiplex/index.js +56 -0
  55. data/assets/reveal.js/plugin/multiplex/master.js +50 -0
  56. data/assets/reveal.js/plugin/notes/notes.html +253 -0
  57. data/assets/reveal.js/plugin/notes/notes.js +100 -0
  58. data/assets/reveal.js/plugin/notes-server/client.js +57 -0
  59. data/assets/reveal.js/plugin/notes-server/index.js +59 -0
  60. data/assets/reveal.js/plugin/notes-server/notes.html +142 -0
  61. data/assets/reveal.js/plugin/postmessage/example.html +39 -0
  62. data/assets/reveal.js/plugin/postmessage/postmessage.js +42 -0
  63. data/assets/reveal.js/plugin/print-pdf/print-pdf.js +44 -0
  64. data/assets/reveal.js/plugin/remotes/remotes.js +39 -0
  65. data/assets/reveal.js/plugin/search/search.js +196 -0
  66. data/assets/reveal.js/plugin/zoom-js/zoom.js +256 -0
  67. data/config/flay.yml +3 -0
  68. data/config/flog.yml +2 -0
  69. data/config/mutant.yml +3 -0
  70. data/config/reek.yml +108 -0
  71. data/config/rubocop.yml +71 -0
  72. data/config/yardstick.yml +2 -0
  73. data/lib/slippery/converter.rb +130 -0
  74. data/lib/slippery/document.rb +20 -0
  75. data/lib/slippery/presentation.rb +36 -0
  76. data/lib/slippery/processor_helpers.rb +43 -0
  77. data/lib/slippery/processors/add_google_font.rb +27 -0
  78. data/lib/slippery/processors/graphviz_dot.rb +46 -0
  79. data/lib/slippery/processors/hr_to_sections.rb +36 -0
  80. data/lib/slippery/processors/impress_js/add_impress_js.rb +30 -0
  81. data/lib/slippery/processors/impress_js/auto_offsets.rb +25 -0
  82. data/lib/slippery/processors/reveal_js/add_reveal_js.rb +78 -0
  83. data/lib/slippery/processors/self_contained.rb +62 -0
  84. data/lib/slippery/version.rb +3 -0
  85. data/lib/slippery.rb +42 -0
  86. data/slippery.gemspec +25 -0
  87. data/spec/fixtures/blockquotes.md +6 -0
  88. data/spec/fixtures/code_blocks.md +9 -0
  89. data/spec/fixtures/definition_lists.md +2 -0
  90. data/spec/fixtures/header_and_paragraph.md +2 -0
  91. data/spec/fixtures/headers.md +13 -0
  92. data/spec/fixtures/ordered_list.md +3 -0
  93. data/spec/fixtures/unordered_list.md +3 -0
  94. data/spec/slippery/converter_spec.rb +67 -0
  95. data/spec/slippery_spec.rb +0 -0
  96. data/spec/spec_helper.rb +20 -0
  97. metadata +208 -0
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Black theme for reveal.js.
3
+ *
4
+ * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5
+ */
6
+
7
+
8
+ // Default mixins and settings -----------------
9
+ @import "../template/mixins";
10
+ @import "../template/settings";
11
+ // ---------------------------------------------
12
+
13
+
14
+ // Include theme-specific fonts
15
+ @import url(https://fonts.googleapis.com/css?family=Montserrat:700);
16
+ @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
17
+
18
+
19
+ // Override theme settings (see ../template/settings.scss)
20
+ $backgroundColor: #111;
21
+
22
+ $mainFont: 'Open Sans', sans-serif;
23
+ $linkColor: #e7ad52;
24
+ $linkColorHover: lighten( $linkColor, 20% );
25
+ $headingFont: 'Montserrat', Impact, sans-serif;
26
+ $headingTextShadow: none;
27
+ $headingLetterSpacing: -0.03em;
28
+ $headingTextTransform: none;
29
+ $selectionBackgroundColor: #e7ad52;
30
+ $mainFontSize: 30px;
31
+
32
+
33
+ // Theme template ------------------------------
34
+ @import "../template/theme";
35
+ // ---------------------------------------------
@@ -0,0 +1,35 @@
1
+ /**
2
+ * A simple theme for reveal.js presentations, similar
3
+ * to the default theme. The accent color is brown.
4
+ *
5
+ * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
6
+ */
7
+
8
+
9
+ // Default mixins and settings -----------------
10
+ @import "../template/mixins";
11
+ @import "../template/settings";
12
+ // ---------------------------------------------
13
+
14
+
15
+
16
+ // Override theme settings (see ../template/settings.scss)
17
+ $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
18
+ $mainColor: #000;
19
+ $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
20
+ $headingColor: #383D3D;
21
+ $headingTextShadow: none;
22
+ $headingTextTransform: none;
23
+ $backgroundColor: #F0F1EB;
24
+ $linkColor: #51483D;
25
+ $linkColorHover: lighten( $linkColor, 20% );
26
+ $selectionBackgroundColor: #26351C;
27
+
28
+ .reveal a:not(.image) {
29
+ line-height: 1.3em;
30
+ }
31
+
32
+
33
+ // Theme template ------------------------------
34
+ @import "../template/theme";
35
+ // ---------------------------------------------
@@ -0,0 +1,38 @@
1
+ /**
2
+ * A simple theme for reveal.js presentations, similar
3
+ * to the default theme. The accent color is darkblue.
4
+ *
5
+ * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
6
+ * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7
+ */
8
+
9
+
10
+ // Default mixins and settings -----------------
11
+ @import "../template/mixins";
12
+ @import "../template/settings";
13
+ // ---------------------------------------------
14
+
15
+
16
+
17
+ // Include theme-specific fonts
18
+ @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
19
+ @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
20
+
21
+
22
+ // Override theme settings (see ../template/settings.scss)
23
+ $mainFont: 'Lato', sans-serif;
24
+ $mainColor: #000;
25
+ $headingFont: 'News Cycle', Impact, sans-serif;
26
+ $headingColor: #000;
27
+ $headingTextShadow: none;
28
+ $headingTextTransform: none;
29
+ $backgroundColor: #fff;
30
+ $linkColor: #00008B;
31
+ $linkColorHover: lighten( $linkColor, 20% );
32
+ $selectionBackgroundColor: rgba(0, 0, 0, 0.99);
33
+
34
+
35
+
36
+ // Theme template ------------------------------
37
+ @import "../template/theme";
38
+ // ---------------------------------------------
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Sky theme for reveal.js.
3
+ *
4
+ * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5
+ */
6
+
7
+
8
+ // Default mixins and settings -----------------
9
+ @import "../template/mixins";
10
+ @import "../template/settings";
11
+ // ---------------------------------------------
12
+
13
+
14
+
15
+ // Include theme-specific fonts
16
+ @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic);
17
+ @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
18
+
19
+
20
+ // Override theme settings (see ../template/settings.scss)
21
+ $mainFont: 'Open Sans', sans-serif;
22
+ $mainColor: #333;
23
+ $headingFont: 'Quicksand', sans-serif;
24
+ $headingColor: #333;
25
+ $headingLetterSpacing: -0.08em;
26
+ $headingTextShadow: none;
27
+ $backgroundColor: #f7fbfc;
28
+ $linkColor: #3b759e;
29
+ $linkColorHover: lighten( $linkColor, 20% );
30
+ $selectionBackgroundColor: #134674;
31
+
32
+ // Fix links so they are not cut off
33
+ .reveal a:not(.image) {
34
+ line-height: 1.3em;
35
+ }
36
+
37
+ // Background generator
38
+ @mixin bodyBackground() {
39
+ @include radial-gradient( #add9e4, #f7fbfc );
40
+ }
41
+
42
+
43
+
44
+ // Theme template ------------------------------
45
+ @import "../template/theme";
46
+ // ---------------------------------------------
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Solarized Light theme for reveal.js.
3
+ * Author: Achim Staebler
4
+ */
5
+
6
+
7
+ // Default mixins and settings -----------------
8
+ @import "../template/mixins";
9
+ @import "../template/settings";
10
+ // ---------------------------------------------
11
+
12
+
13
+
14
+ // Include theme-specific fonts
15
+ @font-face {
16
+ font-family: 'League Gothic';
17
+ src: url('../../lib/font/league_gothic-webfont.eot');
18
+ src: url('../../lib/font/league_gothic-webfont.eot?#iefix') format('embedded-opentype'),
19
+ url('../../lib/font/league_gothic-webfont.woff') format('woff'),
20
+ url('../../lib/font/league_gothic-webfont.ttf') format('truetype'),
21
+ url('../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular') format('svg');
22
+
23
+ font-weight: normal;
24
+ font-style: normal;
25
+ }
26
+
27
+ @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
28
+
29
+
30
+ /**
31
+ * Solarized colors by Ethan Schoonover
32
+ */
33
+ html * {
34
+ color-profile: sRGB;
35
+ rendering-intent: auto;
36
+ }
37
+
38
+ // Solarized colors
39
+ $base03: #002b36;
40
+ $base02: #073642;
41
+ $base01: #586e75;
42
+ $base00: #657b83;
43
+ $base0: #839496;
44
+ $base1: #93a1a1;
45
+ $base2: #eee8d5;
46
+ $base3: #fdf6e3;
47
+ $yellow: #b58900;
48
+ $orange: #cb4b16;
49
+ $red: #dc322f;
50
+ $magenta: #d33682;
51
+ $violet: #6c71c4;
52
+ $blue: #268bd2;
53
+ $cyan: #2aa198;
54
+ $green: #859900;
55
+
56
+ // Override theme settings (see ../template/settings.scss)
57
+ $mainColor: $base00;
58
+ $headingColor: $base01;
59
+ $headingTextShadow: none;
60
+ $backgroundColor: $base3;
61
+ $linkColor: $blue;
62
+ $linkColorHover: lighten( $linkColor, 20% );
63
+ $selectionBackgroundColor: $magenta;
64
+
65
+ // Background generator
66
+ // @mixin bodyBackground() {
67
+ // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) );
68
+ // }
69
+
70
+
71
+
72
+ // Theme template ------------------------------
73
+ @import "../template/theme";
74
+ // ---------------------------------------------
@@ -0,0 +1,29 @@
1
+ @mixin vertical-gradient( $top, $bottom ) {
2
+ background: $top;
3
+ background: -moz-linear-gradient( top, $top 0%, $bottom 100% );
4
+ background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) );
5
+ background: -webkit-linear-gradient( top, $top 0%, $bottom 100% );
6
+ background: -o-linear-gradient( top, $top 0%, $bottom 100% );
7
+ background: -ms-linear-gradient( top, $top 0%, $bottom 100% );
8
+ background: linear-gradient( top, $top 0%, $bottom 100% );
9
+ }
10
+
11
+ @mixin horizontal-gradient( $top, $bottom ) {
12
+ background: $top;
13
+ background: -moz-linear-gradient( left, $top 0%, $bottom 100% );
14
+ background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) );
15
+ background: -webkit-linear-gradient( left, $top 0%, $bottom 100% );
16
+ background: -o-linear-gradient( left, $top 0%, $bottom 100% );
17
+ background: -ms-linear-gradient( left, $top 0%, $bottom 100% );
18
+ background: linear-gradient( left, $top 0%, $bottom 100% );
19
+ }
20
+
21
+ @mixin radial-gradient( $outer, $inner, $type: circle ) {
22
+ background: $outer;
23
+ background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
24
+ background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) );
25
+ background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
26
+ background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
27
+ background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
28
+ background: radial-gradient( center, $type cover, $inner 0%, $outer 100% );
29
+ }
@@ -0,0 +1,33 @@
1
+ // Base settings for all themes that can optionally be
2
+ // overridden by the super-theme
3
+
4
+ // Background of the presentation
5
+ $backgroundColor: #2b2b2b;
6
+
7
+ // Primary/body text
8
+ $mainFont: 'Lato', sans-serif;
9
+ $mainFontSize: 36px;
10
+ $mainColor: #eee;
11
+
12
+ // Headings
13
+ $headingFont: 'League Gothic', Impact, sans-serif;
14
+ $headingColor: #eee;
15
+ $headingLineHeight: 0.9em;
16
+ $headingLetterSpacing: 0.02em;
17
+ $headingTextTransform: uppercase;
18
+ $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2);
19
+ $heading1TextShadow: $headingTextShadow;
20
+
21
+ // Links and actions
22
+ $linkColor: #13DAEC;
23
+ $linkColorHover: lighten( $linkColor, 20% );
24
+
25
+ // Text selection
26
+ $selectionBackgroundColor: #FF5E99;
27
+ $selectionColor: #fff;
28
+
29
+ // Generates the presentation background, can be overridden
30
+ // to return a background image or gradient
31
+ @mixin bodyBackground() {
32
+ background: $backgroundColor;
33
+ }
@@ -0,0 +1,163 @@
1
+ // Base theme template for reveal.js
2
+
3
+ /*********************************************
4
+ * GLOBAL STYLES
5
+ *********************************************/
6
+
7
+ body {
8
+ @include bodyBackground();
9
+ background-color: $backgroundColor;
10
+ }
11
+
12
+ .reveal {
13
+ font-family: $mainFont;
14
+ font-size: $mainFontSize;
15
+ font-weight: 200;
16
+ letter-spacing: -0.02em;
17
+ color: $mainColor;
18
+ }
19
+
20
+ ::selection {
21
+ color: $selectionColor;
22
+ background: $selectionBackgroundColor;
23
+ text-shadow: none;
24
+ }
25
+
26
+ /*********************************************
27
+ * HEADERS
28
+ *********************************************/
29
+
30
+ .reveal h1,
31
+ .reveal h2,
32
+ .reveal h3,
33
+ .reveal h4,
34
+ .reveal h5,
35
+ .reveal h6 {
36
+ margin: 0 0 20px 0;
37
+ color: $headingColor;
38
+
39
+ font-family: $headingFont;
40
+ line-height: $headingLineHeight;
41
+ letter-spacing: $headingLetterSpacing;
42
+
43
+ text-transform: $headingTextTransform;
44
+ text-shadow: $headingTextShadow;
45
+ }
46
+
47
+ .reveal h1 {
48
+ text-shadow: $heading1TextShadow;
49
+ }
50
+
51
+
52
+ /*********************************************
53
+ * LINKS
54
+ *********************************************/
55
+
56
+ .reveal a:not(.image) {
57
+ color: $linkColor;
58
+ text-decoration: none;
59
+
60
+ -webkit-transition: color .15s ease;
61
+ -moz-transition: color .15s ease;
62
+ -ms-transition: color .15s ease;
63
+ -o-transition: color .15s ease;
64
+ transition: color .15s ease;
65
+ }
66
+ .reveal a:not(.image):hover {
67
+ color: $linkColorHover;
68
+
69
+ text-shadow: none;
70
+ border: none;
71
+ }
72
+
73
+ .reveal .roll span:after {
74
+ color: #fff;
75
+ background: darken( $linkColor, 15% );
76
+ }
77
+
78
+
79
+ /*********************************************
80
+ * IMAGES
81
+ *********************************************/
82
+
83
+ .reveal section img {
84
+ margin: 15px 0px;
85
+ background: rgba(255,255,255,0.12);
86
+ border: 4px solid $mainColor;
87
+
88
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
89
+
90
+ -webkit-transition: all .2s linear;
91
+ -moz-transition: all .2s linear;
92
+ -ms-transition: all .2s linear;
93
+ -o-transition: all .2s linear;
94
+ transition: all .2s linear;
95
+ }
96
+
97
+ .reveal a:hover img {
98
+ background: rgba(255,255,255,0.2);
99
+ border-color: $linkColor;
100
+
101
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
102
+ }
103
+
104
+
105
+ /*********************************************
106
+ * NAVIGATION CONTROLS
107
+ *********************************************/
108
+
109
+ .reveal .controls div.navigate-left,
110
+ .reveal .controls div.navigate-left.enabled {
111
+ border-right-color: $linkColor;
112
+ }
113
+
114
+ .reveal .controls div.navigate-right,
115
+ .reveal .controls div.navigate-right.enabled {
116
+ border-left-color: $linkColor;
117
+ }
118
+
119
+ .reveal .controls div.navigate-up,
120
+ .reveal .controls div.navigate-up.enabled {
121
+ border-bottom-color: $linkColor;
122
+ }
123
+
124
+ .reveal .controls div.navigate-down,
125
+ .reveal .controls div.navigate-down.enabled {
126
+ border-top-color: $linkColor;
127
+ }
128
+
129
+ .reveal .controls div.navigate-left.enabled:hover {
130
+ border-right-color: $linkColorHover;
131
+ }
132
+
133
+ .reveal .controls div.navigate-right.enabled:hover {
134
+ border-left-color: $linkColorHover;
135
+ }
136
+
137
+ .reveal .controls div.navigate-up.enabled:hover {
138
+ border-bottom-color: $linkColorHover;
139
+ }
140
+
141
+ .reveal .controls div.navigate-down.enabled:hover {
142
+ border-top-color: $linkColorHover;
143
+ }
144
+
145
+
146
+ /*********************************************
147
+ * PROGRESS BAR
148
+ *********************************************/
149
+
150
+ .reveal .progress {
151
+ background: rgba(0,0,0,0.2);
152
+ }
153
+ .reveal .progress span {
154
+ background: $linkColor;
155
+
156
+ -webkit-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
157
+ -moz-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
158
+ -ms-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
159
+ -o-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
160
+ transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
161
+ }
162
+
163
+
@@ -0,0 +1,8 @@
1
+ /**
2
+ Head JS The only script in your <HEAD>
3
+ Copyright Tero Piirainen (tipiirai)
4
+ License MIT / http://bit.ly/mit-license
5
+ Version 0.96
6
+
7
+ http://headjs.com
8
+ */(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c<a.length;c++)b.call(a,a[c],c)}}function r(a){var b;if(typeof a=="object")for(var c in a)a[c]&&(b={name:c,url:a[c]});else b={name:q(a),url:a};var d=h[b.name];if(d&&d.url===b.url)return d;h[b.name]=b;return b}function q(a){var b=a.split("/"),c=b[b.length-1],d=c.indexOf("?");return d!=-1?c.substring(0,d):c}function p(a){a._done||(a(),a._done=1)}var b=a.documentElement,c,d,e=[],f=[],g={},h={},i=a.createElement("script").async===!0||"MozAppearance"in a.documentElement.style||window.opera,j=window.head_conf&&head_conf.head||"head",k=window[j]=window[j]||function(){k.ready.apply(null,arguments)},l=1,m=2,n=3,o=4;i?k.js=function(){var a=arguments,b=a[a.length-1],c={};t(b)||(b=null),s(a,function(d,e){d!=b&&(d=r(d),c[d.name]=d,x(d,b&&e==a.length-2?function(){u(c)&&p(b)}:null))});return k}:k.js=function(){var a=arguments,b=[].slice.call(a,1),d=b[0];if(!c){f.push(function(){k.js.apply(null,a)});return k}d?(s(b,function(a){t(a)||w(r(a))}),x(r(a[0]),t(d)?d:function(){k.js.apply(null,b)})):x(r(a[0]));return k},k.ready=function(b,c){if(b==a){d?p(c):e.push(c);return k}t(b)&&(c=b,b="ALL");if(typeof b!="string"||!t(c))return k;var f=h[b];if(f&&f.state==o||b=="ALL"&&u()&&d){p(c);return k}var i=g[b];i?i.push(c):i=g[b]=[c];return k},k.ready(a,function(){u()&&s(g.ALL,function(a){p(a)}),k.feature&&k.feature("domloaded",!0)});if(window.addEventListener)a.addEventListener("DOMContentLoaded",z,!1),window.addEventListener("load",z,!1);else if(window.attachEvent){a.attachEvent("onreadystatechange",function(){a.readyState==="complete"&&z()});var A=1;try{A=window.frameElement}catch(B){}!A&&b.doScroll&&function(){try{b.doScroll("left"),z()}catch(a){setTimeout(arguments.callee,1);return}}(),window.attachEvent("onload",z)}!a.readyState&&a.addEventListener&&(a.readyState="loading",a.addEventListener("DOMContentLoaded",handler=function(){a.removeEventListener("DOMContentLoaded",handler,!1),a.readyState="complete"},!1)),setTimeout(function(){c=!0,s(f,function(a){a()})},300)})(document)