materialize-sass 0.95.1 → 0.95.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. data/.gitignore +1 -0
  2. data/README.md +18 -9
  3. data/app/assets/javascripts/{materialize-sprokets.js → materialize-sprockets.js} +5 -1
  4. data/app/assets/javascripts/materialize.js +453 -139
  5. data/app/assets/javascripts/materialize/animations.js +8 -0
  6. data/app/assets/javascripts/materialize/buttons.js +35 -0
  7. data/app/assets/javascripts/materialize/cards.js +7 -3
  8. data/app/assets/javascripts/materialize/collapsible.js +6 -6
  9. data/app/assets/javascripts/materialize/dropdown.js +42 -32
  10. data/app/assets/javascripts/materialize/forms.js +128 -18
  11. data/app/assets/javascripts/materialize/hammer.min.js +1 -1
  12. data/app/assets/javascripts/materialize/init.js +13 -36
  13. data/app/assets/javascripts/materialize/jquery.easing.1.3.js +34 -34
  14. data/app/assets/javascripts/materialize/parallax.js +19 -17
  15. data/app/assets/javascripts/materialize/scrollFire.js +29 -0
  16. data/app/assets/javascripts/materialize/scrollspy.js +1 -1
  17. data/app/assets/javascripts/materialize/sideNav.js +32 -16
  18. data/app/assets/javascripts/materialize/slider.js +16 -9
  19. data/app/assets/javascripts/materialize/transitions.js +94 -0
  20. data/app/assets/stylesheets/materialize.scss +30 -30
  21. data/app/assets/stylesheets/{components → materialize/components}/_buttons.scss +29 -0
  22. data/app/assets/stylesheets/{components → materialize/components}/_cards.scss +36 -7
  23. data/app/assets/stylesheets/{components → materialize/components}/_collapsible.scss +0 -0
  24. data/app/assets/stylesheets/{components → materialize/components}/_color.scss +0 -0
  25. data/app/assets/stylesheets/{components → materialize/components}/_dropdown.scss +2 -2
  26. data/app/assets/stylesheets/{components → materialize/components}/_form.scss +88 -31
  27. data/app/assets/stylesheets/{components → materialize/components}/_global.scss +63 -13
  28. data/app/assets/stylesheets/{components → materialize/components}/_grid.scss +0 -0
  29. data/app/assets/stylesheets/{components → materialize/components}/_icons-material-design.scss +5 -5
  30. data/app/assets/stylesheets/{components → materialize/components}/_materialbox.scss +0 -0
  31. data/app/assets/stylesheets/{components → materialize/components}/_mixins.scss +0 -0
  32. data/app/assets/stylesheets/{components → materialize/components}/_modal.scss +34 -8
  33. data/app/assets/stylesheets/{components → materialize/components}/_navbar.scss +9 -4
  34. data/app/assets/stylesheets/{components → materialize/components}/_normalize.scss +0 -0
  35. data/app/assets/stylesheets/{components → materialize/components}/_prefixer.scss +3 -4
  36. data/app/assets/stylesheets/{components → materialize/components}/_preloader.scss +0 -0
  37. data/app/assets/stylesheets/{components → materialize/components}/_roboto.scss +5 -5
  38. data/app/assets/stylesheets/{components → materialize/components}/_sideNav.scss +28 -67
  39. data/app/assets/stylesheets/{components → materialize/components}/_slider.scss +5 -1
  40. data/app/assets/stylesheets/{components → materialize/components}/_table_of_contents.scss +0 -0
  41. data/app/assets/stylesheets/{components → materialize/components}/_tabs.scss +0 -0
  42. data/app/assets/stylesheets/{components → materialize/components}/_toast.scss +0 -0
  43. data/app/assets/stylesheets/{components → materialize/components}/_tooltip.scss +0 -0
  44. data/app/assets/stylesheets/{components → materialize/components}/_typography.scss +0 -0
  45. data/app/assets/stylesheets/{components → materialize/components}/_variables.scss +6 -2
  46. data/app/assets/stylesheets/{components → materialize/components}/_waves.scss +0 -0
  47. data/app/assets/stylesheets/{components → materialize/components}/date_picker/_default.date.scss +0 -0
  48. data/app/assets/stylesheets/{components → materialize/components}/date_picker/_default.scss +0 -0
  49. data/app/assets/stylesheets/{components → materialize/components}/date_picker/_default.time.scss +0 -0
  50. data/lib/materialize-sass.rb +7 -0
  51. data/lib/materialize-sass/version.rb +1 -1
  52. data/materialize-sass.gemspec +4 -0
  53. metadata +68 -42
  54. checksums.yaml +0 -7
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ *.gem
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
- # Materializecss sass version for rails asset pipeline [![GitHub version](https://badge.fury.io/gh/mkhairi%2Fmaterialize-sass.svg)](http://badge.fury.io/gh/mkhairi%2Fmaterialize-sass)
1
+ # Materialize Sass version for Rails Asset Pipeline
2
+ [![Gem Version](https://badge.fury.io/rb/materialize-sass.svg)](http://badge.fury.io/rb/materialize-sass)
2
3
 
3
- `materialize-sass` is a Sass-powered version of Materialize - a modern responsive front-end framework based on Material Design.
4
+ `materialize-sass` is a Sass powered version of Materialize, a modern responsive front-end framework based on Material Design.
4
5
 
5
6
  ## Installation
6
7
 
@@ -10,31 +11,39 @@ In your Gemfile you need to add the `materialize-sass` gem:
10
11
  gem 'materialize-sass'
11
12
  ```
12
13
 
13
- **NOTE:** ensure that the `sass-rails` gem is presented in your Gemfile.
14
+ **NOTE:** Ensure that the `sass-rails` gem is presented in your Gemfile.
14
15
 
15
16
  And then run the bundler and restart your server to make the files available through the pipeline:
16
17
 
17
- $ bundle install
18
+ ```console
19
+ $ bundle install
20
+ ```
18
21
 
19
22
  Or install it separately:
20
23
 
21
- $ gem install materialize-sass
24
+ ```console
25
+ $ gem install materialize-sass
26
+ ```
22
27
 
23
28
  ## Usage
24
- ### a. SASS
29
+
30
+ ### a. Sass
25
31
 
26
32
  Import Materialize styles in `app/assets/stylesheets/application.css.scss`:
33
+
27
34
  ```scss
28
35
  @import "materialize";
29
36
  ```
30
- **NOTE:** If you have just generated a new Rails app, it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so remove it.
37
+
38
+ **NOTE:** If you have just generated a new Rails application, it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so remove it.
31
39
 
32
40
  ```console
33
41
  $ rm app/assets/stylesheets/application.css
34
42
  ```
35
- ### b. JavaScript
36
43
 
37
- Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
44
+ ### b. JavaScript
45
+
46
+ Require Bootstrap javascripts in `app/assets/javascripts/application.js`:
38
47
 
39
48
  ```js
40
49
  //= require jquery
@@ -12,10 +12,14 @@
12
12
  //= require ./materialize/waves
13
13
  //= require ./materialize/toasts
14
14
  //= require ./materialize/sideNav
15
+ //= require ./materialize/scrollFire
15
16
  //= require ./materialize/scrollspy
16
17
  //= require ./materialize/forms
17
18
  //= require ./materialize/slider
18
19
  //= require ./materialize/cards
19
20
  //= require ./materialize/pushpin
21
+ //= require ./materialize/animations
22
+ //= require ./materialize/buttons
23
+ //= require ./materialize/transitions
20
24
  //= require ./materialize/date_picker/picker
21
- //= require ./materialize/date_picker/picker.date
25
+ //= require ./materialize/date_picker/picker.date
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v0.95.1 (http://materializecss.com)
2
+ * Materialize v0.95.2 (http://materializecss.com)
3
3
  * Copyright 2014-2015 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -10,33 +10,33 @@
10
10
  * to offer multiple easing options
11
11
  *
12
12
  * TERMS OF USE - jQuery Easing
13
- *
14
- * Open source under the BSD License.
15
- *
13
+ *
14
+ * Open source under the BSD License.
15
+ *
16
16
  * Copyright © 2008 George McGinley Smith
17
17
  * All rights reserved.
18
- *
19
- * Redistribution and use in source and binary forms, with or without modification,
18
+ *
19
+ * Redistribution and use in source and binary forms, with or without modification,
20
20
  * are permitted provided that the following conditions are met:
21
- *
22
- * Redistributions of source code must retain the above copyright notice, this list of
21
+ *
22
+ * Redistributions of source code must retain the above copyright notice, this list of
23
23
  * conditions and the following disclaimer.
24
- * Redistributions in binary form must reproduce the above copyright notice, this list
25
- * of conditions and the following disclaimer in the documentation and/or other materials
24
+ * Redistributions in binary form must reproduce the above copyright notice, this list
25
+ * of conditions and the following disclaimer in the documentation and/or other materials
26
26
  * provided with the distribution.
27
- *
28
- * Neither the name of the author nor the names of contributors may be used to endorse
27
+ *
28
+ * Neither the name of the author nor the names of contributors may be used to endorse
29
29
  * or promote products derived from this software without specific prior written permission.
30
- *
31
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
30
+ *
31
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
32
32
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
33
33
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
34
34
  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
35
35
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
36
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
36
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
37
37
  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
38
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39
- * OF THE POSSIBILITY OF SUCH DAMAGE.
38
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
40
40
  *
41
41
  */
42
42
 
@@ -152,7 +152,7 @@ jQuery.extend( jQuery.easing,
152
152
  return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
153
153
  },
154
154
  easeInOutBack: function (x, t, b, c, d, s) {
155
- if (s == undefined) s = 1.70158;
155
+ if (s == undefined) s = 1.70158;
156
156
  if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
157
157
  return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
158
158
  },
@@ -179,35 +179,44 @@ jQuery.extend( jQuery.easing,
179
179
  /*
180
180
  *
181
181
  * TERMS OF USE - EASING EQUATIONS
182
- *
183
- * Open source under the BSD License.
184
- *
182
+ *
183
+ * Open source under the BSD License.
184
+ *
185
185
  * Copyright © 2001 Robert Penner
186
186
  * All rights reserved.
187
- *
188
- * Redistribution and use in source and binary forms, with or without modification,
187
+ *
188
+ * Redistribution and use in source and binary forms, with or without modification,
189
189
  * are permitted provided that the following conditions are met:
190
- *
191
- * Redistributions of source code must retain the above copyright notice, this list of
190
+ *
191
+ * Redistributions of source code must retain the above copyright notice, this list of
192
192
  * conditions and the following disclaimer.
193
- * Redistributions in binary form must reproduce the above copyright notice, this list
194
- * of conditions and the following disclaimer in the documentation and/or other materials
193
+ * Redistributions in binary form must reproduce the above copyright notice, this list
194
+ * of conditions and the following disclaimer in the documentation and/or other materials
195
195
  * provided with the distribution.
196
- *
197
- * Neither the name of the author nor the names of contributors may be used to endorse
196
+ *
197
+ * Neither the name of the author nor the names of contributors may be used to endorse
198
198
  * or promote products derived from this software without specific prior written permission.
199
- *
200
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
199
+ *
200
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
201
201
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
202
202
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
203
203
  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
204
204
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
205
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
205
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
206
206
  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
207
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
208
- * OF THE POSSIBILITY OF SUCH DAMAGE.
207
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
208
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
209
209
  *
210
- */;/*! VelocityJS.org (1.1.0). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
210
+ */; // Custom Easing
211
+ jQuery.extend( jQuery.easing,
212
+ {
213
+ easeInOutMaterial: function (x, t, b, c, d) {
214
+ if ((t/=d/2) < 1) return c/2*t*t + b;
215
+ return c/4*((t-=2)*t*t + 2) + b;
216
+ }
217
+ });
218
+
219
+ ;/*! VelocityJS.org (1.1.0). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
211
220
  /*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
212
221
  !function(e){function t(e){var t=e.length,r=$.type(e);return"function"===r||$.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e}if(!e.jQuery){var $=function(e,t){return new $.fn.init(e,t)};$.isWindow=function(e){return null!=e&&e==e.window},$.type=function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?a[o.call(e)]||"object":typeof e},$.isArray=Array.isArray||function(e){return"array"===$.type(e)},$.isPlainObject=function(e){var t;if(!e||"object"!==$.type(e)||e.nodeType||$.isWindow(e))return!1;try{if(e.constructor&&!n.call(e,"constructor")&&!n.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}for(t in e);return void 0===t||n.call(e,t)},$.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},$.data=function(e,t,a){if(void 0===a){var n=e[$.expando],o=n&&r[n];if(void 0===t)return o;if(o&&t in o)return o[t]}else if(void 0!==t){var n=e[$.expando]||(e[$.expando]=++$.uuid);return r[n]=r[n]||{},r[n][t]=a,a}},$.removeData=function(e,t){var a=e[$.expando],n=a&&r[a];n&&$.each(t,function(e,t){delete n[t]})},$.extend=function(){var e,t,r,a,n,o,i=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof i&&(u=i,i=arguments[s]||{},s++),"object"!=typeof i&&"function"!==$.type(i)&&(i={}),s===l&&(i=this,s--);l>s;s++)if(null!=(n=arguments[s]))for(a in n)e=i[a],r=n[a],i!==r&&(u&&r&&($.isPlainObject(r)||(t=$.isArray(r)))?(t?(t=!1,o=e&&$.isArray(e)?e:[]):o=e&&$.isPlainObject(e)?e:{},i[a]=$.extend(u,o,r)):void 0!==r&&(i[a]=r));return i},$.queue=function(e,r,a){function n(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){r=(r||"fx")+"queue";var o=$.data(e,r);return a?(!o||$.isArray(a)?o=$.data(e,r,n(a)):o.push(a),o):o||[]}},$.dequeue=function(e,t){$.each(e.nodeType?[e]:e,function(e,r){t=t||"fx";var a=$.queue(r,t),n=a.shift();"inprogress"===n&&(n=a.shift()),n&&("fx"===t&&a.unshift("inprogress"),n.call(r,function(){$.dequeue(r,t)}))})},$.fn=$.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),r=this.offset(),a=/^(?:body|html)$/i.test(e.nodeName)?{top:0,left:0}:$(e).offset();return r.top-=parseFloat(t.style.marginTop)||0,r.left-=parseFloat(t.style.marginLeft)||0,e.style&&(a.top+=parseFloat(e.style.borderTopWidth)||0,a.left+=parseFloat(e.style.borderLeftWidth)||0),{top:r.top-a.top,left:r.left-a.left}}};var r={};$.expando="velocity"+(new Date).getTime(),$.uuid=0;for(var a={},n=a.hasOwnProperty,o=a.toString,i="Boolean Number String Function Array Date RegExp Object Error".split(" "),s=0;s<i.length;s++)a["[object "+i[s]+"]"]=i[s].toLowerCase();$.fn.init.prototype=$.fn,e.Velocity={Utilities:$}}}(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 g.isWrapped(e)?e=[].slice.call(e):g.isNode(e)&&(e=[e]),e}function i(e){var t=$.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 g.isString(e)?v.Easings[e]||(r=!1):r=g.isArray(e)&&1===e.length?s.apply(null,e):g.isArray(e)&&2===e.length?b.apply(null,e.concat([t])):g.isArray(e)&&4===e.length?l.apply(null,e):!1,r===!1&&(r=v.Easings[v.defaults.easing]?v.defaults.easing:h),r}function c(e){if(e)for(var t=(new Date).getTime(),r=0,n=v.State.calls.length;n>r;r++)if(v.State.calls[r]){var o=v.State.calls[r],s=o[0],l=o[2],u=o[3],f=!!u;u||(u=v.State.calls[r][3]=t-16);for(var d=Math.min((t-u)/l.duration,1),m=0,y=s.length;y>m;m++){var h=s[m],b=h.element;if(i(b)){var S=!1;if(l.display!==a&&null!==l.display&&"none"!==l.display){if("flex"===l.display){var w=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];$.each(w,function(e,t){x.setPropertyValue(b,"display",t)})}x.setPropertyValue(b,"display",l.display)}l.visibility!==a&&"hidden"!==l.visibility&&x.setPropertyValue(b,"visibility",l.visibility);for(var V in h)if("element"!==V){var C=h[V],T,k=g.isString(C.easing)?v.Easings[C.easing]:C.easing;if(1===d)T=C.endValue;else if(T=C.startValue+(C.endValue-C.startValue)*k(d),!f&&T===C.currentValue)continue;if(C.currentValue=T,x.Hooks.registered[V]){var A=x.Hooks.getRoot(V),F=i(b).rootPropertyValueCache[A];F&&(C.rootPropertyValue=F)}var E=x.setPropertyValue(b,V,C.currentValue+(0===parseFloat(T)?"":C.unitType),C.rootPropertyValue,C.scrollData);x.Hooks.registered[V]&&(i(b).rootPropertyValueCache[A]=x.Normalizations.registered[A]?x.Normalizations.registered[A]("extract",null,E[1]):E[1]),"transform"===E[0]&&(S=!0)}l.mobileHA&&i(b).transformCache.translate3d===a&&(i(b).transformCache.translate3d="(0px, 0px, 0px)",S=!0),S&&x.flushTransformCache(b)}}l.display!==a&&"none"!==l.display&&(v.State.calls[r][2].display=!1),l.visibility!==a&&"hidden"!==l.visibility&&(v.State.calls[r][2].visibility=!1),l.progress&&l.progress.call(o[1],o[1],d,Math.max(0,u+l.duration-t),u),1===d&&p(r)}v.State.isTicking&&P(c)}function p(e,t){if(!v.State.calls[e])return!1;for(var r=v.State.calls[e][0],n=v.State.calls[e][1],o=v.State.calls[e][2],s=v.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&&x.setPropertyValue(p,"display",o.display),"hidden"===o.visibility&&x.setPropertyValue(p,"visibility",o.visibility)),o.loop!==!0&&($.queue(p)[1]===a||!/\.velocityQueueEntryFlag/i.test($.queue(p)[1]))&&i(p)){i(p).isAnimating=!1,i(p).rootPropertyValueCache={};var f=!1;$.each(x.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)&&(f=!0,delete i(p).transformCache[t])}),o.mobileHA&&(f=!0,delete i(p).transformCache.translate3d),f&&x.flushTransformCache(p),x.Values.removeClass(p,"velocity-animating")}if(!t&&o.complete&&!o.loop&&u===c-1)try{o.complete.call(n,n)}catch(d){setTimeout(function(){throw d},1)}s&&o.loop!==!0&&s(n),o.loop!==!0||t||($.each(i(p).tweensContainer,function(e,t){/^rotate/.test(e)&&360===parseFloat(t.endValue)&&(t.endValue=0,t.startValue=360)}),v(p,"reverse",{loop:!0,delay:o.delay})),o.queue!==!1&&$.dequeue(p,o.queue)}v.State.calls[e]=!1;for(var g=0,m=v.State.calls.length;m>g;g++)if(v.State.calls[g]!==!1){l=!0;break}l===!1&&(v.State.isTicking=!1,delete v.State.calls,v.State.calls=[])}var f=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}(),d=function(){var e=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var r=(new Date).getTime(),a;return a=Math.max(0,16-(r-e)),e=r+a,setTimeout(function(){t(r+a)},a)}}(),g={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}},$,m=!1;if(e.fn&&e.fn.jquery?($=e,m=!0):$=t.Velocity.Utilities,8>=f&&!m)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=f)return void(jQuery.fn.velocity=jQuery.fn.animate);var y=400,h="swing",v={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:$,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:y,easing:h,begin:a,complete:a,progress:a,display:a,visibility:a,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(e){$.data(e,"velocity",{isSVG:g.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:1,patch:0},debug:!1};t.pageYOffset!==a?(v.State.scrollAnchor=t,v.State.scrollPropertyLeft="pageXOffset",v.State.scrollPropertyTop="pageYOffset"):(v.State.scrollAnchor=r.documentElement||r.body.parentNode||r.body,v.State.scrollPropertyLeft="scrollLeft",v.State.scrollPropertyTop="scrollTop");var b=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={x:-1,v:0,tension:null,friction:null},i=[0],s=0,l=1e-4,u=.016,c,p,f;for(e=parseFloat(e)||500,t=parseFloat(t)||20,n=n||null,o.tension=e,o.friction=t,c=null!==n,c?(s=a(e,t),p=s/n*u):p=u;;)if(f=r(f||o,p),i.push(1+f.x),s+=16,!(Math.abs(f.x)>l&&Math.abs(f.v)>l))break;return c?function(e){return i[e*(i.length-1)|0]}:s}}();v.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)}},$.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){v.Easings[t[0]]=l.apply(null,t[1])});var x=v.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<x.Lists.colors.length;e++){var t="color"===x.Lists.colors[e]?"0 0 0 1":"255 255 255 1";x.Hooks.templates[x.Lists.colors[e]]=["Red Green Blue Alpha",t]}var r,a,n;if(f)for(r in x.Hooks.templates){a=x.Hooks.templates[r],n=a[0].split(" ");var o=a[1].match(x.RegEx.valueSplit);"Color"===n[0]&&(n.push(n.shift()),o.push(o.shift()),x.Hooks.templates[r]=[n.join(" "),o.join(" ")])}for(r in x.Hooks.templates){a=x.Hooks.templates[r],n=a[0].split(" ");for(var e in n){var i=r+n[e],s=e;x.Hooks.registered[i]=[r,s]}}},getRoot:function(e){var t=x.Hooks.registered[e];return t?t[0]:e},cleanRootPropertyValue:function(e,t){return x.RegEx.valueUnwrap.test(t)&&(t=t.match(x.RegEx.valueUnwrap)[1]),x.Values.isCSSNullValue(t)&&(t=x.Hooks.templates[e][1]),t},extractValue:function(e,t){var r=x.Hooks.registered[e];if(r){var a=r[0],n=r[1];return t=x.Hooks.cleanRootPropertyValue(a,t),t.toString().match(x.RegEx.valueSplit)[n]}return t},injectValue:function(e,t,r){var a=x.Hooks.registered[e];if(a){var n=a[0],o=a[1],i,s;return r=x.Hooks.cleanRootPropertyValue(n,r),i=r.toString().match(x.RegEx.valueSplit),i[o]=t,s=i.join(" ")}return r}},Normalizations:{registered:{clip:function(e,t,r){switch(e){case"name":return"clip";case"extract":var a;return x.RegEx.wrappedValueAlreadyExtracted.test(r)?a=r:(a=r.toString().match(x.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"-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>=f)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>=f||v.State.isGingerbread||(x.Lists.transformsBase=x.Lists.transformsBase.concat(x.Lists.transforms3D));for(var e=0;e<x.Lists.transformsBase.length;e++)!function(){var t=x.Lists.transformsBase[e];x.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":v.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<x.Lists.colors.length;e++)!function(){var t=x.Lists.colors[e];x.Normalizations.registered[t]=function(e,r,n){switch(e){case"name":return t;case"extract":var o;if(x.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:x.RegEx.isHex.test(n)?i="rgb("+x.Values.hexToRgb(n).join(" ")+")":/^rgba?\(/i.test(n)||(i=s.black),o=(i||n).toString().match(x.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return 8>=f||3!==o.split(" ").length||(o+=" 1"),o;case"inject":return 8>=f?4===n.split(" ").length&&(n=n.split(/\s+/).slice(0,3).join(" ")):3===n.split(" ").length&&(n+=" 1"),(8>=f?"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(f||v.State.isAndroid&&!v.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(v.State.prefixMatches[e])return[v.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()}),g.isString(v.State.prefixElement.style[n]))return v.State.prefixMatches[e]=n,[n,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,a;return e=e.replace(t,function(e,t,r,a){return t+t+r+r+a+a}),a=r.exec(e),a?[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[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":"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&&x.setPropertyValue(e,"display","none")}var l=0;if(8>=f)l=$.css(e,r);else{var u=!1;if(/^(width|height)$/.test(r)&&0===x.getPropertyValue(e,"display")&&(u=!0,x.setPropertyValue(e,"display",x.Values.getDisplayType(e))),!o){if("height"===r&&"border-box"!==x.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(x.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(x.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(x.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(x.getPropertyValue(e,"paddingBottom"))||0);return n(),c}if("width"===r&&"border-box"!==x.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var p=e.offsetWidth-(parseFloat(x.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(x.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(x.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(x.getPropertyValue(e,"paddingRight"))||0);return n(),p}}var d;d=i(e)===a?t.getComputedStyle(e,null):i(e).computedStyle?i(e).computedStyle:i(e).computedStyle=t.getComputedStyle(e,null),(f||v.State.isFirefox)&&"borderColor"===r&&(r="borderTopColor"),l=9===f&&"filter"===r?d.getPropertyValue(r):d[r],(""===l||null===l)&&(l=e.style[r]),n()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(r)){var g=s(e,"position");("fixed"===g||"absolute"===g&&/top|left/i.test(r))&&(l=$(e).position()[r]+"px")}return l}var l;if(x.Hooks.registered[r]){var u=r,c=x.Hooks.getRoot(u);n===a&&(n=x.getPropertyValue(e,x.Names.prefixCheck(c)[0])),x.Normalizations.registered[c]&&(n=x.Normalizations.registered[c]("extract",e,n)),l=x.Hooks.extractValue(u,n)}else if(x.Normalizations.registered[r]){var p,d;p=x.Normalizations.registered[r]("name",e),"transform"!==p&&(d=s(e,x.Names.prefixCheck(p)[0]),x.Values.isCSSNullValue(d)&&x.Hooks.templates[r]&&(d=x.Hooks.templates[r][1])),l=x.Normalizations.registered[r]("extract",e,d)}return/^[\d-]/.test(l)||(l=i(e)&&i(e).isSVG&&x.Names.SVGAttribute(r)?/^(height|width)$/i.test(r)?e.getBBox()[r]:e.getAttribute(r):s(e,x.Names.prefixCheck(r)[0])),x.Values.isCSSNullValue(l)&&(l=0),v.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(x.Normalizations.registered[r]&&"transform"===x.Normalizations.registered[r]("name",e))x.Normalizations.registered[r]("inject",e,a),s="transform",a=i(e).transformCache[r];else{if(x.Hooks.registered[r]){var l=r,u=x.Hooks.getRoot(r);n=n||x.getPropertyValue(e,u),a=x.Hooks.injectValue(l,a,n),r=u}if(x.Normalizations.registered[r]&&(a=x.Normalizations.registered[r]("inject",e,a),r=x.Normalizations.registered[r]("name",e)),s=x.Names.prefixCheck(r)[0],8>=f)try{e.style[s]=a}catch(c){v.debug&&console.log("Browser does not support ["+a+"] for ["+s+"]")}else i(e)&&i(e).isSVG&&x.Names.SVGAttribute(r)?e.setAttribute(r,a):e.style[s]=a;v.debug>=2&&console.log("Set "+r+" ("+s+"): "+a)}return[s,a]},flushTransformCache:function(e){function t(t){return parseFloat(x.getPropertyValue(e,t))}var r="";if((f||v.State.isAndroid&&!v.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]};$.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;$.each(i(e).transformCache,function(t){return n=i(e).transformCache[t],"transformPerspective"===t?(o=n,!0):(9===f&&"rotateZ"===t&&(t="rotate"),void(r+=t+n+" "))}),o&&(r="perspective"+o+" "+r)}x.setPropertyValue(e,"transform",r)}};x.Hooks.register(),x.Normalizations.register(),v.hook=function(e,t,r){var n=a;return e=o(e),$.each(e,function(e,o){if(i(o)===a&&v.init(o),r===a)n===a&&(n=v.CSS.getPropertyValue(o,t));else{var s=v.CSS.setPropertyValue(o,t,r);"transform"===s[0]&&v.CSS.flushTransformCache(o),n=s}}),n};var S=function(){function e(){return f?k.promise||null:d}function s(){function e(e){function f(e,t){var r=a,n=a,i=a;return g.isArray(e)?(r=e[0],!g.isArray(e[1])&&/^[\d-]/.test(e[1])||g.isFunction(e[1])||x.RegEx.isHex.test(e[1])?i=e[1]:(g.isString(e[1])&&!x.RegEx.isHex.test(e[1])||g.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),g.isFunction(r)&&(r=r.call(o,V,w)),g.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=x.Values.getUnitType(e)),[a,r]}function m(){var e={myParent:o.parentNode||r.body,position:x.getPropertyValue(o,"position"),fontSize:x.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");v.init(u),e.myParent.appendChild(u),$.each(["overflow","overflowX","overflowY"],function(e,t){v.CSS.setPropertyValue(u,t,"hidden")}),v.CSS.setPropertyValue(u,"position",e.position),v.CSS.setPropertyValue(u,"fontSize",e.fontSize),v.CSS.setPropertyValue(u,"boxSizing","content-box"),$.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(e,t){v.CSS.setPropertyValue(u,t,s+"%")}),v.CSS.setPropertyValue(u,"paddingLeft",s+"em"),l.percentToPxWidth=L.lastPercentToPxWidth=(parseFloat(x.getPropertyValue(u,"width",null,!0))||1)/s,l.percentToPxHeight=L.lastPercentToPxHeight=(parseFloat(x.getPropertyValue(u,"height",null,!0))||1)/s,l.emToPx=L.lastEmToPx=(parseFloat(x.getPropertyValue(u,"paddingLeft"))||1)/s,e.myParent.removeChild(u)}return null===L.remToPx&&(L.remToPx=parseFloat(x.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,v.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),o),l}if(s.begin&&0===V)try{s.begin.call(h,h)}catch(y){setTimeout(function(){throw y},1)}if("scroll"===A){var S=/^x$/i.test(s.axis)?"Left":"Top",C=parseFloat(s.offset)||0,T,F,E;s.container?g.isWrapped(s.container)||g.isNode(s.container)?(s.container=s.container[0]||s.container,T=s.container["scroll"+S],E=T+$(o).position()[S.toLowerCase()]+C):s.container=null:(T=v.State.scrollAnchor[v.State["scrollProperty"+S]],F=v.State.scrollAnchor[v.State["scrollProperty"+("Left"===S?"Top":"Left")]],E=$(o).offset()[S.toLowerCase()]+C),l={scroll:{rootPropertyValue:!1,startValue:T,currentValue:T,endValue:E,unitType:"",easing:s.easing,scrollData:{container:s.container,direction:S,alternateValue:F}},element:o},v.debug&&console.log("tweensContainer (scroll): ",l.scroll,o)}else if("reverse"===A){if(!i(o).tweensContainer)return void $.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,P.easing||delete s.easing,P.duration||delete s.duration,s=$.extend({},i(o).opts,s);var j=$.extend(!0,{},i(o).tweensContainer);for(var H in j)if("element"!==H){var N=j[H].startValue;j[H].startValue=j[H].currentValue=j[H].endValue,j[H].endValue=N,g.isEmptyObject(P)||(j[H].easing=s.easing),v.debug&&console.log("reverse tweensContainer ("+H+"): "+JSON.stringify(j[H]),o)}l=j}else if("start"===A){var j;i(o).tweensContainer&&i(o).isAnimating===!0&&(j=i(o).tweensContainer),$.each(b,function(e,t){if(RegExp("^"+x.Lists.colors.join("$|^")+"$").test(e)){var r=f(t,!0),n=r[0],o=r[1],i=r[2];if(x.RegEx.isHex.test(n)){for(var s=["Red","Green","Blue"],l=x.Values.hexToRgb(n),u=i?x.Values.hexToRgb(i):a,c=0;c<s.length;c++){var p=[l[c]];o&&p.push(o),u!==a&&p.push(u[c]),b[e+s[c]]=p}delete b[e]}}});for(var O in b){var z=f(b[O]),q=z[0],M=z[1],I=z[2];O=x.Names.camelCase(O);var B=x.Hooks.getRoot(O),W=!1;if(i(o).isSVG||x.Names.prefixCheck(B)[1]!==!1||x.Normalizations.registered[B]!==a){(s.display!==a&&null!==s.display&&"none"!==s.display||s.visibility!==a&&"hidden"!==s.visibility)&&/opacity|filter/.test(O)&&!I&&0!==q&&(I=0),s._cacheValues&&j&&j[O]?(I===a&&(I=j[O].endValue+j[O].unitType),W=i(o).rootPropertyValueCache[B]):x.Hooks.registered[O]?I===a?(W=x.getPropertyValue(o,B),I=x.getPropertyValue(o,O,W)):W=x.Hooks.templates[B][1]:I===a&&(I=x.getPropertyValue(o,O));var G,D,X,Y=!1;if(G=d(O,I),I=G[0],X=G[1],G=d(O,q),q=G[0].replace(/^([+-\/*])=/,function(e,t){return Y=t,""}),D=G[1],I=parseFloat(I)||0,q=parseFloat(q)||0,"%"===D&&(/^(fontSize|lineHeight)$/.test(O)?(q/=100,D="em"):/^scale/.test(O)?(q/=100,D=""):/(Red|Green|Blue)$/i.test(O)&&(q=q/100*255,D="")),/[\/*]/.test(Y))D=X;else if(X!==D&&0!==I)if(0===q)D=X;else{p=p||m();var Q=/margin|padding|left|right|width|text|word|letter/i.test(O)||/X$/.test(O)||"x"===O?"x":"y";switch(X){case"%":I*="x"===Q?p.percentToPxWidth:p.percentToPxHeight;break;case"px":break;default:I*=p[X+"ToPx"]}switch(D){case"%":I*=1/("x"===Q?p.percentToPxWidth:p.percentToPxHeight);break;case"px":break;default:I*=1/p[D+"ToPx"]}}switch(Y){case"+":q=I+q;break;case"-":q=I-q;break;case"*":q=I*q;break;case"/":q=I/q}l[O]={rootPropertyValue:W,startValue:I,currentValue:I,endValue:q,unitType:D,easing:M},v.debug&&console.log("tweensContainer ("+O+"): "+JSON.stringify(l[O]),o)}else v.debug&&console.log("Skipping ["+B+"] due to a lack of browser support.")}l.element=o}l.element&&(x.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?(v.State.calls.length>1e4&&(v.State.calls=n(v.State.calls)),v.State.calls.push([R,h,s,null,k.resolver]),v.State.isTicking===!1&&(v.State.isTicking=!0,c())):V++)}var o=this,s=$.extend({},v.defaults,P),l={},p;switch(i(o)===a&&v.init(o),parseFloat(s.delay)&&s.queue!==!1&&$.queue(o,s.queue,function(e){v.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=y;break;case"slow":s.duration=600;break;default:s.duration=parseFloat(s.duration)||1}v.mock!==!1&&(v.mock===!0?s.duration=s.delay=1:(s.duration*=parseFloat(v.mock)||1,s.delay*=parseFloat(v.mock)||1)),s.easing=u(s.easing,s.duration),s.begin&&!g.isFunction(s.begin)&&(s.begin=null),s.progress&&!g.isFunction(s.progress)&&(s.progress=null),s.complete&&!g.isFunction(s.complete)&&(s.complete=null),s.display!==a&&null!==s.display&&(s.display=s.display.toString().toLowerCase(),"auto"===s.display&&(s.display=v.CSS.Values.getDisplayType(o))),s.visibility!==a&&null!==s.visibility&&(s.visibility=s.visibility.toString().toLowerCase()),s.mobileHA=s.mobileHA&&v.State.isMobile&&!v.State.isGingerbread,s.queue===!1?s.delay?setTimeout(e,s.delay):e():$.queue(o,s.queue,function(t,r){return r===!0?(k.promise&&k.resolver(h),!0):(v.velocityQueueEntryFlag=!0,void e(t))}),""!==s.queue&&"fx"!==s.queue||"inprogress"===$.queue(o)[0]||$.dequeue(o)}var l=arguments[0]&&($.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||g.isString(arguments[0].properties)),f,d,m,h,b,P;if(g.isWrapped(this)?(f=!1,m=0,h=this,d=this):(f=!0,m=1,h=l?arguments[0].elements:arguments[0]),h=o(h)){l?(b=arguments[0].properties,P=arguments[0].options):(b=arguments[m],P=arguments[m+1]);var w=h.length,V=0;if("stop"!==b&&!$.isPlainObject(P)){var C=m+1;P={};for(var T=C;T<arguments.length;T++)g.isArray(arguments[T])||!/^(fast|normal|slow)$/i.test(arguments[T])&&!/^\d/.test(arguments[T])?g.isString(arguments[T])||g.isArray(arguments[T])?P.easing=arguments[T]:g.isFunction(arguments[T])&&(P.complete=arguments[T]):P.duration=arguments[T]}var k={promise:null,resolver:null,rejecter:null};f&&v.Promise&&(k.promise=new v.Promise(function(e,t){k.resolver=e,k.rejecter=t}));var A;switch(b){case"scroll":A="scroll";break;case"reverse":A="reverse";break;case"stop":$.each(h,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 $.each(v.State.calls,function(e,t){t&&$.each(t[1],function(r,n){var o=g.isString(P)?P:"";return P!==a&&t[2].queue!==o?!0:void $.each(h,function(t,r){r===n&&(P!==a&&($.each($.queue(r,o),function(e,t){g.isFunction(t)&&t(null,!0)}),$.queue(r,o,[])),i(r)&&""===o&&$.each(i(r).tweensContainer,function(e,t){t.endValue=t.currentValue}),F.push(e))})})}),$.each(F,function(e,t){p(t,!0)}),k.promise&&k.resolver(h),e();default:if(!$.isPlainObject(b)||g.isEmptyObject(b)){if(g.isString(b)&&v.Redirects[b]){var E=$.extend({},P),j=E.duration,H=E.delay||0;return E.backwards===!0&&(h=$.extend(!0,[],h).reverse()),$.each(h,function(e,t){parseFloat(E.stagger)?E.delay=H+parseFloat(E.stagger)*e:g.isFunction(E.stagger)&&(E.delay=H+E.stagger.call(t,e,w)),E.drag&&(E.duration=parseFloat(j)||(/^(callout|transition)/.test(b)?1e3:y),E.duration=Math.max(E.duration*(E.backwards?1-e/w:(e+1)/w),.75*E.duration,200)),v.Redirects[b].call(t,t,E||{},e,w,h,k.promise?k:a)
213
222
  }),e()}var N="Velocity: First argument ("+b+") 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=[];$.each(h,function(e,t){g.isNode(t)&&s.call(t)});var E=$.extend({},v.defaults,P),O;if(E.loop=parseInt(E.loop),O=2*E.loop-1,E.loop)for(var z=0;O>z;z++){var q={delay:E.delay,progress:E.progress};z===O-1&&(q.display=E.display,q.visibility=E.visibility,q.complete=E.complete),S(h,"reverse",q)}return e()}};v=$.extend(S,v),v.animate=S;var P=t.requestAnimationFrame||d;return v.State.isMobile||r.hidden===a||r.addEventListener("visibilitychange",function(){r.hidden?(P=function(e){return setTimeout(function(){e(!0)},16)},c()):P=t.requestAnimationFrame||d}),e.Velocity=v,e!==t&&(e.fn.velocity=S,e.fn.velocity.defaults=v.defaults),$.each(["Down","Up"],function(e,t){v.Redirects["slide"+t]=function(e,r,n,o,i,s){var l=$.extend({},r),u=l.begin,c=l.complete,p={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},f={};l.display===a&&(l.display="Down"===t?"inline"===v.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),l.begin=function(){u&&u.call(i,i);for(var r in p){f[r]=e.style[r];var a=v.CSS.getPropertyValue(e,r);p[r]="Down"===t?[a,0]:[0,a]}f.overflow=e.style.overflow,e.style.overflow="hidden"},l.complete=function(){for(var t in f)e.style[t]=f[t];c&&c.call(i,i),s&&s.resolver(i)},v(e,p,l)}}),$.each(["In","Out"],function(e,t){v.Redirects["fade"+t]=function(e,r,n,o,i,s){var l=$.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"),v(this,u,l)}}),v}(window.jQuery||window.Zepto||window,window,document)});;!function(a,b,c,d){"use strict";function k(a,b,c){return setTimeout(q(a,c),b)}function l(a,b,c){return Array.isArray(a)?(m(a,c[b],c),!0):!1}function m(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e<a.length;)b.call(c,a[e],e,a),e++;else for(e in a)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}function n(a,b,c){for(var e=Object.keys(b),f=0;f<e.length;)(!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]),f++;return a}function o(a,b){return n(a,b,!0)}function p(a,b,c){var e,d=b.prototype;e=a.prototype=Object.create(d),e.constructor=a,e._super=d,c&&n(e,c)}function q(a,b){return function(){return a.apply(b,arguments)}}function r(a,b){return typeof a==g?a.apply(b?b[0]||d:d,b):a}function s(a,b){return a===d?b:a}function t(a,b,c){m(x(b),function(b){a.addEventListener(b,c,!1)})}function u(a,b,c){m(x(b),function(b){a.removeEventListener(b,c,!1)})}function v(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function w(a,b){return a.indexOf(b)>-1}function x(a){return a.trim().split(/\s+/g)}function y(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)return d;d++}return-1}function z(a){return Array.prototype.slice.call(a,0)}function A(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];y(e,g)<0&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort()),d}function B(a,b){for(var c,f,g=b[0].toUpperCase()+b.slice(1),h=0;h<e.length;){if(c=e[h],f=c?c+g:b,f in a)return f;h++}return d}function D(){return C++}function E(a){var b=a.ownerDocument;return b.defaultView||b.parentWindow}function ab(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){r(a.options.enable,[a])&&c.handler(b)},this.init()}function bb(a){var b,c=a.options.inputClass;return b=c?c:H?wb:I?Eb:G?Gb:rb,new b(a,cb)}function cb(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=b&O&&0===d-e,g=b&(Q|R)&&0===d-e;c.isFirst=!!f,c.isFinal=!!g,f&&(a.session={}),c.eventType=b,db(a,c),a.emit("hammer.input",c),a.recognize(c),a.session.prevInput=c}function db(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=gb(b)),e>1&&!c.firstMultiple?c.firstMultiple=gb(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=hb(d);b.timeStamp=j(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=lb(h,i),b.distance=kb(h,i),eb(c,b),b.offsetDirection=jb(b.deltaX,b.deltaY),b.scale=g?nb(g.pointers,d):1,b.rotation=g?mb(g.pointers,d):0,fb(c,b);var k=a.element;v(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function eb(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===O||f.eventType===Q)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function fb(a,b){var f,g,h,j,c=a.lastInterval||b,e=b.timeStamp-c.timeStamp;if(b.eventType!=R&&(e>N||c.velocity===d)){var k=c.deltaX-b.deltaX,l=c.deltaY-b.deltaY,m=ib(e,k,l);g=m.x,h=m.y,f=i(m.x)>i(m.y)?m.x:m.y,j=jb(k,l),a.lastInterval=b}else f=c.velocity,g=c.velocityX,h=c.velocityY,j=c.direction;b.velocity=f,b.velocityX=g,b.velocityY=h,b.direction=j}function gb(a){for(var b=[],c=0;c<a.pointers.length;)b[c]={clientX:h(a.pointers[c].clientX),clientY:h(a.pointers[c].clientY)},c++;return{timeStamp:j(),pointers:b,center:hb(b),deltaX:a.deltaX,deltaY:a.deltaY}}function hb(a){var b=a.length;if(1===b)return{x:h(a[0].clientX),y:h(a[0].clientY)};for(var c=0,d=0,e=0;b>e;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:h(c/b),y:h(d/b)}}function ib(a,b,c){return{x:b/a||0,y:c/a||0}}function jb(a,b){return a===b?S:i(a)>=i(b)?a>0?T:U:b>0?V:W}function kb(a,b,c){c||(c=$);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function lb(a,b,c){c||(c=$);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function mb(a,b){return lb(b[1],b[0],_)-lb(a[1],a[0],_)}function nb(a,b){return kb(b[0],b[1],_)/kb(a[0],a[1],_)}function rb(){this.evEl=pb,this.evWin=qb,this.allow=!0,this.pressed=!1,ab.apply(this,arguments)}function wb(){this.evEl=ub,this.evWin=vb,ab.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Ab(){this.evTarget=yb,this.evWin=zb,this.started=!1,ab.apply(this,arguments)}function Bb(a,b){var c=z(a.touches),d=z(a.changedTouches);return b&(Q|R)&&(c=A(c.concat(d),"identifier",!0)),[c,d]}function Eb(){this.evTarget=Db,this.targetIds={},ab.apply(this,arguments)}function Fb(a,b){var c=z(a.touches),d=this.targetIds;if(b&(O|P)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=z(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return v(a.target,i)}),b===O)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),b&(Q|R)&&delete d[g[e].identifier],e++;return h.length?[A(f.concat(h),"identifier",!0),h]:void 0}function Gb(){ab.apply(this,arguments);var a=q(this.handler,this);this.touch=new Eb(this.manager,a),this.mouse=new rb(this.manager,a)}function Pb(a,b){this.manager=a,this.set(b)}function Qb(a){if(w(a,Mb))return Mb;var b=w(a,Nb),c=w(a,Ob);return b&&c?Nb+" "+Ob:b||c?b?Nb:Ob:w(a,Lb)?Lb:Kb}function Yb(a){this.id=D(),this.manager=null,this.options=o(a||{},this.defaults),this.options.enable=s(this.options.enable,!0),this.state=Rb,this.simultaneous={},this.requireFail=[]}function Zb(a){return a&Wb?"cancel":a&Ub?"end":a&Tb?"move":a&Sb?"start":""}function $b(a){return a==W?"down":a==V?"up":a==T?"left":a==U?"right":""}function _b(a,b){var c=b.manager;return c?c.get(a):a}function ac(){Yb.apply(this,arguments)}function bc(){ac.apply(this,arguments),this.pX=null,this.pY=null}function cc(){ac.apply(this,arguments)}function dc(){Yb.apply(this,arguments),this._timer=null,this._input=null}function ec(){ac.apply(this,arguments)}function fc(){ac.apply(this,arguments)}function gc(){Yb.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function hc(a,b){return b=b||{},b.recognizers=s(b.recognizers,hc.defaults.preset),new kc(a,b)}function kc(a,b){b=b||{},this.options=o(b,hc.defaults),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.element=a,this.input=bb(this),this.touchAction=new Pb(this,this.options.touchAction),lc(this,!0),m(b.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])},this)}function lc(a,b){var c=a.element;m(a.options.cssProps,function(a,d){c.style[B(c.style,d)]=b?a:""})}function mc(a,c){var d=b.createEvent("Event");d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}var e=["","webkit","moz","MS","ms","o"],f=b.createElement("div"),g="function",h=Math.round,i=Math.abs,j=Date.now,C=1,F=/mobile|tablet|ip(ad|hone|od)|android/i,G="ontouchstart"in a,H=B(a,"PointerEvent")!==d,I=G&&F.test(navigator.userAgent),J="touch",K="pen",L="mouse",M="kinect",N=25,O=1,P=2,Q=4,R=8,S=1,T=2,U=4,V=8,W=16,X=T|U,Y=V|W,Z=X|Y,$=["x","y"],_=["clientX","clientY"];ab.prototype={handler:function(){},init:function(){this.evEl&&t(this.element,this.evEl,this.domHandler),this.evTarget&&t(this.target,this.evTarget,this.domHandler),this.evWin&&t(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&u(this.element,this.evEl,this.domHandler),this.evTarget&&u(this.target,this.evTarget,this.domHandler),this.evWin&&u(E(this.element),this.evWin,this.domHandler)}};var ob={mousedown:O,mousemove:P,mouseup:Q},pb="mousedown",qb="mousemove mouseup";p(rb,ab,{handler:function(a){var b=ob[a.type];b&O&&0===a.button&&(this.pressed=!0),b&P&&1!==a.which&&(b=Q),this.pressed&&this.allow&&(b&Q&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:L,srcEvent:a}))}});var sb={pointerdown:O,pointermove:P,pointerup:Q,pointercancel:R,pointerout:R},tb={2:J,3:K,4:L,5:M},ub="pointerdown",vb="pointermove pointerup pointercancel";a.MSPointerEvent&&(ub="MSPointerDown",vb="MSPointerMove MSPointerUp MSPointerCancel"),p(wb,ab,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace("ms",""),e=sb[d],f=tb[a.pointerType]||a.pointerType,g=f==J,h=y(b,a.pointerId,"pointerId");e&O&&(0===a.button||g)?0>h&&(b.push(a),h=b.length-1):e&(Q|R)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var xb={touchstart:O,touchmove:P,touchend:Q,touchcancel:R},yb="touchstart",zb="touchstart touchmove touchend touchcancel";p(Ab,ab,{handler:function(a){var b=xb[a.type];if(b===O&&(this.started=!0),this.started){var c=Bb.call(this,a,b);b&(Q|R)&&0===c[0].length-c[1].length&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:J,srcEvent:a})}}});var Cb={touchstart:O,touchmove:P,touchend:Q,touchcancel:R},Db="touchstart touchmove touchend touchcancel";p(Eb,ab,{handler:function(a){var b=Cb[a.type],c=Fb.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:J,srcEvent:a})}}),p(Gb,ab,{handler:function(a,b,c){var d=c.pointerType==J,e=c.pointerType==L;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Q|R)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Hb=B(f.style,"touchAction"),Ib=Hb!==d,Jb="compute",Kb="auto",Lb="manipulation",Mb="none",Nb="pan-x",Ob="pan-y";Pb.prototype={set:function(a){a==Jb&&(a=this.compute()),Ib&&(this.manager.element.style[Hb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return m(this.manager.recognizers,function(b){r(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),Qb(a.join(" "))},preventDefaults:function(a){if(!Ib){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return b.preventDefault(),void 0;var d=this.actions,e=w(d,Mb),f=w(d,Ob),g=w(d,Nb);return e||f&&c&X||g&&c&Y?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var Rb=1,Sb=2,Tb=4,Ub=8,Vb=Ub,Wb=16,Xb=32;Yb.prototype={defaults:{},set:function(a){return n(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(l(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=_b(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return l(a,"dropRecognizeWith",this)?this:(a=_b(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(l(a,"requireFailure",this))return this;var b=this.requireFail;return a=_b(a,this),-1===y(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(l(a,"dropRequireFailure",this))return this;a=_b(a,this);var b=y(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function d(d){b.manager.emit(b.options.event+(d?Zb(c):""),a)}var b=this,c=this.state;Ub>c&&d(!0),d(),c>=Ub&&d(!0)},tryEmit:function(a){return this.canEmit()?this.emit(a):(this.state=Xb,void 0)},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&(Xb|Rb)))return!1;a++}return!0},recognize:function(a){var b=n({},a);return r(this.options.enable,[this,b])?(this.state&(Vb|Wb|Xb)&&(this.state=Rb),this.state=this.process(b),this.state&(Sb|Tb|Ub|Wb)&&this.tryEmit(b),void 0):(this.reset(),this.state=Xb,void 0)},process:function(){},getTouchAction:function(){},reset:function(){}},p(ac,Yb,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=b&(Sb|Tb),e=this.attrTest(a);return d&&(c&R||!e)?b|Wb:d||e?c&Q?b|Ub:b&Sb?b|Tb:Sb:Xb}}),p(bc,ac,{defaults:{event:"pan",threshold:10,pointers:1,direction:Z},getTouchAction:function(){var a=this.options.direction,b=[];return a&X&&b.push(Ob),a&Y&&b.push(Nb),b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;return e&b.direction||(b.direction&X?(e=0===f?S:0>f?T:U,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?S:0>g?V:W,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return ac.prototype.attrTest.call(this,a)&&(this.state&Sb||!(this.state&Sb)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=$b(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),p(cc,ac,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Mb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&Sb)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){var b=a.scale<1?"in":"out";this.manager.emit(this.options.event+b,a)}}}),p(dc,Yb,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[Kb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,e=a.deltaTime>b.time;if(this._input=a,!d||!c||a.eventType&(Q|R)&&!e)this.reset();else if(a.eventType&O)this.reset(),this._timer=k(function(){this.state=Vb,this.tryEmit()},b.time,this);else if(a.eventType&Q)return Vb;return Xb},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===Vb&&(a&&a.eventType&Q?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=j(),this.manager.emit(this.options.event,this._input)))}}),p(ec,ac,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Mb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&Sb)}}),p(fc,ac,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:X|Y,pointers:1},getTouchAction:function(){return bc.prototype.getTouchAction.call(this)},attrTest:function(a){var c,b=this.options.direction;return b&(X|Y)?c=a.velocity:b&X?c=a.velocityX:b&Y&&(c=a.velocityY),this._super.attrTest.call(this,a)&&b&a.direction&&a.distance>this.options.threshold&&i(c)>this.options.velocity&&a.eventType&Q},emit:function(a){var b=$b(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),p(gc,Yb,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[Lb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,e=a.deltaTime<b.time;if(this.reset(),a.eventType&O&&0===this.count)return this.failTimeout();if(d&&e&&c){if(a.eventType!=Q)return this.failTimeout();var f=this.pTime?a.timeStamp-this.pTime<b.interval:!0,g=!this.pCenter||kb(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp,this.pCenter=a.center,g&&f?this.count+=1:this.count=1,this._input=a;var h=this.count%b.taps;if(0===h)return this.hasRequireFailures()?(this._timer=k(function(){this.state=Vb,this.tryEmit()},b.interval,this),Sb):Vb}return Xb},failTimeout:function(){return this._timer=k(function(){this.state=Xb},this.options.interval,this),Xb},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Vb&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),hc.VERSION="2.0.4",hc.defaults={domEvents:!1,touchAction:Jb,enable:!0,inputTarget:null,inputClass:null,preset:[[ec,{enable:!1}],[cc,{enable:!1},["rotate"]],[fc,{direction:X}],[bc,{direction:X},["swipe"]],[gc],[gc,{event:"doubletap",taps:2},["tap"]],[dc]],cssProps:{userSelect:"default",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var ic=1,jc=2;kc.prototype={set:function(a){return n(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?jc:ic},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c,d=this.recognizers,e=b.curRecognizer;(!e||e&&e.state&Vb)&&(e=b.curRecognizer=null);for(var f=0;f<d.length;)c=d[f],b.stopped===jc||e&&c!=e&&!c.canRecognizeWith(e)?c.reset():c.recognize(a),!e&&c.state&(Sb|Tb|Ub)&&(e=b.curRecognizer=c),f++}},get:function(a){if(a instanceof Yb)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(l(a,"add",this))return this;var b=this.get(a.options.event);return b&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(l(a,"remove",this))return this;var b=this.recognizers;return a=this.get(a),b.splice(y(b,a),1),this.touchAction.update(),this},on:function(a,b){var c=this.handlers;return m(x(a),function(a){c[a]=c[a]||[],c[a].push(b)}),this},off:function(a,b){var c=this.handlers;return m(x(a),function(a){b?c[a].splice(y(c[a],b),1):delete c[a]}),this},emit:function(a,b){this.options.domEvents&&mc(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(var d=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&lc(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},n(hc,{INPUT_START:O,INPUT_MOVE:P,INPUT_END:Q,INPUT_CANCEL:R,STATE_POSSIBLE:Rb,STATE_BEGAN:Sb,STATE_CHANGED:Tb,STATE_ENDED:Ub,STATE_RECOGNIZED:Vb,STATE_CANCELLED:Wb,STATE_FAILED:Xb,DIRECTION_NONE:S,DIRECTION_LEFT:T,DIRECTION_RIGHT:U,DIRECTION_UP:V,DIRECTION_DOWN:W,DIRECTION_HORIZONTAL:X,DIRECTION_VERTICAL:Y,DIRECTION_ALL:Z,Manager:kc,Input:ab,TouchAction:Pb,TouchInput:Eb,MouseInput:rb,PointerEventInput:wb,TouchMouseInput:Gb,SingleTouchInput:Ab,Recognizer:Yb,AttrRecognizer:ac,Tap:gc,Pan:bc,Swipe:fc,Pinch:cc,Rotate:ec,Press:dc,on:t,off:u,each:m,merge:o,extend:n,inherit:p,bindFn:q,prefixed:B}),typeof define==g&&define.amd?define(function(){return hc}):"undefined"!=typeof module&&module.exports?module.exports=hc:a[c]=hc}(window,document,"Hammer");;(function(factory) {
@@ -261,8 +270,8 @@ jQuery.extend( jQuery.easing,
261
270
  var collapsible_type = $this.data("collapsible");
262
271
 
263
272
  // Turn off any existing event handlers
264
- $this.off();
265
- $this.children().off();
273
+ $this.off('click.collapse', '.collapsible-header');
274
+ $panel_headers.off('click.collapse');
266
275
 
267
276
 
268
277
  /****************
@@ -299,8 +308,8 @@ jQuery.extend( jQuery.easing,
299
308
 
300
309
  if (options.accordion || collapsible_type == "accordion" || collapsible_type == undefined) { // Handle Accordion
301
310
 
302
- // Event delegation to open collapsible section
303
- $this.on('click', '.collapsible-header', function (e) {
311
+ // Event delegation to all collapsible section
312
+ $this.on('click.collapse', '.collapsible-header', function (e) {
304
313
  accordionOpen($(e.currentTarget));
305
314
  });
306
315
 
@@ -311,7 +320,7 @@ jQuery.extend( jQuery.easing,
311
320
  $panel_headers.each(function () {
312
321
 
313
322
  // Event delegation to open collapsible section
314
- $this.on('click', '.collapsible-header', function (e) {
323
+ $(this).on('click.collapse', function (e) {
315
324
  collapsibleOpen($(e.currentTarget));
316
325
  });
317
326
 
@@ -331,6 +340,13 @@ jQuery.extend( jQuery.easing,
331
340
  });
332
341
  }( jQuery ));;(function ($) {
333
342
 
343
+ // Add posibility to scroll to selected option
344
+ // usefull for select for example
345
+ $.fn.scrollTo = function(elem) {
346
+ $(this).scrollTop($(this).scrollTop() - $(this).offset().top + $(elem).offset().top);
347
+ return this;
348
+ };
349
+
334
350
  $.fn.dropdown = function (options) {
335
351
  var defaults = {
336
352
  inDuration: 300,
@@ -339,6 +355,7 @@ jQuery.extend( jQuery.easing,
339
355
  hover: true,
340
356
  alignment: 'left',
341
357
  gutter: 0, // Spacing from edge
358
+ belowOrigin: false
342
359
  }
343
360
 
344
361
  options = $.extend(defaults, options);
@@ -361,6 +378,8 @@ jQuery.extend( jQuery.easing,
361
378
  options.alignment = origin.data('alignment');
362
379
  if (origin.data('gutter') != undefined)
363
380
  options.gutter = origin.data('gutter');
381
+ if (origin.data('beloworigin') != undefined)
382
+ options.belowOrigin = origin.data('beloworigin');
364
383
  }
365
384
 
366
385
  updateOptions();
@@ -371,6 +390,8 @@ jQuery.extend( jQuery.easing,
371
390
  $('body').append(activates);
372
391
  }
373
392
 
393
+ var dropdownRealHeight = activates.height();
394
+
374
395
  /*
375
396
  Helper function to position and resize dropdown.
376
397
  Used in hover and click handler.
@@ -379,10 +400,13 @@ jQuery.extend( jQuery.easing,
379
400
  // Check html data attributes
380
401
  updateOptions();
381
402
 
382
- var dropdownRealHeight = activates.height();
383
403
  if (options.constrain_width == true) {
384
404
  activates.css('width', origin.outerWidth());
385
405
  }
406
+ var offset = 0;
407
+ if (options.belowOrigin == true) {
408
+ offset = origin.height();
409
+ }
386
410
  // Handle edge alignment
387
411
  var width_difference = 0;
388
412
  var gutter_spacing = options.gutter;
@@ -395,14 +419,14 @@ jQuery.extend( jQuery.easing,
395
419
  display: 'block',
396
420
  position: 'fixed',
397
421
  height: 0,
398
- top: origin.offset().top - $(window).scrollTop(),
422
+ top: origin.offset().top - $(window).scrollTop() + offset,
399
423
  left: origin.offset().left + width_difference + gutter_spacing
400
424
  });
401
425
  }
402
426
  else {
403
427
  activates.css({
404
428
  display: 'block',
405
- top: origin.offset().top,
429
+ top: origin.offset().top + offset,
406
430
  left: origin.offset().left + width_difference + gutter_spacing,
407
431
  height: 0
408
432
  });
@@ -433,6 +457,22 @@ jQuery.extend( jQuery.easing,
433
457
  return isFixed;
434
458
  }
435
459
 
460
+ function hideDropdown() {
461
+ activates.velocity(
462
+ {
463
+ opacity: 0
464
+ },
465
+ {
466
+ duration: options.outDuration,
467
+ easing: 'easeOutQuad',
468
+ complete: function(){
469
+ activates.css({
470
+ display: 'none',
471
+ 'overflow-y': ''
472
+ });
473
+ }
474
+ });
475
+ }
436
476
 
437
477
  // Hover
438
478
  if (options.hover) {
@@ -443,20 +483,7 @@ jQuery.extend( jQuery.easing,
443
483
 
444
484
  // Document click handler
445
485
  activates.on('mouseleave', function(e){ // Mouse out
446
- activates.velocity(
447
- {
448
- opacity: 0
449
- },
450
- {
451
- duration: options.outDuration,
452
- easing: 'easeOutQuad',
453
- complete: function(){
454
- activates.css({
455
- display: 'none',
456
- 'overflow-y': ''
457
- });
458
- }
459
- });
486
+ hideDropdown();
460
487
  });
461
488
 
462
489
  // Click
@@ -470,19 +497,7 @@ jQuery.extend( jQuery.easing,
470
497
  placeDropdown();
471
498
  $(document).bind('click.'+ activates.attr('id'), function (e) {
472
499
  if (!activates.is(e.target) && (!origin.is(e.target))) {
473
- activates.velocity({
474
- opacity: 0
475
- },
476
- {
477
- duration: options.outDuration,
478
- easing: 'easeOutQuad',
479
- complete: function(){
480
- activates.css({
481
- display: 'none',
482
- 'overflow-y': ''
483
- });
484
- }
485
- });
500
+ hideDropdown();
486
501
  $(document).unbind('click.' + activates.attr('id'));
487
502
  }
488
503
  });
@@ -490,13 +505,18 @@ jQuery.extend( jQuery.easing,
490
505
 
491
506
  } // End else
492
507
 
508
+ // Listen to open and close event - usefull for select component
509
+ origin.on('open', placeDropdown);
510
+ origin.on('close', hideDropdown);
511
+
493
512
  // Window Resize Reposition
494
513
  $(document).on('resize', function(){
495
514
 
496
515
  });
497
516
  });
498
517
  }; // End dropdown plugin
499
- }( jQuery ));;(function($) {
518
+ }( jQuery ));
519
+ ;(function($) {
500
520
  $.fn.extend({
501
521
  openModal: function(options) {
502
522
  var modal = this;
@@ -838,31 +858,33 @@ $(document).ready(function(){
838
858
  $this.addClass('parallax');
839
859
 
840
860
  function updateParallax(initial) {
841
- var container_height;
861
+ var container_height;
842
862
  if (window_width < 992) {
843
863
  container_height = ($this.height() > 0) ? $this.height() : $this.children("img").height();
844
864
  }
845
865
  else {
846
866
  container_height = ($this.height() > 0) ? $this.height() : 500;
847
867
  }
848
- var img_height = $this.children("img").height();
849
- var parallax_dist = img_height - container_height;
850
- var bottom = $this.offset().top + container_height;
851
- var top = $this.offset().top;
852
- var scrollTop = $(window).scrollTop();
853
- var windowHeight = window.innerHeight;
854
- var windowBottom = scrollTop + windowHeight;
855
- var percentScrolled = (windowBottom - top) / (container_height + windowHeight);
856
- var parallax = -1 * parallax_dist * percentScrolled;
857
-
858
- if ((bottom > scrollTop) && (top < (scrollTop + windowHeight))) {
859
- $this.children("img").first().css('bottom', parallax + "px");
860
- }
861
- if (initial) {
862
- $this.children("img").first().css('display', 'block');
863
- }
868
+ var img_height = $this.children("img").height();
869
+ var parallax_dist = img_height - container_height;
870
+ var bottom = $this.offset().top + container_height;
871
+ var top = $this.offset().top;
872
+ var scrollTop = $(window).scrollTop();
873
+ var windowHeight = window.innerHeight;
874
+ var windowBottom = scrollTop + windowHeight;
875
+ var percentScrolled = (windowBottom - top) / (container_height + windowHeight);
876
+ var parallax = -1 * parallax_dist * percentScrolled;
877
+
878
+ if ((bottom > scrollTop) && (top < (scrollTop + windowHeight))) {
879
+ $this.children("img").first().css('bottom', parallax + "px");
880
+ }
881
+ if (initial) {
882
+ $this.children("img").first().css('display', 'block');
883
+ }
864
884
  }
865
- updateParallax(true);
885
+ $this.children("img").load(function () {
886
+ updateParallax(true);
887
+ });
866
888
 
867
889
  $(window).scroll(function() {
868
890
  window_width = $(window).width();
@@ -1653,15 +1675,23 @@ $(document).ready(function(){
1653
1675
  var methods = {
1654
1676
  init : function(options) {
1655
1677
  var defaults = {
1656
- activationWidth: 70,
1657
- edge: 'left'
1678
+ menuWidth: 240,
1679
+ edge: 'left',
1680
+ closeOnClick: false
1658
1681
  }
1659
1682
  options = $.extend(defaults, options);
1660
1683
 
1661
1684
  $(this).each(function(){
1662
1685
  var $this = $(this);
1663
1686
  var menu_id = $("#"+ $this.attr('data-activates'));
1664
- var menuWidth = 240;
1687
+
1688
+ // Set to width
1689
+ if (options.menuWidth != 240) {
1690
+ menu_id.css('width', options.menuWidth);
1691
+ if (!menu_id.hasClass('fixed')) {
1692
+ menu_id.css('left', -1 * (options.menuWidth + 10));
1693
+ }
1694
+ }
1665
1695
 
1666
1696
  // Add alignment
1667
1697
  if (options.edge != 'left') {
@@ -1683,6 +1713,7 @@ $(document).ready(function(){
1683
1713
  if ($(window).width() > 1200) {
1684
1714
  if (menu_id.attr('style')) {
1685
1715
  menu_id.removeAttr('style');
1716
+ menu_id.css('width', options.menuWidth);
1686
1717
  }
1687
1718
  }
1688
1719
  if ($('#sidenav-overlay').css('opacity') != 0 && menuOut) {
@@ -1691,6 +1722,13 @@ $(document).ready(function(){
1691
1722
  });
1692
1723
  }
1693
1724
 
1725
+ // if closeOnClick, then add close event for all a tags in side sideNav
1726
+ if (options.closeOnClick == true) {
1727
+ menu_id.on("click.itemclick", "a:not(.collapsible-header)", function(){
1728
+ removeMenu();
1729
+ });
1730
+ }
1731
+
1694
1732
  function removeMenu() {
1695
1733
  panning = false;
1696
1734
  menuOut = false;
@@ -1701,12 +1739,12 @@ $(document).ready(function(){
1701
1739
  if (options.edge === 'left') {
1702
1740
  // Reset phantom div
1703
1741
  $('.drag-target').css({width: '', right: '', left: '0'});
1704
- menu_id.velocity({left: -1 * (menuWidth + 10)}, {duration: 200, queue: false, easing: 'easeOutCubic'});
1742
+ menu_id.velocity({left: -1 * (options.menuWidth + 10)}, {duration: 200, queue: false, easing: 'easeOutCubic'});
1705
1743
  }
1706
1744
  else {
1707
1745
  // Reset phantom div
1708
1746
  $('.drag-target').css({width: '', right: '0', left: ''});
1709
- menu_id.velocity({right: -1 * (menuWidth + 10)}, {duration: 200, queue: false, easing: 'easeOutCubic'});
1747
+ menu_id.velocity({right: -1 * (options.menuWidth + 10)}, {duration: 200, queue: false, easing: 'easeOutCubic'});
1710
1748
  }
1711
1749
 
1712
1750
  // enable_scroll();
@@ -1742,41 +1780,41 @@ $(document).ready(function(){
1742
1780
 
1743
1781
  // Keep within boundaries
1744
1782
  if (options.edge === 'left') {
1745
- if (x > menuWidth) { x = menuWidth; }
1783
+ if (x > options.menuWidth) { x = options.menuWidth; }
1746
1784
  else if (x < 0) { x = 0; }
1747
1785
  }
1748
1786
  else {
1749
- if (x < $(window).width() - menuWidth) { x = $(window).width() - menuWidth; }
1787
+ if (x < $(window).width() - options.menuWidth) { x = $(window).width() - options.menuWidth; }
1750
1788
  }
1751
1789
 
1752
1790
  if (options.edge === 'left') {
1753
1791
  // Left Direction
1754
- if (x < (menuWidth / 2)) { menuOut = false; }
1792
+ if (x < (options.menuWidth / 2)) { menuOut = false; }
1755
1793
  // Right Direction
1756
- else if (x >= (menuWidth / 2)) { menuOut = true; }
1794
+ else if (x >= (options.menuWidth / 2)) { menuOut = true; }
1757
1795
  }
1758
1796
  else {
1759
1797
  // Left Direction
1760
- if (x < ($(window).width() - menuWidth / 2)) { menuOut = true; }
1798
+ if (x < ($(window).width() - options.menuWidth / 2)) { menuOut = true; }
1761
1799
  // Right Direction
1762
- else if (x >= ($(window).width() - menuWidth / 2)) { menuOut = false; }
1800
+ else if (x >= ($(window).width() - options.menuWidth / 2)) { menuOut = false; }
1763
1801
  }
1764
1802
 
1765
1803
 
1766
1804
  if (options.edge === 'left') {
1767
- menu_id.css('left', (x - menuWidth));
1805
+ menu_id.css('left', (x - options.menuWidth));
1768
1806
  }
1769
1807
  else {
1770
- menu_id.css('right', -1 *(x - menuWidth / 2));
1808
+ menu_id.css('right', -1 *(x - options.menuWidth / 2));
1771
1809
  }
1772
1810
 
1773
1811
  // Percentage overlay
1774
1812
  if (options.edge === 'left') {
1775
- var overlayPerc = x / menuWidth;
1813
+ var overlayPerc = x / options.menuWidth;
1776
1814
  $('#sidenav-overlay').velocity({opacity: overlayPerc }, {duration: 50, queue: false, easing: 'easeOutQuad'});
1777
1815
  }
1778
1816
  else {
1779
- var overlayPerc = Math.abs((x - $(window).width()) / menuWidth);
1817
+ var overlayPerc = Math.abs((x - $(window).width()) / options.menuWidth);
1780
1818
  $('#sidenav-overlay').velocity({opacity: overlayPerc }, {duration: 50, queue: false, easing: 'easeOutQuad'});
1781
1819
  }
1782
1820
  }
@@ -2179,8 +2217,9 @@ $(document).ready(function(){
2179
2217
  // Add active if form auto complete
2180
2218
  $(document).on('change', input_selector, function () {
2181
2219
  if($(this).val().length !== 0) {
2182
- $(this).siblings('label, i').addClass('active');
2220
+ $(this).siblings('label, i').addClass('active');
2183
2221
  }
2222
+ validate_field($(this));
2184
2223
  });
2185
2224
 
2186
2225
  // Add active if input element has been pre-populated on document ready
@@ -2200,7 +2239,7 @@ $(document).ready(function(){
2200
2239
  // Reset select
2201
2240
  $(this).find('select.initialized').each(function () {
2202
2241
  var reset_text = $(this).find('option[selected]').text();
2203
- $(this).prev('span.select-dropdown').html(reset_text);
2242
+ $(this).siblings('input.select-dropdown').val(reset_text);
2204
2243
  });
2205
2244
  }
2206
2245
  });
@@ -2213,25 +2252,30 @@ $(document).ready(function(){
2213
2252
  $(document).on('blur', input_selector, function () {
2214
2253
  if ($(this).val().length === 0) {
2215
2254
  $(this).siblings('label, i').removeClass('active');
2255
+ }
2256
+ validate_field($(this));
2257
+ });
2216
2258
 
2217
- if ($(this).hasClass('validate')) {
2218
- $(this).removeClass('valid');
2219
- $(this).removeClass('invalid');
2259
+ validate_field = function(object) {
2260
+ if (object.val().length === 0) {
2261
+ if (object.hasClass('validate')) {
2262
+ object.removeClass('valid');
2263
+ object.removeClass('invalid');
2220
2264
  }
2221
2265
  }
2222
2266
  else {
2223
- if ($(this).hasClass('validate')) {
2224
- if ($(this).is(':valid')) {
2225
- $(this).removeClass('invalid');
2226
- $(this).addClass('valid');
2267
+ if (object.hasClass('validate')) {
2268
+ if (object.is(':valid')) {
2269
+ object.removeClass('invalid');
2270
+ object.addClass('valid');
2227
2271
  }
2228
2272
  else {
2229
- $(this).removeClass('valid');
2230
- $(this).addClass('invalid');
2273
+ object.removeClass('valid');
2274
+ object.addClass('invalid');
2231
2275
  }
2232
2276
  }
2233
2277
  }
2234
- });
2278
+ }
2235
2279
 
2236
2280
 
2237
2281
  // Textarea Auto Resize
@@ -2261,6 +2305,16 @@ $(document).ready(function(){
2261
2305
  });
2262
2306
 
2263
2307
 
2308
+ // File Input Path
2309
+ $('.file-field').each(function() {
2310
+ var path_input = $(this).find('input.file-path');
2311
+ $(this).find('input[type="file"]').change(function () {
2312
+ path_input.val($(this).val());
2313
+ path_input.trigger('change');
2314
+ });
2315
+ });
2316
+
2317
+
2264
2318
  // Range Input
2265
2319
  var range_type = 'input[type=range]';
2266
2320
  var range_mousedown = false;
@@ -2336,15 +2390,13 @@ $(document).ready(function(){
2336
2390
  }
2337
2391
  });
2338
2392
 
2339
-
2340
-
2341
-
2342
2393
  // Select Functionality
2343
2394
 
2344
2395
  // Select Plugin
2345
2396
  $.fn.material_select = function (callback) {
2346
2397
  $(this).each(function(){
2347
2398
  $select = $(this);
2399
+
2348
2400
  if ( $select.hasClass('browser-default') || $select.hasClass('initialized')) {
2349
2401
  return; // Continue to next (return false breaks out of entire loop)
2350
2402
  }
@@ -2376,7 +2428,7 @@ $(document).ready(function(){
2376
2428
  $curr_select.find('option').eq(i).prop('selected', true);
2377
2429
  // Trigger onchange() event
2378
2430
  $curr_select.trigger('change');
2379
- $curr_select.prev('span.select-dropdown').html($(this).text());
2431
+ $curr_select.siblings('input.select-dropdown').val($(this).text());
2380
2432
  if (typeof callback !== 'undefined') callback();
2381
2433
  }
2382
2434
  });
@@ -2386,8 +2438,8 @@ $(document).ready(function(){
2386
2438
  // Wrap Elements
2387
2439
  $select.wrap(wrapper);
2388
2440
  // Add Select Display Element
2389
- var $newSelect = $('<span class="select-dropdown ' + (($select.is(':disabled')) ? 'disabled' : '')
2390
- + '" data-activates="select-options-' + uniqueID +'">' + label.html() + '</span>');
2441
+ var $newSelect = $('<input type="text" class="select-dropdown" readonly="true" ' + (($select.is(':disabled')) ? 'disabled' : '')
2442
+ + ' data-activates="select-options-' + uniqueID +'" value="'+ label.html() +'"/><i class="mdi-navigation-arrow-drop-down">');
2391
2443
  $select.before($newSelect);
2392
2444
  $('body').append(options);
2393
2445
  // Check if section element is disabled
@@ -2396,6 +2448,102 @@ $(document).ready(function(){
2396
2448
  }
2397
2449
  $select.addClass('initialized');
2398
2450
 
2451
+ $newSelect.on('focus', function(){
2452
+ $(this).trigger('open');
2453
+ label = $(this).val();
2454
+ selectedOption = options.find('li').filter(function() {
2455
+ return $(this).text().toLowerCase() === label.toLowerCase();
2456
+ })[0];
2457
+ activateOption(options, selectedOption);
2458
+ });
2459
+
2460
+ $newSelect.on('blur', function(){
2461
+ $(this).trigger('close');
2462
+ });
2463
+
2464
+ // Make option as selected and scroll to selected position
2465
+ activateOption = function(collection, newOption) {
2466
+ collection.find('li.active').removeClass('active');
2467
+ $(newOption).addClass('active');
2468
+ collection.scrollTo(newOption);
2469
+ }
2470
+
2471
+ // Allow user to search by typing
2472
+ // this array is cleared after 1 second
2473
+ filterQuery = []
2474
+
2475
+ onKeyDown = function(event){
2476
+ // TAB - switch to another input
2477
+ if(event.which == 9){
2478
+ $newSelect.trigger('close');
2479
+ return
2480
+ }
2481
+
2482
+ // ARROW DOWN WHEN SELECT IS CLOSED - open select options
2483
+ if(event.which == 40 && !options.is(":visible")){
2484
+ $newSelect.trigger('open');
2485
+ return
2486
+ }
2487
+
2488
+ // ENTER WHEN SELECT IS CLOSED - submit form
2489
+ if(event.which == 13 && !options.is(":visible")){
2490
+ return
2491
+ }
2492
+
2493
+ event.preventDefault();
2494
+
2495
+ // CASE WHEN USER TYPE LETTERS
2496
+ letter = String.fromCharCode(event.which).toLowerCase();
2497
+
2498
+ if (letter){
2499
+ filterQuery.push(letter);
2500
+
2501
+ string = filterQuery.join("");
2502
+
2503
+ newOption = options.find('li').filter(function() {
2504
+ return $(this).text().toLowerCase().indexOf(string) === 0;
2505
+ })[0];
2506
+
2507
+ if(newOption){
2508
+ activateOption(options, newOption);
2509
+ }
2510
+ }
2511
+
2512
+ // ENTER - select option and close when select options are opened
2513
+ if(event.which == 13){
2514
+ activeOption = options.find('li.active:not(.disabled)')[0];
2515
+ if(activeOption){
2516
+ $(activeOption).trigger('click');
2517
+ $newSelect.trigger('close');
2518
+ }
2519
+ }
2520
+
2521
+ // ARROW DOWN - move to next not disabled option
2522
+ if(event.which == 40){
2523
+ newOption = options.find('li.active').next('li:not(.disabled)')[0];
2524
+ if(newOption){
2525
+ activateOption(options, newOption);
2526
+ }
2527
+ }
2528
+
2529
+ // ESC - close options
2530
+ if(event.which == 27){
2531
+ $newSelect.trigger('close');
2532
+ }
2533
+
2534
+ // ARROW UP - move to previous not disabled option
2535
+ if(event.which == 38){
2536
+ newOption = options.find('li.active').prev('li:not(.disabled)')[0];
2537
+ if(newOption){
2538
+ activateOption(options, newOption);
2539
+ }
2540
+ }
2541
+
2542
+ // Automaticaly clean filter query so user can search again by starting letters
2543
+ setTimeout(function(){filterQuery = []}, 1000)
2544
+ }
2545
+
2546
+ $newSelect.on('keydown', onKeyDown);
2399
2547
  });
2400
2548
  }
2401
2549
 
@@ -2422,7 +2570,7 @@ $(document).ready(function(){
2422
2570
  indicators: true,
2423
2571
  height: 400,
2424
2572
  transition: 500,
2425
- interval: 6000
2573
+ interval: 60000
2426
2574
  }
2427
2575
  options = $.extend(defaults, options);
2428
2576
 
@@ -2452,6 +2600,7 @@ $(document).ready(function(){
2452
2600
 
2453
2601
  // This function will transition the slide to any index of the next slide
2454
2602
  function moveToSlide(index) {
2603
+ console.log("Move to slide");
2455
2604
  if (index >= $slides.length) index = 0;
2456
2605
  else if (index < 0) index = $slides.length -1;
2457
2606
 
@@ -2499,12 +2648,18 @@ $(document).ready(function(){
2499
2648
  });
2500
2649
 
2501
2650
  // Set initial dimensions of images
2651
+ // $slides.find('img').each(function () {
2652
+ // $(this).load(function () {
2653
+ // if ($(this).width() < $(this).parent().width()) {
2654
+ // $(this).css({width: '100%', height: 'auto'});
2655
+ // }
2656
+ // });
2657
+ // });
2658
+
2659
+ // Move img src into background-image
2502
2660
  $slides.find('img').each(function () {
2503
- $(this).load(function () {
2504
- if ($(this).width() < $(this).parent().width()) {
2505
- $(this).css({width: '100%', height: 'auto'});
2506
- }
2507
- });
2661
+ $(this).css('background-image', 'url(' + $(this).attr('src') + ')' );
2662
+ $(this).attr('src', '');
2508
2663
  });
2509
2664
 
2510
2665
  // dynamically add indicators
@@ -2554,8 +2709,7 @@ $(document).ready(function(){
2554
2709
  }
2555
2710
 
2556
2711
  // Adjust height to current slide
2557
- $active.find('img').load(function() {
2558
- // Handler for .load() called.
2712
+ $active.find('img').each(function() {
2559
2713
  $active.find('.caption').velocity({opacity: 1, translateX: 0, translateY: 0}, {duration: options.transition, queue: false, easing: 'easeOutQuad'});
2560
2714
  });
2561
2715
 
@@ -2667,21 +2821,26 @@ $(document).ready(function(){
2667
2821
  }
2668
2822
  });
2669
2823
 
2670
-
2671
2824
  });
2672
2825
 
2826
+
2827
+
2673
2828
  };
2674
2829
  }( jQuery ));;(function ($) {
2675
2830
  $(document).ready(function() {
2676
2831
 
2832
+ $('.card > .card-reveal').each(function() {
2833
+ $(this).parent().css('overflow', 'hidden');
2834
+ });
2835
+
2677
2836
  $(document).on('click.card', '.card', function (e) {
2678
2837
  if ($(this).find('.card-reveal').length) {
2679
2838
  if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {
2680
- $(this).find('.card-reveal').velocity({translateY: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
2839
+ $(this).find('.card-reveal').velocity({translateY: 0}, {duration: 225, queue: false, easing: 'easeInOutQuad'});
2681
2840
  }
2682
2841
  else if ($(e.target).is($('.card .activator')) ||
2683
2842
  $(e.target).is($('.card .activator i')) ) {
2684
- $(this).find('.card-reveal').velocity({translateY: '-100%'}, {duration: 300, queue: false, easing: 'easeOutQuad'});
2843
+ $(this).find('.card-reveal').velocity({translateY: '-100%'}, {duration: 300, queue: false, easing: 'easeInOutQuad'});
2685
2844
  }
2686
2845
  }
2687
2846
 
@@ -2757,7 +2916,7 @@ $(document).ready(function(){
2757
2916
  }
2758
2917
 
2759
2918
 
2760
-
2919
+
2761
2920
  updateElements($this, $(window).scrollTop());
2762
2921
  $(window).on('scroll.' + $uniqueId, function () {
2763
2922
  var $scrolled = $(window).scrollTop() + options.offset;
@@ -2765,17 +2924,173 @@ $(document).ready(function(){
2765
2924
  updateElements($this, $scrolled);
2766
2925
  });
2767
2926
 
2768
- });
2927
+ });
2769
2928
 
2770
2929
 
2771
2930
 
2772
2931
  };
2773
2932
 
2774
-
2775
-
2933
+
2934
+
2776
2935
 
2777
2936
  });
2778
- }( jQuery ));;/*!
2937
+ }( jQuery ));;(function ($) {
2938
+ $(document).ready(function() {
2939
+
2940
+ // jQuery reverse
2941
+ jQuery.fn.reverse = [].reverse;
2942
+
2943
+ $('.fixed-action-btn').each(function (i) {
2944
+ var $this = $(this);
2945
+ $this.find('ul a.btn-floating').velocity(
2946
+ { scaleY: ".4", scaleX: ".4", translateY: "40px"},
2947
+ { duration: 0 });
2948
+
2949
+
2950
+ var timer;
2951
+ $this.hover(
2952
+ function() {
2953
+ var time = 0;
2954
+ $this.find('ul a.btn-floating').reverse().each(function () {
2955
+ $(this).velocity(
2956
+ { opacity: "1", scaleX: "1", scaleY: "1", translateY: "0"},
2957
+ { duration: 100, delay: time });
2958
+ time += 40;
2959
+ });
2960
+ }, function() {
2961
+ var time = 0;
2962
+ $this.find('ul a.btn-floating').velocity("stop", true);
2963
+ $this.find('ul a.btn-floating').velocity(
2964
+ { opacity: "0", scaleX: ".4", scaleY: ".4", translateY: "40px"},
2965
+ { duration: 100 });
2966
+ }
2967
+ );
2968
+ });
2969
+
2970
+ });
2971
+ }( jQuery ));
2972
+ ;(function ($) {
2973
+ $(document).ready(function() {
2974
+
2975
+ var time = 0;
2976
+
2977
+ // Horizontal staggered list
2978
+ showStaggeredList = function(selector) {
2979
+ $(selector).find('li').velocity(
2980
+ { translateX: "-100px"},
2981
+ { duration: 0 });
2982
+
2983
+ $(selector).find('li').each(function() {
2984
+ $(this).velocity(
2985
+ { opacity: "1", translateX: "0"},
2986
+ { duration: 800, delay: time, easing: [60, 10] });
2987
+ time += 120;
2988
+ });
2989
+ }
2990
+
2991
+ // Hardcoded .staggered-list scrollFire
2992
+ var staggeredListOptions = [];
2993
+ $('ul.staggered-list').each(function (i) {
2994
+
2995
+ console.log(i);
2996
+ var label = 'scrollFire-' + i;
2997
+ $(this).addClass(label);
2998
+ staggeredListOptions.push(
2999
+ {selector: 'ul.staggered-list.' + label,
3000
+ offset: 200,
3001
+ callback: 'showStaggeredList("ul.staggered-list.' + label + '")'});
3002
+ });
3003
+ console.log(staggeredListOptions);
3004
+ scrollFire(staggeredListOptions);
3005
+
3006
+
3007
+
3008
+
3009
+ // time = 0
3010
+ // // Vertical Staggered list
3011
+ // $('ul.staggered-list.vertical li').velocity(
3012
+ // { translateY: "100px"},
3013
+ // { duration: 0 });
3014
+
3015
+ // $('ul.staggered-list.vertical li').each(function() {
3016
+ // $(this).velocity(
3017
+ // { opacity: "1", translateY: "0"},
3018
+ // { duration: 800, delay: time, easing: [60, 25] });
3019
+ // time += 120;
3020
+ // });
3021
+
3022
+ // // Fade in and Scale
3023
+ // $('.fade-in.scale').velocity(
3024
+ // { scaleX: .4, scaleY: .4, translateX: -600},
3025
+ // { duration: 0});
3026
+ // $('.fade-in').each(function() {
3027
+ // $(this).velocity(
3028
+ // { opacity: "1", scaleX: 1, scaleY: 1, translateX: 0},
3029
+ // { duration: 800, easing: [60, 10] });
3030
+ // });
3031
+
3032
+
3033
+ // Image transition function
3034
+ fadeInImage = function(selector){
3035
+ var element = $(selector);
3036
+ element.css({opacity: 0});
3037
+ $(element).velocity({opacity: 1}, {
3038
+ duration: 650,
3039
+ queue: false,
3040
+ easing: 'easeOutSine'
3041
+ });
3042
+ $(element).animate({opacity: 1}, {
3043
+ duration: 1300,
3044
+ queue: false,
3045
+ easing: 'swing',
3046
+ step: function(now, fx) {
3047
+ fx.start = 100;
3048
+ var grayscale_setting = now/100;
3049
+ var brightness_setting = 150 - (100 - now)/1.75;
3050
+
3051
+ if (brightness_setting < 100)
3052
+ brightness_setting = 100;
3053
+ console.log(grayscale_setting)
3054
+ if (now >= 0) {
3055
+ $(this).css({
3056
+ "-webkit-filter": "grayscale("+grayscale_setting+")" + "brightness("+brightness_setting+"%)",
3057
+ "filter": "grayscale("+grayscale_setting+")" + "brightness("+brightness_setting+"%)"
3058
+ });
3059
+ }
3060
+ }
3061
+ });
3062
+ };
3063
+
3064
+ });
3065
+ }( jQuery ));;(function($) {
3066
+
3067
+ // Input: Array of JSON objects {selector, offset, callback}
3068
+
3069
+ scrollFire = function(options) {
3070
+ $(window).scroll(function () {
3071
+ var windowScroll = $(window).scrollTop() + $(window).height();
3072
+
3073
+ $.each( options, function( i, value ){
3074
+ var selector = value.selector,
3075
+ offset = value.offset,
3076
+ callback = value.callback;
3077
+
3078
+ var elementOffset = $(selector).offset().top;
3079
+
3080
+ if (windowScroll > (elementOffset + offset)) {
3081
+ if ($(selector).data('done') === undefined) {
3082
+ var callbackFunc = new Function(callback);
3083
+ callbackFunc();
3084
+
3085
+ $(selector).data('done', true);
3086
+ }
3087
+ }
3088
+
3089
+ });
3090
+ });
3091
+ }
3092
+
3093
+ })(jQuery);;/*!
2779
3094
  * pickadate.js v3.5.0, 2014/04/13
2780
3095
  * By Amsul, http://amsul.ca
2781
3096
  * Hosted on http://amsul.github.io/pickadate.js
@@ -5324,4 +5639,3 @@ Picker.extend( 'pickadate', DatePicker )
5324
5639
 
5325
5640
  }));
5326
5641
 
5327
-