j1_template_mde 2018.4.17 → 2018.4.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/modules/boards/news_pin_board.html +10 -10
  3. data/_includes/themes/j1/modules/headers/master_header_generator.html +26 -26
  4. data/_includes/themes/j1/modules/search/algolia.html +181 -0
  5. data/_includes/themes/j1/modules/search/docsearch.html +42 -0
  6. data/_includes/themes/j1/procedures/layouts/content_writer.proc +8 -8
  7. data/_includes/themes/j1/procedures/layouts/default_writer.proc +11 -11
  8. data/_includes/themes/j1/procedures/layouts/module_writer.proc +7 -7
  9. data/_includes/themes/j1/procedures/layouts/resource_writer.proc +2 -2
  10. data/_includes/themes/j1/procedures/posts/collate_calendar.proc +3 -6
  11. data/_includes/themes/j1/procedures/posts/collate_list.proc +3 -9
  12. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +3 -3
  13. data/_includes/themes/j1/procedures/posts/create_ad_block.proc +3 -3
  14. data/_includes/themes/j1/procedures/posts/create_series_header.proc +4 -4
  15. data/_layouts/app.html +5 -5
  16. data/_layouts/blog_archive.html +5 -5
  17. data/_layouts/collection.html +5 -5
  18. data/_layouts/compress.html +2 -2
  19. data/_layouts/default.html +1 -0
  20. data/_layouts/home.html +5 -5
  21. data/_layouts/page.html +5 -5
  22. data/_layouts/post.html +5 -5
  23. data/_layouts/raw.html +5 -5
  24. data/lib/j1/version.rb +1 -1
  25. data/lib/starter_web/Gemfile +10 -9
  26. data/lib/starter_web/_config.yml +12 -1
  27. data/lib/starter_web/_data/apps/j1_carousel.yml +2 -2
  28. data/lib/starter_web/_data/j1_resources.yml +94 -91
  29. data/lib/starter_web/_data/layouts/home.yml +106 -61
  30. data/lib/starter_web/_data/modules/j1_back2top.yml +2 -2
  31. data/lib/starter_web/_data/modules/j1_banner.yml +154 -188
  32. data/lib/starter_web/_data/modules/j1_footer.yml +7 -7
  33. data/lib/starter_web/_data/modules/j1_header.yml +2 -2
  34. data/lib/starter_web/_data/modules/j1_navigator.yml +11 -11
  35. data/lib/starter_web/_data/modules/j1_navigator_menu.yml +15 -23
  36. data/lib/starter_web/_data/modules/j1_panel.yml +92 -304
  37. data/lib/starter_web/_data/modules/j1_toccer.yml +1 -1
  38. data/lib/starter_web/assets/data/banner.html +95 -26
  39. data/lib/starter_web/assets/data/menu.html +17 -17
  40. data/lib/starter_web/assets/data/panel.html +269 -201
  41. data/lib/starter_web/assets/data/panel.org.html +611 -0
  42. data/lib/starter_web/assets/images/blog/featured/{img3.jpg → welcome-to-j1-template.jpg} +0 -0
  43. data/lib/starter_web/assets/images/mdb/lightbox/default-skin.png +0 -0
  44. data/lib/starter_web/assets/images/mdb/lightbox/default-skin.svg +1 -0
  45. data/lib/starter_web/assets/images/mdb/lightbox/preloader.gif +0 -0
  46. data/lib/starter_web/assets/images/mdb/overlays/01.png +0 -0
  47. data/lib/starter_web/assets/images/mdb/overlays/02.png +0 -0
  48. data/lib/starter_web/assets/images/mdb/overlays/03.png +0 -0
  49. data/lib/starter_web/assets/images/mdb/overlays/04.png +0 -0
  50. data/lib/starter_web/assets/images/mdb/overlays/05.png +0 -0
  51. data/lib/starter_web/assets/images/mdb/overlays/06.png +0 -0
  52. data/lib/starter_web/assets/images/mdb/overlays/07.png +0 -0
  53. data/lib/starter_web/assets/images/mdb/overlays/08.png +0 -0
  54. data/lib/starter_web/assets/images/mdb/overlays/09.png +0 -0
  55. data/lib/starter_web/assets/images/mdb/svg/arrow_left.svg +4 -0
  56. data/lib/starter_web/assets/images/mdb/svg/arrow_right.svg +4 -0
  57. data/lib/starter_web/assets/themes/j1/core/css/bootstrap.css +0 -15
  58. data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.css +10969 -2746
  59. data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
  60. data/lib/starter_web/assets/themes/j1/core/css/uno.css +10558 -10317
  61. data/lib/starter_web/assets/themes/j1/core/css/uno.min.css +1 -1
  62. data/lib/starter_web/assets/themes/j1/core/css/vendor.css +30052 -28474
  63. data/lib/starter_web/assets/themes/j1/core/css/vendor.min.css +9 -2
  64. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Bold.eot +0 -0
  65. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Bold.ttf +0 -0
  66. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Bold.woff +0 -0
  67. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Bold.woff2 +0 -0
  68. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Light.eot +0 -0
  69. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Light.ttf +0 -0
  70. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Light.woff +0 -0
  71. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Light.woff2 +0 -0
  72. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Medium.eot +0 -0
  73. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Medium.ttf +0 -0
  74. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Medium.woff +0 -0
  75. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Medium.woff2 +0 -0
  76. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Regular.eot +0 -0
  77. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Regular.ttf +0 -0
  78. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Regular.woff +0 -0
  79. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Regular.woff2 +0 -0
  80. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Thin.eot +0 -0
  81. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Thin.ttf +0 -0
  82. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Thin.woff +0 -0
  83. data/lib/starter_web/assets/themes/j1/core/fonts/roboto/fonts/Roboto-Thin.woff2 +0 -0
  84. data/lib/starter_web/assets/themes/j1/core/js/adapter/master_header.js +108 -113
  85. data/lib/starter_web/assets/themes/j1/core/js/adapter/template.js +86 -27
  86. data/lib/starter_web/assets/themes/j1/core/js/template.js +17 -6
  87. data/lib/starter_web/assets/themes/j1/core/js/template.js.map +1 -1
  88. data/lib/starter_web/assets/themes/j1/core/js/template.min.js +1 -1
  89. data/lib/starter_web/assets/themes/j1/extensions/bmd/css/bootstrap-material-design.css +11194 -0
  90. data/lib/starter_web/assets/themes/j1/extensions/bmd/css/bootstrap-material-design.min.css +8 -0
  91. data/lib/starter_web/assets/themes/j1/extensions/bmd/js/bootstrap-material-design.js +6048 -0
  92. data/lib/starter_web/assets/themes/j1/extensions/bmd/js/bootstrap-material-design.js.map +1 -0
  93. data/lib/starter_web/assets/themes/j1/extensions/bmd/js/bootstrap-material-design.min.js +1 -0
  94. data/lib/starter_web/assets/themes/j1/extensions/bmd/js/umd/popper.js +2580 -0
  95. data/lib/starter_web/assets/themes/j1/extensions/bmd/js/umd/popper.min.js +5 -0
  96. data/lib/starter_web/assets/themes/j1/extensions/bmd/js/umd/popper.min.js.map +1 -0
  97. data/lib/starter_web/assets/themes/j1/extensions/light_gallery/js/lg-fullscreen.js +8 -2
  98. data/lib/starter_web/assets/themes/j1/extensions/mdb/CODE_OF_CONDUCT.md +39 -0
  99. data/lib/starter_web/assets/themes/j1/extensions/mdb/CONTRIBUTING.md +32 -0
  100. data/lib/starter_web/assets/themes/j1/extensions/mdb/License.pdf +0 -0
  101. data/lib/starter_web/assets/themes/j1/extensions/mdb/README.md +256 -0
  102. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/addons/datatables.css +147 -0
  103. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/addons/datatables.min.css +1 -0
  104. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/bootstrap.css +9030 -0
  105. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/bootstrap.min.css +7 -0
  106. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/mdb.css +8125 -0
  107. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/mdb.lite.css +5802 -0
  108. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/mdb.lite.min.css +38 -0
  109. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/mdb.min.css +44 -0
  110. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/modules/animations-extended.css +2327 -0
  111. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/modules/animations-extended.min.css +7 -0
  112. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/style.css +0 -0
  113. data/lib/starter_web/assets/themes/j1/extensions/mdb/css/style.min.css +0 -0
  114. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Bold.eot +0 -0
  115. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Bold.ttf +0 -0
  116. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Bold.woff +0 -0
  117. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Bold.woff2 +0 -0
  118. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Light.eot +0 -0
  119. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Light.ttf +0 -0
  120. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Light.woff +0 -0
  121. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Light.woff2 +0 -0
  122. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Medium.eot +0 -0
  123. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Medium.ttf +0 -0
  124. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Medium.woff +0 -0
  125. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Medium.woff2 +0 -0
  126. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Regular.eot +0 -0
  127. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Regular.ttf +0 -0
  128. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Regular.woff +0 -0
  129. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Regular.woff2 +0 -0
  130. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Thin.eot +0 -0
  131. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Thin.ttf +0 -0
  132. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Thin.woff +0 -0
  133. data/lib/starter_web/assets/themes/j1/extensions/mdb/font/roboto/Roboto-Thin.woff2 +0 -0
  134. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/lightbox/default-skin.png +0 -0
  135. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/lightbox/default-skin.svg +1 -0
  136. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/lightbox/preloader.gif +0 -0
  137. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/01.png +0 -0
  138. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/02.png +0 -0
  139. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/03.png +0 -0
  140. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/04.png +0 -0
  141. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/05.png +0 -0
  142. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/06.png +0 -0
  143. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/07.png +0 -0
  144. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/08.png +0 -0
  145. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/overlays/09.png +0 -0
  146. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/svg/arrow_left.svg +4 -0
  147. data/lib/starter_web/assets/themes/j1/extensions/mdb/img/svg/arrow_right.svg +4 -0
  148. data/lib/starter_web/assets/themes/j1/extensions/mdb/index.html +44 -0
  149. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/addons/datatables.js +15500 -0
  150. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/addons/datatables.min.js +3 -0
  151. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/bootstrap.js +3944 -0
  152. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/bootstrap.min.js +7 -0
  153. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/jquery-3.3.1.min.js +2 -0
  154. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/mdb.js +15730 -0
  155. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/mdb.min.js +1 -0
  156. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/chart.js +14456 -0
  157. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/default-file-input.js +22 -0
  158. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/enhanced-modals.js +26 -0
  159. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/forms-free.js +173 -0
  160. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/jquery.easing.js +205 -0
  161. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/scrolling-navbar.js +16 -0
  162. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/velocity.js +5 -0
  163. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/velocity.min.js +5 -0
  164. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/waves.js +603 -0
  165. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/modules/wow.js +180 -0
  166. data/lib/starter_web/assets/themes/j1/extensions/mdb/js/popper.min.js +5 -0
  167. data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1-template.adoc.erb +33 -17
  168. data/lib/starter_web/collections/posts/public/featured/_posts/2017-05-01-confusion-about-base-url.adoc +13 -3
  169. data/lib/starter_web/collections/posts/public/featured/_posts/2017-06-01-top-open-source-static-site-generators.adoc +5 -3
  170. data/lib/starter_web/collections/posts/public/featured/_posts/2017-07-01-what-is-a-static-site.adoc +23 -15
  171. data/lib/starter_web/index.html +24 -24
  172. data/lib/starter_web/package.json +1 -1
  173. data/lib/starter_web/pages/private/previewer/justified_gallery.html +1 -1
  174. data/lib/starter_web/pages/private/previewer/mdi_icons_preview.adoc +4 -4
  175. data/lib/starter_web/pages/public/panels/service_panel_components.adoc +36 -0
  176. data/lib/starter_web/pages/public/panels/service_panel_core.adoc +39 -0
  177. data/lib/starter_web/pages/public/panels/service_panel_modules.adoc +37 -0
  178. data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +84 -84
  179. data/lib/starter_web/pages/public/start/bmd_examples/000_includes/attributes.asciidoc +58 -0
  180. data/lib/starter_web/pages/public/start/bmd_examples/100_bmd_landing_page.adoc +256 -0
  181. data/lib/starter_web/pages/public/start/change_me_first.adoc +1 -4
  182. data/lib/starter_web/pages/public/start/roundtrip/100_present_images.adoc +10 -9
  183. data/lib/starter_web/pages/public/start/roundtrip/200_cards.adoc +33 -32
  184. data/lib/starter_web/pages/public/start/roundtrip/500_asciidoc_extensions.adoc +15 -0
  185. data/lib/starter_web/pages/public/start/roundtrip/{700_j1_modals.adoc → 700_extended_modals.adoc} +0 -0
  186. data/lib/starter_web/pages/public/start/roundtrip/800_search_engine.adoc +185 -0
  187. metadata +109 -7
  188. data/_includes/themes/j1/procedures/posts/_collate_timeline.proc +0 -253
  189. data/_layouts/_unused/default.html +0 -347
  190. data/_layouts/_unused/default.modal.html +0 -291
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ (function ($) {
4
+ $('.input-default-wrapper').on('change', '.input-default-js', function (e) {
5
+ var $this = $(e.target),
6
+ $label = $this.next('label'),
7
+ $files = $this[0].files;
8
+ var fileName = '';
9
+
10
+ if ($files && $files.length > 1) {
11
+ fileName = ($this.attr('data-multiple-target') || '').replace('{target}', $files.length);
12
+ } else if (e.target.value) {
13
+ fileName = e.target.value.split('\\').pop();
14
+ }
15
+
16
+ if (fileName) {
17
+ $label.find('.span-choose-file').html(fileName);
18
+ } else {
19
+ $label.html($label.html());
20
+ }
21
+ });
22
+ })(jQuery);
@@ -0,0 +1,26 @@
1
+ /*
2
+ Enhanced Bootstrap Modals
3
+ https://mdbootstrap.com
4
+ office@mdbootstrap.com
5
+ */
6
+
7
+ $('body').on('shown.bs.modal', '.modal', function() {
8
+ if($('.modal-backdrop').length) {
9
+ } else {
10
+
11
+ $modal_dialog = $(this).children('.modal-dialog')
12
+
13
+ if($modal_dialog.hasClass('modal-side')) {
14
+ $(this).addClass('modal-scrolling');
15
+ $('body').addClass('scrollable');
16
+ }
17
+
18
+ if($modal_dialog.hasClass('modal-frame')) {
19
+ $(this).addClass('modal-content-clickable');
20
+ $('body').addClass('scrollable');
21
+ }
22
+ }
23
+ });
24
+ $('body').on('hidden.bs.modal', '.modal', function() {
25
+ $('body').removeClass('scrollable');
26
+ });
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+
3
+ var _this = void 0;
4
+
5
+ (function ($) {
6
+ var inputSelector = "".concat(['text', 'password', 'email', 'url', 'tel', 'number', 'search', 'search-md'].map(function (selector) {
7
+ return "input[type=".concat(selector, "]");
8
+ }).join(', '), ", textarea");
9
+ var textAreaSelector = '.materialize-textarea';
10
+
11
+ var updateTextFields = function updateTextFields($input) {
12
+ var $labelAndIcon = $input.siblings('label, i');
13
+ var hasValue = $input.val().length;
14
+ var hasPlaceholder = $input.attr('placeholder');
15
+ var addOrRemove = "".concat(hasValue || hasPlaceholder ? 'add' : 'remove', "Class");
16
+ $labelAndIcon[addOrRemove]('active');
17
+ };
18
+
19
+ var validateField = function validateField($input) {
20
+ if ($input.hasClass('validate')) {
21
+ var value = $input.val();
22
+ var noValue = !value.length;
23
+ var isValid = !$input[0].validity.badInput;
24
+
25
+ if (noValue && isValid) {
26
+ $input.removeClass('valid').removeClass('invalid');
27
+ } else {
28
+ var valid = $input.is(':valid');
29
+ var length = Number($input.attr('length')) || 0;
30
+
31
+ if (valid && (!length || length > value.length)) {
32
+ $input.removeClass('invalid').addClass('valid');
33
+ } else {
34
+ $input.removeClass('valid').addClass('invalid');
35
+ }
36
+ }
37
+ }
38
+ };
39
+
40
+ var textAreaAutoResize = function textAreaAutoResize() {
41
+ var $textarea = $(_this);
42
+
43
+ if ($textarea.val().length) {
44
+ var $hiddenDiv = $('.hiddendiv');
45
+ var fontFamily = $textarea.css('font-family');
46
+ var fontSize = $textarea.css('font-size');
47
+
48
+ if (fontSize) {
49
+ $hiddenDiv.css('font-size', fontSize);
50
+ }
51
+
52
+ if (fontFamily) {
53
+ $hiddenDiv.css('font-family', fontFamily);
54
+ }
55
+
56
+ if ($textarea.attr('wrap') === 'off') {
57
+ $hiddenDiv.css('overflow-wrap', 'normal').css('white-space', 'pre');
58
+ }
59
+
60
+ $hiddenDiv.text("".concat($textarea.val(), "\n"));
61
+ var content = $hiddenDiv.html().replace(/\n/g, '<br>');
62
+ $hiddenDiv.html(content); // When textarea is hidden, width goes crazy.
63
+ // Approximate with half of window size
64
+
65
+ $hiddenDiv.css('width', $textarea.is(':visible') ? $textarea.width() : $(window).width() / 2);
66
+ $textarea.css('height', $hiddenDiv.height());
67
+ }
68
+ };
69
+
70
+ $(inputSelector).each(function (index, input) {
71
+ var $this = $(input);
72
+ var $labelAndIcon = $this.siblings('label, i');
73
+ updateTextFields($this);
74
+ var isValid = input.validity.badInput;
75
+
76
+ if (isValid) {
77
+ $labelAndIcon.addClass('active');
78
+ }
79
+ });
80
+ $(document).on('focus', inputSelector, function (e) {
81
+ $(e.target).siblings('label, i').addClass('active');
82
+ });
83
+ $(document).on('blur', inputSelector, function (e) {
84
+ var $this = $(e.target);
85
+ var noValue = !$this.val();
86
+ var invalid = !e.target.validity.badInput;
87
+ var noPlaceholder = $this.attr('placeholder') === undefined;
88
+
89
+ if (noValue && invalid && noPlaceholder) {
90
+ $this.siblings('label, i').removeClass('active');
91
+ }
92
+
93
+ validateField($this);
94
+ });
95
+ $(document).on('change', inputSelector, function (e) {
96
+ var $this = $(e.target);
97
+ updateTextFields($this);
98
+ validateField($this);
99
+ });
100
+ $('input[autofocus]').siblings('label, i').addClass('active');
101
+ $(document).on('reset', function (e) {
102
+ var $formReset = $(e.target);
103
+
104
+ if ($formReset.is('form')) {
105
+ var $formInputs = $formReset.find(inputSelector);
106
+ $formInputs.removeClass('valid').removeClass('invalid').each(function (index, input) {
107
+ var $this = $(input);
108
+ var noDefaultValue = !$this.val();
109
+ var noPlaceholder = !$this.attr('placeholder');
110
+
111
+ if (noDefaultValue && noPlaceholder) {
112
+ $this.siblings('label, i').removeClass('active');
113
+ }
114
+ });
115
+ $formReset.find('select.initialized').each(function (index, select) {
116
+ var $select = $(select);
117
+ var $visibleInput = $select.siblings('input.select-dropdown');
118
+ var defaultValue = $select.children('[selected]').val();
119
+ $select.val(defaultValue);
120
+ $visibleInput.val(defaultValue);
121
+ });
122
+ }
123
+ });
124
+
125
+ function init() {
126
+ var $text = $('.md-textarea-auto');
127
+
128
+ if ($text.length) {
129
+ var observe;
130
+
131
+ if (window.attachEvent) {
132
+ observe = function observe(element, event, handler) {
133
+ element.attachEvent("on".concat(event), handler);
134
+ };
135
+ } else {
136
+ observe = function observe(element, event, handler) {
137
+ element.addEventListener(event, handler, false);
138
+ };
139
+ }
140
+
141
+ $text.each(function () {
142
+ var self = this;
143
+
144
+ function resize() {
145
+ self.style.height = 'auto';
146
+ self.style.height = "".concat(self.scrollHeight, "px");
147
+ }
148
+
149
+ function delayedResize() {
150
+ window.setTimeout(resize, 0);
151
+ }
152
+
153
+ observe(self, 'change', resize);
154
+ observe(self, 'cut', delayedResize);
155
+ observe(self, 'paste', delayedResize);
156
+ observe(self, 'drop', delayedResize);
157
+ observe(self, 'keydown', delayedResize);
158
+ resize();
159
+ });
160
+ }
161
+ }
162
+
163
+ init();
164
+ var $body = $('body');
165
+
166
+ if (!$('.hiddendiv').first().length) {
167
+ var $hiddenDiv = $('<div class="hiddendiv common"></div>');
168
+ $body.append($hiddenDiv);
169
+ }
170
+
171
+ $(textAreaSelector).each(textAreaAutoResize);
172
+ $body.on('keyup keydown', textAreaSelector, textAreaAutoResize);
173
+ })(jQuery);
@@ -0,0 +1,205 @@
1
+ /*
2
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
3
+ *
4
+ * Uses the built in easing capabilities added In jQuery 1.1
5
+ * to offer multiple easing options
6
+ *
7
+ * TERMS OF USE - jQuery Easing
8
+ *
9
+ * Open source under the BSD License.
10
+ *
11
+ * Copyright © 2008 George McGinley Smith
12
+ * All rights reserved.
13
+ *
14
+ * Redistribution and use in source and binary forms, with or without modification,
15
+ * are permitted provided that the following conditions are met:
16
+ *
17
+ * Redistributions of source code must retain the above copyright notice, this list of
18
+ * conditions and the following disclaimer.
19
+ * Redistributions in binary form must reproduce the above copyright notice, this list
20
+ * of conditions and the following disclaimer in the documentation and/or other materials
21
+ * provided with the distribution.
22
+ *
23
+ * Neither the name of the author nor the names of contributors may be used to endorse
24
+ * or promote products derived from this software without specific prior written permission.
25
+ *
26
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
27
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
31
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ *
36
+ */
37
+
38
+ // t: current time, b: begInnIng value, c: change In value, d: duration
39
+ jQuery.easing['jswing'] = jQuery.easing['swing'];
40
+
41
+ jQuery.extend( jQuery.easing,
42
+ {
43
+ def: 'easeOutQuad',
44
+ swing: function (x, t, b, c, d) {
45
+ //alert(jQuery.easing.default);
46
+ return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
47
+ },
48
+ easeInQuad: function (x, t, b, c, d) {
49
+ return c*(t/=d)*t + b;
50
+ },
51
+ easeOutQuad: function (x, t, b, c, d) {
52
+ return -c *(t/=d)*(t-2) + b;
53
+ },
54
+ easeInOutQuad: function (x, t, b, c, d) {
55
+ if ((t/=d/2) < 1) return c/2*t*t + b;
56
+ return -c/2 * ((--t)*(t-2) - 1) + b;
57
+ },
58
+ easeInCubic: function (x, t, b, c, d) {
59
+ return c*(t/=d)*t*t + b;
60
+ },
61
+ easeOutCubic: function (x, t, b, c, d) {
62
+ return c*((t=t/d-1)*t*t + 1) + b;
63
+ },
64
+ easeInOutCubic: function (x, t, b, c, d) {
65
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
66
+ return c/2*((t-=2)*t*t + 2) + b;
67
+ },
68
+ easeInQuart: function (x, t, b, c, d) {
69
+ return c*(t/=d)*t*t*t + b;
70
+ },
71
+ easeOutQuart: function (x, t, b, c, d) {
72
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
73
+ },
74
+ easeInOutQuart: function (x, t, b, c, d) {
75
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
76
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
77
+ },
78
+ easeInQuint: function (x, t, b, c, d) {
79
+ return c*(t/=d)*t*t*t*t + b;
80
+ },
81
+ easeOutQuint: function (x, t, b, c, d) {
82
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
83
+ },
84
+ easeInOutQuint: function (x, t, b, c, d) {
85
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
86
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
87
+ },
88
+ easeInSine: function (x, t, b, c, d) {
89
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
90
+ },
91
+ easeOutSine: function (x, t, b, c, d) {
92
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
93
+ },
94
+ easeInOutSine: function (x, t, b, c, d) {
95
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
96
+ },
97
+ easeInExpo: function (x, t, b, c, d) {
98
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
99
+ },
100
+ easeOutExpo: function (x, t, b, c, d) {
101
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
102
+ },
103
+ easeInOutExpo: function (x, t, b, c, d) {
104
+ if (t==0) return b;
105
+ if (t==d) return b+c;
106
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
107
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
108
+ },
109
+ easeInCirc: function (x, t, b, c, d) {
110
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
111
+ },
112
+ easeOutCirc: function (x, t, b, c, d) {
113
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
114
+ },
115
+ easeInOutCirc: function (x, t, b, c, d) {
116
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
117
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
118
+ },
119
+ easeInElastic: function (x, t, b, c, d) {
120
+ var s=1.70158;var p=0;var a=c;
121
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
122
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
123
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
124
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
125
+ },
126
+ easeOutElastic: function (x, t, b, c, d) {
127
+ var s=1.70158;var p=0;var a=c;
128
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
129
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
130
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
131
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
132
+ },
133
+ easeInOutElastic: function (x, t, b, c, d) {
134
+ var s=1.70158;var p=0;var a=c;
135
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
136
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
137
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
138
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
139
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
140
+ },
141
+ easeInBack: function (x, t, b, c, d, s) {
142
+ if (s == undefined) s = 1.70158;
143
+ return c*(t/=d)*t*((s+1)*t - s) + b;
144
+ },
145
+ easeOutBack: function (x, t, b, c, d, s) {
146
+ if (s == undefined) s = 1.70158;
147
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
148
+ },
149
+ easeInOutBack: function (x, t, b, c, d, s) {
150
+ if (s == undefined) s = 1.70158;
151
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
152
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
153
+ },
154
+ easeInBounce: function (x, t, b, c, d) {
155
+ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
156
+ },
157
+ easeOutBounce: function (x, t, b, c, d) {
158
+ if ((t/=d) < (1/2.75)) {
159
+ return c*(7.5625*t*t) + b;
160
+ } else if (t < (2/2.75)) {
161
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
162
+ } else if (t < (2.5/2.75)) {
163
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
164
+ } else {
165
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
166
+ }
167
+ },
168
+ easeInOutBounce: function (x, t, b, c, d) {
169
+ if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
170
+ return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
171
+ }
172
+ });
173
+
174
+ /*
175
+ *
176
+ * TERMS OF USE - EASING EQUATIONS
177
+ *
178
+ * Open source under the BSD License.
179
+ *
180
+ * Copyright © 2001 Robert Penner
181
+ * All rights reserved.
182
+ *
183
+ * Redistribution and use in source and binary forms, with or without modification,
184
+ * are permitted provided that the following conditions are met:
185
+ *
186
+ * Redistributions of source code must retain the above copyright notice, this list of
187
+ * conditions and the following disclaimer.
188
+ * Redistributions in binary form must reproduce the above copyright notice, this list
189
+ * of conditions and the following disclaimer in the documentation and/or other materials
190
+ * provided with the distribution.
191
+ *
192
+ * Neither the name of the author nor the names of contributors may be used to endorse
193
+ * or promote products derived from this software without specific prior written permission.
194
+ *
195
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
196
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
197
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
198
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
199
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
200
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
201
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
202
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
203
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
204
+ *
205
+ */
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ (function ($) {
4
+ var SCROLLING_NAVBAR_OFFSET_TOP = 50;
5
+ $(window).on('scroll', function () {
6
+ var $navbar = $('.navbar');
7
+
8
+ if ($navbar.length) {
9
+ if ($navbar.offset().top > SCROLLING_NAVBAR_OFFSET_TOP) {
10
+ $('.scrolling-navbar').addClass('top-nav-collapse');
11
+ } else {
12
+ $('.scrolling-navbar').removeClass('top-nav-collapse');
13
+ }
14
+ }
15
+ });
16
+ })(jQuery);
@@ -0,0 +1,5 @@
1
+ /*! VelocityJS.org (1.2.3). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
2
+ /*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
3
+ /*! Note that this has been modified by Materialize to confirm that Velocity is not already being imported. */
4
+ jQuery.Velocity?console.log("Velocity is already loaded. You may be needlessly importing Velocity again; note that Materialize includes Velocity."):(!function(e){function t(e){var t=e.length,a=r.type(e);return"function"===a||r.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===a||0===t||"number"==typeof t&&t>0&&t-1 in e}if(!e.jQuery){var r=function(e,t){return new r.fn.init(e,t)};r.isWindow=function(e){return null!=e&&e==e.window},r.type=function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e},r.isArray=Array.isArray||function(e){return"array"===r.type(e)},r.isPlainObject=function(e){var t;if(!e||"object"!==r.type(e)||e.nodeType||r.isWindow(e))return!1;try{if(e.constructor&&!o.call(e,"constructor")&&!o.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}for(t in e);return void 0===t||o.call(e,t)},r.each=function(e,r,a){var n,o=0,i=e.length,s=t(e);if(a){if(s)for(;i>o&&(n=r.apply(e[o],a),n!==!1);o++);else for(o in e)if(n=r.apply(e[o],a),n===!1)break}else if(s)for(;i>o&&(n=r.call(e[o],o,e[o]),n!==!1);o++);else for(o in e)if(n=r.call(e[o],o,e[o]),n===!1)break;return e},r.data=function(e,t,n){if(void 0===n){var o=e[r.expando],i=o&&a[o];if(void 0===t)return i;if(i&&t in i)return i[t]}else if(void 0!==t){var o=e[r.expando]||(e[r.expando]=++r.uuid);return a[o]=a[o]||{},a[o][t]=n,n}},r.removeData=function(e,t){var n=e[r.expando],o=n&&a[n];o&&r.each(t,function(e,t){delete o[t]})},r.extend=function(){var e,t,a,n,o,i,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[l]||{},l++),"object"!=typeof s&&"function"!==r.type(s)&&(s={}),l===u&&(s=this,l--);u>l;l++)if(null!=(o=arguments[l]))for(n in o)e=s[n],a=o[n],s!==a&&(c&&a&&(r.isPlainObject(a)||(t=r.isArray(a)))?(t?(t=!1,i=e&&r.isArray(e)?e:[]):i=e&&r.isPlainObject(e)?e:{},s[n]=r.extend(c,i,a)):void 0!==a&&(s[n]=a));return s},r.queue=function(e,a,n){function o(e,r){var a=r||[];return null!=e&&(t(Object(e))?!function(e,t){for(var r=+t.length,a=0,n=e.length;r>a;)e[n++]=t[a++];if(r!==r)for(;void 0!==t[a];)e[n++]=t[a++];return e.length=n,e}(a,"string"==typeof e?[e]:e):[].push.call(a,e)),a}if(e){a=(a||"fx")+"queue";var i=r.data(e,a);return n?(!i||r.isArray(n)?i=r.data(e,a,o(n)):i.push(n),i):i||[]}},r.dequeue=function(e,t){r.each(e.nodeType?[e]:e,function(e,a){t=t||"fx";var n=r.queue(a,t),o=n.shift();"inprogress"===o&&(o=n.shift()),o&&("fx"===t&&n.unshift("inprogress"),o.call(a,function(){r.dequeue(a,t)}))})},r.fn=r.prototype={init:function(e){if(e.nodeType)return this[0]=e,this;throw new Error("Not a DOM node.")},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(e.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(e.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function e(){for(var e=this.offsetParent||document;e&&"html"===!e.nodeType.toLowerCase&&"static"===e.style.position;)e=e.offsetParent;return e||document}var t=this[0],e=e.apply(t),a=this.offset(),n=/^(?:body|html)$/i.test(e.nodeName)?{top:0,left:0}:r(e).offset();return a.top-=parseFloat(t.style.marginTop)||0,a.left-=parseFloat(t.style.marginLeft)||0,e.style&&(n.top+=parseFloat(e.style.borderTopWidth)||0,n.left+=parseFloat(e.style.borderLeftWidth)||0),{top:a.top-n.top,left:a.left-n.left}}};var a={};r.expando="velocity"+(new Date).getTime(),r.uuid=0;for(var n={},o=n.hasOwnProperty,i=n.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),l=0;l<s.length;l++)n["[object "+s[l]+"]"]=s[l].toLowerCase();r.fn.init.prototype=r.fn,e.Velocity={Utilities:r}}}(window),function(e){"object"==typeof module&&"object"==typeof module.exports?module.exports=e():"function"==typeof define&&define.amd?define(e):e()}(function(){return function(e,t,r,a){function n(e){for(var t=-1,r=e?e.length:0,a=[];++t<r;){var n=e[t];n&&a.push(n)}return a}function o(e){return m.isWrapped(e)?e=[].slice.call(e):m.isNode(e)&&(e=[e]),e}function i(e){var t=f.data(e,"velocity");return null===t?a:t}function s(e){return function(t){return Math.round(t*e)*(1/e)}}function l(e,r,a,n){function o(e,t){return 1-3*t+3*e}function i(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,r){return((o(t,r)*e+i(t,r))*e+s(t))*e}function u(e,t,r){return 3*o(t,r)*e*e+2*i(t,r)*e+s(t)}function c(t,r){for(var n=0;m>n;++n){var o=u(r,e,a);if(0===o)return r;var i=l(r,e,a)-t;r-=i/o}return r}function p(){for(var t=0;b>t;++t)w[t]=l(t*x,e,a)}function f(t,r,n){var o,i,s=0;do i=r+(n-r)/2,o=l(i,e,a)-t,o>0?n=i:r=i;while(Math.abs(o)>h&&++s<v);return i}function d(t){for(var r=0,n=1,o=b-1;n!=o&&w[n]<=t;++n)r+=x;--n;var i=(t-w[n])/(w[n+1]-w[n]),s=r+i*x,l=u(s,e,a);return l>=y?c(t,s):0==l?s:f(t,r,r+x)}function g(){V=!0,(e!=r||a!=n)&&p()}var m=4,y=.001,h=1e-7,v=10,b=11,x=1/(b-1),S="Float32Array"in t;if(4!==arguments.length)return!1;for(var P=0;4>P;++P)if("number"!=typeof arguments[P]||isNaN(arguments[P])||!isFinite(arguments[P]))return!1;e=Math.min(e,1),a=Math.min(a,1),e=Math.max(e,0),a=Math.max(a,0);var w=S?new Float32Array(b):new Array(b),V=!1,C=function(t){return V||g(),e===r&&a===n?t:0===t?0:1===t?1:l(d(t),r,n)};C.getControlPoints=function(){return[{x:e,y:r},{x:a,y:n}]};var T="generateBezier("+[e,r,a,n]+")";return C.toString=function(){return T},C}function u(e,t){var r=e;return m.isString(e)?b.Easings[e]||(r=!1):r=m.isArray(e)&&1===e.length?s.apply(null,e):m.isArray(e)&&2===e.length?x.apply(null,e.concat([t])):m.isArray(e)&&4===e.length?l.apply(null,e):!1,r===!1&&(r=b.Easings[b.defaults.easing]?b.defaults.easing:v),r}function c(e){if(e){var t=(new Date).getTime(),r=b.State.calls.length;r>1e4&&(b.State.calls=n(b.State.calls));for(var o=0;r>o;o++)if(b.State.calls[o]){var s=b.State.calls[o],l=s[0],u=s[2],d=s[3],g=!!d,y=null;d||(d=b.State.calls[o][3]=t-16);for(var h=Math.min((t-d)/u.duration,1),v=0,x=l.length;x>v;v++){var P=l[v],V=P.element;if(i(V)){var C=!1;if(u.display!==a&&null!==u.display&&"none"!==u.display){if("flex"===u.display){var T=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];f.each(T,function(e,t){S.setPropertyValue(V,"display",t)})}S.setPropertyValue(V,"display",u.display)}u.visibility!==a&&"hidden"!==u.visibility&&S.setPropertyValue(V,"visibility",u.visibility);for(var k in P)if("element"!==k){var A,F=P[k],j=m.isString(F.easing)?b.Easings[F.easing]:F.easing;if(1===h)A=F.endValue;else{var E=F.endValue-F.startValue;if(A=F.startValue+E*j(h,u,E),!g&&A===F.currentValue)continue}if(F.currentValue=A,"tween"===k)y=A;else{if(S.Hooks.registered[k]){var H=S.Hooks.getRoot(k),N=i(V).rootPropertyValueCache[H];N&&(F.rootPropertyValue=N)}var L=S.setPropertyValue(V,k,F.currentValue+(0===parseFloat(A)?"":F.unitType),F.rootPropertyValue,F.scrollData);S.Hooks.registered[k]&&(i(V).rootPropertyValueCache[H]=S.Normalizations.registered[H]?S.Normalizations.registered[H]("extract",null,L[1]):L[1]),"transform"===L[0]&&(C=!0)}}u.mobileHA&&i(V).transformCache.translate3d===a&&(i(V).transformCache.translate3d="(0px, 0px, 0px)",C=!0),C&&S.flushTransformCache(V)}}u.display!==a&&"none"!==u.display&&(b.State.calls[o][2].display=!1),u.visibility!==a&&"hidden"!==u.visibility&&(b.State.calls[o][2].visibility=!1),u.progress&&u.progress.call(s[1],s[1],h,Math.max(0,d+u.duration-t),d,y),1===h&&p(o)}}b.State.isTicking&&w(c)}function p(e,t){if(!b.State.calls[e])return!1;for(var r=b.State.calls[e][0],n=b.State.calls[e][1],o=b.State.calls[e][2],s=b.State.calls[e][4],l=!1,u=0,c=r.length;c>u;u++){var p=r[u].element;if(t||o.loop||("none"===o.display&&S.setPropertyValue(p,"display",o.display),"hidden"===o.visibility&&S.setPropertyValue(p,"visibility",o.visibility)),o.loop!==!0&&(f.queue(p)[1]===a||!/\.velocityQueueEntryFlag/i.test(f.queue(p)[1]))&&i(p)){i(p).isAnimating=!1,i(p).rootPropertyValueCache={};var d=!1;f.each(S.Lists.transforms3D,function(e,t){var r=/^scale/.test(t)?1:0,n=i(p).transformCache[t];i(p).transformCache[t]!==a&&new RegExp("^\\("+r+"[^.]").test(n)&&(d=!0,delete i(p).transformCache[t])}),o.mobileHA&&(d=!0,delete i(p).transformCache.translate3d),d&&S.flushTransformCache(p),S.Values.removeClass(p,"velocity-animating")}if(!t&&o.complete&&!o.loop&&u===c-1)try{o.complete.call(n,n)}catch(g){setTimeout(function(){throw g},1)}s&&o.loop!==!0&&s(n),i(p)&&o.loop===!0&&!t&&(f.each(i(p).tweensContainer,function(e,t){/^rotate/.test(e)&&360===parseFloat(t.endValue)&&(t.endValue=0,t.startValue=360),/^backgroundPosition/.test(e)&&100===parseFloat(t.endValue)&&"%"===t.unitType&&(t.endValue=0,t.startValue=100)}),b(p,"reverse",{loop:!0,delay:o.delay})),o.queue!==!1&&f.dequeue(p,o.queue)}b.State.calls[e]=!1;for(var m=0,y=b.State.calls.length;y>m;m++)if(b.State.calls[m]!==!1){l=!0;break}l===!1&&(b.State.isTicking=!1,delete b.State.calls,b.State.calls=[])}var f,d=function(){if(r.documentMode)return r.documentMode;for(var e=7;e>4;e--){var t=r.createElement("div");if(t.innerHTML="<!--[if IE "+e+"]><span></span><![endif]-->",t.getElementsByTagName("span").length)return t=null,e}return a}(),g=function(){var e=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var r,a=(new Date).getTime();return r=Math.max(0,16-(a-e)),e=a+r,setTimeout(function(){t(a+r)},r)}}(),m={isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isNodeList:function(e){return"object"==typeof e&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&e.length!==a&&(0===e.length||"object"==typeof e[0]&&e[0].nodeType>0)},isWrapped:function(e){return e&&(e.jquery||t.Zepto&&t.Zepto.zepto.isZ(e))},isSVG:function(e){return t.SVGElement&&e instanceof t.SVGElement},isEmptyObject:function(e){for(var t in e)return!1;return!0}},y=!1;if(e.fn&&e.fn.jquery?(f=e,y=!0):f=t.Velocity.Utilities,8>=d&&!y)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=d)return void(jQuery.fn.velocity=jQuery.fn.animate);var h=400,v="swing",b={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:r.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:f,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:h,easing:v,begin:a,complete:a,progress:a,display:a,visibility:a,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(e){f.data(e,"velocity",{isSVG:m.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};t.pageYOffset!==a?(b.State.scrollAnchor=t,b.State.scrollPropertyLeft="pageXOffset",b.State.scrollPropertyTop="pageYOffset"):(b.State.scrollAnchor=r.documentElement||r.body.parentNode||r.body,b.State.scrollPropertyLeft="scrollLeft",b.State.scrollPropertyTop="scrollTop");var x=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,r,a){var n={x:t.x+a.dx*r,v:t.v+a.dv*r,tension:t.tension,friction:t.friction};return{dx:n.v,dv:e(n)}}function r(r,a){var n={dx:r.v,dv:e(r)},o=t(r,.5*a,n),i=t(r,.5*a,o),s=t(r,a,i),l=1/6*(n.dx+2*(o.dx+i.dx)+s.dx),u=1/6*(n.dv+2*(o.dv+i.dv)+s.dv);return r.x=r.x+l*a,r.v=r.v+u*a,r}return function a(e,t,n){var o,i,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,p=1e-4,f=.016;for(e=parseFloat(e)||500,t=parseFloat(t)||20,n=n||null,l.tension=e,l.friction=t,o=null!==n,o?(c=a(e,t),i=c/n*f):i=f;s=r(s||l,i),u.push(1+s.x),c+=16,Math.abs(s.x)>p&&Math.abs(s.v)>p;);return o?function(e){return u[e*(u.length-1)|0]}:c}}();b.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}},f.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(e,t){b.Easings[t[0]]=l.apply(null,t[1])});var S=b.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e<S.Lists.colors.length;e++){var t="color"===S.Lists.colors[e]?"0 0 0 1":"255 255 255 1";S.Hooks.templates[S.Lists.colors[e]]=["Red Green Blue Alpha",t]}var r,a,n;if(d)for(r in S.Hooks.templates){a=S.Hooks.templates[r],n=a[0].split(" ");var o=a[1].match(S.RegEx.valueSplit);"Color"===n[0]&&(n.push(n.shift()),o.push(o.shift()),S.Hooks.templates[r]=[n.join(" "),o.join(" ")])}for(r in S.Hooks.templates){a=S.Hooks.templates[r],n=a[0].split(" ");for(var e in n){var i=r+n[e],s=e;S.Hooks.registered[i]=[r,s]}}},getRoot:function(e){var t=S.Hooks.registered[e];return t?t[0]:e},cleanRootPropertyValue:function(e,t){return S.RegEx.valueUnwrap.test(t)&&(t=t.match(S.RegEx.valueUnwrap)[1]),S.Values.isCSSNullValue(t)&&(t=S.Hooks.templates[e][1]),t},extractValue:function(e,t){var r=S.Hooks.registered[e];if(r){var a=r[0],n=r[1];return t=S.Hooks.cleanRootPropertyValue(a,t),t.toString().match(S.RegEx.valueSplit)[n]}return t},injectValue:function(e,t,r){var a=S.Hooks.registered[e];if(a){var n,o,i=a[0],s=a[1];return r=S.Hooks.cleanRootPropertyValue(i,r),n=r.toString().match(S.RegEx.valueSplit),n[s]=t,o=n.join(" ")}return r}},Normalizations:{registered:{clip:function(e,t,r){switch(e){case"name":return"clip";case"extract":var a;return S.RegEx.wrappedValueAlreadyExtracted.test(r)?a=r:(a=r.toString().match(S.RegEx.valueUnwrap),a=a?a[1].replace(/,(\s+)?/g," "):r),a;case"inject":return"rect("+r+")"}},blur:function(e,t,r){switch(e){case"name":return b.State.isFirefox?"filter":"-webkit-filter";case"extract":var a=parseFloat(r);if(!a&&0!==a){var n=r.toString().match(/blur\(([0-9]+[A-z]+)\)/i);a=n?n[1]:0}return a;case"inject":return parseFloat(r)?"blur("+r+")":"none"}},opacity:function(e,t,r){if(8>=d)switch(e){case"name":return"filter";case"extract":var a=r.toString().match(/alpha\(opacity=(.*)\)/i);return r=a?a[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(r)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(e){case"name":return"opacity";case"extract":return r;case"inject":return r}}},register:function(){9>=d||b.State.isGingerbread||(S.Lists.transformsBase=S.Lists.transformsBase.concat(S.Lists.transforms3D));for(var e=0;e<S.Lists.transformsBase.length;e++)!function(){var t=S.Lists.transformsBase[e];S.Normalizations.registered[t]=function(e,r,n){switch(e){case"name":return"transform";case"extract":return i(r)===a||i(r).transformCache[t]===a?/^scale/i.test(t)?1:0:i(r).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(n);break;case"scal":case"scale":b.State.isAndroid&&i(r).transformCache[t]===a&&1>n&&(n=1),o=!/(\d)$/i.test(n);break;case"skew":o=!/(deg|\d)$/i.test(n);break;case"rotate":o=!/(deg|\d)$/i.test(n)}return o||(i(r).transformCache[t]="("+n+")"),i(r).transformCache[t]}}}();for(var e=0;e<S.Lists.colors.length;e++)!function(){var t=S.Lists.colors[e];S.Normalizations.registered[t]=function(e,r,n){switch(e){case"name":return t;case"extract":var o;if(S.RegEx.wrappedValueAlreadyExtracted.test(n))o=n;else{var i,s={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(n)?i=s[n]!==a?s[n]:s.black:S.RegEx.isHex.test(n)?i="rgb("+S.Values.hexToRgb(n).join(" ")+")":/^rgba?\(/i.test(n)||(i=s.black),o=(i||n).toString().match(S.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return 8>=d||3!==o.split(" ").length||(o+=" 1"),o;case"inject":return 8>=d?4===n.split(" ").length&&(n=n.split(/\s+/).slice(0,3).join(" ")):3===n.split(" ").length&&(n+=" 1"),(8>=d?"rgb":"rgba")+"("+n.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(d||b.State.isAndroid&&!b.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(b.State.prefixMatches[e])return[b.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],r=0,a=t.length;a>r;r++){var n;if(n=0===r?e:t[r]+e.replace(/^\w/,function(e){return e.toUpperCase()}),m.isString(b.State.prefixElement.style[n]))return b.State.prefixMatches[e]=n,[n,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t,r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return e=e.replace(r,function(e,t,r,a){return t+t+r+r+a+a}),t=a.exec(e),t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(e){return 0==e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e&&e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(e,t){e.classList?e.classList.add(t):e.className+=(e.className.length?" ":"")+t},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(e,r,n,o){function s(e,r){function n(){u&&S.setPropertyValue(e,"display","none")}var l=0;if(8>=d)l=f.css(e,r);else{var u=!1;if(/^(width|height)$/.test(r)&&0===S.getPropertyValue(e,"display")&&(u=!0,S.setPropertyValue(e,"display",S.Values.getDisplayType(e))),!o){if("height"===r&&"border-box"!==S.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(S.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(S.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(S.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(S.getPropertyValue(e,"paddingBottom"))||0);return n(),c}if("width"===r&&"border-box"!==S.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var p=e.offsetWidth-(parseFloat(S.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(S.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(S.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(S.getPropertyValue(e,"paddingRight"))||0);return n(),p}}var g;g=i(e)===a?t.getComputedStyle(e,null):i(e).computedStyle?i(e).computedStyle:i(e).computedStyle=t.getComputedStyle(e,null),"borderColor"===r&&(r="borderTopColor"),l=9===d&&"filter"===r?g.getPropertyValue(r):g[r],(""===l||null===l)&&(l=e.style[r]),n()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(r)){var m=s(e,"position");("fixed"===m||"absolute"===m&&/top|left/i.test(r))&&(l=f(e).position()[r]+"px")}return l}var l;if(S.Hooks.registered[r]){var u=r,c=S.Hooks.getRoot(u);n===a&&(n=S.getPropertyValue(e,S.Names.prefixCheck(c)[0])),S.Normalizations.registered[c]&&(n=S.Normalizations.registered[c]("extract",e,n)),l=S.Hooks.extractValue(u,n)}else if(S.Normalizations.registered[r]){var p,g;p=S.Normalizations.registered[r]("name",e),"transform"!==p&&(g=s(e,S.Names.prefixCheck(p)[0]),S.Values.isCSSNullValue(g)&&S.Hooks.templates[r]&&(g=S.Hooks.templates[r][1])),l=S.Normalizations.registered[r]("extract",e,g)}if(!/^[\d-]/.test(l))if(i(e)&&i(e).isSVG&&S.Names.SVGAttribute(r))if(/^(height|width)$/i.test(r))try{l=e.getBBox()[r]}catch(m){l=0}else l=e.getAttribute(r);else l=s(e,S.Names.prefixCheck(r)[0]);return S.Values.isCSSNullValue(l)&&(l=0),b.debug>=2&&console.log("Get "+r+": "+l),l},setPropertyValue:function(e,r,a,n,o){var s=r;if("scroll"===r)o.container?o.container["scroll"+o.direction]=a:"Left"===o.direction?t.scrollTo(a,o.alternateValue):t.scrollTo(o.alternateValue,a);else if(S.Normalizations.registered[r]&&"transform"===S.Normalizations.registered[r]("name",e))S.Normalizations.registered[r]("inject",e,a),s="transform",a=i(e).transformCache[r];else{if(S.Hooks.registered[r]){var l=r,u=S.Hooks.getRoot(r);n=n||S.getPropertyValue(e,u),a=S.Hooks.injectValue(l,a,n),r=u}if(S.Normalizations.registered[r]&&(a=S.Normalizations.registered[r]("inject",e,a),r=S.Normalizations.registered[r]("name",e)),s=S.Names.prefixCheck(r)[0],8>=d)try{e.style[s]=a}catch(c){b.debug&&console.log("Browser does not support ["+a+"] for ["+s+"]")}else i(e)&&i(e).isSVG&&S.Names.SVGAttribute(r)?e.setAttribute(r,a):e.style[s]=a;b.debug>=2&&console.log("Set "+r+" ("+s+"): "+a)}return[s,a]},flushTransformCache:function(e){function t(t){return parseFloat(S.getPropertyValue(e,t))}var r="";if((d||b.State.isAndroid&&!b.State.isChrome)&&i(e).isSVG){var a={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]};f.each(i(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),a[e]&&(r+=e+"("+a[e].join(" ")+") ",delete a[e])})}else{var n,o;f.each(i(e).transformCache,function(t){return n=i(e).transformCache[t],"transformPerspective"===t?(o=n,!0):(9===d&&"rotateZ"===t&&(t="rotate"),void(r+=t+n+" "))}),o&&(r="perspective"+o+" "+r)}S.setPropertyValue(e,"transform",r)}};S.Hooks.register(),S.Normalizations.register(),b.hook=function(e,t,r){var n=a;return e=o(e),f.each(e,function(e,o){if(i(o)===a&&b.init(o),r===a)n===a&&(n=b.CSS.getPropertyValue(o,t));else{var s=b.CSS.setPropertyValue(o,t,r);"transform"===s[0]&&b.CSS.flushTransformCache(o),n=s}}),n};var P=function(){function e(){return s?k.promise||null:l}function n(){function e(e){function p(e,t){var r=a,n=a,i=a;return m.isArray(e)?(r=e[0],!m.isArray(e[1])&&/^[\d-]/.test(e[1])||m.isFunction(e[1])||S.RegEx.isHex.test(e[1])?i=e[1]:(m.isString(e[1])&&!S.RegEx.isHex.test(e[1])||m.isArray(e[1]))&&(n=t?e[1]:u(e[1],s.duration),e[2]!==a&&(i=e[2]))):r=e,t||(n=n||s.easing),m.isFunction(r)&&(r=r.call(o,V,w)),m.isFunction(i)&&(i=i.call(o,V,w)),[r||0,n,i]}function d(e,t){var r,a;return a=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(e){return r=e,""}),r||(r=S.Values.getUnitType(e)),[a,r]}function h(){var e={myParent:o.parentNode||r.body,position:S.getPropertyValue(o,"position"),fontSize:S.getPropertyValue(o,"fontSize")},a=e.position===L.lastPosition&&e.myParent===L.lastParent,n=e.fontSize===L.lastFontSize;L.lastParent=e.myParent,L.lastPosition=e.position,L.lastFontSize=e.fontSize;var s=100,l={};if(n&&a)l.emToPx=L.lastEmToPx,l.percentToPxWidth=L.lastPercentToPxWidth,l.percentToPxHeight=L.lastPercentToPxHeight;else{var u=i(o).isSVG?r.createElementNS("http://www.w3.org/2000/svg","rect"):r.createElement("div");b.init(u),e.myParent.appendChild(u),f.each(["overflow","overflowX","overflowY"],function(e,t){b.CSS.setPropertyValue(u,t,"hidden")}),b.CSS.setPropertyValue(u,"position",e.position),b.CSS.setPropertyValue(u,"fontSize",e.fontSize),b.CSS.setPropertyValue(u,"boxSizing","content-box"),f.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(e,t){b.CSS.setPropertyValue(u,t,s+"%")}),b.CSS.setPropertyValue(u,"paddingLeft",s+"em"),l.percentToPxWidth=L.lastPercentToPxWidth=(parseFloat(S.getPropertyValue(u,"width",null,!0))||1)/s,l.percentToPxHeight=L.lastPercentToPxHeight=(parseFloat(S.getPropertyValue(u,"height",null,!0))||1)/s,l.emToPx=L.lastEmToPx=(parseFloat(S.getPropertyValue(u,"paddingLeft"))||1)/s,e.myParent.removeChild(u)}return null===L.remToPx&&(L.remToPx=parseFloat(S.getPropertyValue(r.body,"fontSize"))||16),null===L.vwToPx&&(L.vwToPx=parseFloat(t.innerWidth)/100,L.vhToPx=parseFloat(t.innerHeight)/100),l.remToPx=L.remToPx,l.vwToPx=L.vwToPx,l.vhToPx=L.vhToPx,b.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),o),l}if(s.begin&&0===V)try{s.begin.call(g,g)}catch(x){setTimeout(function(){throw x},1)}if("scroll"===A){var P,C,T,F=/^x$/i.test(s.axis)?"Left":"Top",j=parseFloat(s.offset)||0;s.container?m.isWrapped(s.container)||m.isNode(s.container)?(s.container=s.container[0]||s.container,P=s.container["scroll"+F],T=P+f(o).position()[F.toLowerCase()]+j):s.container=null:(P=b.State.scrollAnchor[b.State["scrollProperty"+F]],C=b.State.scrollAnchor[b.State["scrollProperty"+("Left"===F?"Top":"Left")]],T=f(o).offset()[F.toLowerCase()]+j),l={scroll:{rootPropertyValue:!1,startValue:P,currentValue:P,endValue:T,unitType:"",easing:s.easing,scrollData:{container:s.container,direction:F,alternateValue:C}},element:o},b.debug&&console.log("tweensContainer (scroll): ",l.scroll,o)}else if("reverse"===A){if(!i(o).tweensContainer)return void f.dequeue(o,s.queue);"none"===i(o).opts.display&&(i(o).opts.display="auto"),"hidden"===i(o).opts.visibility&&(i(o).opts.visibility="visible"),i(o).opts.loop=!1,i(o).opts.begin=null,i(o).opts.complete=null,v.easing||delete s.easing,v.duration||delete s.duration,s=f.extend({},i(o).opts,s);var E=f.extend(!0,{},i(o).tweensContainer);for(var H in E)if("element"!==H){var N=E[H].startValue;E[H].startValue=E[H].currentValue=E[H].endValue,E[H].endValue=N,m.isEmptyObject(v)||(E[H].easing=s.easing),b.debug&&console.log("reverse tweensContainer ("+H+"): "+JSON.stringify(E[H]),o)}l=E}else if("start"===A){var E;i(o).tweensContainer&&i(o).isAnimating===!0&&(E=i(o).tweensContainer),f.each(y,function(e,t){if(RegExp("^"+S.Lists.colors.join("$|^")+"$").test(e)){var r=p(t,!0),n=r[0],o=r[1],i=r[2];if(S.RegEx.isHex.test(n)){for(var s=["Red","Green","Blue"],l=S.Values.hexToRgb(n),u=i?S.Values.hexToRgb(i):a,c=0;c<s.length;c++){var f=[l[c]];o&&f.push(o),u!==a&&f.push(u[c]),y[e+s[c]]=f}delete y[e]}}});for(var z in y){var O=p(y[z]),q=O[0],$=O[1],M=O[2];z=S.Names.camelCase(z);var I=S.Hooks.getRoot(z),B=!1;if(i(o).isSVG||"tween"===I||S.Names.prefixCheck(I)[1]!==!1||S.Normalizations.registered[I]!==a){(s.display!==a&&null!==s.display&&"none"!==s.display||s.visibility!==a&&"hidden"!==s.visibility)&&/opacity|filter/.test(z)&&!M&&0!==q&&(M=0),s._cacheValues&&E&&E[z]?(M===a&&(M=E[z].endValue+E[z].unitType),B=i(o).rootPropertyValueCache[I]):S.Hooks.registered[z]?M===a?(B=S.getPropertyValue(o,I),M=S.getPropertyValue(o,z,B)):B=S.Hooks.templates[I][1]:M===a&&(M=S.getPropertyValue(o,z));var W,G,Y,D=!1;if(W=d(z,M),M=W[0],Y=W[1],W=d(z,q),q=W[0].replace(/^([+-\/*])=/,function(e,t){return D=t,""}),G=W[1],M=parseFloat(M)||0,q=parseFloat(q)||0,"%"===G&&(/^(fontSize|lineHeight)$/.test(z)?(q/=100,G="em"):/^scale/.test(z)?(q/=100,G=""):/(Red|Green|Blue)$/i.test(z)&&(q=q/100*255,G="")),/[\/*]/.test(D))G=Y;else if(Y!==G&&0!==M)if(0===q)G=Y;else{n=n||h();var Q=/margin|padding|left|right|width|text|word|letter/i.test(z)||/X$/.test(z)||"x"===z?"x":"y";switch(Y){case"%":M*="x"===Q?n.percentToPxWidth:n.percentToPxHeight;break;case"px":break;default:M*=n[Y+"ToPx"]}switch(G){case"%":M*=1/("x"===Q?n.percentToPxWidth:n.percentToPxHeight);break;case"px":break;default:M*=1/n[G+"ToPx"]}}switch(D){case"+":q=M+q;break;case"-":q=M-q;break;case"*":q=M*q;break;case"/":q=M/q}l[z]={rootPropertyValue:B,startValue:M,currentValue:M,endValue:q,unitType:G,easing:$},b.debug&&console.log("tweensContainer ("+z+"): "+JSON.stringify(l[z]),o)}else b.debug&&console.log("Skipping ["+I+"] due to a lack of browser support.")}l.element=o}l.element&&(S.Values.addClass(o,"velocity-animating"),R.push(l),""===s.queue&&(i(o).tweensContainer=l,i(o).opts=s),i(o).isAnimating=!0,V===w-1?(b.State.calls.push([R,g,s,null,k.resolver]),b.State.isTicking===!1&&(b.State.isTicking=!0,c())):V++)}var n,o=this,s=f.extend({},b.defaults,v),l={};switch(i(o)===a&&b.init(o),parseFloat(s.delay)&&s.queue!==!1&&f.queue(o,s.queue,function(e){b.velocityQueueEntryFlag=!0,i(o).delayTimer={setTimeout:setTimeout(e,parseFloat(s.delay)),next:e}}),s.duration.toString().toLowerCase()){case"fast":s.duration=200;break;case"normal":s.duration=h;break;case"slow":s.duration=600;break;default:s.duration=parseFloat(s.duration)||1}b.mock!==!1&&(b.mock===!0?s.duration=s.delay=1:(s.duration*=parseFloat(b.mock)||1,s.delay*=parseFloat(b.mock)||1)),s.easing=u(s.easing,s.duration),s.begin&&!m.isFunction(s.begin)&&(s.begin=null),s.progress&&!m.isFunction(s.progress)&&(s.progress=null),s.complete&&!m.isFunction(s.complete)&&(s.complete=null),s.display!==a&&null!==s.display&&(s.display=s.display.toString().toLowerCase(),"auto"===s.display&&(s.display=b.CSS.Values.getDisplayType(o))),s.visibility!==a&&null!==s.visibility&&(s.visibility=s.visibility.toString().toLowerCase()),s.mobileHA=s.mobileHA&&b.State.isMobile&&!b.State.isGingerbread,s.queue===!1?s.delay?setTimeout(e,s.delay):e():f.queue(o,s.queue,function(t,r){return r===!0?(k.promise&&k.resolver(g),!0):(b.velocityQueueEntryFlag=!0,void e(t))}),""!==s.queue&&"fx"!==s.queue||"inprogress"===f.queue(o)[0]||f.dequeue(o)}var s,l,d,g,y,v,x=arguments[0]&&(arguments[0].p||f.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||m.isString(arguments[0].properties));if(m.isWrapped(this)?(s=!1,d=0,g=this,l=this):(s=!0,d=1,g=x?arguments[0].elements||arguments[0].e:arguments[0]),g=o(g)){x?(y=arguments[0].properties||arguments[0].p,v=arguments[0].options||arguments[0].o):(y=arguments[d],v=arguments[d+1]);var w=g.length,V=0;if(!/^(stop|finish)$/i.test(y)&&!f.isPlainObject(v)){var C=d+1;v={};for(var T=C;T<arguments.length;T++)m.isArray(arguments[T])||!/^(fast|normal|slow)$/i.test(arguments[T])&&!/^\d/.test(arguments[T])?m.isString(arguments[T])||m.isArray(arguments[T])?v.easing=arguments[T]:m.isFunction(arguments[T])&&(v.complete=arguments[T]):v.duration=arguments[T]}var k={promise:null,resolver:null,rejecter:null};s&&b.Promise&&(k.promise=new b.Promise(function(e,t){k.resolver=e,k.rejecter=t}));var A;switch(y){case"scroll":A="scroll";break;case"reverse":A="reverse";break;case"finish":case"stop":f.each(g,function(e,t){i(t)&&i(t).delayTimer&&(clearTimeout(i(t).delayTimer.setTimeout),i(t).delayTimer.next&&i(t).delayTimer.next(),delete i(t).delayTimer)});var F=[];return f.each(b.State.calls,function(e,t){t&&f.each(t[1],function(r,n){var o=v===a?"":v;return o===!0||t[2].queue===o||v===a&&t[2].queue===!1?void f.each(g,function(r,a){a===n&&((v===!0||m.isString(v))&&(f.each(f.queue(a,m.isString(v)?v:""),function(e,t){
5
+ m.isFunction(t)&&t(null,!0)}),f.queue(a,m.isString(v)?v:"",[])),"stop"===y?(i(a)&&i(a).tweensContainer&&o!==!1&&f.each(i(a).tweensContainer,function(e,t){t.endValue=t.currentValue}),F.push(e)):"finish"===y&&(t[2].duration=1))}):!0})}),"stop"===y&&(f.each(F,function(e,t){p(t,!0)}),k.promise&&k.resolver(g)),e();default:if(!f.isPlainObject(y)||m.isEmptyObject(y)){if(m.isString(y)&&b.Redirects[y]){var j=f.extend({},v),E=j.duration,H=j.delay||0;return j.backwards===!0&&(g=f.extend(!0,[],g).reverse()),f.each(g,function(e,t){parseFloat(j.stagger)?j.delay=H+parseFloat(j.stagger)*e:m.isFunction(j.stagger)&&(j.delay=H+j.stagger.call(t,e,w)),j.drag&&(j.duration=parseFloat(E)||(/^(callout|transition)/.test(y)?1e3:h),j.duration=Math.max(j.duration*(j.backwards?1-e/w:(e+1)/w),.75*j.duration,200)),b.Redirects[y].call(t,t,j||{},e,w,g,k.promise?k:a)}),e()}var N="Velocity: First argument ("+y+") was not a property map, a known action, or a registered redirect. Aborting.";return k.promise?k.rejecter(new Error(N)):console.log(N),e()}A="start"}var L={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},R=[];f.each(g,function(e,t){m.isNode(t)&&n.call(t)});var z,j=f.extend({},b.defaults,v);if(j.loop=parseInt(j.loop),z=2*j.loop-1,j.loop)for(var O=0;z>O;O++){var q={delay:j.delay,progress:j.progress};O===z-1&&(q.display=j.display,q.visibility=j.visibility,q.complete=j.complete),P(g,"reverse",q)}return e()}};b=f.extend(P,b),b.animate=P;var w=t.requestAnimationFrame||g;return b.State.isMobile||r.hidden===a||r.addEventListener("visibilitychange",function(){r.hidden?(w=function(e){return setTimeout(function(){e(!0)},16)},c()):w=t.requestAnimationFrame||g}),e.Velocity=b,e!==t&&(e.fn.velocity=P,e.fn.velocity.defaults=b.defaults),f.each(["Down","Up"],function(e,t){b.Redirects["slide"+t]=function(e,r,n,o,i,s){var l=f.extend({},r),u=l.begin,c=l.complete,p={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},d={};l.display===a&&(l.display="Down"===t?"inline"===b.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),l.begin=function(){u&&u.call(i,i);for(var r in p){d[r]=e.style[r];var a=b.CSS.getPropertyValue(e,r);p[r]="Down"===t?[a,0]:[0,a]}d.overflow=e.style.overflow,e.style.overflow="hidden"},l.complete=function(){for(var t in d)e.style[t]=d[t];c&&c.call(i,i),s&&s.resolver(i)},b(e,p,l)}}),f.each(["In","Out"],function(e,t){b.Redirects["fade"+t]=function(e,r,n,o,i,s){var l=f.extend({},r),u={opacity:"In"===t?1:0},c=l.complete;l.complete=n!==o-1?l.begin=null:function(){c&&c.call(i,i),s&&s.resolver(i)},l.display===a&&(l.display="In"===t?"auto":"none"),b(this,u,l)}}),b}(window.jQuery||window.Zepto||window,window,document)}));