jekyll-theme-marketing 0.5.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +5 -5
  2. data/{LICENSE.txt → LICENSE} +1 -1
  3. data/README.md +6 -1
  4. data/_includes/components/analytics/google.js +13 -0
  5. data/_includes/components/assets/file-downloads.html +15 -0
  6. data/_includes/components/breadcrumbs/bootstrap.html +35 -0
  7. data/_includes/components/breadcrumbs/bootstrap.js +11 -0
  8. data/_includes/components/bullets/fontawesome.html +4 -0
  9. data/_includes/components/cards/bootstrap-h.html +20 -0
  10. data/_includes/components/cards/bootstrap-v.html +16 -0
  11. data/_includes/components/contact-cards/phone-card.html +6 -0
  12. data/_includes/components/contact-cards/phone-directory.html +22 -0
  13. data/_includes/components/copyrights/progressive.html +19 -0
  14. data/_includes/components/exchange-rates/progressive.html +6 -0
  15. data/_includes/{body/header/exchange-rates/usd.html → components/exchange-rates/progressive.js} +1 -6
  16. data/_includes/components/filters/isotope.html +32 -0
  17. data/_includes/components/filters/isotope.js +47 -0
  18. data/_includes/components/firebase/sdk.html +17 -0
  19. data/_includes/components/firebase/special-offers.html +28 -0
  20. data/_includes/components/firebase/ui.html +15 -0
  21. data/_includes/components/firebase/ui.js +33 -0
  22. data/_includes/{head/fonts.html → components/fonts/google.html} +0 -0
  23. data/_includes/components/footers/progressive/custom-item.liquid +1 -0
  24. data/_includes/components/footers/progressive/custom-title.liquid +1 -0
  25. data/_includes/components/footers/progressive/footer.html +43 -0
  26. data/_includes/components/footers/progressive/top.html +27 -0
  27. data/_includes/components/forms/formspree.html +59 -0
  28. data/_includes/components/forms/formspree.js +35 -0
  29. data/_includes/components/forms/google-forms.css +5 -0
  30. data/_includes/components/forms/google-forms.html +76 -0
  31. data/_includes/components/forms/google-forms.js +31 -0
  32. data/_includes/components/generators/pdf/special-offers.html +51 -0
  33. data/_includes/components/icons/bootstrap.html +14 -0
  34. data/_includes/components/icons/progressive.html +29 -0
  35. data/_includes/components/icons/progressive.js +5 -0
  36. data/_includes/components/info-cards/card-deck.html +16 -0
  37. data/_includes/components/info-cards/progressive.html +20 -0
  38. data/_includes/components/info-cards/search-results.html +38 -0
  39. data/_includes/components/jumbotron/bootstrap.html +5 -0
  40. data/_includes/components/lang-switchers/two-langs.html +27 -0
  41. data/_includes/components/login/progressive.html +89 -0
  42. data/_includes/components/logos/motorola.html +3 -0
  43. data/_includes/components/logos/progressive.html +3 -0
  44. data/_includes/components/maps/google-maps.html +2 -0
  45. data/_includes/components/maps/google-maps.js +96 -0
  46. data/_includes/components/maps/image-map.html +21 -0
  47. data/_includes/components/megamenu/progressive.html +35 -0
  48. data/_includes/{head/meta.html → components/meta/progressive.html} +5 -1
  49. data/_includes/components/modals/bootstrap.html +124 -0
  50. data/_includes/components/modals/bootstrap.js +26 -0
  51. data/_includes/components/nav-items/bootstrap.html +23 -0
  52. data/_includes/components/nav-tabs/product-nav-tab.html +48 -0
  53. data/_includes/components/nav-tabs/product-nav-tab.js +38 -0
  54. data/_includes/components/navbars/bootstrap.html +16 -0
  55. data/_includes/components/navbars/common.liquid +14 -0
  56. data/_includes/components/navbars/progressive.html +33 -0
  57. data/_includes/components/navbars/progressive.js +18 -0
  58. data/_includes/components/panels/brands.html +12 -0
  59. data/_includes/{body → components}/product-cards/3d-space.html +5 -5
  60. data/_includes/components/product-cards/featured-product.html +15 -0
  61. data/_includes/components/product-cards/product-details.html +48 -0
  62. data/_includes/components/product-cards/product-generals.html +54 -0
  63. data/_includes/components/product-cards/progressive.html +57 -0
  64. data/_includes/components/scripts/body.js +41 -0
  65. data/_includes/components/scripts/head.js +14 -0
  66. data/_includes/components/scroll-to-tops/progressive.html +3 -0
  67. data/_includes/components/search-engines/lunr.html +19 -0
  68. data/_includes/components/search-engines/lunr.js +119 -0
  69. data/_includes/components/searchbars/progressive.html +14 -0
  70. data/_includes/components/sidenavs/material/dependencies.html +2 -2
  71. data/_includes/components/sliders/bootstrap.html +37 -0
  72. data/_includes/components/sliders/lightslider.html +35 -0
  73. data/_includes/components/sliders/lightslider.js +12 -0
  74. data/_includes/components/sliders/revolution-slider.html +67 -0
  75. data/_includes/components/social-media/facebook.html +18 -0
  76. data/_includes/components/social-media/progressive.html +9 -0
  77. data/_includes/components/spinners/bootstrap.html +5 -0
  78. data/_includes/components/stylesheets/progressive.html +47 -0
  79. data/_includes/components/timelines/9.html +27 -0
  80. data/_includes/components/topbars/progressive.html +36 -0
  81. data/_includes/components/topbars/progressive.js +5 -0
  82. data/_includes/components/videos/background.html +22 -0
  83. data/_includes/components/videos/youtube.html +23 -0
  84. data/_includes/components/zendesk/script.js +9 -0
  85. data/_includes/pages/footer/grupopv/our-offices.js +22 -0
  86. data/_layouts/default.html +30 -12
  87. data/_layouts/grid.html +34 -28
  88. data/_layouts/page.html +4 -48
  89. data/_layouts/product.html +29 -174
  90. data/_sass/common/_common.scss +32 -0
  91. data/_sass/components/breadcrumbs/_bootstrap.scss +2 -3
  92. data/_sass/components/contact-cards/_location.scss +14 -0
  93. data/_sass/components/contact-cards/_phone-card.scss +17 -0
  94. data/_sass/components/footers/_vg_progressive.scss +72 -0
  95. data/_sass/components/forms/_formspree.scss +5 -0
  96. data/_sass/components/forms/_google-forms.scss +29 -0
  97. data/_sass/components/icons/bootstrap.scss +21 -0
  98. data/_sass/components/info-cards/_card-deck.scss +12 -0
  99. data/_sass/components/info-cards/search-results.scss +9 -0
  100. data/_sass/components/jumbotron/bootstrap.scss +5 -0
  101. data/_sass/components/lang-switchers/_toogle-lang.scss +0 -1
  102. data/_sass/components/login/progressive.scss +13 -0
  103. data/_sass/components/logos/progressive.scss +12 -0
  104. data/_sass/components/maps/google-maps.scss +13 -0
  105. data/_sass/components/megamenu/progressive.scss +9 -0
  106. data/_sass/components/nav-items/bootstrap.scss +26 -0
  107. data/_sass/components/navbars/bootstrap.scss +8 -0
  108. data/_sass/components/navbars/progressive.scss +94 -0
  109. data/_sass/components/product-cards/_3d-space.scss +12 -12
  110. data/_sass/components/product-cards/_product-details.scss +6 -0
  111. data/_sass/components/product-cards/_product-generals.scss +13 -0
  112. data/_sass/components/product-cards/_progressive.scss +30 -0
  113. data/_sass/components/product-cards/featured-product.scss +12 -0
  114. data/_sass/components/searchbars/progressive.scss +8 -0
  115. data/_sass/components/sidenavs/_material.scss +160 -0
  116. data/_sass/components/sliders/_lightslider.scss +33 -0
  117. data/_sass/components/social-media/_progressive.scss +25 -0
  118. data/_sass/components/timelines/9.scss +152 -0
  119. data/_sass/components/videos/background.scss +22 -0
  120. data/_sass/grupopv/_navbar.scss +22 -0
  121. data/_sass/layouts/_404.scss +39 -0
  122. data/_sass/layouts/_default.scss +3 -0
  123. data/_sass/layouts/_page.scss +70 -0
  124. data/_sass/layouts/_product.scss +56 -0
  125. data/assets/css/main.min.scss +88 -0
  126. data/assets/img/common/favicon.png +0 -0
  127. data/assets/js/firebase/firebase-account-controller.js +42 -0
  128. data/assets/js/firebase/firebase-login.js +4 -4
  129. data/assets/js/firebase/firebase-sdk.js +19 -0
  130. data/assets/js/firebase/firebase-special-offers.js +41 -0
  131. data/assets/node_modules/@fortawesome/fontawesome-free-brands/index.js +1221 -0
  132. data/assets/node_modules/@fortawesome/fontawesome-free-regular/index.js +489 -0
  133. data/assets/node_modules/@fortawesome/fontawesome-free-solid/index.js +2013 -0
  134. data/assets/node_modules/@fortawesome/fontawesome/index.js +1823 -0
  135. data/assets/node_modules/@fortawesome/fontawesome/styles.css +345 -0
  136. data/assets/node_modules/bootstrap/dist/css/bootstrap.min.css +5 -3
  137. data/assets/node_modules/bootstrap/dist/css/bootstrap.min.css.map +1 -0
  138. data/assets/node_modules/bootstrap/dist/js/bootstrap.min.js +6 -5
  139. data/assets/node_modules/bootstrap/dist/js/bootstrap.min.js.map +1 -0
  140. data/assets/node_modules/bootstrap/scss/_badge.scss +54 -0
  141. data/assets/node_modules/bootstrap/scss/_buttons.scss +139 -0
  142. data/assets/node_modules/bootstrap/scss/_functions.scss +134 -0
  143. data/assets/node_modules/bootstrap/scss/_nav.scss +120 -0
  144. data/assets/node_modules/bootstrap/scss/_reboot.scss +482 -0
  145. data/assets/node_modules/bootstrap/scss/_variables.scss +1143 -0
  146. data/assets/node_modules/bootstrap/scss/mixins/_background-variant.scss +22 -0
  147. data/assets/node_modules/bootstrap/scss/mixins/_badge.scss +17 -0
  148. data/assets/node_modules/bootstrap/scss/mixins/_border-radius.scss +63 -0
  149. data/assets/node_modules/bootstrap/scss/mixins/_box-shadow.scss +20 -0
  150. data/assets/node_modules/bootstrap/scss/mixins/_breakpoints.scss +123 -0
  151. data/assets/node_modules/bootstrap/scss/mixins/_buttons.scss +110 -0
  152. data/assets/node_modules/bootstrap/scss/mixins/_deprecate.scss +10 -0
  153. data/assets/node_modules/bootstrap/scss/mixins/_gradients.scss +45 -0
  154. data/assets/node_modules/bootstrap/scss/mixins/_hover.scss +37 -0
  155. data/assets/node_modules/bootstrap/scss/mixins/_text-emphasis.scss +17 -0
  156. data/assets/node_modules/bootstrap/scss/mixins/_text-hide.scss +11 -0
  157. data/assets/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  158. data/assets/node_modules/bootstrap/scss/mixins/_transition.scss +16 -0
  159. data/assets/node_modules/bootstrap/scss/utilities/_background.scss +19 -0
  160. data/assets/node_modules/bootstrap/scss/utilities/_text.scss +72 -0
  161. data/assets/node_modules/bootstrap/scss/vendor/_rfs.scss +204 -0
  162. data/assets/node_modules/firebase/firebase-app.js +2 -0
  163. data/assets/node_modules/firebase/firebase-app.js.map +1 -0
  164. data/assets/node_modules/firebase/firebase-auth.js +2 -0
  165. data/assets/node_modules/firebase/firebase-auth.js.map +1 -0
  166. data/assets/node_modules/firebase/firebase-firestore.js +2 -0
  167. data/assets/node_modules/firebase/firebase-firestore.js.map +1 -0
  168. data/assets/node_modules/flag-icon-css/flags/1x1/br.svg +41 -41
  169. data/assets/node_modules/flag-icon-css/flags/1x1/mx.svg +371 -378
  170. data/assets/node_modules/flag-icon-css/flags/1x1/us.svg +2 -2
  171. data/assets/node_modules/flag-icon-css/sass/_flag-icon-list.scss +265 -249
  172. data/assets/node_modules/flag-icon-css/sass/_variables.scss +1 -1
  173. data/assets/node_modules/flag-icon-css/sass/flag-icon.scss +3 -4
  174. data/assets/node_modules/isotope-layout/dist/isotope.pkgd.min.js +12 -0
  175. data/assets/node_modules/jquery.stellar/jquery.stellar.min.js +9 -0
  176. data/assets/node_modules/jquery/dist/jquery.min.js +2 -0
  177. data/assets/node_modules/jquery/dist/jquery.min.map +1 -0
  178. data/assets/node_modules/jspdf/dist/jspdf.min.js +149 -88
  179. data/assets/node_modules/lightslider/dist/css/lightslider.min.css +3 -0
  180. data/assets/node_modules/lightslider/dist/img/controls.png +0 -0
  181. data/assets/node_modules/lightslider/dist/js/lightslider.min.js +4 -0
  182. data/assets/node_modules/lunr/lunr.min.js +6 -0
  183. data/assets/node_modules/vue/dist/vue.min.js +3 -3
  184. data/assets/vendors/revolution-slider/assets/coloredbg.png +0 -0
  185. data/assets/vendors/revolution-slider/assets/shadow3.png +0 -0
  186. data/assets/vendors/revolution-slider/css/settings.css +1480 -0
  187. data/assets/vendors/revolution-slider/font/revicons.svg +54 -0
  188. data/assets/vendors/revolution-slider/font/revicons.woff +0 -0
  189. data/assets/vendors/revolution-slider/js/jquery.themepunch.revolution.min.js +11 -0
  190. data/assets/vendors/revolution-slider/js/jquery.themepunch.tools.min.js +138 -0
  191. data/assets/vendors/revolution-slider/js/settings.js +110 -0
  192. data/assets/vendors/themeforest/fonts/social-icons.eot +0 -0
  193. data/assets/vendors/themeforest/fonts/social-icons.svg +403 -0
  194. data/assets/vendors/themeforest/fonts/social-icons.ttf +0 -0
  195. data/assets/vendors/themeforest/fonts/social-icons.woff +0 -0
  196. data/assets/vendors/themeforest/progressive/css/animate.css +1582 -0
  197. data/assets/vendors/themeforest/progressive/css/base.css +278 -0
  198. data/assets/vendors/themeforest/progressive/css/buttons.css +272 -0
  199. data/assets/vendors/themeforest/progressive/css/cms.css +289 -0
  200. data/assets/vendors/themeforest/progressive/css/responsive.css +2111 -0
  201. data/assets/vendors/themeforest/progressive/css/social-icons.css +130 -0
  202. data/assets/vendors/themeforest/progressive/css/style.css +9521 -0
  203. data/assets/vendors/themeforest/progressive/images/svg/loader.svg +34 -0
  204. data/assets/vendors/themeforest/progressive/js/jquery.appear.js +150 -0
  205. data/assets/vendors/themeforest/progressive/js/main.js +2176 -0
  206. metadata +189 -40
  207. data/_includes/body/footer.html +0 -0
  208. data/_includes/body/footer/buttons.html +0 -40
  209. data/_includes/body/header.html +0 -0
  210. data/_includes/body/header/logo.html +0 -5
  211. data/_includes/body/header/search-contact-phone-buttons.html +0 -29
  212. data/_includes/body/header/top-bar.html +0 -20
  213. data/_includes/body/scripts.html +0 -41
  214. data/_includes/head/firebase/sdk.html +0 -4
  215. data/_includes/head/google-analytics.html +0 -0
  216. data/_includes/head/scripts.html +0 -9
  217. data/_includes/head/style.html +0 -50
  218. data/_sass/components/navbars/_vg_progressive.scss +0 -44
  219. data/_sass/layouts/_grid.scss +0 -13
  220. data/assets/css/main.scss +0 -23
  221. data/assets/js/bootstrap/nav-tabs.js +0 -36
  222. data/assets/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +0 -229
  223. data/assets/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  224. data/assets/node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  225. data/assets/node_modules/flag-icon-css/sass/_flag-icon-more.scss +0 -7
  226. data/assets/node_modules/font-awesome/css/font-awesome.min.css +0 -4
  227. data/assets/node_modules/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  228. data/assets/node_modules/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
  229. data/assets/node_modules/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  230. data/assets/node_modules/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  231. data/assets/node_modules/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
  232. data/assets/node_modules/jquery/dist/cdn/jquery.min.js +0 -4
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4
+ <g>
5
+ <defs>
6
+ <clipPath id="clip">
7
+ <path d="M 50 50 L 35 0 L 65 0 z" />
8
+ </clipPath>
9
+
10
+ <ellipse id= "MyEllipse" clip-path="url(#clip)" cx="50" cy="50" rx="40" ry="40" style="fill:none; stroke:#aaa" stroke-width="10" />
11
+ </defs>
12
+
13
+
14
+ <use xlink:href="#MyEllipse" />
15
+ <use xlink:href="#MyEllipse" transform="rotate(40 50 50)" />
16
+ <use xlink:href="#MyEllipse" transform="rotate(80 50 50)" />
17
+ <use xlink:href="#MyEllipse" transform="rotate(120 50 50)"/>
18
+ <use xlink:href="#MyEllipse" transform="rotate(160 50 50)"/>
19
+ <use xlink:href="#MyEllipse" transform="rotate(200 50 50)"/>
20
+ <use xlink:href="#MyEllipse" transform="rotate(240 50 50)"/>
21
+ <use xlink:href="#MyEllipse" transform="rotate(280 50 50)"/>
22
+ <use xlink:href="#MyEllipse" transform="rotate(320 50 50)"/>
23
+
24
+
25
+ <ellipse clip-path="url(#clip)" cx="50" cy="50" rx="40" ry="40" style="fill:none; stroke:black" stroke-width="12" >
26
+ <animateTransform attributeName="transform" attributeType="XML"
27
+ type="rotate" values="0 50 50; 40 50 50; 80 50 50; 120 50 50; 160 50 50; 200 50 50; 240 50 50; 280 50 50; 320 50 50; 360 50 50"
28
+ dur="2s"
29
+ repeatCount="indefinite"
30
+ additive="replace"
31
+ calcMode="discrete" fill="freeze"/>
32
+ </ellipse>
33
+ </g>
34
+ </svg>
@@ -0,0 +1,150 @@
1
+ /*
2
+ * jQuery.appear
3
+ * https://github.com/bas2k/jquery.appear/
4
+ * http://code.google.com/p/jquery-appear/
5
+ *
6
+ * Copyright (c) 2009 Michael Hixson
7
+ * Copyright (c) 2012 Alexander Brovikov
8
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
9
+ */
10
+ (function($) {
11
+ $.fn.appear = function(fn, options) {
12
+
13
+ var settings = $.extend({
14
+
15
+ //arbitrary data to pass to fn
16
+ data: undefined,
17
+
18
+ //call fn only on the first appear?
19
+ one: true,
20
+
21
+ // X & Y accuracy
22
+ accX: 0,
23
+ accY: 0
24
+
25
+ }, options);
26
+
27
+ return this.each(function() {
28
+
29
+ var t = $(this);
30
+
31
+ //whether the element is currently visible
32
+ t.appeared = false;
33
+
34
+ if (!fn) {
35
+
36
+ //trigger the custom event
37
+ t.trigger('appear', settings.data);
38
+ return;
39
+ }
40
+
41
+ var w = $(window);
42
+
43
+ //fires the appear event when appropriate
44
+ var check = function() {
45
+
46
+ //is the element hidden?
47
+ if (!t.is(':visible')) {
48
+
49
+ //it became hidden
50
+ t.appeared = false;
51
+ return;
52
+ }
53
+
54
+ //is the element inside the visible window?
55
+ var a = w.scrollLeft();
56
+ var b = w.scrollTop();
57
+ var o = t.offset();
58
+ var x = o.left;
59
+ var y = o.top;
60
+
61
+ var ax = settings.accX;
62
+ var ay = settings.accY;
63
+ var th = t.height();
64
+ var wh = w.height();
65
+ var tw = t.width();
66
+ var ww = w.width();
67
+
68
+ if (y + th + ay >= b &&
69
+ y <= b + wh + ay &&
70
+ x + tw + ax >= a &&
71
+ x <= a + ww + ax) {
72
+
73
+ //trigger the custom event
74
+ if (!t.appeared) t.trigger('appear', settings.data);
75
+
76
+ } else {
77
+
78
+ //it scrolled out of view
79
+ t.appeared = false;
80
+ }
81
+ };
82
+
83
+ //create a modified fn with some additional logic
84
+ var modifiedFn = function() {
85
+
86
+ //mark the element as visible
87
+ t.appeared = true;
88
+
89
+ //is this supposed to happen only once?
90
+ if (settings.one) {
91
+
92
+ //remove the check
93
+ w.unbind('scroll', check);
94
+ var i = $.inArray(check, $.fn.appear.checks);
95
+ if (i >= 0) $.fn.appear.checks.splice(i, 1);
96
+ }
97
+
98
+ //trigger the original fn
99
+ fn.apply(this, arguments);
100
+ };
101
+
102
+ //bind the modified fn to the element
103
+ if (settings.one) t.one('appear', settings.data, modifiedFn);
104
+ else t.bind('appear', settings.data, modifiedFn);
105
+
106
+ //check whenever the window scrolls
107
+ w.scroll(check);
108
+
109
+ //check whenever the dom changes
110
+ $.fn.appear.checks.push(check);
111
+
112
+ //check now
113
+ (check)();
114
+ });
115
+ };
116
+
117
+ //keep a queue of appearance checks
118
+ $.extend($.fn.appear, {
119
+
120
+ checks: [],
121
+ timeout: null,
122
+
123
+ //process the queue
124
+ checkAll: function() {
125
+ var length = $.fn.appear.checks.length;
126
+ if (length > 0) while (length--) ($.fn.appear.checks[length])();
127
+ },
128
+
129
+ //check the queue asynchronously
130
+ run: function() {
131
+ if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);
132
+ $.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20);
133
+ }
134
+ });
135
+
136
+ //run checks when these methods are called
137
+ $.each(['append', 'prepend', 'after', 'before', 'attr',
138
+ 'removeAttr', 'addClass', 'removeClass', 'toggleClass',
139
+ 'remove', 'css', 'show', 'hide'], function(i, n) {
140
+ var old = $.fn[n];
141
+ if (old) {
142
+ $.fn[n] = function() {
143
+ var r = old.apply(this, arguments);
144
+ $.fn.appear.run();
145
+ return r;
146
+ }
147
+ }
148
+ });
149
+
150
+ })(jQuery);
@@ -0,0 +1,2176 @@
1
+ jQuery(window).on('load', function() {
2
+ var $ = jQuery;
3
+
4
+ $('img:not(".logo-img")').each(function() {
5
+ if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
6
+ var ieversion=new Number(RegExp.$1)
7
+ if (ieversion>=9)
8
+ if (typeof this.naturalWidth === "undefined" || this.naturalWidth === 0) {
9
+ //this.src = "http://placehold.it/" + ($(this).attr('width') || this.width || $(this).naturalWidth()) + "x" + (this.naturalHeight || $(this).attr('height') || $(this).height());
10
+ }
11
+ } else {
12
+ if (!this.complete || typeof this.naturalWidth === "undefined" || this.naturalWidth === 0) {
13
+ //this.src = "http://placehold.it/" + ($(this).attr('width') || this.width) + "x" + ($(this).attr('height') || $(this).height());
14
+ }
15
+ }
16
+ });
17
+ });
18
+
19
+ //Calculating The Browser Scrollbar Width
20
+ var parent, child, scrollWidth, bodyWidth;
21
+
22
+ if (scrollWidth === undefined) {
23
+ parent = jQuery('<div style="width: 50px; height: 50px; overflow: auto"><div/></div>').appendTo('body');
24
+ child = parent.children();
25
+ scrollWidth = child.innerWidth() - child.height(99).innerWidth();
26
+ parent.remove();
27
+ }
28
+
29
+ //Form Stylization
30
+ function formStylization() {
31
+ var $ = jQuery,
32
+ radio = 'input[type="radio"]',
33
+ checkbox = 'input[type="checkbox"]';
34
+
35
+ $(radio).wrap('<div class="new-radio"></div>');
36
+ $('.new-radio').append('<span></span>');
37
+ $(checkbox).wrap('<div class="new-checkbox"></div>');
38
+ $('.new-checkbox').append('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="15px" height="15px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve"><polygon fill="#1e1e1e" points="9.298,13.391 4.18,9.237 3,10.079 9.297,17 17.999,4.678 16.324,3 "/></svg>');
39
+ $(checkbox + ':checked').parent('.new-checkbox').addClass('checked');
40
+ $(radio + ':checked').parent('.new-radio').addClass('checked');
41
+ $(checkbox + ':disabled').parent().addClass('disabled');
42
+ $(radio + ':disabled').parent().addClass('disabled');
43
+
44
+ $('html').click(function(){
45
+ $(radio).parent('.new-radio').removeClass('checked');
46
+ $(radio + ':checked').parent('.new-radio').addClass('checked');
47
+ $(checkbox).parent('.new-checkbox').removeClass('checked');
48
+ $(checkbox + ':checked').parent('.new-checkbox').addClass('checked');
49
+ $(radio).parent().removeClass('disabled');
50
+ $(checkbox).parent().removeClass('disabled');
51
+ $(radio + ':disabled').parent().addClass('disabled');
52
+ $(checkbox + ':disabled').parent().addClass('disabled');
53
+ });
54
+
55
+ if(typeof($.fn.selectBox) !== 'undefined') {
56
+ $('select:not(".without-styles")').selectBox();
57
+ }
58
+ }
59
+
60
+ //Full Width Box
61
+ function fullWidthBox() {
62
+ var $ = jQuery;
63
+
64
+ if ($('.full-width-box.auto-width').length) {
65
+ var windowWidth = $('body').outerWidth(),
66
+ containerWidth = $('.header .container').width();
67
+
68
+ $('.full-width-box.auto-width').each(function() {
69
+ $(this)
70
+ .css({
71
+ left : ( containerWidth - windowWidth) / 2,
72
+ width : windowWidth
73
+ })
74
+ .addClass('loaded');
75
+ });
76
+ }
77
+ }
78
+
79
+ //Animations
80
+ function animations() {
81
+ var $ = jQuery;
82
+
83
+ $('[data-appear-animation]').each(function() {
84
+ var $this = $(this);
85
+
86
+ $this.addClass('appear-animation');
87
+
88
+ if(!$('body').hasClass('no-csstransitions') && ($('body').width() + scrollWidth) > 767) {
89
+ $this.appear(function() {
90
+ var delay = ($this.attr('data-appear-animation-delay') ? $this.attr('data-appear-animation-delay') : 1);
91
+
92
+ if(delay > 1) $this.css('animation-delay', delay + 'ms');
93
+ $this.addClass($this.attr('data-appear-animation'));
94
+
95
+ setTimeout(function() {
96
+ $this.addClass('appear-animation-visible');
97
+ }, delay);
98
+ }, {accX: 0, accY: -150});
99
+ } else {
100
+ $this.addClass('appear-animation-visible');
101
+ }
102
+ });
103
+
104
+ /* Animation Progress Bars */
105
+ $('[data-appear-progress-animation]').each(function() {
106
+ var $this = $(this);
107
+
108
+ $this.appear(function() {
109
+ var delay = ($this.attr('data-appear-animation-delay') ? $this.attr('data-appear-animation-delay') : 1);
110
+
111
+ if(delay > 1) $this.css('animation-delay', delay + 'ms');
112
+
113
+ $this.find('.progress-bar').addClass($this.attr('data-appear-animation'));
114
+
115
+ setTimeout(function() {
116
+ $this.find('.progress-bar').animate({
117
+ width: $this.attr('data-appear-progress-animation')
118
+ }, 500, 'easeInCirc', function() {
119
+ $this.find('.progress-bar').animate({
120
+ textIndent: 10
121
+ }, 1500, 'easeOutBounce');
122
+ });
123
+ }, delay);
124
+ }, {accX: 0, accY: -50});
125
+ });
126
+ }
127
+
128
+ //Header Fixed
129
+ function headerCustomizer() {
130
+ var $ = jQuery,
131
+ body = $('body'),
132
+ topHeight = 0,
133
+ headerHeight = 0,
134
+ scroll = 0,
135
+ fixedH = $('.fixed-header');
136
+
137
+ if ($('#top-box').length) {
138
+ topHeight = $('#top-box').outerHeight();
139
+ }
140
+
141
+ headerHeight = $('.header').outerHeight();
142
+
143
+ if (!navigator.userAgent.match(/iPad|iPhone|Android/i)) {
144
+ scroll = topHeight;
145
+
146
+ if (body.hasClass('hidden-top')) {
147
+ scroll = 8;
148
+ }
149
+
150
+ if (body.hasClass('padding-top')) {
151
+ scroll = topHeight + 420;
152
+ } else if (body.hasClass('boxed')) {
153
+ scroll = topHeight + 20;
154
+ }
155
+
156
+ $(window).scroll(function(){
157
+ var $this = $(this);
158
+
159
+ if (body.hasClass('fixed-header')) {
160
+ if ($this.scrollTop() >= scroll) {
161
+ body.addClass('fixed');
162
+ } else {
163
+ body.removeClass('fixed');
164
+ }
165
+ }
166
+
167
+ if ($this.scrollTop() >= headerHeight) {
168
+ fixedH.addClass('background-opacity');
169
+ } else {
170
+ fixedH.removeClass('background-opacity');
171
+ }
172
+ });
173
+
174
+ $('.hidden-top .header, .hidden-top #top-box').not('.boxed .header, .boxed #top-box').hover(function(){
175
+ $('.hidden-top').addClass('visible-top');
176
+ }, function(){
177
+ $('.hidden-top').removeClass('visible-top');
178
+ });
179
+ }
180
+
181
+ $(window).scroll(function(){
182
+ if ($(this).scrollTop() >= topHeight + headerHeight) {
183
+ $('.top-fixed-box').addClass('fixed');
184
+ } else {
185
+ $('.top-fixed-box').removeClass('fixed');
186
+ }
187
+ });
188
+ }
189
+
190
+ //Header Menu
191
+ function menu() {
192
+ var $ = jQuery,
193
+ body = $('body'),
194
+ primary = '.primary';
195
+
196
+ $(primary).find('.parent > a .open-sub, .megamenu .title .open-sub').remove();
197
+
198
+ if ((body.width() + scrollWidth) <= 979 ) {
199
+ $(primary).find('.parent > a, .megamenu .title').append('<span class="open-sub"><span></span><span></span></span>');
200
+ } else {
201
+ $(primary).find('ul').removeAttr('style').find('li').removeClass('active');
202
+ }
203
+
204
+ $(primary).find('.open-sub').click(function(event){
205
+ event.preventDefault();
206
+
207
+ var item = $(this).closest('li, .box');
208
+
209
+ if ($(item).hasClass('active')) {
210
+ $(item).children().last().slideUp(600);
211
+ $(item).removeClass('active');
212
+ } else {
213
+ var li = $(this).closest('li, .box').parent('ul, .sub-list').children('li, .box');
214
+
215
+ if ($(li).is('.active')) {
216
+ $(li).removeClass('active').children('ul').slideUp(600);
217
+ }
218
+
219
+ $(item).children().last().slideDown(600);
220
+ $(item).addClass('active');
221
+ }
222
+ });
223
+
224
+ $(primary).find('.parent > a').click(function(event){
225
+ if (((body.width() + scrollWidth) > 979) && (navigator.userAgent.match(/iPad|iPhone|Android/i))) {
226
+ var $this = $(this);
227
+
228
+ if ($this.parent().hasClass('open')) {
229
+ $this.parent().removeClass('open')
230
+ } else {
231
+ event.preventDefault();
232
+
233
+ $this.parent().addClass('open')
234
+ }
235
+ }
236
+ });
237
+
238
+ body.on('click', function(event) {
239
+ if (!$(event.target).is(primary + ' *')) {
240
+ if ($(primary + ' .collapse').hasClass('in')) {
241
+ $(primary + ' .navbar-toggle').addClass('collapsed');
242
+ $(primary + ' .navbar-collapse').collapse('hide');
243
+ }
244
+ }
245
+ });
246
+
247
+ /* Top Menu */
248
+ var topMenu = $('.top-navbar').find('.collapse');
249
+
250
+ if ((body.width() + scrollWidth) < 768) {
251
+ topMenu.css('width', body.width());
252
+ } else {
253
+ topMenu.css('width', 'auto');
254
+ }
255
+ }
256
+
257
+ //One Page
258
+ function scrollMenu() {
259
+ var $ = jQuery,
260
+ link = $('a.scroll'),
261
+ header = $('.header'),
262
+ headerHeight = header.height();
263
+
264
+ if(($('body').width() + scrollWidth) < 991) {
265
+ headerHeight = 0;
266
+ }
267
+
268
+ $(document).on('scroll', onScroll);
269
+
270
+ link.on('click', function(e) {
271
+ var target = $(this).attr('href'),
272
+ $this = $(this);
273
+
274
+ e.preventDefault();
275
+
276
+ link.removeClass('active');
277
+ $this.addClass('active');
278
+
279
+ if ($(target).length) {
280
+ $('html, body').animate({scrollTop: $(target).offset().top - headerHeight}, 600);
281
+ }
282
+ });
283
+
284
+ function onScroll(){
285
+ var scrollPos = $(document).scrollTop();
286
+
287
+ link.each(function () {
288
+ var currLink = $(this),
289
+ refElement = $(currLink.attr('href'));
290
+
291
+ if (
292
+ refElement.position().top - headerHeight <= scrollPos &&
293
+ refElement.position().top + refElement.height() > scrollPos) {
294
+ link.removeClass('active');
295
+ currLink.addClass('active');
296
+ } else {
297
+ currLink.removeClass('active');
298
+ }
299
+ });
300
+ }
301
+ }
302
+
303
+ //Accordion
304
+ function accordions() {
305
+ var $ = jQuery;
306
+
307
+ //Some open
308
+ $('.multi-collapse .collapse').collapse({
309
+ toggle: false
310
+ });
311
+
312
+ //Always open
313
+ $('.panel a[data-toggle="collapse"]').click( function(event){
314
+ event.preventDefault();
315
+
316
+ if ($(this).closest('.panel').hasClass('active')) {
317
+ if ($(this).closest('.panel-group').hasClass('one-open')) {
318
+ event.stopPropagation();
319
+ }
320
+ }
321
+ });
322
+
323
+ $('.collapse').on('hide.bs.collapse', function (event) {
324
+ event.stopPropagation();
325
+
326
+ $(this).closest('.panel').removeClass('active');
327
+ });
328
+ $('.collapse').on('show.bs.collapse', function () {
329
+ $(this).closest('.panel').addClass('active');
330
+ });
331
+
332
+ $('.collapse.in').closest('.panel').addClass('active');
333
+ }
334
+
335
+ //Tabs
336
+ function tabs() {
337
+ var $ = jQuery,
338
+ tab = $('.nav-tabs');
339
+
340
+ tab.find('a').click(function (e) {
341
+ e.preventDefault();
342
+
343
+ $(this).tab('show');
344
+ });
345
+
346
+ if (($('body').width() + scrollWidth) < 768 && (!tab.hasClass('no-responsive')))
347
+ {
348
+ tab.each(function(){
349
+ var $this = $(this);
350
+
351
+ if (!$this.next('.tab-content').hasClass('hidden') && !$this.find('li').hasClass('dropdown')) {
352
+ $this.addClass('accordion-tab');
353
+
354
+ $this.find('a').each(function(){
355
+ var $this = $(this),
356
+ id = $this.attr('href');
357
+
358
+ $this.prepend('<span class="open-sub"></span>');
359
+
360
+ $this.closest('.nav-tabs').next('.tab-content').find(id)
361
+ .appendTo($this.closest('li'));
362
+ });
363
+
364
+ $this.next('.tab-content').addClass('hidden');
365
+ }
366
+ });
367
+
368
+ $('.accordion-tab > li.active .tab-pane').slideDown();
369
+ }
370
+ else
371
+ {
372
+ tab.find('.tab-pane').removeAttr('style', 'display');
373
+ tab.each(function(){
374
+ var $this = $(this);
375
+
376
+ if ($this.next('.tab-content').hasClass('hidden')) {
377
+ $this.removeClass('accordion-tab');
378
+
379
+ $this.find('a').each(function(){
380
+ var $this = $(this),
381
+ id = $this.attr('href');
382
+
383
+ $($this.closest('li').find('.tab-pane'))
384
+ .appendTo($this.closest('.nav-tabs').next('.tab-content'));
385
+ });
386
+
387
+ $this.next('.tab-content').removeClass('hidden');
388
+ }
389
+ });
390
+ }
391
+
392
+ $('.accordion-tab > li > a').on('shown.bs.tab', function (e) {
393
+ if (($('body').width() + scrollWidth) < 768) {
394
+ var $this = $(this),
395
+ tab = $this.closest('li');
396
+
397
+ e.preventDefault();
398
+
399
+ $this
400
+ .closest('.accordion-tab')
401
+ .find('.tab-pane').not(tab.find('.tab-pane'))
402
+ .removeClass('active')
403
+ .slideUp();
404
+ tab.find('.tab-pane')
405
+ .addClass('active')
406
+ .slideDown();
407
+
408
+ $('html, body').on("scroll mousedown DOMMouseScroll mousewheel keyup", function(){
409
+ $('html, body').stop();
410
+ });
411
+
412
+ setTimeout(function(){
413
+ $('html, body').animate({
414
+ scrollTop: $this.offset().top
415
+ }, 800);
416
+ }, 500 );
417
+ }
418
+ });
419
+ }
420
+
421
+ //Footer structure (max-width < 768)
422
+ function footerStructure() {
423
+ var $ = jQuery,
424
+ footer = $('#footer .footer-bottom');
425
+
426
+ if (($('body').width() + scrollWidth) < 768) {
427
+ if (!footer.find('.new-copyright').length) {
428
+ footer.find('.address').after('<div class="new-copyright"></div>');
429
+ footer.find('.copyright').appendTo('#footer .footer-bottom .new-copyright');
430
+ }
431
+ } else {
432
+ if (footer.find('.new-copyright').length) {
433
+ footer.find('.copyright').prependTo('#footer .footer-bottom .row');
434
+ footer.find('.new-copyright').remove();
435
+ }
436
+ }
437
+ }
438
+
439
+ //Slider
440
+ function openItem( $item ) {
441
+ var $ = jQuery;
442
+
443
+ $item.addClass('active');
444
+ $item.stop().children('.slid-content').animate({
445
+ opacity: 1
446
+ });
447
+ }
448
+ function progressiveSlider() {
449
+ var $ = jQuery,
450
+ parameters,
451
+ slider = $('.progressive-slider');
452
+
453
+ slider.each(function () {
454
+ var $this = $(this);
455
+
456
+ if ($this.hasClass('progressive-slider-two')) {
457
+ parameters = {
458
+ responsive : true,
459
+ auto : true,
460
+ pagination : $(this).closest('.slider').find('.pagination'),
461
+ scroll : {
462
+ duration : 1000,
463
+ pauseOnHover : true
464
+ },
465
+ items : {
466
+ visible : 1,
467
+ },
468
+ swipe : {
469
+ onMouse : false,
470
+ onTouch : true
471
+ },
472
+ onCreate : function( data ) {
473
+ $this.find('.slider-wrapper').css('height', data.height)
474
+ }
475
+ }
476
+ } else if ($this.hasClass('progressive-slider-three')) {
477
+ parameters = {
478
+ responsive : true,
479
+ auto : true,
480
+ items : {
481
+ visible : 1,
482
+ },
483
+ scroll : {
484
+ fx : 'crossfade',
485
+ duration : 1000,
486
+ pauseOnHover : true
487
+ },
488
+ swipe : {
489
+ onMouse: false,
490
+ onTouch: true
491
+ }
492
+ }
493
+ } else if ($this.hasClass('progressive-slider-four')) {
494
+ parameters = {
495
+ responsive : true,
496
+ auto : true,
497
+ items : {
498
+ visible : 1,
499
+ },
500
+ scroll : {
501
+ duration : 1000,
502
+ pauseOnHover : true
503
+ },
504
+ next : $(this).closest('.slider').find('.next'),
505
+ prev : $(this).closest('.slider').find('.prev'),
506
+ swipe : {
507
+ onMouse: false,
508
+ onTouch: true
509
+ }
510
+ }
511
+ } else {
512
+ parameters = {
513
+ responsive : true,
514
+ scroll : {
515
+ fx : 'crossfade',
516
+ duration : 700,
517
+ onBefore : function( data ) {
518
+ data.items.old.stop().children('.slid-content').animate({
519
+ opacity: 0
520
+ });
521
+ },
522
+ onAfter : function( data ) {
523
+ openItem( data.items.visible );
524
+ }
525
+ },
526
+ auto : false,
527
+ next : $(this).closest('.slider').find('.next'),
528
+ prev : $(this).closest('.slider').find('.prev'),
529
+ pagination : $(this).closest('.slider').find('.pagination'),
530
+ items : {
531
+ visible : 1,
532
+ },
533
+ swipe : {
534
+ onMouse: false,
535
+ onTouch: true
536
+ },
537
+ onCreate : function( data ) {
538
+ openItem(data.items);
539
+ }
540
+ }
541
+ }
542
+ });
543
+
544
+ slider.find('.sliders-box').each(function () {
545
+ $(this).carouFredSel(parameters).parents('.slider').removeClass('load');
546
+ });
547
+ }
548
+
549
+ //Banner set
550
+ function bannerSetCarousel() {
551
+ var $ = jQuery;
552
+
553
+ $('.banner-set .banners').each(function () {
554
+ var bannerSet = $(this).closest('.banner-set'),
555
+ prev = bannerSet.find('.prev'),
556
+ next = bannerSet.find('.next'),
557
+ height;
558
+
559
+ $(this).carouFredSel({
560
+ auto : false,
561
+ width : '100%',
562
+ responsive : false,
563
+ infinite : false,
564
+ next : next,
565
+ prev : prev,
566
+ pagination : bannerSet.find('.pagination'),
567
+ swipe : {
568
+ onMouse : false,
569
+ onTouch : true
570
+ },
571
+ scroll: 1,
572
+ onCreate: function () {
573
+ height = $(this).height();
574
+
575
+ $(this).find('.banner').css({
576
+ height : height
577
+ });
578
+ if (bannerSet.hasClass('banner-set-mini') && bannerSet.hasClass('banner-set-no-pagination')) {
579
+ $(this).closest('.banner-set').find('.prev, .next').css({
580
+ marginTop : -((height / 2) + 7)
581
+ });
582
+ }
583
+ }
584
+ }).parents('.banner-set').removeClass('load');
585
+ });
586
+ }
587
+
588
+ //Carousel
589
+ function carousel() {
590
+ var $ = jQuery;
591
+
592
+ if ($('.carousel-box .carousel').length) {
593
+ var carouselBox = $('.carousel-box .carousel');
594
+
595
+ carouselBox.each(function () {
596
+ var carousel = $(this).closest('.carousel-box'),
597
+ swipe,
598
+ autoplay,
599
+ prev,
600
+ next,
601
+ pagitation,
602
+ responsive = false;
603
+
604
+ if (carousel.hasClass('no-swipe')) {
605
+ swipe = false;
606
+ } else {
607
+ swipe = true;
608
+ }
609
+
610
+ if (carousel.attr('data-carousel-autoplay') == 'true') {
611
+ autoplay = true;
612
+ } else {
613
+ autoplay = false;
614
+ }
615
+
616
+ if (carousel.attr('data-carousel-nav') == 'false') {
617
+ next = false;
618
+ prev = false;
619
+ carousel.addClass('no-nav');
620
+ } else {
621
+ next = carousel.find('.next');
622
+ prev = carousel.find('.prev');
623
+ carousel.removeClass('no-nav');
624
+ }
625
+
626
+ if (carousel.attr('data-carousel-pagination') == 'true') {
627
+ pagination = carousel.find('.pagination');
628
+ carousel.removeClass('no-pagination');
629
+ } else {
630
+ pagination = false;
631
+ carousel.addClass('no-pagination');
632
+ }
633
+
634
+ if (carousel.attr('data-carousel-one') == 'true') {
635
+ responsive = true;
636
+ }
637
+
638
+ $(this).carouFredSel({
639
+ onCreate : function () {
640
+ $(window).on('resize', function(event){
641
+ event.stopPropagation();
642
+ });
643
+ },
644
+ auto : autoplay,
645
+ width : '100%',
646
+ infinite : false,
647
+ next : next,
648
+ prev : prev,
649
+ pagination : pagination,
650
+ responsive : responsive,
651
+ swipe : {
652
+ onMouse : false,
653
+ onTouch : swipe
654
+ },
655
+ scroll : 1
656
+ }).parents('.carousel-box').removeClass('load');
657
+ });
658
+ }
659
+ }
660
+
661
+ function thumblist() {
662
+ var $ = jQuery;
663
+
664
+ if ($('#thumblist').length) {
665
+ $('#thumblist').carouFredSel({
666
+ prev : '.thumblist-box .prev',
667
+ next : '.thumblist-box .next',
668
+ width : '100%',
669
+ auto : false,
670
+ swipe : {
671
+ onMouse : false,
672
+ onTouch : true
673
+ }
674
+ }).parents('.thumblist-box').removeClass('load');
675
+ }
676
+ }
677
+
678
+ //Modern Gallery
679
+ function modernGallery() {
680
+ var $ = jQuery;
681
+
682
+ if(typeof($.fn.imagesLoaded) !== 'undefined') {
683
+ var $container = $('#gallery-modern'),
684
+ bodyWidth = $('body').width();
685
+
686
+ $container.imagesLoaded( function() {
687
+ if ((bodyWidth + scrollWidth) >= 1200) {
688
+ $container.masonry({
689
+ columnWidth: 300,
690
+ itemSelector: '.images-box'
691
+ });
692
+ } else if ((bodyWidth + scrollWidth) <= 1199 && (bodyWidth + scrollWidth) ) {
693
+ $container.masonry({
694
+ columnWidth: 242.5,
695
+ itemSelector: '.images-box'
696
+ });
697
+ } else if ((bodyWidth + scrollWidth) <= 979 && (bodyWidth + scrollWidth) >= 768 ) {
698
+ $container.masonry({
699
+ columnWidth: 187.5,
700
+ itemSelector: '.images-box'
701
+ });
702
+ }
703
+ });
704
+ }
705
+ }
706
+
707
+ //Chart
708
+ function chart() {
709
+ var $ = jQuery;
710
+
711
+ $('.chart').each(function () {
712
+ var $this = $(this),
713
+ line = [],
714
+ type = 'line',
715
+ width = '100%',
716
+ height = '225',
717
+ lineColor = '#e1e1e1',
718
+ fillColor = 'rgba(0, 0, 0, .05)',
719
+ spotColor = '#a9a8a8',
720
+ minSpotColor = '#c6c6c6',
721
+ maxSpotColor = '#727070',
722
+ verticalLineColor = '#e1e1e1',
723
+ spotColorHovered = '#1e1e1e',
724
+ lineWidth = 2,
725
+ barSpacing = 8,
726
+ barWidth = 18,
727
+ barColor = 'rgba(0, 0, 0, .2)',
728
+ offset = 0,
729
+ sliceColors = [],
730
+ colorMap = [],
731
+ rangeColors = ['#d3dafe', '#a8b6ff', '#7f94ff'],
732
+ posBarColor = '#c6c6c6',
733
+ negBarColor = '#727070',
734
+ zeroBarColor = '#a9a8a8',
735
+ performanceColor = '#575656',
736
+ targetWidth = 5,
737
+ targetColor = '#1e1e1e';
738
+
739
+ if ($this.attr('data-line') !== undefined && $this.attr('data-line') !== false) {
740
+ line = $this.attr('data-line').split(/,/);
741
+ }
742
+ if ($this.attr('data-height') !== undefined && $this.attr('data-height') !== false) {
743
+ height = $this.attr('data-height');
744
+ }
745
+ if ($this.attr('data-line-width') !== undefined && $this.attr('data-line-width') !== false) {
746
+ lineWidth = $this.attr('data-line-width');
747
+ }
748
+ if ($this.attr('data-line-color') !== undefined && $this.attr('data-line-color') !== false) {
749
+ lineColor = $this.attr('data-line-color');
750
+ }
751
+ if ($this.attr('data-vertical-line-color') !== undefined && $this.attr('data-vertical-line-color') !== false) {
752
+ verticalLineColor = $this.attr('data-vertical-line-color');
753
+ }
754
+ if ($this.attr('data-spot-color-hovered') !== undefined && $this.attr('data-spot-color-hovered') !== false) {
755
+ spotColorHovered = $this.attr('data-spot-color-hovered');
756
+ }
757
+ if ($this.attr('data-spot-color') !== undefined && $this.attr('data-spot-color') !== false) {
758
+ spotColor = $this.attr('data-spot-color');
759
+ }
760
+ if ($this.attr('data-min-spot-color') !== undefined && $this.attr('data-min-spot-color') !== false) {
761
+ minSpotColor = $this.attr('data-min-spot-color');
762
+ }
763
+ if ($this.attr('data-max-spot-color') !== undefined && $this.attr('data-max-spot-color') !== false) {
764
+ maxSpotColor = $this.attr('data-max-spot-color');
765
+ }
766
+ if ($this.attr('data-bar-spacing') !== undefined && $this.attr('data-bar-spacing') !== false) {
767
+ barSpacing = $this.attr('data-bar-spacing');
768
+ }
769
+ if ($this.attr('data-bar-width') !== undefined && $this.attr('data-bar-width') !== false) {
770
+ barWidth = $this.attr('data-bar-width');
771
+ }
772
+ if ($this.attr('data-bar-color') !== undefined && $this.attr('data-bar-color') !== false) {
773
+ barColor = $this.attr('data-bar-color');
774
+ }
775
+ if ($this.attr('data-color-map') !== undefined && $this.attr('data-color-map') !== false) {
776
+ colorMap = $this.attr('data-color-map').split(/, /);
777
+ }
778
+ if ($this.attr('data-offset') !== undefined && $this.attr('data-offset') !== false) {
779
+ offset = $this.attr('data-offset');
780
+ }
781
+ if ($this.attr('data-slice-colors') !== undefined && $this.attr('data-slice-colors') !== false) {
782
+ sliceColors = $this.attr('data-slice-colors').split(/, /);
783
+ }
784
+ if ($this.attr('data-range-colors') !== undefined && $this.attr('data-range-colors') !== false) {
785
+ rangeColors = $this.attr('data-range-colors').split(/, /);
786
+ }
787
+ if ($this.attr('data-target-width') !== undefined && $this.attr('data-target-width') !== false) {
788
+ targetWidth = $this.attr('data-target-width');
789
+ }
790
+ if ($this.attr('data-pos-bar-color') !== undefined && $this.attr('data-pos-bar-color') !== false) {
791
+ posBarColor = $this.attr('data-pos-bar-color');
792
+ }
793
+ if ($this.attr('data-neg-bar-color') !== undefined && $this.attr('data-neg-bar-color') !== false) {
794
+ negBarColor = $this.attr('data-neg-bar-color');
795
+ }
796
+ if ($this.attr('data-performance-color') !== undefined && $this.attr('data-performance-color') !== false) {
797
+ performanceColor = $this.attr('data-performance-color');
798
+ }
799
+ if ($this.attr('data-fill-color') !== undefined && $this.attr('data-fill-color') !== false) {
800
+ fillColor = $this.attr('data-fill-color');
801
+ }
802
+ if ($this.attr('data-type') == 'bar') {
803
+ type = 'bar';
804
+ }
805
+ if ($this.attr('data-type') == 'pie') {
806
+ type = 'pie';
807
+ width = 'auto';
808
+ }
809
+ if ($this.attr('data-type') == 'discrete') {
810
+ type = 'discrete';
811
+ }
812
+ if ($this.attr('data-type') == 'tristate') {
813
+ type = 'tristate';
814
+ }
815
+ if ($this.attr('data-type') == 'bullet') {
816
+ type = 'bullet';
817
+ }
818
+ if ($this.attr('data-type') == 'box') {
819
+ type = 'box';
820
+ }
821
+
822
+ $this.sparkline(line, {
823
+ type : type,
824
+ width : width,
825
+ height : height,
826
+ lineColor : lineColor,
827
+ fillColor : fillColor,
828
+ lineWidth : lineWidth,
829
+ spotColor : spotColor,
830
+ minSpotColor : minSpotColor,
831
+ maxSpotColor : maxSpotColor,
832
+ highlightSpotColor : spotColorHovered,
833
+ highlightLineColor : verticalLineColor,
834
+ spotRadius : 6,
835
+ chartRangeMin : 0,
836
+ barSpacing : barSpacing,
837
+ barWidth : barWidth,
838
+ barColor : barColor,
839
+ offset : offset,
840
+ sliceColors : sliceColors,
841
+ colorMap : colorMap,
842
+ posBarColor : posBarColor,
843
+ negBarColor : negBarColor,
844
+ zeroBarColor : zeroBarColor,
845
+ rangeColors : rangeColors,
846
+ performanceColor : performanceColor,
847
+ targetWidth : targetWidth,
848
+ targetColor : targetColor
849
+ });
850
+ });
851
+ }
852
+
853
+ function graph($re) {
854
+ var $ = jQuery,
855
+ tax_data;
856
+
857
+ if ($re) {
858
+ $('.graph').html('');
859
+ }
860
+
861
+ tax_data = [
862
+ {
863
+ period: "2011 Q3",
864
+ licensed: 3407,
865
+ sorned: 660
866
+ }, {
867
+ period: "2011 Q2",
868
+ licensed: 3351,
869
+ sorned: 629
870
+ }, {
871
+ period: "2011 Q1",
872
+ licensed: 3269,
873
+ sorned: 618
874
+ }, {
875
+ period: "2010 Q4",
876
+ licensed: 3246,
877
+ sorned: 661
878
+ }, {
879
+ period: "2009 Q4",
880
+ licensed: 3171,
881
+ sorned: 676
882
+ }, {
883
+ period: "2008 Q4",
884
+ licensed: 3155,
885
+ sorned: 681
886
+ }, {
887
+ period: "2007 Q4",
888
+ licensed: 3226,
889
+ sorned: 620
890
+ }, {
891
+ period: "2006 Q4",
892
+ licensed: 3245,
893
+ sorned: null
894
+ }, {
895
+ period: "2005 Q4",
896
+ licensed: 3289,
897
+ sorned: null
898
+ }
899
+ ];
900
+
901
+ if ($('#hero-graph').length) {
902
+ Morris.Line({
903
+ element : "hero-graph",
904
+ data : tax_data,
905
+ xkey : "period",
906
+ ykeys : ["licensed", "sorned"],
907
+ labels : ["Licensed", "Off the road"],
908
+ lineColors : ["#3e8e00", "#000000"]
909
+ });
910
+ }
911
+
912
+ if ($('#hero-donut').length) {
913
+ Morris.Donut({
914
+ element : "hero-donut",
915
+ data : [
916
+ {
917
+ label: "Development",
918
+ value: 25
919
+ }, {
920
+ label: "Sales & Marketing",
921
+ value: 40
922
+ }, {
923
+ label: "User Experience",
924
+ value: 25
925
+ }, {
926
+ label: "Human Resources",
927
+ value: 10
928
+ }
929
+ ],
930
+ colors : ["#ff9d00"],
931
+ height : 100,
932
+ formatter : function(y) {
933
+ return y + "%";
934
+ }
935
+ });
936
+ }
937
+
938
+ if ($('#hero-area').length) {
939
+ Morris.Area({
940
+ element : "hero-area",
941
+ data : [
942
+ {
943
+ period: "2010 Q1",
944
+ iphone: 2666,
945
+ ipad: null,
946
+ itouch: 2647
947
+ }, {
948
+ period: "2010 Q2",
949
+ iphone: 2778,
950
+ ipad: 2294,
951
+ itouch: 2441
952
+ }, {
953
+ period: "2010 Q3",
954
+ iphone: 4912,
955
+ ipad: 1969,
956
+ itouch: 2501
957
+ }, {
958
+ period: "2010 Q4",
959
+ iphone: 3767,
960
+ ipad: 3597,
961
+ itouch: 5689
962
+ }, {
963
+ period: "2011 Q1",
964
+ iphone: 6810,
965
+ ipad: 1914,
966
+ itouch: 2293
967
+ }, {
968
+ period: "2011 Q2",
969
+ iphone: 5670,
970
+ ipad: 4293,
971
+ itouch: 1881
972
+ }, {
973
+ period: "2011 Q3",
974
+ iphone: 4820,
975
+ ipad: 3795,
976
+ itouch: 1588
977
+ }, {
978
+ period: "2011 Q4",
979
+ iphone: 15073,
980
+ ipad: 5967,
981
+ itouch: 5175
982
+ }, {
983
+ period: "2012 Q1",
984
+ iphone: 10687,
985
+ ipad: 4460,
986
+ itouch: 2028
987
+ }, {
988
+ period: "2012 Q2",
989
+ iphone: 8432,
990
+ ipad: 5713,
991
+ itouch: 1791
992
+ }
993
+ ],
994
+ xkey : "period",
995
+ ykeys : ["iphone", "ipad", "itouch"],
996
+ labels : ["iPhone", "iPad", "iPod Touch"],
997
+ hideHover : "auto",
998
+ lineWidth : 2,
999
+ pointSize : 4,
1000
+ lineColors : ["#00c3ff", "#ff9d00", "#3e8e00"],
1001
+ fillOpacity : 0.3,
1002
+ smooth : true
1003
+ });
1004
+ }
1005
+
1006
+ if ($('#hero-bar').length) {
1007
+ return Morris.Bar({
1008
+ element : "hero-bar",
1009
+ data : [
1010
+ {
1011
+ device: "iPhone",
1012
+ geekbench: 136
1013
+ }, {
1014
+ device: "iPhone 3G",
1015
+ geekbench: 137
1016
+ }, {
1017
+ device: "iPhone 3GS",
1018
+ geekbench: 275
1019
+ }, {
1020
+ device: "iPhone 4",
1021
+ geekbench: 380
1022
+ }, {
1023
+ device: "iPhone 4S",
1024
+ geekbench: 655
1025
+ }, {
1026
+ device: "iPhone 5",
1027
+ geekbench: 1571
1028
+ }
1029
+ ],
1030
+ xkey : "device",
1031
+ ykeys : ["geekbench"],
1032
+ labels : ["Geekbench"],
1033
+ barRatio : 0.4,
1034
+ xLabelAngle : 35,
1035
+ hideHover : "auto",
1036
+ barColors : ["#ef005c"]
1037
+ });
1038
+ }
1039
+ }
1040
+
1041
+ //Portfolio Filter
1042
+ function isotopFilter() {
1043
+ var $ = jQuery;
1044
+
1045
+ $('.portfolio, .filter-box').each(function () {
1046
+ var filterBox = $(this),
1047
+ filterElems = filterBox.find('.filter-elements'),
1048
+ buttonBox = filterBox.find('.filter-buttons'),
1049
+ selector = filterBox.find('.filter-buttons .active').attr('data-filter');
1050
+
1051
+ if (!filterBox.hasClass('accordions-filter')) {
1052
+ filterElems.isotope({
1053
+ filter: selector,
1054
+ layoutMode: 'fitRows'
1055
+ });
1056
+ buttonBox.find('.dropdown-toggle').html(filterBox.find('.filter-buttons .active').text() + '<span class="caret"></span>')
1057
+ }
1058
+
1059
+ buttonBox.find('a').on('click', function(e){
1060
+ var selector = $(this).attr('data-filter');
1061
+ e.preventDefault();
1062
+
1063
+ if (!$(this).hasClass('active')) {
1064
+ buttonBox.find('a').removeClass('active');
1065
+ $(this).addClass('active');
1066
+ buttonBox.find('.dropdown-toggle').html($(this).text() + '<span class="caret"></span>')
1067
+
1068
+ if (filterBox.hasClass('accordions-filter')) {
1069
+ filterElems.children().not(selector)
1070
+ .animate({ height : 0 })
1071
+ .addClass('e-hidden');
1072
+ filterElems.children(selector)
1073
+ .animate({ height : '100%' })
1074
+ .removeClass('e-hidden');
1075
+ } else {
1076
+ filterElems.isotope({
1077
+ filter: selector,
1078
+ layoutMode: 'fitRows'
1079
+ });
1080
+ }
1081
+ }
1082
+ });
1083
+ });
1084
+ }
1085
+
1086
+ //Add your review
1087
+ function addReview() {
1088
+ var $ = jQuery;
1089
+
1090
+ $('a[href="#reviews"].add-review').click(function(){
1091
+ $('.product-tab a[href="#reviews"]').trigger('click');
1092
+
1093
+ $('html, body').animate({
1094
+ scrollTop: $("#reviews").offset().top
1095
+ }, 1000);
1096
+ });
1097
+ }
1098
+
1099
+ // Zoomer
1100
+ function zoom() {
1101
+ var $ = jQuery;
1102
+
1103
+ if ($.fn.elevateZoom) {
1104
+ var image = $('.general-img').find('img'),
1105
+ zoomType,
1106
+ zoomWidth = 470,
1107
+ zoomHeight = 470,
1108
+ zoomType = 'window';
1109
+
1110
+ if (($('body').width() + scrollWidth) < 992) {
1111
+ zoomWidth = 0;
1112
+ zoomHeight = 0;
1113
+ zoomType = 'inner';
1114
+ }
1115
+
1116
+ image.removeData('elevateZoom');
1117
+ $('.zoomContainer').remove();
1118
+
1119
+ image.elevateZoom({
1120
+ gallery : 'thumblist',
1121
+ cursor : 'crosshair',
1122
+ galleryActiveClass : 'active',
1123
+ zoomWindowWidth : zoomWidth,
1124
+ zoomWindowHeight : zoomHeight,
1125
+ borderSize : 0,
1126
+ borderColor : 'none',
1127
+ lensFadeIn : true,
1128
+ zoomWindowFadeIn : true,
1129
+ zoomType : zoomType
1130
+ });
1131
+ }
1132
+ }
1133
+
1134
+ //Blur
1135
+ function blur() {
1136
+ var $ = jQuery;
1137
+
1138
+ $('.full-width-box .fwb-blur').each(function () {
1139
+ var blurBox = $(this),
1140
+ img = new Image(),
1141
+ amount = 2,
1142
+ prependBox = '<div class="blur-box"></div>';
1143
+
1144
+ img.src = blurBox.attr('data-blur-image');
1145
+
1146
+ if (
1147
+ blurBox.attr('data-blur-amount') !== undefined &&
1148
+ blurBox.attr('data-blur-amount') !== false
1149
+ )
1150
+ amount = blurBox.attr('data-blur-amount');
1151
+
1152
+ img.onload = function() {
1153
+ Pixastic.process(img, "blurfast", {
1154
+ amount: amount
1155
+ });
1156
+ }
1157
+
1158
+ if (blurBox.hasClass('paralax')) {
1159
+ prependBox = '<div class="blur-box" data-stellar-ratio="0.5"></div>';
1160
+ }
1161
+
1162
+ blurBox
1163
+ .prepend( prependBox )
1164
+ .find('.blur-box')
1165
+ .prepend( img )
1166
+ setTimeout(function(){
1167
+ $('body').addClass('blur-load');
1168
+ }, 0 );
1169
+ });
1170
+ }
1171
+
1172
+ function blurPage() {
1173
+ var $ = jQuery;
1174
+
1175
+ if ($('.blur-page').length) {
1176
+ var blurBox = $('.blur-page');
1177
+
1178
+ blurBox.each(function () {
1179
+ var $this = $(this),
1180
+ img = new Image(),
1181
+ amount = 2,
1182
+ prependBox = '<div class="blur-box"></div>';
1183
+
1184
+ img.src = $this.attr('data-blur-image');
1185
+
1186
+ if (
1187
+ $this.attr('data-blur-amount') !== undefined &&
1188
+ $this.attr('data-blur-amount') !== false
1189
+ )
1190
+ amount = $this.attr('data-blur-amount');
1191
+
1192
+ img.onload = function() {
1193
+ Pixastic.process(
1194
+ img,
1195
+ 'blurfast',
1196
+ {
1197
+ amount: amount
1198
+ },
1199
+ function(){
1200
+ $('.blur-page').addClass('blur-load')
1201
+ }
1202
+ );
1203
+ }
1204
+
1205
+ $this.prepend( prependBox ).find('.blur-box').prepend( img );
1206
+ });
1207
+ }
1208
+ }
1209
+
1210
+ //Paralax
1211
+ function paralax() {
1212
+ var $ = jQuery;
1213
+
1214
+ if(typeof($.fn.stellar) !== 'undefined') {
1215
+ if(!navigator.userAgent.match(/iPad|iPhone|Android/i) && ($('body').width() + scrollWidth) >= 979) {
1216
+ $('body').stellar({
1217
+ horizontalScrolling: false,
1218
+ verticalOffset: 0,
1219
+ horizontalOffset: 0,
1220
+ responsive: true,
1221
+ scrollProperty: 'scroll',
1222
+ parallaxElements: false,
1223
+ });
1224
+ }
1225
+ }
1226
+ }
1227
+
1228
+ //Video Background
1229
+ function videoBg() {
1230
+ var $ = jQuery;
1231
+
1232
+ if(typeof($.fn.tubular) !== 'undefined') {
1233
+ var id,
1234
+ options,
1235
+ poster,
1236
+ youtube = $('.fwb-youtube-video');
1237
+
1238
+ if (
1239
+ youtube.attr('data-youtube-videoId') !== undefined &&
1240
+ youtube.attr('data-youtube-videoId') !== false) {
1241
+ id = youtube.attr('data-youtube-videoId');
1242
+ }
1243
+
1244
+ if (
1245
+ youtube.attr('data-youtube-poster') !== undefined &&
1246
+ youtube.attr('data-youtube-poster') !== false) {
1247
+ poster = youtube.attr('data-youtube-poster');
1248
+ }
1249
+
1250
+ options = {
1251
+ videoId: id,
1252
+ start: 0,
1253
+ wrapperZIndex: -1,
1254
+ mute: true,
1255
+ width: $('body').width()
1256
+ }
1257
+
1258
+ if( navigator.userAgent.match(/iPad|iPhone|Android/i) ) {
1259
+ youtube.css('background-image', "url('"+poster+"')");
1260
+ } else {
1261
+ youtube.tubular(options);
1262
+ }
1263
+ }
1264
+ }
1265
+
1266
+
1267
+ //Login/Register Page
1268
+ function loginRegister() {
1269
+ var $ = jQuery;
1270
+
1271
+ if(typeof($.fn.isotope) !== 'undefined') {
1272
+
1273
+ var filterBox = $('.login-register'),
1274
+ filterElems = filterBox.find('.filter-elements'),
1275
+ buttonBox = filterBox.find('.filter-buttons'),
1276
+ selector = filterBox.find('.filter-buttons.active-form').attr('data-filter');
1277
+
1278
+ filterElems.removeClass('hidden');
1279
+ filterElems.isotope({
1280
+ filter: selector,
1281
+ layoutMode: 'fitRows'
1282
+ });
1283
+
1284
+ buttonBox.click(function(e){
1285
+ var selector = $(this).attr('data-filter');
1286
+
1287
+ e.preventDefault();
1288
+
1289
+ if (!$(this).hasClass('active-form')) {
1290
+ buttonBox.removeClass('active-form');
1291
+ $(this).addClass('active-form');
1292
+
1293
+ filterElems.isotope({
1294
+ filter: selector,
1295
+ layoutMode: 'fitRows'
1296
+ });
1297
+ }
1298
+ });
1299
+ }
1300
+
1301
+ var height = 0,
1302
+ form = $('.form-content');
1303
+
1304
+ form.each(function () {
1305
+ if ($(this).outerHeight() > height) {
1306
+ height = $(this).outerHeight();
1307
+ }
1308
+ });
1309
+
1310
+ form.css('height', height)
1311
+
1312
+ $('.switch-form').click(function (e) {
1313
+ var button = $(this),
1314
+ formBox = $('.form-box');
1315
+
1316
+ e.preventDefault();
1317
+
1318
+ if ($(this).hasClass('forgot')) {
1319
+ $('.form-content').removeClass('hidden');
1320
+ $('.register-form').closest('.form-content').addClass('hidden');
1321
+ } else if ($(this).hasClass('sing-up')) {
1322
+ $('.form-content').removeClass('hidden');
1323
+ $('.forgot-form').closest('.form-content').addClass('hidden');
1324
+ }
1325
+
1326
+ $('.login-register .rotation').toggleClass('hover');
1327
+ });
1328
+ }
1329
+
1330
+ function loadingButton() {
1331
+ var $ = jQuery;
1332
+
1333
+ loading = function(){
1334
+ if ($('.ladda-button.progress-button').length) {
1335
+ Ladda.bind('.ladda-button:not(.progress-button)', {
1336
+ timeout: 2000
1337
+ });
1338
+
1339
+ Ladda.bind('.ladda-button.progress-button', {
1340
+ callback: function(instance) {
1341
+ var interval,
1342
+ progress;
1343
+
1344
+ progress = 0;
1345
+
1346
+ return interval = setInterval(function() {
1347
+ progress = Math.min(progress + Math.random() * 0.1, 1);
1348
+ instance.setProgress(progress);
1349
+ if (progress === 1) {
1350
+ instance.stop();
1351
+ return clearInterval(interval);
1352
+ }
1353
+ }, 200);
1354
+ }
1355
+ });
1356
+ }
1357
+ }
1358
+
1359
+ if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
1360
+ var ieversion = new Number(RegExp.$1);
1361
+
1362
+ if (ieversion >= 9) {
1363
+ loading();
1364
+ }
1365
+ } else {
1366
+ loading();
1367
+ }
1368
+ }
1369
+
1370
+ function productLimited() {
1371
+ var $ = jQuery;
1372
+
1373
+ if ($('.product .limit-offer').length){
1374
+ var product = $('.product .limit-offer'),
1375
+ endDateTime = '';
1376
+
1377
+ product.each(function () {
1378
+ var $this = $(this);
1379
+
1380
+ if (
1381
+ $this.attr('data-end') !== undefined &&
1382
+ $this.attr('data-end') !== false) {
1383
+ endDateTime = $this.attr('data-end');
1384
+ } else {
1385
+ endDateTime = '';
1386
+ }
1387
+
1388
+ $this.county({
1389
+ endDateTime: new Date(endDateTime),
1390
+ animation: 'scroll',
1391
+ reflection: false
1392
+ });
1393
+ });
1394
+ }
1395
+ }
1396
+
1397
+ //Google Map
1398
+ function initialize() {
1399
+ var $ = jQuery,
1400
+ mapCanvas = $('.map-canvas');
1401
+
1402
+ mapCanvas.each(function () {
1403
+ var $this = $(this),
1404
+ zoom = 8,
1405
+ lat = -34,
1406
+ lng = 150,
1407
+ scrollwheel = false,
1408
+ draggable = true,
1409
+ mapType = google.maps.MapTypeId.ROADMAP,
1410
+ title = '',
1411
+ contentString = '',
1412
+ dataZoom = $this.attr('data-zoom'),
1413
+ dataLat = $this.attr('data-lat'),
1414
+ dataLng = $this.attr('data-lng'),
1415
+ dataType = $this.attr('data-type'),
1416
+ dataScrollwheel = $this.attr('data-scrollwheel'),
1417
+ dataHue = $this.attr('data-hue'),
1418
+ dataTitle = $this.attr('data-title'),
1419
+ dataContent = $this.attr('data-content');
1420
+
1421
+ if (dataZoom !== undefined && dataZoom !== false) {
1422
+ zoom = parseFloat(dataZoom);
1423
+ }
1424
+
1425
+ if (dataLat !== undefined && dataLat !== false) {
1426
+ lat = parseFloat(dataLat);
1427
+ }
1428
+
1429
+ if (dataLng !== undefined && dataLng !== false) {
1430
+ lng = parseFloat(dataLng);
1431
+ }
1432
+
1433
+ if (dataScrollwheel !== undefined && dataScrollwheel !== false) {
1434
+ scrollwheel = dataScrollwheel;
1435
+ }
1436
+
1437
+ if (dataType !== undefined && dataType !== false) {
1438
+ if (dataType == 'satellite') {
1439
+ mapType = google.maps.MapTypeId.SATELLITE;
1440
+ } else if (dataType == 'hybrid') {
1441
+ mapType = google.maps.MapTypeId.HYBRID;
1442
+ } else if (dataType == 'terrain') {
1443
+ mapType = google.maps.MapTypeId.TERRAIN;
1444
+ }
1445
+ }
1446
+
1447
+ if (dataTitle !== undefined && dataTitle !== false) {
1448
+ title = dataTitle;
1449
+ }
1450
+
1451
+ if( navigator.userAgent.match(/iPad|iPhone|Android/i) ) {
1452
+ draggable = false;
1453
+ }
1454
+
1455
+ var mapOptions = {
1456
+ zoom : zoom,
1457
+ scrollwheel : scrollwheel,
1458
+ draggable : draggable,
1459
+ center : new google.maps.LatLng(lat, lng),
1460
+ mapTypeId : mapType
1461
+ };
1462
+
1463
+ var map = new google.maps.Map($this[0], mapOptions);
1464
+
1465
+ var image = 'img/svg/map-marker.svg';
1466
+
1467
+ if (dataContent !== undefined && dataContent !== false) {
1468
+ contentString = '<div class="map-content">' +
1469
+ '<h3 class="title">' + title + '</h3>' +
1470
+ dataContent +
1471
+ '</div>';
1472
+ }
1473
+
1474
+ var infowindow = new google.maps.InfoWindow({
1475
+ content: contentString
1476
+ });
1477
+
1478
+ var marker = new google.maps.Marker({
1479
+ position : new google.maps.LatLng(lat, lng),
1480
+ map : map,
1481
+ icon : image,
1482
+ title : title
1483
+ });
1484
+
1485
+ if (dataContent !== undefined && dataContent !== false) {
1486
+ google.maps.event.addListener(marker, 'click', function() {
1487
+ infowindow.open(map,marker);
1488
+ });
1489
+ }
1490
+
1491
+ if (dataHue !== undefined && dataHue !== false) {
1492
+ var styles = [
1493
+ {
1494
+ stylers : [
1495
+ { hue : dataHue }
1496
+ ]
1497
+ }
1498
+ ];
1499
+
1500
+ map.setOptions({styles: styles});
1501
+ }
1502
+ });
1503
+ }
1504
+
1505
+ function loadScript() {
1506
+ var script = document.createElement('script');
1507
+ script.type = 'text/javascript';
1508
+ script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&' +
1509
+ 'callback=initialize';
1510
+ document.body.appendChild(script);
1511
+ }
1512
+
1513
+ //window.onload = loadScript;
1514
+
1515
+ //Remove Video
1516
+ if( navigator.userAgent.match(/iPad|iPhone|Android/i) ) {
1517
+ jQuery('.fwb-video').find('video').remove();
1518
+ }
1519
+
1520
+ //Word Rotate
1521
+ function wordRotate() {
1522
+ var $ = jQuery;
1523
+
1524
+ $('.word-rotate').each(function() {
1525
+ var $this = $(this),
1526
+ wordsBox = $this.find('.words-box'),
1527
+ words = wordsBox.find('> span'),
1528
+ firstWord = words.eq(0),
1529
+ firstWordClone = firstWord.clone(),
1530
+ wordHeight,
1531
+ currentItem = 1,
1532
+ currentTop = 0;
1533
+
1534
+ wordHeight = firstWord.height();
1535
+
1536
+ wordsBox.append(firstWordClone);
1537
+
1538
+ $this.height(wordHeight).addClass('loaded');
1539
+
1540
+ setInterval(function() {
1541
+ currentTop = (currentItem * wordHeight);
1542
+
1543
+ wordsBox.animate({
1544
+ top: -(currentTop) + 'px'
1545
+ }, 300, 'easeOutQuad', function() {
1546
+ currentItem++;
1547
+
1548
+ if(currentItem > words.length) {
1549
+ wordsBox.css('top', 0);
1550
+ currentItem = 1;
1551
+ }
1552
+ });
1553
+ }, 2000);
1554
+ });
1555
+ }
1556
+
1557
+ //Modal Window
1558
+ function centerModal() {
1559
+ var $ = jQuery;
1560
+
1561
+ $(this).css('display', 'block');
1562
+
1563
+ var dialog = $(this).find('.modal-dialog'),
1564
+ offset = ($(window).height() - dialog.height()) / 2;
1565
+
1566
+ if (offset < 10) {
1567
+ offset = 10;
1568
+ }
1569
+ dialog.css('margin-top', offset);
1570
+ }
1571
+
1572
+ //Social Feed
1573
+ function locationSocialFeed() {
1574
+ var $ = jQuery,
1575
+ socialFeed = $('.social-feed');
1576
+
1577
+ if(typeof($.fn.isotope) !== 'undefined') {
1578
+ socialFeed.isotope({
1579
+ itemSelector: '.isotope-item',
1580
+ }).addClass('loaded');
1581
+
1582
+ $('#load-more').click(function() {
1583
+ var item1, item2, item3, items, tmp;
1584
+
1585
+ items = socialFeed.find('.item-clone');
1586
+ item1 = $(items[Math.floor(Math.random() * items.length)]).clone();
1587
+ item2 = $(items[Math.floor(Math.random() * items.length)]).clone();
1588
+ item3 = $(items[Math.floor(Math.random() * items.length)]).clone();
1589
+ tmp = $().add(item1).add(item2).add(item3);
1590
+
1591
+ var images = tmp.find('img');
1592
+
1593
+ images.imagesLoaded(function(){
1594
+ return socialFeed.isotope('insert', tmp);
1595
+ });
1596
+ });
1597
+ }
1598
+ }
1599
+
1600
+ jQuery(document).ready(function(){
1601
+ 'use strict';
1602
+ var $ = jQuery;
1603
+
1604
+ //Replace img > IE8
1605
+ if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
1606
+ var ieversion = new Number(RegExp.$1);
1607
+
1608
+ if (ieversion < 9) {
1609
+ $('img[src*="svg"]').attr('src', function() {
1610
+ return $(this).attr('src').replace('.svg', '.png');
1611
+ });
1612
+ }
1613
+ }
1614
+
1615
+ //IE
1616
+ if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
1617
+ $('html').addClass('ie');
1618
+ }
1619
+
1620
+ //Touch device
1621
+ if( navigator.userAgent.match(/iPad|iPhone|Android/i) ) {
1622
+ $('body').addClass('touch-device');
1623
+ }
1624
+
1625
+ //Meta Head
1626
+ if (document.width > 768) {
1627
+ $('.viewport').remove();
1628
+ }
1629
+
1630
+ //Bootstrap Elements
1631
+ $('[data-toggle="tooltip"], .tooltip-link').tooltip();
1632
+
1633
+ $("a[data-toggle=popover]")
1634
+ .popover()
1635
+ .click(function(event) {
1636
+ event.preventDefault();
1637
+ });
1638
+
1639
+ $('.btn-loading').click(function () {
1640
+ var btn = $(this);
1641
+
1642
+ btn.button('loading');
1643
+
1644
+ setTimeout(function () {
1645
+ btn.button('reset')
1646
+ }, 3000);
1647
+ });
1648
+
1649
+ $('.disabled, fieldset[disabled] .selectBox').click(function () {
1650
+ return false;
1651
+ });
1652
+
1653
+ $('.modal-center').on('show.bs.modal', centerModal);
1654
+
1655
+ //Bootstrap Validator
1656
+ if(typeof($.fn.bootstrapValidator) !== 'undefined') {
1657
+ $('.form-validator').bootstrapValidator({
1658
+ excluded: [':disabled', ':hidden', ':not(:visible)'],
1659
+ feedbackIcons: {
1660
+ valid: 'glyphicon glyphicon-ok',
1661
+ invalid: 'glyphicon glyphicon-remove',
1662
+ validating: 'glyphicon glyphicon-refresh'
1663
+ },
1664
+ message: 'This value is not valid',
1665
+ trigger: null
1666
+ });
1667
+ }
1668
+
1669
+ //Bootstrap Datepicker
1670
+ if(typeof($.fn.datepicker) !== 'undefined') {
1671
+ $('.datepicker-box').datepicker({
1672
+ todayHighlight : true,
1673
+ beforeShowDay: function (date){
1674
+ if (date.getMonth() == (new Date()).getMonth())
1675
+ switch (date.getDate()){
1676
+ case 4:
1677
+ return {
1678
+ tooltip: 'Example tooltip',
1679
+ classes: 'active'
1680
+ };
1681
+ case 8:
1682
+ return false;
1683
+ case 12:
1684
+ return "green";
1685
+ }
1686
+ }
1687
+ });
1688
+ }
1689
+
1690
+ /*/Royal Slider
1691
+ if(typeof($.fn.royalSlider) !== 'undefined') {
1692
+ $('.royal-slider').royalSlider({
1693
+ arrowsNav : true,
1694
+ loop : false,
1695
+ keyboardNavEnabled : true,
1696
+ controlsInside : false,
1697
+ imageScaleMode : 'fill',
1698
+ arrowsNavAutoHide : false,
1699
+ autoScaleSlider : true,
1700
+ autoScaleSliderWidth : 960,
1701
+ autoScaleSliderHeight : 350,
1702
+ controlNavigation : 'bullets',
1703
+ thumbsFitInViewport : false,
1704
+ navigateByClick : true,
1705
+ startSlideId : 0,
1706
+ autoPlay : false,
1707
+ transitionType :'move',
1708
+ globalCaption : false,
1709
+ deeplinking : {
1710
+ enabled : true,
1711
+ change : true,
1712
+ prefix : 'image-'
1713
+ },
1714
+ imgWidth : 1920,
1715
+ imgHeight : 700
1716
+ }).parents('.slider').removeClass('load');
1717
+ }
1718
+
1719
+ //Layer Slider
1720
+ if ($('.layerslider-box').length) {
1721
+ $('.layerslider-box').layerSlider({
1722
+ skinsPath : 'css/layerslider/skins/',
1723
+ tnContainerWidth : '100%'
1724
+ });
1725
+ }*/
1726
+
1727
+ //Functions
1728
+ fullWidthBox();
1729
+ menu();
1730
+ scrollMenu();
1731
+ footerStructure();
1732
+ tabs();
1733
+ accordions();
1734
+ headerCustomizer();
1735
+ modernGallery();
1736
+ animations();
1737
+ chart();
1738
+ graph();
1739
+ formStylization();
1740
+ addReview();
1741
+ zoom();
1742
+ paralax();
1743
+ videoBg();
1744
+ loginRegister();
1745
+ loadingButton();
1746
+ productLimited();
1747
+ blurPage();
1748
+ wordRotate();
1749
+ locationSocialFeed();
1750
+
1751
+ //Carousel load
1752
+ $(window).on({
1753
+ load : function() {
1754
+ blur();
1755
+ progressiveSlider();
1756
+ bannerSetCarousel();
1757
+ thumblist();
1758
+ carousel();
1759
+ isotopFilter();
1760
+ }
1761
+ });
1762
+
1763
+ //Language-Currency
1764
+ if( !navigator.userAgent.match(/iPad|iPhone|Android/i) ) {
1765
+ $('.language, .currency, .sort-by, .show-by').hover(function(){
1766
+ $(this).addClass('open');
1767
+ }, function(){
1768
+ $(this).removeClass('open');
1769
+ });
1770
+ }
1771
+
1772
+ //Header Phone & Search
1773
+ $('.phone-header > a').click(function(event){
1774
+ event.preventDefault();
1775
+ $('.btn-group').removeClass('open');
1776
+ $('.phone-active').fadeIn().addClass('open');
1777
+ });
1778
+ $('.search-header > a').click(function(event){
1779
+ event.preventDefault();
1780
+ $('.btn-group').removeClass('open');
1781
+ $('.search-active').fadeIn().addClass('open');
1782
+ });
1783
+
1784
+ $('.phone-active .close, .search-active .close').click(function(event){
1785
+ event.preventDefault();
1786
+ $(this).parent().fadeOut().removeClass('open');
1787
+ });
1788
+
1789
+ $('body').on('click', function(event) {
1790
+ var phone = '.phone-active',
1791
+ search = '.search-active';
1792
+
1793
+ if ((!$(event.target).is(phone + ' *')) && (!$(event.target).is('.phone-header *'))) {
1794
+ if ($(phone).hasClass('open')) {
1795
+ $(phone).fadeOut().removeClass('open');
1796
+ }
1797
+ }
1798
+ if ((!$(event.target).is(search + ' *')) && (!$(event.target).is('.search-header *'))) {
1799
+ if ($(search).hasClass('open')) {
1800
+ $(search).fadeOut().removeClass('open');
1801
+ }
1802
+ }
1803
+ });
1804
+
1805
+ //Cart
1806
+ $('.cart-header').hover(function(){
1807
+ if (($('body').width() + scrollWidth) >= 979 ) {
1808
+ $(this).addClass('open');
1809
+ }
1810
+ }, function(){
1811
+ if (($('body').width() + scrollWidth) >= 979 ) {
1812
+ $(this).removeClass('open');
1813
+ }
1814
+ });
1815
+
1816
+ //Product
1817
+ if(!navigator.userAgent.match(/iPad|iPhone|Android/i)) {
1818
+ $('.product, .employee')
1819
+ .hover(function(event) {
1820
+ event.preventDefault();
1821
+
1822
+ $(this).addClass('hover');
1823
+ }, function(event) {
1824
+ event.preventDefault();
1825
+
1826
+ $(this).removeClass('hover');
1827
+ });
1828
+ }
1829
+
1830
+ $('body').on('touchstart', function (event) {
1831
+ event.stopPropagation();
1832
+
1833
+ if ($(event.target).parents('.product, .employee').length==0) {
1834
+ $('.product, .employee').removeClass('hover');
1835
+ }
1836
+ });
1837
+
1838
+ $('.product, .employee').on('touchend', function(event){
1839
+ if ($(this).hasClass('hover')) {
1840
+ $(this).removeClass('hover');
1841
+ } else {
1842
+ $('.product, .employee').removeClass('hover');
1843
+ $(this).addClass('hover');
1844
+ }
1845
+ });
1846
+
1847
+ //Menu > Sidebar
1848
+ $('.menu .parent:not(".active") a').next('.sub').css('display', 'none');
1849
+ $('.menu .parent a .open-sub').click(function(event){
1850
+ event.preventDefault();
1851
+
1852
+ if ($(this).closest('.parent').hasClass('active')) {
1853
+ $(this).parent().next('.sub').slideUp(600);
1854
+ $(this).closest('.parent').removeClass('active');
1855
+ } else {
1856
+ $(this).parent().next('.sub').slideDown(600);
1857
+ $(this).closest('.parent').addClass('active');
1858
+ }
1859
+ });
1860
+
1861
+ //Price Regulator
1862
+ if(typeof($.fn.slider) !== 'undefined') {
1863
+ $('#Slider2').slider({
1864
+ from : 5000,
1865
+ to : 150000,
1866
+ limits : false,
1867
+ heterogeneity : ['50/50000'],
1868
+ step : 1000,
1869
+ dimension : '&nbsp;$'
1870
+ });
1871
+ }
1872
+
1873
+ if(typeof($.fn.slider) !== 'undefined') {
1874
+ $('#filter').slider({
1875
+ from : 2000,
1876
+ to : 2013,
1877
+ limits : false,
1878
+ step : 1,
1879
+ dimension : '',
1880
+ calculate : function( value ){
1881
+ return ( value );
1882
+ }
1883
+ });
1884
+ }
1885
+ $('.jslider-pointer').html('\n\
1886
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 8 12" enable-background="new 0 0 8 12" xml:space="preserve">\n\
1887
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#1e1e1e" d="M2,0h4c1.1,0,2,0.9,2,2l-2,8c-0.4,1.1-0.9,2-2,2l0,0c-1.1,0-1.6-0.9-2-2L0,2C0,0.9,0.9,0,2,0z"/>\n\
1888
+ </svg>\n\
1889
+ ');
1890
+
1891
+ //Contact Us
1892
+ $('#submit').click(function(){
1893
+ $.post('php/form.php', $('#contactform').serialize(), function(data) {
1894
+ $('#success').html(data).animate({opacity: 1}, 500, function(){
1895
+ if ($(data).is('.send-true')) {
1896
+ $('#contactform').trigger( 'reset' );
1897
+ }
1898
+ });
1899
+ });
1900
+ return false;
1901
+ });
1902
+
1903
+ //Coming Soon
1904
+ $('#join-us').click(function(){
1905
+ $.post('php/sent-email.php', $('#sent-email').serialize(), function(data) {
1906
+ $('#sent-email .success').html(data).animate({opacity: 1}, 500, function(){
1907
+ if ($(data).is('.send-true')) {
1908
+ $('#sent-email').trigger( 'reset' );
1909
+ }
1910
+ });
1911
+ });
1912
+ return false;
1913
+ });
1914
+
1915
+ //Regulator Up/Down
1916
+ $('.number-up').click(function(){
1917
+ var $value = ($(this).closest('.number').find('input[type="text"]').attr('value'));
1918
+ $(this).closest('.number').find('input[type="text"]').attr('value', parseFloat($value)+1);
1919
+ return false;
1920
+ });
1921
+ $('.number-down').click(function(){
1922
+ var $value = ($(this).closest('.number').find('input[type="text"]').attr('value'));
1923
+ if ($value > 1) {
1924
+ $(this).closest('.number').find('input[type="text"]').attr('value', parseFloat($value)-1);
1925
+ }
1926
+ return false;
1927
+ });
1928
+
1929
+ //Add to Cart
1930
+ $(".add-cart-form .add-cart").click(function() {
1931
+ $(this).next('.number').find('input[type="text"]').attr('value', 1);
1932
+ return false;
1933
+ });
1934
+
1935
+ //Emergence Price
1936
+ $('.emergence-price').click(function(){
1937
+ $(this).animate({opacity: "0"}, 0);
1938
+ $(this).prev('.price').fadeIn(1000);
1939
+ return false;
1940
+ });
1941
+
1942
+ //Gallery
1943
+ if ($.fn.fancybox){
1944
+ $('.gallery-images, .lightbox').fancybox({
1945
+ nextEffect : 'fade',
1946
+ prevEffect : 'fade',
1947
+ openEffect : 'fade',
1948
+ closeEffect : 'fade',
1949
+ helpers : {
1950
+ overlay : {
1951
+ locked : false
1952
+ }
1953
+ },
1954
+ tpl : {
1955
+ closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;">×</a>',
1956
+ next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;">\n\
1957
+ <span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve"><polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="1,0.001 0,1.001 7,8 0,14.999 1,15.999 9,8 "/></svg></span>\n\
1958
+ </a>',
1959
+ prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;">\n\
1960
+ <span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9px" height="16px" viewBox="0 0 9 16" enable-background="new 0 0 9 16" xml:space="preserve"><polygon fill-rule="evenodd" clip-rule="evenodd" fill="#fcfcfc" points="8,15.999 9,14.999 2,8 9,1.001 8,0.001 0,8 "/></svg></span>\n\
1961
+ </a>'
1962
+ }
1963
+ });
1964
+ }
1965
+
1966
+ // Scroll to Top
1967
+ $('#footer .up').click(function() {
1968
+ $('html, body').animate({
1969
+ scrollTop: $('body').offset().top
1970
+ }, 500);
1971
+ return false;
1972
+ });
1973
+
1974
+ // Circular Bars - Knob
1975
+ if(typeof($.fn.knob) != 'undefined') {
1976
+ $('.knob').each(function () {
1977
+ var $this = $(this),
1978
+ knobVal = $this.attr('rel');
1979
+
1980
+ $this.knob({
1981
+ 'draw' : function () {
1982
+ $(this.i).val(this.cv + '%')
1983
+ }
1984
+ });
1985
+
1986
+ $this.appear(function() {
1987
+ $({
1988
+ value: 0
1989
+ }).animate({
1990
+ value: knobVal
1991
+ }, {
1992
+ duration : 2000,
1993
+ easing : 'swing',
1994
+ step : function () {
1995
+ $this.val(Math.ceil(this.value)).trigger('change');
1996
+ }
1997
+ });
1998
+ }, {accX: 0, accY: -150});
1999
+ });
2000
+ }
2001
+
2002
+ //Facebook
2003
+ if ($('.facebook-widget').length) {
2004
+ (function(d, s, id) {
2005
+ var js, fjs = d.getElementsByTagName(s)[0];
2006
+ if (d.getElementById(id)) return;
2007
+ js = d.createElement(s); js.id = id;
2008
+ js.src = "//connect.facebook.net/en_EN/all.js#xfbml=1";
2009
+ fjs.parentNode.insertBefore(js, fjs);
2010
+ }(document, 'script', 'facebook-jssdk'));
2011
+ }
2012
+
2013
+ //Twitter
2014
+ if ($('.twitter-widget').length) {
2015
+ !function(d,s,id){
2016
+ var js,
2017
+ fjs=d.getElementsByTagName(s)[0],
2018
+ p=/^http:/.test(d.location)?'http':'https';
2019
+
2020
+ if(!d.getElementById(id)){
2021
+ js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
2022
+ fjs.parentNode.insertBefore(js,fjs);
2023
+ }
2024
+ }(document,"script","twitter-wjs");
2025
+ }
2026
+
2027
+ //One Page
2028
+ $('a.scroll').on('click', function(e) {
2029
+ var header = $('.header'),
2030
+ headerHeight = header.height(),
2031
+ target = $(this).attr('href'),
2032
+ $this = $(this);
2033
+
2034
+ e.preventDefault();
2035
+
2036
+ if ($(target).length) {
2037
+ if(($('body').width() + scrollWidth) > 991) {
2038
+ $('html, body').animate({scrollTop: $(target).offset().top - (headerHeight)}, 600);
2039
+ } else {
2040
+ $('html, body').animate({scrollTop: $(target).offset().top}, 600);
2041
+ }
2042
+ }
2043
+
2044
+ $('a.scroll').removeClass('active');
2045
+ $this.addClass('active');
2046
+ });
2047
+
2048
+ //JS loaded
2049
+ $('body').addClass('loaded');
2050
+
2051
+ //jPlayer
2052
+ if ($.fn.jPlayer){
2053
+ var player = $('#jp_container'),
2054
+ single = player.find('.jp-playlist li'),
2055
+ playlist = [],
2056
+ title = "",
2057
+ artist = "";
2058
+
2059
+ if (single.length) {
2060
+ single.each(function() {
2061
+ var $this = $(this);
2062
+
2063
+ if ($this.attr('data-files') !== undefined && $this.attr('data-files') !== false && $this.attr('data-files') !== '') {
2064
+ if ($this.attr('data-title') !== undefined && $this.attr('data-title') !== false)
2065
+ title = $this.attr('data-title');
2066
+
2067
+ if ($this.attr('data-artist') !== undefined && $this.attr('data-artist') !== false)
2068
+ artist = $this.attr('data-artist');
2069
+
2070
+ var files = $this.attr('data-files').split(';');
2071
+
2072
+ files[0].split('.').pop(-1);
2073
+
2074
+ if (files[0].split('.').pop(-1) == "mp3") {
2075
+ var mp3 = files[0];
2076
+ var oga = files[1];
2077
+ } else if (files[0].split('.').pop(-1) == "ogg") {
2078
+ var mp3 = files[1];
2079
+ var oga = files[0];
2080
+ }
2081
+
2082
+ playlist.push({
2083
+ title : title,
2084
+ artist : artist,
2085
+ free : true,
2086
+ mp3 : mp3,
2087
+ oga : oga
2088
+ });
2089
+ }
2090
+ });
2091
+ }
2092
+
2093
+
2094
+
2095
+ new jPlayerPlaylist ({
2096
+ jPlayer : '#jquery_jplayer',
2097
+ cssSelectorAncestor : '#jp_container'
2098
+ },
2099
+ playlist
2100
+ , {
2101
+ swfPath : 'js',
2102
+ supplied : 'oga, mp3',
2103
+ wmode : 'window',
2104
+ smoothPlayBar : true,
2105
+ keyEnabled : true
2106
+ });
2107
+ }
2108
+ });
2109
+
2110
+
2111
+ //Window Resize
2112
+ (function() {
2113
+ var $ = jQuery;
2114
+ var delay = ( function() {
2115
+ var timeout = { };
2116
+
2117
+ return function( callback, id, time ) {
2118
+ if( id !== null ) {
2119
+ time = ( time !== null ) ? time : 100;
2120
+ clearTimeout( timeout[ id ] );
2121
+ timeout[ id ] = setTimeout( callback, time );
2122
+ }
2123
+ };
2124
+ })();
2125
+
2126
+ function resizeFunctions() {
2127
+ if (($('body').width + scrollWidth) > 767) {
2128
+ $('.viewport').remove();
2129
+ } else {
2130
+ $('head').append('<meta class="viewport" name="viewport" content="width=device-width, initial-scale=1.0">');
2131
+ }
2132
+
2133
+ //Functions
2134
+ fullWidthBox();
2135
+ menu();
2136
+ footerStructure();
2137
+ tabs();
2138
+ modernGallery();
2139
+ animations();
2140
+ chart();
2141
+ isotopFilter();
2142
+ zoom();
2143
+ paralax();
2144
+ loginRegister();
2145
+ $('.modal-center:visible').each(centerModal);
2146
+
2147
+ progressiveSlider();
2148
+ bannerSetCarousel();
2149
+ thumblist();
2150
+ carousel();
2151
+ }
2152
+
2153
+ if(navigator.userAgent.match(/iPad|iPhone|Android/i)) {
2154
+ $(window).bind('orientationchange', function() {
2155
+ setTimeout(function() {
2156
+ resizeFunctions();
2157
+ }, 150);
2158
+ });
2159
+ } else {
2160
+ $(window).on('resize', function() {
2161
+ delay( function() {
2162
+
2163
+ resizeFunctions();
2164
+
2165
+ var graphResize;
2166
+
2167
+ clearTimeout(graphResize);
2168
+ return graphResize = setTimeout(function() {
2169
+ return graph(true);
2170
+ }, 500);
2171
+
2172
+ }, 'resize');
2173
+ });
2174
+ }
2175
+
2176
+ }());