phcthemes_web_theme_pack 0.1.0

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 (250) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +0 -0
  4. data/Rakefile +32 -0
  5. data/app/assets/config/phcthemes_web_theme_pack_manifest.js +3 -0
  6. data/app/assets/javascripts/common/backstretch/jquery.backstretch.js +1602 -0
  7. data/app/assets/javascripts/common/bootstrap-datepicker/bootstrap-datepicker.js +2039 -0
  8. data/app/assets/javascripts/common/bootstrap-markdown/bootstrap-markdown.js +1390 -0
  9. data/app/assets/javascripts/common/bootstrap-select/bootstrap-select.js +3139 -0
  10. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.js +46 -0
  11. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.js.map +1 -0
  12. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.min.js +8 -0
  13. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.js +51 -0
  14. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.js.map +1 -0
  15. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.min.js +8 -0
  16. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.js +46 -0
  17. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.js.map +1 -0
  18. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.min.js +8 -0
  19. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.js +39 -0
  20. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.js.map +1 -0
  21. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.min.js +8 -0
  22. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.js +46 -0
  23. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.js.map +1 -0
  24. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.min.js +8 -0
  25. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.js +46 -0
  26. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.js.map +1 -0
  27. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.min.js +8 -0
  28. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.js +46 -0
  29. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.js.map +1 -0
  30. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.min.js +8 -0
  31. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.js +39 -0
  32. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.js.map +1 -0
  33. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.min.js +8 -0
  34. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.js +39 -0
  35. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.js.map +1 -0
  36. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.min.js +8 -0
  37. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.js +46 -0
  38. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.js.map +1 -0
  39. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.min.js +8 -0
  40. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.js +39 -0
  41. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.js.map +1 -0
  42. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.min.js +8 -0
  43. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.js +39 -0
  44. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.js.map +1 -0
  45. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.min.js +8 -0
  46. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.js +46 -0
  47. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.js.map +1 -0
  48. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.min.js +8 -0
  49. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.js +46 -0
  50. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.js.map +1 -0
  51. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.min.js +8 -0
  52. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.js +46 -0
  53. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.js.map +1 -0
  54. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.min.js +8 -0
  55. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.js +46 -0
  56. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.js.map +1 -0
  57. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.min.js +8 -0
  58. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.js +39 -0
  59. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.js.map +1 -0
  60. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.min.js +8 -0
  61. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.js +41 -0
  62. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.js.map +1 -0
  63. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.min.js +8 -0
  64. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.js +39 -0
  65. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.js.map +1 -0
  66. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.min.js +8 -0
  67. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.js +46 -0
  68. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.js.map +1 -0
  69. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.min.js +8 -0
  70. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.js +46 -0
  71. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.js.map +1 -0
  72. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.min.js +8 -0
  73. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.js +46 -0
  74. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.js.map +1 -0
  75. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.min.js +8 -0
  76. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.js +46 -0
  77. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.js.map +1 -0
  78. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.min.js +8 -0
  79. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.js +46 -0
  80. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.js.map +1 -0
  81. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.min.js +8 -0
  82. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.js +39 -0
  83. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.js.map +1 -0
  84. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.min.js +8 -0
  85. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.js +39 -0
  86. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.js.map +1 -0
  87. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.min.js +8 -0
  88. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.js +39 -0
  89. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.js.map +1 -0
  90. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.min.js +8 -0
  91. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.js +39 -0
  92. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.js.map +1 -0
  93. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.min.js +8 -0
  94. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.js +40 -0
  95. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.js.map +1 -0
  96. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.min.js +8 -0
  97. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.js +40 -0
  98. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.js.map +1 -0
  99. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.min.js +8 -0
  100. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.js +39 -0
  101. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.js.map +1 -0
  102. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.min.js +8 -0
  103. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.js +44 -0
  104. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.js.map +1 -0
  105. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.min.js +8 -0
  106. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.js +46 -0
  107. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.js.map +1 -0
  108. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.min.js +8 -0
  109. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.js +46 -0
  110. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.js.map +1 -0
  111. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.min.js +8 -0
  112. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.js +39 -0
  113. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.js.map +1 -0
  114. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.min.js +8 -0
  115. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.js +46 -0
  116. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.js.map +1 -0
  117. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.min.js +8 -0
  118. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.js +39 -0
  119. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.js.map +1 -0
  120. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.min.js +8 -0
  121. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.js +39 -0
  122. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.js.map +1 -0
  123. data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.min.js +8 -0
  124. data/app/assets/javascripts/common/bootstrap/bootstrap.bundle.js +7013 -0
  125. data/app/assets/javascripts/common/custom/custom.js +0 -0
  126. data/app/assets/javascripts/common/daterangepicker/daterangepicker.js +1565 -0
  127. data/app/assets/javascripts/common/flexslider/jquery.flexslider.js +1252 -0
  128. data/app/assets/javascripts/common/greenstock/greensock.js +36 -0
  129. data/app/assets/javascripts/common/icheck/icheck.js +509 -0
  130. data/app/assets/javascripts/common/imagesloaded/imagesloaded.pkgd.js +497 -0
  131. data/app/assets/javascripts/common/isotope/isotope.pkgd.js +3563 -0
  132. data/app/assets/javascripts/common/jquery-countdown/jquery.countdown.js +246 -0
  133. data/app/assets/javascripts/common/jquery-filterizer/jquery.filterizr.min.js +1 -0
  134. data/app/assets/javascripts/common/jquery-placeholder/jquery.placeholder.js +281 -0
  135. data/app/assets/javascripts/common/jquery-validation/jquery.validate.js +1650 -0
  136. data/app/assets/javascripts/common/jqvmap/jquery.vmap.js +1281 -0
  137. data/app/assets/javascripts/common/jqvmap/jquery.vmap.min.js +10 -0
  138. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.africa.js +2 -0
  139. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.asia.js +2 -0
  140. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.australia.js +2 -0
  141. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.europe.js +2 -0
  142. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.north-america.js +2 -0
  143. data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.south-america.js +2 -0
  144. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.algeria.js +2 -0
  145. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.argentina.js +1 -0
  146. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.brazil.js +2 -0
  147. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.canada.js +2 -0
  148. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.europe.js +2 -0
  149. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.france.js +1 -0
  150. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.germany.js +2 -0
  151. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.greece.js +1 -0
  152. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.iran.js +6 -0
  153. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.iraq.js +1 -0
  154. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.russia.js +2 -0
  155. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.tunisia.js +2 -0
  156. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.turkey.js +11 -0
  157. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.usa.js +2 -0
  158. data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.world.js +2 -0
  159. data/app/assets/javascripts/common/js-cookie/js.cookie.js +165 -0
  160. data/app/assets/javascripts/common/layerslider/layerslider.kreaturamedia.jquery.js +13 -0
  161. data/app/assets/javascripts/common/layerslider/layerslider.origami.js +13 -0
  162. data/app/assets/javascripts/common/layerslider/layerslider.timeline.js +13 -0
  163. data/app/assets/javascripts/common/layerslider/layerslider.transitions.js +13 -0
  164. data/app/assets/javascripts/common/leaflet/leaflet.js +5 -0
  165. data/app/assets/javascripts/common/magnific-popup/jquery.magnific-popup.js +1860 -0
  166. data/app/assets/javascripts/common/mapbox/mapbox.js +51 -0
  167. data/app/assets/javascripts/common/moderizer/modernizr.js +11 -0
  168. data/app/assets/javascripts/common/owl-carousel/owl.carousel.js +3448 -0
  169. data/app/assets/javascripts/common/pace/pace.js +935 -0
  170. data/app/assets/javascripts/common/paroller/jquery.paroller.js +228 -0
  171. data/app/assets/javascripts/common/particlejs/particles.js +1541 -0
  172. data/app/assets/javascripts/common/plyr/plyr.js +9137 -0
  173. data/app/assets/javascripts/common/rangeslider/rangeslider.js +498 -0
  174. data/app/assets/javascripts/common/retina/retina.js +100 -0
  175. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.actions.js +386 -0
  176. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.carousel.js +365 -0
  177. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.kenburn.js +199 -0
  178. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.layeranimation.js +2524 -0
  179. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.migration.js +260 -0
  180. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.navigation.js +1156 -0
  181. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.parallax.js +465 -0
  182. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.slideanims.js +1447 -0
  183. data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.video.js +1464 -0
  184. data/app/assets/javascripts/common/rev-slider/jquery.themepunch.revolution.js +3286 -0
  185. data/app/assets/javascripts/common/rev-slider/jquery.themepunch.tools.min.js +8710 -0
  186. data/app/assets/javascripts/common/scrollup/jquery.scrollUp.js +168 -0
  187. data/app/assets/javascripts/common/select2/select2.full.js +6597 -0
  188. data/app/assets/javascripts/common/selectbox/jquery.selectBox.js +1092 -0
  189. data/app/assets/javascripts/common/smooth-scroll/SmoothScroll.js +788 -0
  190. data/app/assets/javascripts/common/spectrum/spectrum.js +2323 -0
  191. data/app/assets/javascripts/common/stepper/jquery.fs.stepper.js +339 -0
  192. data/app/assets/javascripts/common/swiper/swiper.js +8124 -0
  193. data/app/assets/javascripts/common/typed/typed.js +1045 -0
  194. data/app/assets/javascripts/common/visable/jquery.visible.js +68 -0
  195. data/app/assets/javascripts/common/waypoints/jquery.waypoints.js +662 -0
  196. data/app/assets/javascripts/phcthemes_web_theme_pack_appstrap.js +11 -0
  197. data/app/assets/javascripts/phcthemes_web_theme_pack_basic.js +39 -0
  198. data/app/assets/javascripts/phcthemes_web_theme_pack_bold.js +34 -0
  199. data/app/assets/javascripts/phcthemes_web_theme_pack_coloradmin.js +12 -0
  200. data/app/assets/javascripts/phcthemes_web_theme_pack_devine_villas.js +20 -0
  201. data/app/assets/javascripts/phcthemes_web_theme_pack_smarty.js +57 -0
  202. data/app/assets/javascripts/phcthemes_web_theme_pack_xero.js +18 -0
  203. data/app/assets/javascripts/phcthemes_web_theme_pack_zoner.js +24 -0
  204. data/app/assets/javascripts/themes/appstrap/custom/custom.js +0 -0
  205. data/app/assets/javascripts/themes/appstrap/theme/custom-script.js +69 -0
  206. data/app/assets/javascripts/themes/appstrap/theme/script.js +3096 -0
  207. data/app/assets/javascripts/themes/basic/custom/custom.js +0 -0
  208. data/app/assets/javascripts/themes/bold/custom/custom.js +0 -0
  209. data/app/assets/javascripts/themes/coloradmin/custom/custom.js +0 -0
  210. data/app/assets/javascripts/themes/coloradmin/theme/apps.js +236 -0
  211. data/app/assets/javascripts/themes/devine_villas/custom/custom.js +0 -0
  212. data/app/assets/javascripts/themes/devine_villas/theme/dashboard.js +19 -0
  213. data/app/assets/javascripts/themes/devine_villas/theme/main.js +384 -0
  214. data/app/assets/javascripts/themes/devine_villas/theme/map.js +563 -0
  215. data/app/assets/javascripts/themes/devine_villas/theme/searchmap.js +69 -0
  216. data/app/assets/javascripts/themes/smarty/custom/custom.js +0 -0
  217. data/app/assets/javascripts/themes/smarty/theme/scripts.js +4271 -0
  218. data/app/assets/javascripts/themes/xero/custom/custom.js +0 -0
  219. data/app/assets/javascripts/themes/xero/theme/app.js +696 -0
  220. data/app/assets/javascripts/themes/zoner/custom-maps/custom-map.js +289 -0
  221. data/app/assets/javascripts/themes/zoner/custom/custom.js +0 -0
  222. data/app/assets/javascripts/themes/zoner/draggable/draggable.js +196 -0
  223. data/app/assets/javascripts/themes/zoner/jquery-dependclass/dependclass.js +56 -0
  224. data/app/assets/javascripts/themes/zoner/jquery-slider/jquery.slider.js +700 -0
  225. data/app/assets/javascripts/themes/zoner/jquery-vanillabox/jquery.vanillabox.min.js +24 -0
  226. data/app/assets/javascripts/themes/zoner/jshashtable/hashtable.js +402 -0
  227. data/app/assets/javascripts/themes/zoner/numberformatter/numberformatter.js +566 -0
  228. data/app/assets/javascripts/themes/zoner/simple-js-templating/tmpl.js +35 -0
  229. data/app/assets/javascripts/themes/zoner/theme/main.js +667 -0
  230. data/app/assets/stylesheets/common/custom/custom.scss +0 -0
  231. data/app/assets/stylesheets/phcthemes_web_theme_pack_appstrap.scss +28 -0
  232. data/app/assets/stylesheets/phcthemes_web_theme_pack_basic.scss +0 -0
  233. data/app/assets/stylesheets/phcthemes_web_theme_pack_bold.scss +21 -0
  234. data/app/assets/stylesheets/phcthemes_web_theme_pack_coloradmin.scss +22 -0
  235. data/app/assets/stylesheets/phcthemes_web_theme_pack_devine_villas.scss +28 -0
  236. data/app/assets/stylesheets/phcthemes_web_theme_pack_smarty.scss +47 -0
  237. data/app/assets/stylesheets/phcthemes_web_theme_pack_xero.scss +28 -0
  238. data/app/assets/stylesheets/phcthemes_web_theme_pack_zoner.scss +22 -0
  239. data/app/assets/stylesheets/themes/appstrap/custom/custom.scss +0 -0
  240. data/app/assets/stylesheets/themes/bold/custom/custom.scss +0 -0
  241. data/app/assets/stylesheets/themes/coloradmin/custom/custom.scss +0 -0
  242. data/app/assets/stylesheets/themes/devine_villas/custom/custom.scss +0 -0
  243. data/app/assets/stylesheets/themes/smarty/custom/custom.scss +0 -0
  244. data/app/assets/stylesheets/themes/xero/custom/custom.scss +0 -0
  245. data/app/assets/stylesheets/themes/zoner/custom/custom.scss +0 -0
  246. data/lib/phcthemes_web_theme_pack.rb +5 -0
  247. data/lib/phcthemes_web_theme_pack/engine.rb +13 -0
  248. data/lib/phcthemes_web_theme_pack/version.rb +3 -0
  249. data/lib/tasks/phcthemes_web_theme_pack_tasks.rake +4 -0
  250. metadata +375 -0
@@ -0,0 +1,11 @@
1
+ //= require jquery3
2
+ //= require jquery-ui
3
+ //= require jquery-migrate-min
4
+ //= require rails-ujs
5
+ //= require activestorage
6
+ //= require common/bootstrap/bootstrap.bundle.js
7
+ //= require common/retina/retina.js
8
+ //= require common/custom/custom.js
9
+ //= require themes/appstrap/custom/custom.js
10
+ //= require themes/appstrap/theme/custom-script.js
11
+ //= require themes/appstrap/theme/script.js
@@ -0,0 +1,39 @@
1
+ //= require jquery2
2
+ //= require jquery-ui
3
+ //= require jquery-migrate-min
4
+ //= require rails-ujs
5
+ //= require activestorage
6
+ //= require common/bootstrap/bootstrap.bundle.js
7
+ //= require common/bootstrap-select/bootstrap-select.js
8
+ //= require common/icheck/icheck.js
9
+ //= require common/jquery-placeholder/jquery.placeholder.js
10
+ //= require common/jquery-validation/jquery.validate.js
11
+ //= require common/jqvmap/jquery.vmap.js
12
+ //= require common/jqvmap/maps/jquery.vmap.algeria.js
13
+ //= require common/jqvmap/maps/jquery.vmap.argentina.js
14
+ //= require common/jqvmap/maps/jquery.vmap.brazil.js
15
+ //= require common/jqvmap/maps/jquery.vmap.canada.js
16
+ //= require common/jqvmap/maps/jquery.vmap.europe.js
17
+ //= require common/jqvmap/maps/jquery.vmap.france.js
18
+ //= require common/jqvmap/maps/jquery.vmap.germany.js
19
+ //= require common/jqvmap/maps/jquery.vmap.greece.js
20
+ //= require common/jqvmap/maps/jquery.vmap.iran.js
21
+ //= require common/jqvmap/maps/jquery.vmap.iraq.js
22
+ //= require common/jqvmap/maps/jquery.vmap.russia.js
23
+ //= require common/jqvmap/maps/jquery.vmap.tunisia.js
24
+ //= require common/jqvmap/maps/jquery.vmap.turkey.js
25
+ //= require common/jqvmap/maps/jquery.vmap.usa.js
26
+ //= require common/jqvmap/maps/jquery.vmap.world.js
27
+ //= require common/jqvmap/maps/continents/jquery.vmap.africa.js
28
+ //= require common/jqvmap/maps/continents/jquery.vmap.asia.js
29
+ //= require common/jqvmap/maps/continents/jquery.vmap.australia.js
30
+ //= require common/jqvmap/maps/continents/jquery.vmap.europe.js
31
+ //= require common/jqvmap/maps/continents/jquery.vmap.north-america.js
32
+ //= require common/jqvmap/maps/continents/jquery.vmap.south-america.js
33
+ //= require common/leaflet/leaflet.js
34
+ //= require common/magnific-popup/jquery.magnific-popup.js
35
+ //= require common/owl-carousel/owl.carousel.js
36
+ //= require common/retina/retina.js
37
+ //= require common/smooth-scroll/SmoothScroll.js
38
+ //= require common/custom/custom.js
39
+ //= require themes/basic/custom/custom.js
@@ -0,0 +1,34 @@
1
+ //= require jquery3
2
+ //= require jquery-ui
3
+ //= require jquery-migrate-min
4
+ //= require rails-ujs
5
+ //= require activestorage
6
+ //= require common/bootstrap/bootstrap.bundle.js
7
+ //= require common/moderizer/modernizr.js
8
+ //= require common/jqvmap/jquery.vmap.js
9
+ //= require common/jqvmap/maps/jquery.vmap.algeria.js
10
+ //= require common/jqvmap/maps/jquery.vmap.argentina.js
11
+ //= require common/jqvmap/maps/jquery.vmap.brazil.js
12
+ //= require common/jqvmap/maps/jquery.vmap.canada.js
13
+ //= require common/jqvmap/maps/jquery.vmap.europe.js
14
+ //= require common/jqvmap/maps/jquery.vmap.france.js
15
+ //= require common/jqvmap/maps/jquery.vmap.germany.js
16
+ //= require common/jqvmap/maps/jquery.vmap.greece.js
17
+ //= require common/jqvmap/maps/jquery.vmap.iran.js
18
+ //= require common/jqvmap/maps/jquery.vmap.iraq.js
19
+ //= require common/jqvmap/maps/jquery.vmap.russia.js
20
+ //= require common/jqvmap/maps/jquery.vmap.tunisia.js
21
+ //= require common/jqvmap/maps/jquery.vmap.turkey.js
22
+ //= require common/jqvmap/maps/jquery.vmap.usa.js
23
+ //= require common/jqvmap/maps/jquery.vmap.world.js
24
+ //= require common/jqvmap/maps/continents/jquery.vmap.africa.js
25
+ //= require common/jqvmap/maps/continents/jquery.vmap.asia.js
26
+ //= require common/jqvmap/maps/continents/jquery.vmap.australia.js
27
+ //= require common/jqvmap/maps/continents/jquery.vmap.europe.js
28
+ //= require common/jqvmap/maps/continents/jquery.vmap.north-america.js
29
+ //= require common/jqvmap/maps/continents/jquery.vmap.south-america.js
30
+ //= require common/mapbox/mapbox.js
31
+ //= require common/rev-slider/jquery.themepunch.tools.min.js
32
+ //= require common/rev-slider/jquery.themepunch.revolution.js
33
+ //= require common/custom/custom.js
34
+ //= require themes/bold/custom/custom.js
@@ -0,0 +1,12 @@
1
+ //= require jquery3
2
+ //= require jquery-ui
3
+ //= require jquery-migrate-min
4
+ //= require rails-ujs
5
+ //= require activestorage
6
+ //= require common/pace/pace.js
7
+ //= require common/bootstrap/bootstrap.bundle.js
8
+ //= require common/js-cookie/js.cookie.js
9
+ //= require common/paroller/jquery.paroller.js
10
+ //= require common/custom/custom.js
11
+ //= require themes/coloradmin/custom/custom.js
12
+ //= require themes/coloradmin/theme/apps.js
@@ -0,0 +1,20 @@
1
+ //= require jquery2
2
+ //= require jquery-ui
3
+ //= require jquery-migrate-min
4
+ //= require rails-ujs
5
+ //= require activestorage
6
+ //= require common/bootstrap/bootstrap.bundle.js
7
+ //= require common/visable/jquery.visible.js
8
+ //= require common/owl-carousel/owl.carousel.js
9
+ //= require common/bootstrap-select/bootstrap-select.js
10
+ //= require common/plyr/plyr.js
11
+ //= require common/magnific-popup/jquery.magnific-popup.js
12
+ //= require common/isotope/isotope.pkgd.js
13
+ //= require common/imagesloaded/imagesloaded.pkgd.js
14
+ //= require common/leaflet/leaflet.js
15
+ //= require common/custom/custom.js
16
+ //= require themes/devine_villas/custom/custom.js
17
+ //= require themes/devine_villas/theme/main.js
18
+ //= require themes/devine_villas/theme/dashboard.js
19
+ //= require themes/devine_villas/theme/map.js
20
+ //= require themes/devine_villas/theme/searchmap.js
@@ -0,0 +1,57 @@
1
+ //= require jquery3
2
+ //= require rails-ujs
3
+ //= require activestorage
4
+ //= require jquery-ui
5
+ //= require common/bootstrap/bootstrap.bundle.js
6
+ //= require common/jqvmap/jquery.vmap.js
7
+ //= require common/jqvmap/maps/jquery.vmap.algeria.js
8
+ //= require common/jqvmap/maps/jquery.vmap.argentina.js
9
+ //= require common/jqvmap/maps/jquery.vmap.brazil.js
10
+ //= require common/jqvmap/maps/jquery.vmap.canada.js
11
+ //= require common/jqvmap/maps/jquery.vmap.europe.js
12
+ //= require common/jqvmap/maps/jquery.vmap.france.js
13
+ //= require common/jqvmap/maps/jquery.vmap.germany.js
14
+ //= require common/jqvmap/maps/jquery.vmap.greece.js
15
+ //= require common/jqvmap/maps/jquery.vmap.iran.js
16
+ //= require common/jqvmap/maps/jquery.vmap.iraq.js
17
+ //= require common/jqvmap/maps/jquery.vmap.russia.js
18
+ //= require common/jqvmap/maps/jquery.vmap.tunisia.js
19
+ //= require common/jqvmap/maps/jquery.vmap.turkey.js
20
+ //= require common/jqvmap/maps/jquery.vmap.usa.js
21
+ //= require common/jqvmap/maps/jquery.vmap.world.js
22
+ //= require common/jqvmap/maps/continents/jquery.vmap.africa.js
23
+ //= require common/jqvmap/maps/continents/jquery.vmap.asia.js
24
+ //= require common/jqvmap/maps/continents/jquery.vmap.australia.js
25
+ //= require common/jqvmap/maps/continents/jquery.vmap.europe.js
26
+ //= require common/jqvmap/maps/continents/jquery.vmap.north-america.js
27
+ //= require common/jqvmap/maps/continents/jquery.vmap.south-america.js
28
+ //= require common/mapbox/mapbox.js
29
+ //= require common/waypoints/jquery.waypoints.js
30
+ //= require common/greenstock/greensock.js
31
+ //= require common/bootstrap-datepicker/bootstrap-datepicker.js
32
+ //= require common/daterangepicker/daterangepicker.js
33
+ //= require common/bootstrap-markdown/bootstrap-markdown.js
34
+ //= require common/select2/select2.full.js
35
+ //= require common/spectrum/spectrum.js
36
+ //= require common/stepper/jquery.fs.stepper.js
37
+ //= require common/owl-carousel/owl.carousel.js
38
+ //= require common/layerslider/layerslider.transitions.js
39
+ //= require common/layerslider/layerslider.kreaturamedia.jquery.js
40
+ //= require common/layerslider/layerslider.origami.js
41
+ //= require common/layerslider/layerslider.timeline.js
42
+ //= require common/rev-slider/jquery.themepunch.revolution.js
43
+ //= require common/rev-slider/jquery.themepunch.tools.min.js
44
+ //= require common/rev-slider/extensions/revolution.extension.actions.js
45
+ //= require common/rev-slider/extensions/revolution.extension.carousel.js
46
+ //= require common/rev-slider/extensions/revolution.extension.kenburn.js
47
+ //= require common/rev-slider/extensions/revolution.extension.layeranimation.js
48
+ //= require common/rev-slider/extensions/revolution.extension.migration.js
49
+ //= require common/rev-slider/extensions/revolution.extension.navigation.js
50
+ //= require common/rev-slider/extensions/revolution.extension.parallax.js
51
+ //= require common/rev-slider/extensions/revolution.extension.slideanims.js
52
+ //= require common/rev-slider/extensions/revolution.extension.video.js
53
+ //= require common/flexslider/jquery.flexslider.js
54
+ //= require common/custom/custom.js
55
+ //= require themes/smarty/custom/custom.js
56
+ //= require themes/smarty/theme/scripts.js
57
+ //= require common/swiper/swiper.js
@@ -0,0 +1,18 @@
1
+ //= require jquery2
2
+ //= require jquery-ui
3
+ //= require jquery-migrate-min
4
+ //= require rails-ujs
5
+ //= require activestorage
6
+ //= require common/bootstrap/bootstrap.bundle.js
7
+ //= require common/magnific-popup/jquery.magnific-popup.js
8
+ //= require common/selectbox/jquery.selectBox.js
9
+ //= require common/rangeslider/rangeslider.js
10
+ //= require common/jquery-filterizer/jquery.filterizr.min.js
11
+ //= require common/backstretch/jquery.backstretch.js
12
+ //= require common/jquery-countdown/jquery.countdown.js
13
+ //= require common/scrollup/jquery.scrollUp.js
14
+ //= require common/particlejs/particles.js
15
+ //= require common/typed/typed.js
16
+ //= require common/leaflet/leaflet.js
17
+ //= require common/custom/custom.js
18
+ //= require themes/xero/theme/app.js
@@ -0,0 +1,24 @@
1
+ //= require jquery2
2
+ //= require jquery-ui
3
+ //= require jquery-migrate-min
4
+ //= require rails-ujs
5
+ //= require activestorage
6
+ //= require common/leaflet/leaflet.js
7
+ //= require common/bootstrap/bootstrap.bundle.js
8
+ //= require common/jquery-placeholder/jquery.placeholder.js
9
+ //= require common/jquery-validation/jquery.validate.js
10
+ //= require common/icheck/icheck.js
11
+ //= require themes/zoner/jquery-vanillabox/jquery.vanillabox.min.js
12
+ //= require common/retina/retina.js
13
+ //= require common/smooth-scroll/SmoothScroll.js
14
+ //= require common/owl-carousel/owl.carousel.js
15
+ //= require common/bootstrap-select/bootstrap-select.js
16
+ //= require common/custom/custom.js
17
+ //= require themes/zoner/custom-maps/custom-map.js
18
+ //= require themes/zoner/jshashtable/hashtable.js
19
+ //= require themes/zoner/numberformatter/numberformatter.js
20
+ //= require themes/zoner/simple-js-templating/tmpl.js
21
+ //= require themes/zoner/jquery-dependclass/dependclass.js
22
+ //= require themes/zoner/draggable/draggable.js
23
+ //= require themes/zoner/jquery-slider/jquery.slider.js
24
+ //= require themes/zoner/theme/main.js
@@ -0,0 +1,69 @@
1
+ /********************************************************
2
+ *
3
+ * Custom Javascript code for AppStrap Bootstrap theme
4
+ * Written by Themelize.me (http://themelize.me)
5
+ *
6
+ *******************************************************/
7
+ (function($) {
8
+ $.extend($.fn, {
9
+
10
+ // ===============================================================
11
+ // AppStrap Javascript API
12
+ // ===============================================================
13
+ // @callbacks:
14
+ // 1. themePreload: Before any AppStrap Javascript has run
15
+ // 2. themePrePlugins: Before any AppStrap Javascript has run
16
+ // 3. themeLoaded: After the theme has loaded everything
17
+ //
18
+ // arguments:
19
+ // context = the dom in context
20
+ // refresh = true if ajax content, false if default page load
21
+ // ===============================================================
22
+ themePreload: function(context, refresh) {
23
+ //alert('themePreload');
24
+ },
25
+ themePrePlugins: function(context, refresh) {
26
+ //alert('themePrePlugins');
27
+ },
28
+ themeLoaded: function(context, refresh) {
29
+ //alert('themeLoaded');
30
+ if (!refresh) {
31
+ // Use any standard jQuery code to alter page:
32
+ //$('.header-brand-text').html('test 1-2-3');
33
+ }
34
+ },
35
+
36
+ // ===============================================================
37
+ // @group: Override default plugins OR add new plugins
38
+ // ===============================================================
39
+ themePluginsExtras: {
40
+ // Plugin functions
41
+ // name pattern themePluginPLUGINNAME
42
+ // items: PLUGINNAMEs
43
+ //
44
+ // Used to override the themePlugins plugins list in script.js
45
+ // To see all default plugin functions use:
46
+ // var plugins = $.fn.themePluginsLoad(false);
47
+ // console.log(plugins);
48
+ //
49
+ // OR to define your own plugins
50
+ // ----------------------------------------------------------------
51
+ //themePluginFakeLoader: function(context) {
52
+ // override default themePluginFakeLoader function
53
+ //},
54
+
55
+ //themePluginMyPlugin: function(context) {
56
+ // My custom plugin load
57
+ //var $triggerElements = context.find('[data-toggle=SOMETHING]');
58
+ //if ($triggerElements.length > 0) {
59
+ // var themePluginMyPluginInit = function() {
60
+ // // Init the plugin, called when Javascript & CSS are loaded
61
+ // };
62
+ // $document.themeLoadPlugin(["PLUGIN-JAVSCRIPT-COMMA-SEPARATED"], ["PLUGIN-CSS-COMMA-SEPARATED"], themePluginMyPluginInit);
63
+ //}
64
+ //}
65
+ }, // end of themePluginsExtras object
66
+ });
67
+ })(jQuery);
68
+
69
+
@@ -0,0 +1,3096 @@
1
+ /********************************************************
2
+ *
3
+ * Custom Javascript code for AppStrap Bootstrap theme
4
+ * Written by Themelize.me (http://themelize.me)
5
+ *
6
+ *
7
+ * File structure:
8
+ *
9
+ * 1. setup.js
10
+ * 2. utils.js
11
+ * 3. misc.js
12
+ * 4. plugins/*
13
+ * 5. base.js
14
+ *
15
+ *******************************************************/
16
+ // ===============================================================
17
+ // @group: Config & Global variables
18
+ // ===============================================================
19
+
20
+ // Config
21
+ var Config = {
22
+ PLUGINS_LOCALPATH: "./assets/plugins/"
23
+ };
24
+
25
+ // Extend using $.extend(true, Config, { PLUGINS_LOCALPATH: 'new/path/setting' });
26
+
27
+ // Globals - don't touch!
28
+ var Globals = {
29
+ PLUGINS: {},
30
+ PREINITPLUGINS: {},
31
+ LOADED_FILES: [],
32
+ PAGE_SCROLLED: false,
33
+ PAGELOADER_DONE: false,
34
+ };
35
+
36
+
37
+ // ===============================================================
38
+ // @group: Internal worker functions
39
+ // ===============================================================
40
+
41
+ (function($) {
42
+ $.extend($.fn, {
43
+ // ----------------------------------------------------------------
44
+ // Trigger callback when fakeLoader is loaded
45
+ // ----------------------------------------------------------------
46
+ isPageLoaderDone: function(callback) {
47
+ var $loader = $('[data-toggle="page-loader"]');
48
+ var triggerCallback = function() {
49
+ $('html').addClass('.page-loader-done');
50
+
51
+ if (callback && typeof(callback) === "function") {
52
+ callback();
53
+ }
54
+ };
55
+
56
+ if ($loader.length === 0 || $loader.css('display') == 'none') {
57
+ triggerCallback();
58
+ }
59
+
60
+ var isPageLoaderDoneTimer = setInterval(function() {
61
+ if ($loader.css('display') == 'none') {
62
+ Globals.PAGELOADER_DONE = true;
63
+ clearInterval(isPageLoaderDoneTimer);
64
+ triggerCallback();
65
+ }
66
+ }, 500);
67
+ },
68
+
69
+ // ----------------------------------------------------------------
70
+ // Plugin: Waypoints
71
+ // @see: http://imakewebthings.com/waypoints/
72
+ // Used as helper for other functions so not called direct
73
+ // ----------------------------------------------------------------
74
+ includeWaypoints: function(callback) {
75
+ if (typeof jQuery.fn.waypoint === 'undefined') {
76
+ $document.themeLoadPlugin(['https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js'], []);
77
+ var tries = 0;
78
+ var isWaypointsDoneTimer = setInterval(function() {
79
+ if (typeof jQuery.fn.waypoint === 'function') {
80
+ clearInterval(isWaypointsDoneTimer);
81
+
82
+ if (callback && typeof(callback) === "function") {
83
+ callback();
84
+ }
85
+ }
86
+ tries++;
87
+
88
+ if (tries > 20) {
89
+ clearInterval(isWaypointsDoneTimer);
90
+ alert('Error: Waypoints plugin could not be loaded');
91
+ }
92
+ }, 500);
93
+ } else {
94
+ if (callback && typeof(callback) === "function") {
95
+ callback();
96
+ }
97
+ }
98
+ },
99
+
100
+ refreshWaypoints: function() {
101
+ if (typeof jQuery.fn.waypoint !== 'undefined') {
102
+ Waypoint.refreshAll();
103
+ }
104
+ },
105
+
106
+ // ----------------------------------------------------------------
107
+ // Determine if element is in viewport
108
+ // @credit: https://coderwall.com/p/fnvjvg/jquery-test-if-element-is-in-viewport
109
+ // ----------------------------------------------------------------
110
+ elementInView: function(obj) {
111
+ var elementTop = obj.offset().top;
112
+ var elementBottom = elementTop + obj.outerHeight();
113
+ var viewportTop = $(window).scrollTop();
114
+ var viewportBottom = viewportTop + $(window).height();
115
+ return elementBottom > viewportTop && elementTop < viewportBottom;
116
+ },
117
+
118
+ // ----------------------------------------------------------------
119
+ // Scroll links
120
+ // ----------------------------------------------------------------
121
+ themeScrollMenus: function() {
122
+ var context = $(this);
123
+ var scrollLinks = context.find('[data-toggle="scroll-link"]');
124
+ var $header = $('#header [data-toggle="sticky"]');
125
+ var $body = $('body');
126
+ var $window = $(window);
127
+ var $spys = $('[data-spy="scroll"]');
128
+ var spyTarget = $body.data('spy-target') || '.navbar-main';
129
+ var spyData;
130
+
131
+ if (scrollLinks.length > 0) {
132
+ var getHeaderOffset = function(extra) {
133
+ var offset = $header.outerHeight() + (extra !== null ? extra : 0);
134
+ if ($body.hasClass('header-compact-sticky')) {
135
+ offset = offset - 35;
136
+ }
137
+
138
+ if ($body.data('offset-elements')) {
139
+ $($body.data('offset-elements'), context).each(function() {
140
+ offset += $(this).outerHeight();
141
+ });
142
+ }
143
+
144
+ return offset;
145
+ };
146
+
147
+ var customActiveSpyClass = function(active) {
148
+ scrollLinks.each(function() {
149
+ var $t = $(this);
150
+ var customActive = $t.data('active-class') || null;
151
+
152
+ if (active === null && customActive !== null) {
153
+ $t.removeClass(customActive);
154
+ } else {
155
+ if ($t.attr('href') == active) {
156
+ $t.addClass(customActive);
157
+ } else if (customActive !== null) {
158
+ $t.removeClass(customActive);
159
+ }
160
+ }
161
+ });
162
+ }
163
+
164
+ var triggerSpy = function(state) {
165
+ var offsetExtra = 5;
166
+ if (state == 'refresh') {
167
+ spyData = $body.data('bs.scrollspy');
168
+ spyData._config.offset = getHeaderOffset(offsetExtra);
169
+ $body.data('bs.scrollspy', spyData);
170
+ $body.scrollspy('refresh');
171
+ } else {
172
+ $body.scrollspy({
173
+ target: spyTarget,
174
+ offset: getHeaderOffset(offsetExtra),
175
+ });
176
+ }
177
+ };
178
+
179
+ triggerSpy('init');
180
+
181
+ // Custom active class per link
182
+ spyData = $body.data('bs.scrollspy');
183
+ if (spyData._activeTarget) {
184
+ customActiveSpyClass(spyData._activeTarget);
185
+ }
186
+ $window.on('activate.bs.scrollspy', function(e, t) {
187
+ customActiveSpyClass(t.relatedTarget);
188
+ });
189
+ $window.on('scroll.bs.scrollspy', function(e) {
190
+ setTimeout(function() {
191
+ customActiveSpyClass($body.data('bs.scrollspy')._activeTarget);
192
+ }, 200);
193
+ });
194
+
195
+ $window.on('resize', function() {
196
+ setTimeout(function() {
197
+ triggerSpy('refresh');
198
+ }, 200);
199
+ });
200
+
201
+ scrollLinks.click(function() {
202
+ if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
203
+ var $this = $(this),
204
+ target = $(this.hash),
205
+ speed = $this.data('scroll-link-speed') || 1000,
206
+ noOffset = $this.data('scroll-link-nooffset') || false;
207
+
208
+ var clickScroll = function() {
209
+ var hash = this.hash || null;
210
+ target = target.length ? target : (hash !== null ? $('[id=' + this.hash.slice(1) + ']') : null);
211
+ if (target !== null) {
212
+ offset = getHeaderOffset(null);
213
+ if (noOffset) {
214
+ offset = 0;
215
+ }
216
+
217
+ $('html, body').animate({
218
+ scrollTop: target.offset().top - offset,
219
+ }, speed);
220
+ }
221
+ };
222
+
223
+ // If header changes size
224
+ $(window).trigger('resize');
225
+ clickScroll();
226
+ return false;
227
+ }
228
+ });
229
+ }
230
+ },
231
+
232
+ //submenu dropdowns
233
+ // --------------------------------
234
+ themeSubMenus: function() {
235
+ var context = $(this);
236
+ var $tabsPills = $('.dropdown-menu [data-toggle="tab"], .dropdown-menu [data-toggle="pill"]');
237
+
238
+ $tabsPills.on('click', function(e) {
239
+ event.preventDefault();
240
+ event.stopPropagation();
241
+ $(this).tab('show');
242
+ });
243
+ $tabsPills.on('shown.bs.tab', function(e) {
244
+ var $from = $(e.relatedTarget);
245
+ var $to = $(e.target);
246
+ var toSelectors = $to.getSelector();
247
+ var fromSelectors = $from.getSelector();
248
+ var $toSelectors = $(toSelectors);
249
+ var $fromSelectors = $(fromSelectors);
250
+
251
+ $toSelectors.addClass('active');
252
+ $fromSelectors.removeClass('active');
253
+ $(document).find('[data-target="' + toSelectors + '"]').addClass('active');
254
+ $(document).find('[data-target="' + fromSelectors + '"]').removeClass('active');
255
+ });
256
+
257
+ context.find('.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
258
+ event.preventDefault();
259
+ event.stopPropagation();
260
+
261
+ // Toggle direct parent
262
+ $(this).parent().toggleClass('show');
263
+ });
264
+
265
+ // Persistent menus
266
+ context.find('.dropdown.dropdown-persist').on({
267
+ "shown.bs.dropdown": function() {
268
+ $(this).data('closable', false);
269
+ },
270
+ "hide.bs.dropdown": function(event) {
271
+ temp = $(this).data('closable');
272
+ $(this).data('closable', true);
273
+ return temp;
274
+ }
275
+ });
276
+ context.find('.dropdown.dropdown-persist .dropdown-menu').on({
277
+ "click": function(event) {
278
+ $(this).parent('.dropdown.dropdown-persist').data('closable', false);
279
+ },
280
+ });
281
+ },
282
+
283
+ // Gets selector from href or data-target
284
+ getSelector: function() {
285
+ var element = $(this);
286
+ var selector = element.data('target');
287
+ if (!selector || selector === '#') {
288
+ selector = element.attr('href') || '';
289
+ }
290
+
291
+ try {
292
+ var $selector = $(selector);
293
+ return $selector.length > 0 ? selector : null;
294
+ } catch (error) {
295
+ return null;
296
+ }
297
+ },
298
+
299
+ // calculate a height with offset
300
+ calcHeightsOffset: function(height, offset) {
301
+ if (typeof offset == 'number') {
302
+ return height - offset;
303
+ } else if (typeof offset == 'string' && $(offset).length > 0) {
304
+ $(offset).each(function() {
305
+ height = height - $(offset).height();
306
+ });
307
+ }
308
+ return height;
309
+ },
310
+
311
+ // Detected IE & adds body class
312
+ isIE: function() {
313
+ if (document.documentMode || /Edge/.test(navigator.userAgent)) {
314
+ return true;
315
+ }
316
+ },
317
+
318
+ // Determines plugin location
319
+ // --------------------------------
320
+ getScriptLocation: function() {
321
+ var location = $('body').data('plugins-localpath') || null;
322
+ if (location) {
323
+ return location;
324
+ }
325
+ return Config.PLUGINS_LOCALPATH;
326
+ },
327
+
328
+ // Delays
329
+ // --------------------------------
330
+ delay: function(callback, ms) {
331
+ var timer = 0;
332
+ clearTimeout(timer);
333
+ timer = setTimeout(callback, ms);
334
+ },
335
+
336
+ // Hash from string
337
+ // --------------------------------
338
+ hashCode: function(str) {
339
+ var hash = 0;
340
+ for (var i = 0; i < str.length; i++) {
341
+ hash = ~~(((hash << 5) - hash) + str.charCodeAt(i));
342
+ }
343
+ return hash;
344
+ },
345
+
346
+ // Load plugin
347
+ // --------------------------------
348
+ themeLoadPlugin: function(js, css, callback, placement) {
349
+ // Manually loaded assets
350
+ var manualPlugins = $('body').data('plugins-manual') || null;
351
+ if (manualPlugins !== null) {
352
+ if (callback && typeof(callback) === "function") {
353
+ callback();
354
+ }
355
+ return;
356
+ }
357
+
358
+ var themeLoadPluginPath = function(url) {
359
+ if (url.indexOf('http://') === 0 || url.indexOf('https://') === 0) {
360
+ return url;
361
+ }
362
+ var location = $document.getScriptLocation();
363
+ return location + url;
364
+ };
365
+
366
+ $.ajaxPrefilter("script", function(s) {
367
+ s.crossDomain = true;
368
+ });
369
+ if (js.length > 0) {
370
+ var progress = 0;
371
+ var internalCallback = function(url) {
372
+ // Complete
373
+ if (++progress === js.length) {
374
+ $.each(css, function(index, value) {
375
+ if (Globals.LOADED_FILES[value] === value) {
376
+ // Already loaded
377
+ return true;
378
+ }
379
+
380
+ // Record file loaded
381
+ Globals.LOADED_FILES[value] = value;
382
+ $('head').prepend('<link href="' + themeLoadPluginPath(value) + '" rel="stylesheet" type="text/css" />');
383
+ });
384
+
385
+ if (callback && typeof(callback) === "function") {
386
+ callback();
387
+ }
388
+ }
389
+ };
390
+
391
+ $.each(js, function(index, value) {
392
+ if (Globals.LOADED_FILES[value] === value) {
393
+ // Already loaded
394
+ internalCallback();
395
+ return true;
396
+ }
397
+
398
+ // Offline mode
399
+ var hash = window.location.hash;
400
+ if (hash === '#offline' && (value.indexOf('http://') === 0 || value.indexOf('https://')) === 0) {
401
+ console.log('Offline mode: ' + value + ' loading skipped');
402
+ return;
403
+ }
404
+
405
+ // Record file loaded
406
+ Globals.LOADED_FILES[value] = value;
407
+ if (placement === undefined) {
408
+ var options = {
409
+ url: themeLoadPluginPath(value),
410
+ dataType: "script",
411
+ success: internalCallback,
412
+ cache: true
413
+ };
414
+ $.ajax(options);
415
+ } else if (placement === 'append') {
416
+ $('script[src*="bootstrap.min.js"]').after('<script src="' + themeLoadPluginPath(value) + '"></script>');
417
+ internalCallback();
418
+ } else if (placement === 'prepend') {
419
+ $('script[src*="bootstrap.min.js"]').before('<script src="' + themeLoadPluginPath(value) + '"></script>');
420
+ internalCallback();
421
+ } else if (placement === 'head') {
422
+ $('head').append('<script src="' + themeLoadPluginPath(value) + '"></script>');
423
+ internalCallback();
424
+ }
425
+ });
426
+ } else if (css.length > 0) {
427
+ // Just CSS
428
+ $.each(css, function(index, value) {
429
+ if (Globals.LOADED_FILES[value] === value) {
430
+ // Already loaded
431
+ return true;
432
+ }
433
+
434
+ // Record file loaded
435
+ Globals.LOADED_FILES[value] = value;
436
+ $('head').prepend('<link href="' + themeLoadPluginPath(value) + '" rel="stylesheet" type="text/css" />');
437
+ });
438
+
439
+ if (callback && typeof(callback) === "function") {
440
+ callback();
441
+ }
442
+ }
443
+ },
444
+ });
445
+ })(jQuery);
446
+
447
+ // Temp fix for https://github.com/vmitsaras/js-offcanvas/commit/ab116f632a092477574d69760ecbe3d7c07b00ab#diff-7399a891b21afad97155db02f6dbd60dL142
448
+ var raf = (function(callback) {
449
+ return window.requestAnimationFrame ||
450
+ window.webkitRequestAnimationFrame ||
451
+ window.mozRequestAnimationFrame ||
452
+ function(callback) {
453
+ window.setTimeout(callback, 1000 / 60);
454
+ };
455
+ })();
456
+ var utils = {};
457
+ utils.raf = function(callback) {
458
+ raf(callback);
459
+ };
460
+ window.utils = utils;
461
+ // ===============================================================
462
+ // @group: Custom functionality intergration/init
463
+ // ===============================================================
464
+
465
+ (function($) {
466
+ $.extend($.fn, {
467
+ themeCustomScripts: function(refresh) {
468
+ var context = $(this);
469
+ if (typeof context === "undefined" || context === null) {
470
+ context = $(document);
471
+ }
472
+ $document = $(document);
473
+
474
+ // Menus need init quick, @see utils.js
475
+ context.themeSubMenus();
476
+ context.themeScrollMenus();
477
+
478
+ // ----------------------------------------------------------------
479
+ // Hover effects
480
+ // ----------------------------------------------------------------
481
+ var elementsHovered = context.find('[data-hover]');
482
+ if (elementsHovered.length > 0) {
483
+ var initElementsHovered = function() {
484
+ elementsHovered.each(function() {
485
+ var $element = jQuery(this),
486
+ animateClass = $element.data('hover'),
487
+ animateClassOut = $element.data('hover-out'),
488
+ animateDelay = $element.data('hover-delay') || null,
489
+ animateDuration = $element.data('hover-duration') || null;
490
+
491
+ // Delays & durations
492
+ if (animateDelay !== null) {
493
+ $element.css({
494
+ '-webkit-animation-delay': animateDelay + 's',
495
+ '-moz-animation-delay': animateDelay + 's',
496
+ 'animation-delay': animateDelay + 's'
497
+ });
498
+ }
499
+ if (animateDuration !== null) {
500
+ $element.css({
501
+ '-webkit-animation-duration': animateDuration + 's',
502
+ '-moz-animation-duration': animateDuration + 's',
503
+ 'animation-duration': animateDuration + 's'
504
+ });
505
+ }
506
+
507
+ $element.hover(
508
+ function() {
509
+ $element.addClass('animated ' + animateClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
510
+ $element.removeClass('animated ' + animateClass).addClass('animated ' + animateClassOut);
511
+ });
512
+ },
513
+ function() {}
514
+ );
515
+ });
516
+ };
517
+ $document.themeLoadPlugin([], ["https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"], function() {
518
+ $document.isPageLoaderDone(initElementsHovered);
519
+ });
520
+ }
521
+
522
+ // ----------------------------------------------------------------
523
+ // Fullheight elements
524
+ // ----------------------------------------------------------------
525
+ var fullHeights = context.find('[data-toggle="full-height"]');
526
+ if (fullHeights.length > 0) {
527
+ var doFullHeightsOffset = function(height, offset) {
528
+ return $document.calcHeightsOffset(height, offset);
529
+ };
530
+
531
+ var doFullHeights = function() {
532
+ fullHeights.each(function() {
533
+ var $element = $(this),
534
+ fullHeightParent = $element.data('parent') || window,
535
+ fullHeightOffset = $element.data('offset') || null,
536
+ fullHeightBreakpoint = $element.data('breakpoint') || null,
537
+ $fullHeightParent = $(fullHeightParent) || null;
538
+
539
+ if ($fullHeightParent) {
540
+ var fullHeightParentHeight = $fullHeightParent.height();
541
+ var fullHeight = fullHeightParentHeight;
542
+ if (fullHeightOffset) {
543
+ fullHeight = doFullHeightsOffset(fullHeight, fullHeightOffset);
544
+ }
545
+
546
+ if (fullHeightBreakpoint) {
547
+ if ($(window).width() <= fullHeightBreakpoint) {
548
+ $element.css('height', 'auto');
549
+ } else {
550
+ $element.outerHeight(fullHeight);
551
+ }
552
+ } else {
553
+ $element.outerHeight(fullHeight);
554
+ }
555
+ }
556
+ });
557
+ };
558
+
559
+ doFullHeights();
560
+ $(window).on('resize', function() {
561
+ setTimeout(function() {
562
+ doFullHeights();
563
+ }, 400);
564
+ });
565
+ }
566
+
567
+ // ----------------------------------------------------------------
568
+ // Animated scroll elements
569
+ // ----------------------------------------------------------------
570
+ var elementsAnimated = context.find('[data-animate]');
571
+ if (elementsAnimated.length > 0) {
572
+ var initElementsAnimated = function() {
573
+ // SEO hack, hide stuff when page scrolled
574
+ $(window).on('scroll', function() {
575
+ if (Globals.PAGE_SCROLLED !== true) {
576
+ //$body.addClass('animates-pending');
577
+ Globals.PAGE_SCROLLED = true;
578
+ }
579
+ });
580
+
581
+ elementsAnimated.each(function() {
582
+ var $element = $(this),
583
+ animateClass = $element.data('animate'),
584
+ animateInfinite = $element.data('animate-infinite') || null,
585
+ animateDelay = $element.data('animate-delay') || null,
586
+ animateDuration = $element.data('animate-duration') || null,
587
+ animateOffset = $element.data('animate-offset') || '98%',
588
+ animateInView = $element.data('animate-inview') || false,
589
+ elementInView = $document.elementInView($element);
590
+
591
+ // Already scroll passed so don't animate again
592
+ if (elementInView === true && animateInView === false) {
593
+ animateClass = null;
594
+ $element.removeAttr('data-animate');
595
+ }
596
+
597
+ // Infinite
598
+ if (animateInfinite !== null) {
599
+ $element.addClass('infinite');
600
+ }
601
+
602
+ // Delays & durations
603
+ if (animateDelay !== null) {
604
+ $element.css({
605
+ '-webkit-animation-delay': animateDelay + 's',
606
+ '-moz-animation-delay': animateDelay + 's',
607
+ 'animation-delay': animateDelay + 's'
608
+ });
609
+ }
610
+ if (animateDuration !== null) {
611
+ $element.css({
612
+ '-webkit-animation-duration': animateDuration + 's',
613
+ '-moz-animation-duration': animateDuration + 's',
614
+ 'animation-duration': animateDuration + 's'
615
+ });
616
+ }
617
+
618
+ if (animateClass !== null) {
619
+ $element.waypoint(function() {
620
+ $element.addClass('animated ' + animateClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
621
+ $element.addClass('animated-done');
622
+ $element.removeClass(animateClass);
623
+ });
624
+ this.destroy();
625
+ }, {
626
+ offset: animateOffset,
627
+ });
628
+ }
629
+ });
630
+ };
631
+
632
+ $document.includeWaypoints(function() {
633
+ $document.themeLoadPlugin([], ["https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"], function() {
634
+ $document.isPageLoaderDone(initElementsAnimated);
635
+ });
636
+ });
637
+ }
638
+
639
+ // ----------------------------------------------------------------
640
+ // Scroll state
641
+ // ----------------------------------------------------------------
642
+ context.find('[data-scroll="scroll-state"]').each(function() {
643
+ var $scroll = $(this),
644
+ $doc = $(document),
645
+ scrollAmount = $scroll.data('scroll-amount') || $(window).outerHeight(),
646
+ scrollAmountOut = $scroll.data('scroll-amount-out') || null, //@todo
647
+ scrollSettings = $scroll.data('scroll-setting') || null,
648
+ scrollEffectIn = scrollSettings !== null ? (scrollSettings.effectIn || null) : null,
649
+ scrollEffectOut = scrollSettings !== null ? (scrollSettings.effectOut || null) : null,
650
+ scrollEffectDelay = scrollSettings !== null ? (scrollSettings.effectDelay || null) : null,
651
+ scrollEffectDuration = scrollSettings !== null ? (scrollSettings.effectDuration || null) : null,
652
+ scrollBreakpoint = scrollSettings !== null ? (scrollSettings.breakpoint || null) : null,
653
+ scrollFallbackState = scrollSettings !== null ? (scrollSettings.fallbackState || 'scroll-state-active') : null,
654
+ scrollActive = $scroll.data('scroll-active') || true,
655
+ scrollPersist = scrollSettings !== null ? (scrollSettings.persist || null) : null,
656
+ effectType = 'transitions',
657
+ $window = $(window);
658
+
659
+ if ($scroll.hasClass('scroll-state-hidden')) {
660
+ $scroll.data('state', 'out');
661
+ }
662
+ if (scrollEffectIn !== null || scrollEffectOut !== null) {
663
+ $scroll.addClass('scroll-effect');
664
+ $document.themeLoadPlugin([], ["https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"]);
665
+ effectType = 'animate';
666
+ }
667
+
668
+ // Delays & durations
669
+ if (scrollEffectDelay !== null) {
670
+ $scroll.css({
671
+ '-webkit-animation-delay': scrollEffectDelay + 's',
672
+ '-moz-animation-delay': scrollEffectDelay + 's',
673
+ 'animation-delay': scrollEffectDelay + 's'
674
+ });
675
+ }
676
+ if (scrollEffectDuration !== null) {
677
+ $scroll.css({
678
+ '-webkit-animation-duration': scrollEffectDuration + 's',
679
+ '-moz-animation-duration': scrollEffectDuration + 's',
680
+ 'animation-duration': scrollEffectDuration + 's'
681
+ });
682
+ }
683
+
684
+ if (scrollBreakpoint) {
685
+ $window.on('resize', function() {
686
+ setTimeout(function() {
687
+ if ($window.width() <= scrollBreakpoint) {
688
+ scrollActive = false;
689
+ $scroll.addClass(scrollFallbackState);
690
+ $scroll.removeClass(scrollEffectOut);
691
+ $scroll.removeClass(scrollEffectIn);
692
+ } else {
693
+ scrollActive = true;
694
+ $scroll.removeClass(scrollFallbackState);
695
+ }
696
+ $scroll.data('scroll-active', scrollActive);
697
+ }, 400);
698
+ });
699
+ }
700
+
701
+ $doc.scroll(function() {
702
+ if ($scroll.data('scroll-active') === false) {
703
+ return;
704
+ }
705
+ var y = $(this).scrollTop();
706
+ var active = $scroll.data('state');
707
+ if (y >= scrollAmount) {
708
+ if (active === 'out') {
709
+ $scroll.data('state', 'in');
710
+ $scroll.addClass('scroll-state-active');
711
+ $scroll.removeClass('scroll-state-hidden');
712
+ if (scrollEffectOut !== null) {
713
+ $scroll.removeClass(scrollEffectOut);
714
+ }
715
+ if (scrollEffectIn !== null) {
716
+ $scroll.addClass('animated ' + scrollEffectIn);
717
+ }
718
+ }
719
+
720
+ } else if (active === 'in') {
721
+ if (scrollPersist) {
722
+ $scroll.data('state', 'persist');
723
+ } else {
724
+ $scroll.data('state', 'out');
725
+ if (scrollEffectOut !== null) {
726
+ $scroll.addClass('animated ' + scrollEffectOut);
727
+ } else {
728
+ $scroll.removeClass('scroll-state-active');
729
+ $scroll.addClass('scroll-state-hidden');
730
+ }
731
+ if (scrollEffectIn !== null) {
732
+ $scroll.removeClass(scrollEffectIn);
733
+ }
734
+ }
735
+ }
736
+ });
737
+ });
738
+
739
+ // ----------------------------------------------------------------
740
+ // scrollax - adjust oapcity & top on scroll
741
+ // ----------------------------------------------------------------
742
+ context.find('[data-scroll="scrollax"]').each(function() {
743
+ var $scroll = $(this),
744
+ $doc = $(document),
745
+ $window = $(window),
746
+ opRatio = $scroll.data('scrollax-op-ratio') || 500,
747
+ yRatio = $scroll.data('scrollax-y-ratio') || 5;
748
+
749
+ $doc.scroll(function() {
750
+ var windowTop = $window.scrollTop();
751
+ $scroll.css({
752
+ "opacity": (opRatio === 'off' ? 1 : 1 - windowTop / opRatio),
753
+ "transform": (yRatio === 'off' ? 0 : "translateY(" + (0 - windowTop / yRatio) + "px)"),
754
+ });
755
+ });
756
+ });
757
+
758
+ // ----------------------------------------------------------------
759
+ // Quantity widget
760
+ // ----------------------------------------------------------------
761
+ context.find('[data-toggle="quantity"]').each(function() {
762
+ var $this = $(this),
763
+ $down = $this.find('.quantity-down'),
764
+ $up = $this.find('.quantity-up'),
765
+ $quantity = $this.find('.quantity');
766
+
767
+ var toggleQuantity = function(direction) {
768
+ var value = parseInt($quantity.val());
769
+ if (direction === 'down') {
770
+ value = value - 1;
771
+ } else if (direction === 'up') {
772
+ value = value + 1;
773
+ }
774
+ if (value < 0) {
775
+ value = 0;
776
+ }
777
+ $quantity.val(value);
778
+ };
779
+
780
+ if ($quantity.length > 0) {
781
+ $down.on('click', function() {
782
+ toggleQuantity('down');
783
+ });
784
+ $up.on('click', function() {
785
+ toggleQuantity('up');
786
+ });
787
+ }
788
+ });
789
+
790
+ // ----------------------------------------------------------------
791
+ // Dynamic/quick CSS props
792
+ // Example: data-css='{"height":"240px","background-position":"center center"}'
793
+ // ----------------------------------------------------------------
794
+ context.find('[data-css]').each(function() {
795
+ var $this = $(this),
796
+ currentStyles = $this.data('css') || '',
797
+ styleProps = $this.data('css') || {},
798
+ newStyles = {};
799
+ if (styleProps !== null && typeof styleProps === 'object') {
800
+ newStyles = $.extend(currentStyles, styleProps);
801
+ $this.css(newStyles);
802
+ }
803
+ });
804
+
805
+ // ----------------------------------------------------------------
806
+ // Overlay menu
807
+ // ----------------------------------------------------------------
808
+ var overlayMenus = context.find('[data-toggle=overlay]');
809
+ if (overlayMenus.length > 0) {
810
+ overlayMenus.each(function() {
811
+ var $this = jQuery(this),
812
+ target = $this.data('target') || null;
813
+
814
+ // General class for all triggers
815
+ $this.addClass('overlay-trigger');
816
+ if ($(target).length > 0) {
817
+ $target = $(target);
818
+ $this.on('click', function(e) {
819
+ $this.toggleClass('overlay-active');
820
+ jQuery($this.data('target')).toggleClass('overlay-active');
821
+ jQuery('html').toggleClass('overlay-open');
822
+ return false;
823
+ });
824
+ }
825
+ });
826
+
827
+ // Overlay dismiss links/buttons
828
+ context.find('[data-dismiss="overlay"]').each(function() {
829
+ var $this = jQuery(this),
830
+ $target = $this.data('target') || '.overlay',
831
+ $trigger = jQuery('[data-toggle="overlay"][data-target="' + $target + '"]') || null;
832
+
833
+ // Check target overlay to close exists
834
+ if ($($target).length > 0) {
835
+ $target = jQuery($target);
836
+ $this.on('click', function(e) {
837
+ $target.removeClass('overlay-active');
838
+ jQuery('html').removeClass('overlay-open');
839
+
840
+ // Try to find the trigger
841
+ if ($trigger.length > 0) {
842
+ $trigger.removeClass('overlay-active');
843
+ } else {
844
+ // close all
845
+ jQuery('[data-toggle="overlay"]').removeClass('overlay-active');
846
+ }
847
+ return false;
848
+ });
849
+ }
850
+ });
851
+ }
852
+
853
+ // ----------------------------------------------------------------
854
+ // Clickable elements
855
+ // ----------------------------------------------------------------
856
+ context.find('[data-url]').each(function() {
857
+ var url = $(this).data('url');
858
+ var parseStringUrl = function(url) {
859
+ var a = document.createElement('a');
860
+ a.href = url;
861
+ return a;
862
+ };
863
+ var urlParse = parseStringUrl(url);
864
+ $(this).addClass('clickable-element');
865
+
866
+ // Hover event
867
+ $(this).on('hover', function() {
868
+ $(this).hover(
869
+ function() {
870
+ $(this).addClass("hovered");
871
+ },
872
+ function() {
873
+ $(this).removeClass("hovered");
874
+ }
875
+ );
876
+ });
877
+
878
+ // Disable Links within block
879
+ $(this).find('a').on('click', function(e) {
880
+ if ($(this).attr('href') === urlParse.href) {
881
+ e.preventDefault();
882
+ }
883
+ });
884
+
885
+ // Click event
886
+ $(this).on('click', function() {
887
+ if (urlParse.host !== location.host) {
888
+ // external
889
+ window.open(urlParse.href, '_blank');
890
+ } else {
891
+ // internal
892
+ window.location = url;
893
+ }
894
+ });
895
+ });
896
+
897
+ // ----------------------------------------------------------------
898
+ // Search form show/hide
899
+ // ----------------------------------------------------------------
900
+ $searchForm = context.find('[data-toggle=search-form]');
901
+ if ($searchForm.length > 0) {
902
+ var $trigger = $searchForm;
903
+ var target = $trigger.data('target');
904
+ var $target = $(target);
905
+
906
+ if ($target.length === 0) {
907
+ return;
908
+ }
909
+
910
+ $target.addClass('collapse');
911
+ $('[data-toggle=search-form]').click(function() {
912
+ $target.collapse('toggle');
913
+ $(target + ' .search').focus();
914
+ $trigger.toggleClass('open');
915
+ $('html').toggleClass('search-form-open');
916
+ $(window).trigger('resize');
917
+ });
918
+ $('[data-toggle=search-form-close]').click(function() {
919
+ $target.collapse('hide');
920
+ $trigger.removeClass('open');
921
+ $('html').removeClass('search-form-open');
922
+ $(window).trigger('resize');
923
+ });
924
+ }
925
+
926
+ // ----------------------------------------------------------------
927
+ // colour switch - demo only
928
+ // ----------------------------------------------------------------
929
+ var defaultColour = $('body').data('colour-scheme') || 'green';
930
+ var colourSchemes = context.find('.theme-colours a');
931
+ colourSchemes.removeClass('active');
932
+ colourSchemes.filter('.' + defaultColour).addClass('active');
933
+ colourSchemes.click(function() {
934
+ var $this = $(this);
935
+ var c = $this.attr('href').replace('#', '');
936
+ var cacheBuster = 3 * Math.floor(Math.random() * 6);
937
+ $('.theme-colours a').removeClass('active');
938
+ $('.theme-colours a.' + c).addClass('active');
939
+
940
+ if (c !== defaultColour) {
941
+ context.find('#colour-scheme').attr('href', 'assets/css/colour-' + c + '.css?x=' + cacheBuster);
942
+ } else {
943
+ context.find('#colour-scheme').attr('href', '#');
944
+ }
945
+ });
946
+
947
+ // ----------------------------------------------------------------
948
+ // IE placeholders
949
+ // ----------------------------------------------------------------
950
+ if (navigator.userAgent.toLowerCase().indexOf('msie') > -1) {
951
+ context.find('[placeholder]').focus(function() {
952
+ var input = jQuery(this);
953
+ if (input.val() === input.attr('placeholder')) {
954
+ if (this.originalType) {
955
+ this.type = this.originalType;
956
+ delete this.originalType;
957
+ }
958
+ input.val('');
959
+ input.removeClass('placeholder');
960
+ }
961
+ }).blur(function() {
962
+ var input = jQuery(this);
963
+ if (input.val() === '') {
964
+ input.addClass('placeholder');
965
+ input.val(input.attr('placeholder'));
966
+ }
967
+ }).blur();
968
+ }
969
+
970
+
971
+
972
+ // ----------------------------------------------------------------
973
+ // Bootstrap animated progressbar width
974
+ // ----------------------------------------------------------------
975
+ var progressBarsAnimated = context.find('[data-toggle="progress-bar-animated-progress"]');
976
+ if (progressBarsAnimated.length > 0) {
977
+ var initProgressBarsAnimated = function() {
978
+ progressBarsAnimated.each(function() {
979
+ var $progress = jQuery(this);
980
+ var currentStyles = $progress.attr("style") || '';
981
+
982
+ $progress.waypoint(function() {
983
+ currentStyles += 'width: ' + $progress.attr("aria-valuenow") + '% !important;';
984
+ $progress.attr("style", currentStyles).addClass('progress-bar-animated-progress');
985
+ this.destroy();
986
+ }, {
987
+ offset: '98%'
988
+ });
989
+ });
990
+ };
991
+
992
+ $document.includeWaypoints(function() {
993
+ progressBarsAnimated.css("width", 0);
994
+ $document.isPageLoaderDone(initProgressBarsAnimated);
995
+ });
996
+ }
997
+
998
+ // ----------------------------------------------------------------
999
+ // Bootstrap collapse
1000
+ // ----------------------------------------------------------------
1001
+ var collapses = context.find('[data-toggle="collapse"]');
1002
+ collapses.each(function() {
1003
+ var $this = $(this);
1004
+ var target = $this.attr('href') || $this.data('target');
1005
+ var parent = $this.data('parent') || null;
1006
+ if ($(target).length > 0) {
1007
+ if ($(target).hasClass('show')) {
1008
+ $this.addClass('show');
1009
+ }
1010
+ }
1011
+
1012
+ $this.on({
1013
+ 'click': function() {
1014
+ $this.toggleClass('show', !$(target).hasClass('show'));
1015
+ $(window).trigger('resize');
1016
+
1017
+ var $checks = $this.find('input[type="checkbox"]');
1018
+ if ($checks.length > 0) {
1019
+ $checks.prop('checked', !$(target).hasClass('show'));
1020
+ }
1021
+ }
1022
+ });
1023
+ });
1024
+
1025
+ // Scroll to top of active card
1026
+ context.find('[data-accordion-focus]').on('shown.bs.collapse', function(e) {
1027
+ var headingTop = $(e.target).parent().offset().top;
1028
+ var scrollTo = $document.calcHeightsOffset(headingTop, $('#header').outerHeight());
1029
+ $('html,body').animate({
1030
+ scrollTop: scrollTo + 20
1031
+ }, 500);
1032
+ });
1033
+
1034
+ var radioCollapses = context.find('[data-toggle="radio-collapse"]');
1035
+ radioCollapses.each(function(index, item) {
1036
+ var $item = $(item);
1037
+ var $target = $($item.data('target'));
1038
+ var $parent = $($item.data('parent'));
1039
+ var $radio = $item.find('input[type=radio]');
1040
+ var $radioOthers = $parent.find('input[type=radio]').not($radio);
1041
+
1042
+ $radio.on('change', function() {
1043
+ if ($radio.is(':checked')) {
1044
+ $target.collapse('show');
1045
+ } else {
1046
+ $target.collapse('hide');
1047
+ }
1048
+ });
1049
+
1050
+ $radio.on('click', function() {
1051
+ $radioOthers.prop('checked', false).trigger('change');
1052
+ });
1053
+ });
1054
+
1055
+ // ----------------------------------------------------------------
1056
+ // Bootstrap modals onload & duration & animation
1057
+ // @see: http://v4-alpha.getbootstrap.com/components/modal/
1058
+ // ----------------------------------------------------------------
1059
+ var modalsDuration = context.find('[data-modal-duration]');
1060
+ if (modalsDuration.length > 0) {
1061
+ var $modal = modalsDuration,
1062
+ duration = $modal.data('modal-duration'),
1063
+ progressBar = $('<div class="modal-progress"></div>');
1064
+
1065
+ $modal.find('.modal-content').append(progressBar);
1066
+
1067
+ // Actual durations
1068
+ $modal.on('show.bs.modal', function(e) {
1069
+ var i = 2;
1070
+ var durationProgress = setInterval(function() {
1071
+ progressBar.width(i++ + '%');
1072
+ }, duration / 100);
1073
+
1074
+ setTimeout(function() {
1075
+ $modal.modal('hide');
1076
+ clearInterval(durationProgress);
1077
+ }, duration);
1078
+ });
1079
+ }
1080
+
1081
+ var modalsOnload = context.find('[data-toggle="modal-onload"]');
1082
+ if (modalsOnload.length > 0) {
1083
+ modalsOnload.on('shown.bs.modal', function() {
1084
+ $(this).data('modal-shown', true);
1085
+ });
1086
+
1087
+ modalsOnload.each(function() {
1088
+ var $modal = $(this),
1089
+ delay = $modal.data('modal-delay') || null,
1090
+ force = $modal.data('modal-force') || false; // Open it again ever if opened once before
1091
+ var startModal = function($modal) {
1092
+ var shown = $modal.data('modal-shown') || false;
1093
+
1094
+ //if (shown === false || shown && force) {
1095
+ $modal.modal();
1096
+ //}
1097
+ };
1098
+
1099
+ // Delay modal opening
1100
+ if (delay !== null) {
1101
+ setTimeout(function() {
1102
+ startModal($modal);
1103
+ }, delay);
1104
+ } else {
1105
+ // No delay trigger direct
1106
+ startModal($modal);
1107
+ }
1108
+ });
1109
+ }
1110
+
1111
+ // Inline modals ie. no fixed backdrop
1112
+ var modalsHideBd = context.find('[data-backdrop=false]');
1113
+ var $body = $('body');
1114
+ modalsHideBd.on('show.bs.modal', function(e) {
1115
+ $(this).data('bs.modal')._config.backdrop = false;
1116
+ $body.addClass('modal-no-backdrop');
1117
+ });
1118
+ modalsHideBd.on('hidden.bs.modal', function(e) {
1119
+ $body.removeClass('modal-no-backdrop');
1120
+ });
1121
+
1122
+ // Animate.css modal integration
1123
+ function modalAnimate($m, s, e) {
1124
+ var animateIn = $m.data('modal-animate-in') || 'fadeIn',
1125
+ animateOut = $m.data('modal-animate-out') || 'fadeOut',
1126
+ animateAdd = animateIn,
1127
+ animateRemove = animateOut;
1128
+
1129
+ if (s == 'out') {
1130
+ animateAdd = animateOut;
1131
+ animateRemove = animateIn;
1132
+ }
1133
+
1134
+ $m.removeClass(animateRemove);
1135
+ $m.addClass(animateAdd + ' animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
1136
+ $m.removeClass(animateAdd + ' animated');
1137
+ if (s == 'out') {
1138
+ $m.removeClass('modal-animate-closing');
1139
+ $body.removeClass('modal-animate');
1140
+ }
1141
+ });
1142
+ }
1143
+ var $modalsAnimate = context.find('[data-modal-animate-in], [data-modal-animate-out]');
1144
+ if ($modalsAnimate.length > 0) {
1145
+ var $modalBackdrop = $('<div></div>').addClass('modal-animate-backdrop');
1146
+ $modalBackdrop.appendTo($body);
1147
+ $modalsAnimate.on('click.backdropDismiss', function(e) {
1148
+ var $m = $(e.target).hasClass('modal') ? $(e.target) : null;
1149
+ if ($m) {
1150
+ $m.modal('hide');
1151
+ }
1152
+ });
1153
+
1154
+ $modalsAnimate.on('show.bs.modal', function(e) {
1155
+ var $m = $(this);
1156
+ var backdrop = $m.data('bs.modal')._config.backdrop;
1157
+ $body.addClass('modal-animate');
1158
+ $m.data('bs.modal')._config.backdrop = false;
1159
+
1160
+ if (backdrop) {
1161
+ $modalBackdrop.addClass('show');
1162
+ }
1163
+ modalAnimate($m, 'in', e);
1164
+ }).on('hide.bs.modal', function(e) {
1165
+ var $m = $(this);
1166
+ $m.addClass('modal-animate-closing');
1167
+ $modalBackdrop.removeClass('show');
1168
+ modalAnimate($m, 'out', e);
1169
+ });
1170
+ }
1171
+
1172
+ // ----------------------------------------------------------------
1173
+ // Bootstrap tooltip
1174
+ // @see: http://getbootstrap.com/javascript/#tooltips
1175
+ // ----------------------------------------------------------------
1176
+ // invoke by adding data-toggle="tooltip" to a tags (this makes it validate)
1177
+ if ($document.tooltip) {
1178
+ context.find('[data-toggle="tooltip"]').tooltip();
1179
+ }
1180
+
1181
+ // ----------------------------------------------------------------
1182
+ // Bootstrap popover
1183
+ // @see: http://getbootstrap.com/javascript/#popovers
1184
+ // ----------------------------------------------------------------
1185
+ // invoke by adding data-toggle="popover" to a tags (this makes it validate)
1186
+ if ($document.popover) {
1187
+ context.find('[data-toggle="popover"]').popover();
1188
+ }
1189
+
1190
+
1191
+
1192
+ // ----------------------------------------------------------------
1193
+ // allow any page element to set page class
1194
+ // ----------------------------------------------------------------
1195
+ context.find('[data-page-class]').each(function() {
1196
+ context.find('html').addClass(jQuery(this).data('page-class'));
1197
+ });
1198
+
1199
+ // ----------------------------------------------------------------
1200
+ // Detect Bootstrap fixed header
1201
+ // @see: http://getbootstrap.com/components/#navbar-fixed-top
1202
+ // ----------------------------------------------------------------
1203
+ if (context.find('.navbar-fixed-top').length > 0) {
1204
+ context.find('html').addClass('has-navbar-fixed-top');
1205
+ }
1206
+
1207
+ // ----------------------------------------------------------------
1208
+ // simple class toggles
1209
+ // ----------------------------------------------------------------
1210
+ context.find('[data-toggle="class"]').each(function() {
1211
+ var $this = $(this);
1212
+ var target = $this.data('target');
1213
+ var $target = $(target);
1214
+ var toggleClass = $this.data('toggle-class') || 'show';
1215
+ var toggleTrigger = $this.data('toggle-trigger') || 'click';
1216
+ var toggleAction = $this.data('toggle-action') || 'toggle';
1217
+ var toggleCallback = function(t, c, a) {
1218
+ if (typeof c === 'object') {
1219
+ $.each(c, function(i, name) {
1220
+ if (a === 'remove') {
1221
+ t.removeClass(name);
1222
+ } else if (a === 'add') {
1223
+ t.addClass(name);
1224
+ } else {
1225
+ t.toggleClass(name);
1226
+ }
1227
+ });
1228
+ } else {
1229
+ if (a === 'remove') {
1230
+ t.removeClass(c);
1231
+ } else if (a === 'add') {
1232
+ t.addClass(c);
1233
+ } else {
1234
+ t.toggleClass(c);
1235
+ }
1236
+ }
1237
+ };
1238
+
1239
+ if (typeof target === 'object') {
1240
+ $.each(target, function(selector, data) {
1241
+ var _toggleTrigger = data.toggleTrigger || toggleTrigger;
1242
+ var _toggleActions = data.actions || toggleAction;
1243
+
1244
+ $this.on(_toggleTrigger, function() {
1245
+ if (typeof _toggleActions === 'object') {
1246
+ $.each(_toggleActions, function(action, classes) {
1247
+ toggleCallback($(selector), classes, action);
1248
+ });
1249
+ } else {
1250
+ toggleCallback($(selector), _toggleClass, _toggleAction);
1251
+ }
1252
+
1253
+ return false;
1254
+ });
1255
+ });
1256
+ } else {
1257
+ if ($target.length === 0) {
1258
+ return;
1259
+ }
1260
+ $this.on(toggleTrigger, function() {
1261
+ toggleCallback($target, toggleClass, toggleAction);
1262
+ return false;
1263
+ });
1264
+ }
1265
+ });
1266
+
1267
+ // ----------------------------------------------------------------
1268
+ // Simple class togglers
1269
+ // <div id="target"></div>
1270
+ // <a href="#target" data-target="#target" data-class="something-something">Toggle</a>
1271
+ // ----------------------------------------------------------------
1272
+ $("[data-toggle='toggle']").click(function() {
1273
+ var $this = $(this);
1274
+ var selector = $this.getSelector();
1275
+ var toggleClass = $this.data("class");
1276
+ $(selector).toggleClass(toggleClass);
1277
+ });
1278
+
1279
+ // ----------------------------------------------------------------
1280
+ // show hide for hidden header
1281
+ // ----------------------------------------------------------------
1282
+ context.find('[data-toggle=show-hide]').each(function() {
1283
+ var $this = jQuery(this);
1284
+ var target = $this.attr('data-target');
1285
+ var $target = $(target);
1286
+ var state = 'show'; //open or hide
1287
+ var targetState = $this.attr('data-target-state');
1288
+ var callback = $this.attr('data-callback');
1289
+
1290
+ if ($target.length === 0) {
1291
+ return;
1292
+ }
1293
+
1294
+ if (state === 'show') {
1295
+ // Close by default
1296
+ $target.addClass('collapse');
1297
+ }
1298
+
1299
+ $this.click(function() {
1300
+ //allows trigger link to say target is open & should be closed
1301
+ if (typeof targetState !== 'undefined' && targetState !== false) {
1302
+ state = targetState;
1303
+ }
1304
+ if (state === undefined) {
1305
+ state = 'show';
1306
+ }
1307
+ if (!$target.hasClass('show')) {
1308
+ // About to open
1309
+ $this.addClass('show');
1310
+ } else {
1311
+ $this.removeClass('show');
1312
+ }
1313
+
1314
+ $target.collapse('toggle');
1315
+
1316
+ if (callback && typeof(callback) === "function") {
1317
+ callback();
1318
+ }
1319
+ });
1320
+ });
1321
+
1322
+ // Clones DOM elements
1323
+ // --------------------------------
1324
+ context.find('[data-clone]').each(function() {
1325
+ var $this = $(this);
1326
+ var clone = $this.data('clone') || null; // @todo - allow multiple clones
1327
+ var cloneTo = $this.data('clone-to') || null;
1328
+ var $cloneFrom, $cloneTo;
1329
+ var placement = $this.data('clone-placement') || 'after';
1330
+ var classesRemove = $this.data('clone-classes-remove') || [];
1331
+ var classesAdd = $this.data('clone-classes-add') || [];
1332
+
1333
+ // Clone to
1334
+ $cloneTo = $this;
1335
+ if (cloneTo !== null) {
1336
+ $cloneTo = $(cloneTo);
1337
+ $cloneTo = $cloneTo.length() > 0 ? $cloneTo : $this;
1338
+ }
1339
+
1340
+ // Clone from
1341
+ $clone = $(clone);
1342
+ $clone = $clone.length > 0 ? $clone : null;
1343
+ if ($clone === null) {
1344
+ return;
1345
+ }
1346
+
1347
+ // Manipulate clone
1348
+ $clone = $clone.clone();
1349
+ $clone.addClass('cloned-element');
1350
+
1351
+ // Remove elements
1352
+
1353
+
1354
+ // Classes
1355
+ if (classesRemove !== null && $.isArray(classesRemove)) {
1356
+ $.each(classesRemove, function(k, c) {
1357
+ $clone.removeClass(c);
1358
+ });
1359
+ }
1360
+ if (classesAdd !== null && $.isArray(classesAdd)) {
1361
+ $.each(classesAdd, function(k, c) {
1362
+ $clone.addClass(c);
1363
+ });
1364
+ }
1365
+
1366
+ // Placement
1367
+ if (placement === 'before') {
1368
+ $clone.prependTo($this);
1369
+ } else {
1370
+ $clone.appendTo($this);
1371
+ }
1372
+ });
1373
+ },
1374
+ });
1375
+ })(jQuery);
1376
+
1377
+
1378
+ // Object of plugins to add to Globals.PLUGINS
1379
+ // Add custom plugin integration here or as separate files
1380
+ // within the /src/plugins directory
1381
+ var defaultPlugins = {
1382
+ //themePluginPLUGINNAME: function(context) {
1383
+ // // Example: Plugin integration code here
1384
+ //},
1385
+ // Next plugin here
1386
+ };
1387
+
1388
+ // Add to Globals.PLUGINS
1389
+ $.extend($.fn, {
1390
+ themePlugins: defaultPlugins
1391
+ });
1392
+
1393
+
1394
+ // Object of plugins to add to Globals.PLUGINS
1395
+ Globals.PLUGINS.themePluginBackstretch = function(context) {
1396
+ // ----------------------------------------------------------------
1397
+ // Plugin: Backstretch
1398
+ // @see: http://srobbin.com/jquery-plugins/backstretch/
1399
+ // ----------------------------------------------------------------
1400
+ var $backstretches = context.find('[data-toggle=backstretch]');
1401
+ if ($backstretches.length > 0) {
1402
+ var themePluginBackstretchInit = function() {
1403
+ $backstretches.each(function() {
1404
+ var backstretchEl = $(this);
1405
+ var backstretchTarget = jQuery,
1406
+ backstretchImgs = [];
1407
+ var backstretchSettings = {
1408
+ fade: 750,
1409
+ duration: 4000
1410
+ };
1411
+
1412
+ // Get images from element
1413
+ jQuery.each(backstretchEl.data('backstretch-imgs').split(','), function(k, img) {
1414
+ backstretchImgs[k] = img;
1415
+ });
1416
+
1417
+ // block level element
1418
+ if (backstretchEl.data('backstretch-target')) {
1419
+ backstretchTarget = backstretchEl.data('backstretch-target');
1420
+ if (backstretchTarget === 'self') {
1421
+ backstretchTarget = backstretchEl;
1422
+ } else {
1423
+ if ($(backstretchTarget).length > 0) {
1424
+ backstretchTarget = $(backstretchTarget);
1425
+ }
1426
+ }
1427
+ }
1428
+
1429
+ if (backstretchImgs) {
1430
+ $('html').addClass('has-backstretch');
1431
+
1432
+ // Merge in any custom settings
1433
+ backstretchSettings = $.extend({}, backstretchSettings, backstretchEl.data());
1434
+ backstretchTarget.backstretch(backstretchImgs, backstretchSettings);
1435
+
1436
+ // add overlay
1437
+ if (backstretchEl.data('backstretch-overlay') !== false) {
1438
+ $('.backstretch').prepend('<div class="backstretch-overlay"></div>');
1439
+
1440
+ if (backstretchEl.data('backstretch-overlay-opacity')) {
1441
+ $('.backstretch').find('.backstretch-overlay').css('background', 'white').fadeTo(0, backstretchEl.data('backstretch-overlay-opacity'));
1442
+ }
1443
+ }
1444
+ }
1445
+ });
1446
+ };
1447
+ $document.themeLoadPlugin(["backstretch/jquery.backstretch.min.js"], [], themePluginBackstretchInit);
1448
+ }
1449
+ };
1450
+
1451
+
1452
+
1453
+ // Object of plugins to add to Globals.PLUGINS
1454
+ Globals.PLUGINS.themePluginBlazy = function(context) {
1455
+ // ----------------------------------------------------------------
1456
+ // Plugin: Blazy
1457
+ // @see: http://dinbror.dk/blog/blazy/
1458
+ //
1459
+ // From AppStrap 3.0.9 data-bg-img is now loaded by BLazy too
1460
+ // ----------------------------------------------------------------
1461
+ var $blazys = context.find('[data-toggle="blazy"]');
1462
+ var $blazy_bgs = context.find('[data-bg-img]');
1463
+ var bLazy;
1464
+ if ($blazys.length > 0 || $blazy_bgs.length > 0) {
1465
+ var themePluginBlazyInit = function() {
1466
+ if ($blazys.length > 0) {
1467
+ $blazys.each(function() {
1468
+ // Remove alts while loading
1469
+ var $t = $(this);
1470
+ var alt = $t.attr('alt') || null;
1471
+ if (alt) {
1472
+ $t.data('alt', alt);
1473
+ $t.attr('alt', '');
1474
+ }
1475
+ });
1476
+
1477
+ bLazy = new Blazy({
1478
+ selector: '[data-toggle="blazy"]',
1479
+ loadInvisible: true,
1480
+ success: function(ele) {
1481
+ var $ele = $(ele);
1482
+ var alt = $ele.data('alt') || null;
1483
+ if (alt) {
1484
+ $ele.attr('alt', alt);
1485
+ $ele.data('alt', '');
1486
+ }
1487
+ }
1488
+ });
1489
+ }
1490
+
1491
+ if ($blazy_bgs.length > 0) {
1492
+ $blazy_bgs.addClass('bg-img blazy-bg');
1493
+ bLazy = new Blazy({
1494
+ selector: '[data-bg-img]',
1495
+ loadInvisible: true,
1496
+ src: 'data-bg-img'
1497
+ });
1498
+ }
1499
+ };
1500
+
1501
+ $document.themeLoadPlugin(
1502
+ ["https://cdn.jsdelivr.net/blazy/latest/blazy.min.js"], ["plugin-css/plugin-blazy.min.css"],
1503
+ themePluginBlazyInit
1504
+ );
1505
+ }
1506
+ };
1507
+
1508
+
1509
+
1510
+ // Object of plugins to add to Globals.PLUGINS
1511
+ Globals.PLUGINS.themePluginBootstrapSelect = function(context) {
1512
+ // ----------------------------------------------------------------
1513
+ // Plugin: Bootstrap Select
1514
+ // @see: https://github.com/snapappointments/bootstrap-select
1515
+ // ----------------------------------------------------------------
1516
+ var $selects = context.find('[data-toggle="select"], [data-toggle="selects"] select');
1517
+ var themePluginBootstrapSelectInit = function() {
1518
+ if ($selects.length > 0) {
1519
+ $selects.each(function() {
1520
+ var $select = $(this);
1521
+ var styles = [];
1522
+ var defaultSettings = {
1523
+ "width": "100%",
1524
+ "style": null,
1525
+ "classes": null,
1526
+ };
1527
+ var customSettings = $select.data('settings') || {};
1528
+ var settings = $.extend({}, defaultSettings, customSettings); // @see: https://silviomoreto.github.io/bootstrap-select/options/
1529
+ var style = $select.data('style') || null;
1530
+
1531
+ if (style) {
1532
+ styles.push(style);
1533
+ }
1534
+ if ($select.hasClass('form-control-lg')) {
1535
+ styles.push('btn-lg');
1536
+ } else if ($select.hasClass('form-control-sm')) {
1537
+ styles.push('btn-sm');
1538
+ }
1539
+ if ($select.hasClass('form-control-rounded')) {
1540
+ styles.push('btn-rounded');
1541
+ }
1542
+ if (settings.classes !== null) {
1543
+ if (typeof settings.classes == 'object') {
1544
+ $.each(settings.classes, function(key, value) {
1545
+ styles.push(value);
1546
+ })
1547
+ } else if (typeof settings.classes == 'string') {
1548
+ styles.push(settings.classes);
1549
+ }
1550
+ }
1551
+
1552
+ // Default
1553
+ if (styles.length == 0) {
1554
+ styles.push('btn-light');
1555
+ }
1556
+
1557
+ if (styles) {
1558
+ settings.style = styles.join(' ');
1559
+ }
1560
+
1561
+ $select.selectpicker(settings);
1562
+ });
1563
+ }
1564
+ };
1565
+
1566
+ if ($selects.length > 0) {
1567
+ $document.themeLoadPlugin(
1568
+ ["https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.0-beta/js/bootstrap-select.min.js"], ["https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.0-beta/css/bootstrap-select.min.css", "plugin-css/plugin-bootstrap-select.min.css"],
1569
+ themePluginBootstrapSelectInit
1570
+ );
1571
+ }
1572
+ };
1573
+
1574
+
1575
+
1576
+ // Object of plugins to add to Globals.PLUGINS
1577
+ Globals.PLUGINS.themePluginBootstrapSwitch = function(context) {
1578
+ // ----------------------------------------------------------------
1579
+ // Plugin: Bootstrap switch integration
1580
+ // @see: http://www.bootstrap-switch.org/
1581
+ // ----------------------------------------------------------------
1582
+ var $bootstrapSwitches = context.find('[data-toggle=switch]');
1583
+ if ($bootstrapSwitches.length > 0) {
1584
+ var themePluginBootstrapSwitchInit = function() {
1585
+ $bootstrapSwitches.bootstrapSwitch();
1586
+ };
1587
+ $document.themeLoadPlugin(
1588
+ ["bootstrap-switch/build/js/bootstrap-switch.min.js"], ["plugin-css/plugin-bootstrap-switch.min.css", "bootstrap-switch/build/css/bootstrap3/bootstrap-switch.min.css"],
1589
+ themePluginBootstrapSwitchInit
1590
+ );
1591
+ }
1592
+ };
1593
+
1594
+
1595
+
1596
+ var clipboardSelectors = '[data-clipboard-target], [data-clipboard-text]';
1597
+
1598
+ // Object of plugins to add to Globals.PREINITPLUGINS
1599
+ Globals.PREINITPLUGINS.themePluginClipboard = function(context) {
1600
+ // Get premanipulated HTML
1601
+ $(clipboardSelectors).each(function() {
1602
+ var $this = $(this);
1603
+ if ($this.data('clipboard-target-html')) {
1604
+ var target = $this.data('clipboard-target');
1605
+ var $target = $(target);
1606
+ $target.data('clipboard-html-clone', $target.clone().prop('outerHTML'));
1607
+ }
1608
+ });
1609
+ };
1610
+
1611
+ // Object of plugins to add to Globals.PLUGINS
1612
+ Globals.PLUGINS.themePluginClipboard = function(context) {
1613
+ // ----------------------------------------------------------------
1614
+ // Plugin: Clipboard.js
1615
+ // @see: https://clipboardjs.com/
1616
+ // ----------------------------------------------------------------
1617
+
1618
+ var $clipboards = context.find(clipboardSelectors);
1619
+ var formatFactory = function(html) {
1620
+ var parse = function(html, tab) {
1621
+ if (!tab) {
1622
+ tab = 0;
1623
+ }
1624
+ var html = $.parseHTML(html);
1625
+ var formatHtml = new String();
1626
+
1627
+ function setTabs() {
1628
+ var tabs = new String();
1629
+
1630
+ for (i = 0; i < tab; i++) {
1631
+ tabs += '\t';
1632
+ }
1633
+ return tabs;
1634
+ };
1635
+
1636
+
1637
+ $.each(html, function(i, el) {
1638
+ if (el.nodeName == '#text') {
1639
+ if (($(el).text().trim()).length) {
1640
+ formatHtml += setTabs() + $(el).text().trim() + '\n';
1641
+ }
1642
+ } else {
1643
+ var innerHTML = $(el).html().trim();
1644
+ $(el).html(innerHTML.replace('\n', '').replace(/ +(?= )/g, ''));
1645
+
1646
+
1647
+ if ($(el).children().length) {
1648
+ $(el).html('\n' + parse(innerHTML, (tab + 1)) + setTabs());
1649
+ var outerHTML = $(el).prop('outerHTML').trim();
1650
+ formatHtml += setTabs() + outerHTML + '\n';
1651
+
1652
+ } else {
1653
+ var outerHTML = $(el).prop('outerHTML').trim();
1654
+ formatHtml += setTabs() + outerHTML + '\n';
1655
+ }
1656
+ }
1657
+ });
1658
+
1659
+ return formatHtml;
1660
+ };
1661
+
1662
+ return parse(html.replace(/(\r\n|\n|\r)/gm, " ").replace(/ +(?= )/g, ''));
1663
+ };
1664
+
1665
+ var themePluginClipboardInit = function() {
1666
+ if ($clipboards.length > 0) {
1667
+ var clipboard = new Clipboard(clipboardSelectors, {
1668
+ text: function(trigger) {
1669
+ if ($(trigger).data('clipboard-target-html')) {
1670
+ var target = $(trigger).data('clipboard-target');
1671
+ var $target = $(target);
1672
+ var htmlClone = $target.data('clipboard-html-clone') || null;
1673
+ var html = htmlClone || $target.clone().html();
1674
+ return formatFactory(html);
1675
+ }
1676
+ }
1677
+ });
1678
+ clipboard.on('success', function(e) {
1679
+ var $trigger = $(e.trigger) || null;
1680
+ var hasTooltip = $trigger.data('toggle') == 'tooltip' || false;
1681
+ if (hasTooltip !== false) {
1682
+ var originalTitle = $trigger.data('original-title');
1683
+ $trigger.attr("title", "Copied!").tooltip("_fixTitle").tooltip("show").attr("title", originalTitle).tooltip("_fixTitle")
1684
+ }
1685
+ e.clearSelection();
1686
+ });
1687
+ }
1688
+ };
1689
+
1690
+ if ($clipboards.length > 0) {
1691
+ $document.themeLoadPlugin(
1692
+ ["https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"], [],
1693
+ themePluginClipboardInit
1694
+ );
1695
+ }
1696
+ };
1697
+
1698
+
1699
+
1700
+ // Object of plugins to add to Globals.PLUGINS
1701
+ Globals.PLUGINS.themePluginCountTo = function(context) {
1702
+ // ----------------------------------------------------------------
1703
+ // Count To (counters)
1704
+ // @see:
1705
+ // ----------------------------------------------------------------
1706
+ var $countTos = context.find('[data-toggle="count-to"]');
1707
+ if ($countTos.length > 0) {
1708
+ var themePluginCountToInit = function() {
1709
+ $countTos.each(function() {
1710
+ var $this = $(this),
1711
+ delay = $this.data('delay') || 0;
1712
+ $this.waypoint(function() {
1713
+ setTimeout(function() {
1714
+ $this.countTo({
1715
+ onComplete: function() {
1716
+ $this.addClass('count-to-done');
1717
+ },
1718
+ formatter: function(value, options) {
1719
+ var v = value.toFixed(options.decimals);
1720
+ if (v == '-0') {
1721
+ v = '0';
1722
+ }
1723
+ return v;
1724
+ },
1725
+ });
1726
+ }, delay);
1727
+ this.destroy();
1728
+ }, {
1729
+ offset: '90%',
1730
+ });
1731
+ });
1732
+ };
1733
+ $document.themeLoadPlugin(["https://cdnjs.cloudflare.com/ajax/libs/jquery-countto/1.2.0/jquery.countTo.min.js"], [], function() {
1734
+ $document.includeWaypoints(function() {
1735
+ $document.isPageLoaderDone(themePluginCountToInit);
1736
+ });
1737
+ });
1738
+ }
1739
+ };
1740
+
1741
+
1742
+
1743
+ // Object of plugins to add to Globals.PLUGINS
1744
+ Globals.PLUGINS.themePluginCountDown = function(context) {
1745
+ // ----------------------------------------------------------------
1746
+ // Plugin: jQuery Countdown timer
1747
+ // @see: http://hilios.github.io/jQuery.countdown/
1748
+ // ----------------------------------------------------------------
1749
+ var $countdowns = context.find('[data-countdown]');
1750
+ if ($countdowns.length > 0) {
1751
+ var themePluginCountdownInit = function() {
1752
+ $countdowns.each(function() {
1753
+ var $this = $(this),
1754
+ countTo = $this.data('countdown'),
1755
+ countdownFormat = $this.data('countdown-format') || null,
1756
+ coundownExpireText = $this.data('countdown-expire-text') || null;
1757
+
1758
+ $this.countdown(countTo)
1759
+ .on('update.countdown', function(event) {
1760
+ if (countdownFormat === null) {
1761
+ countdownFormat = '%H hrs %M mins %S secs';
1762
+ if (event.offset.totalDays > 0) {
1763
+ countdownFormat = '%-d day%!d ' + countdownFormat;
1764
+ }
1765
+ if (event.offset.weeks > 0) {
1766
+ countdownFormat = '%-w week%!w ' + countdownFormat;
1767
+ }
1768
+ }
1769
+ $this.html(event.strftime(countdownFormat));
1770
+ })
1771
+ .on('finish.countdown', function(event) {
1772
+ if (coundownExpireText !== coundownExpireText) {
1773
+ $this.html(coundownExpireText);
1774
+ }
1775
+ $this.addClass('countdown-done');
1776
+ });
1777
+ });
1778
+ };
1779
+ $document.themeLoadPlugin(["https://cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.2.0/jquery.countdown.min.js"], [], themePluginCountdownInit);
1780
+ }
1781
+ };
1782
+
1783
+
1784
+
1785
+ // Object of plugins to add to Globals.PLUGINS
1786
+ Globals.PLUGINS.themePluginCubePortfolio = function(context) {
1787
+ // ----------------------------------------------------------------
1788
+ // Plugin: Cube Portfolio
1789
+ // @see: http://hilios.github.io/jQuery.countdown/
1790
+ // ----------------------------------------------------------------
1791
+ var $cubePortfolios = context.find('[data-toggle="cbp"]');
1792
+ var defaultSettings = {
1793
+ layoutMode: 'mosaic',
1794
+ sortToPreventGaps: true,
1795
+ defaultFilter: '*',
1796
+ animationType: 'slideDelay',
1797
+ gapHorizontal: 2,
1798
+ gapVertical: 2,
1799
+ gridAdjustment: 'responsive',
1800
+ mediaQueries: [{
1801
+ width: 1100,
1802
+ cols: 4
1803
+ }, {
1804
+ width: 800,
1805
+ cols: 3
1806
+ }, {
1807
+ width: 480,
1808
+ cols: 2
1809
+ }, {
1810
+ width: 0,
1811
+ cols: 1
1812
+ }],
1813
+ caption: 'zoom',
1814
+ displayTypeSpeed: 100,
1815
+ displayType: "sequentially",
1816
+
1817
+ // lightbox
1818
+ lightboxDelegate: '.cbp-lightbox',
1819
+ lightboxGallery: true,
1820
+ lightboxTitleSrc: 'data-title',
1821
+ lightboxCounter: '<div class="cbp-popup-lightbox-counter">{{current}} of {{total}}</div>',
1822
+
1823
+ // singlePageInline
1824
+ singlePageInlinePosition: 'top',
1825
+ singlePageInlineInFocus: true,
1826
+
1827
+ // singlePage
1828
+ singlePageAnimation: 'fade'
1829
+ };
1830
+ var themePluginCubePortfolioInit = function() {
1831
+ $cubePortfolios.each(function() {
1832
+ var $this = $(this),
1833
+ customSettings = $this.data('settings') || {},
1834
+ settings = $.extend({}, defaultSettings, customSettings);
1835
+
1836
+ $this.data('cbp-settings', settings);
1837
+ // Custom callbacks
1838
+ settings.singlePageInlineCallback = function(url, element) {
1839
+ var t = this,
1840
+ $this = $(t),
1841
+ $element = $(element),
1842
+ content = $element.data('content') || 'ajax',
1843
+ customNavButtons = function($html, t) {
1844
+ var customClose = $html.find('[data-cbp-close]') || null;
1845
+ if (customClose !== null) {
1846
+ $(t.wrap).addClass('has-custom-close');
1847
+ $(t.closeButton).hide();
1848
+ customClose.on('click', function() {
1849
+ t.close();
1850
+ });
1851
+ }
1852
+ };
1853
+
1854
+ // get content from ajax or inline HTML
1855
+ if (content !== 'ajax' && $(content).length > 0) {
1856
+ // Inline HTML
1857
+ var html = $(content).clone(true, true);
1858
+ html.themeRefresh();
1859
+ t.content.html('');
1860
+ t.content.append(html.contents());
1861
+ t.cubeportfolio.$obj.trigger('updateSinglePageInlineStart.cbp');
1862
+ t.singlePageInlineIsOpen.call(t);
1863
+ context.refreshWaypoints();
1864
+ } else if (content == 'ajax') {
1865
+ // Ajax
1866
+ $.ajax({
1867
+ url: url,
1868
+ type: 'GET',
1869
+ dataType: 'html',
1870
+ timeout: 30000
1871
+ })
1872
+ .done(function(result) {
1873
+ // overwritter updateSinglePageInline() so events work
1874
+ var html = $(result);
1875
+ html.themeRefresh();
1876
+ customNavButtons(html, t);
1877
+ t.content.html('');
1878
+ t.content.append(html);
1879
+ t.cubeportfolio.$obj.trigger('updateSinglePageInlineStart.cbp');
1880
+ //t.singlePageInlineIsOpen.call(t);
1881
+
1882
+ if ($document.imagesLoaded) {
1883
+ t.content.imagesLoaded(function() {
1884
+ // If inline has owlCarousel
1885
+ var $owl = t.content.find('[data-toggle="owl-carousel"]');
1886
+ $owl.on('translated.owl.carousel', function(event) {
1887
+ setTimeout(function() {
1888
+ t.resizeSinglePageInline();
1889
+ }, 200);
1890
+ });
1891
+
1892
+ setTimeout(function() {
1893
+ t.resizeSinglePageInline();
1894
+ t.singlePageInlineIsOpen.call(t);
1895
+ context.refreshWaypoints();
1896
+ }, 1000);
1897
+ });
1898
+ } else {
1899
+ setTimeout(function() {
1900
+ t.resizeSinglePageInline();
1901
+ t.singlePageInlineIsOpen.call(t);
1902
+ context.refreshWaypoints();
1903
+ }, 1000);
1904
+ }
1905
+ })
1906
+ .fail(function() {
1907
+ t.updateSinglePageInline('AJAX Error! Please refresh the page!');
1908
+ });
1909
+ } else {
1910
+ t.updateSinglePageInline('Content Error! Please refresh the page!');
1911
+ }
1912
+ };
1913
+ settings.singlePageCallback = function(url, element) {
1914
+ var t = this;
1915
+
1916
+ // Ajax
1917
+ $.ajax({
1918
+ url: url,
1919
+ type: 'GET',
1920
+ dataType: 'html',
1921
+ timeout: 30000
1922
+ })
1923
+ .done(function(result) {
1924
+ // overwrite updateSinglePageInline() so events work
1925
+ var html = $(result);
1926
+ html.themeRefresh();
1927
+ var counterMarkup,
1928
+ animationFinish,
1929
+ scripts, isWrap;
1930
+
1931
+ t.content.addClass('cbp-popup-content').removeClass('cbp-popup-content-basic');
1932
+ if (isWrap === false) {
1933
+ t.content.removeClass('cbp-popup-content').addClass('cbp-popup-content-basic');
1934
+ }
1935
+ // update counter navigation
1936
+ if (t.counter) {
1937
+ counterMarkup = $(t.getCounterMarkup(t.options.singlePageCounter, t.current + 1, t.counterTotal));
1938
+ t.counter.text(counterMarkup.text());
1939
+ }
1940
+ t.fromAJAX = {
1941
+ html: html,
1942
+ scripts: scripts
1943
+ };
1944
+ t.finishOpen--;
1945
+ if (t.finishOpen <= 0) {
1946
+ t.wrap.addClass('cbp-popup-ready');
1947
+ t.wrap.removeClass('cbp-popup-loading');
1948
+ t.content.html('');
1949
+ t.content.append(html);
1950
+ t.checkForSocialLinks(t.content);
1951
+ t.cubeportfolio.$obj.trigger('updateSinglePageComplete.cbp');
1952
+ }
1953
+ })
1954
+ .fail(function() {
1955
+ t.updateSinglePage('AJAX Error! Please refresh the page!');
1956
+ });
1957
+ };
1958
+
1959
+ $this.data('cbp-settings-full', settings);
1960
+
1961
+ // If imagesLoaded avaliable use it
1962
+ if ($document.imagesLoaded) {
1963
+ $this.imagesLoaded(function() {
1964
+ $this.cubeportfolio(settings);
1965
+ if (settings.filters) {
1966
+ $(settings.filters).addClass('cbp-loaded show');
1967
+ }
1968
+ $this.addClass('cbp-loaded show');
1969
+
1970
+ if (settings.loader) {
1971
+ $(settings.loader).addClass('cbp-loaded loaded');
1972
+ }
1973
+
1974
+ // Refresh waypoints
1975
+ context.refreshWaypoints();
1976
+ });
1977
+ }
1978
+ });
1979
+ };
1980
+
1981
+
1982
+ // @todo - Config builder
1983
+ // @todo - live preview
1984
+ /*var $cbpDemo = $('[data-cbp-demo]') || null;
1985
+ if ($cbpDemo.length > 0) {
1986
+ var buildSettings = {};
1987
+ var $target = $cbpDemo.data('cbp-demo') !== null ? $($cbpDemo.data('cbp-demo')) : null;
1988
+ var $configElements = $('[data-cbp-demo-option]') || null;
1989
+ var $configOutput = $cbpDemo.data('cbp-demo-config') !== null ? $($cbpDemo.data('cbp-demo-config')) : null;
1990
+ var buildConfigOutput = function($configOutput, s) {
1991
+ if ($configOutput.length > 0) {
1992
+ var JSONString = "data-settings='"+ JSON.stringify(s) +"'";
1993
+ $configOutput.html(JSONString);
1994
+ }
1995
+ };
1996
+
1997
+ buildConfigOutput($configOutput, buildSettings);
1998
+
1999
+ $cbpDemo.on('click', function() {
2000
+ // Build settings object
2001
+ buildSettings = {};
2002
+ $configElements.each(function() {
2003
+ var $config = $(this);
2004
+ var value = $config.val();
2005
+ var option = $config.data('cbp-demo-option');
2006
+ buildSettings[option] = value;
2007
+ });
2008
+ buildConfigOutput($configOutput, buildSettings);
2009
+ });
2010
+ } */
2011
+
2012
+ if ($cubePortfolios.length > 0) {
2013
+ $document.themeLoadPlugin(
2014
+ ["https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js", "cubeportfolio-jquery-plugin/cubeportfolio/js/jquery.cubeportfolio.min.js"], ["plugin-css/plugin-magnific-popup.min.css", "plugin-css/plugin-cube-portfolio.min.css", "cubeportfolio-jquery-plugin/cubeportfolio/css/cubeportfolio.min.css"],
2015
+ themePluginCubePortfolioInit
2016
+ );
2017
+ }
2018
+ };
2019
+
2020
+ // Object of plugins to add to Globals.PLUGINS
2021
+ Globals.PLUGINS.themePluginDropdown = function(context) {
2022
+ // ----------------------------------------------------------------
2023
+ // Plugin: Bootstrap Hover Dropdown
2024
+ // @see: https://github.com/CWSpear/bootstrap-hover-dropdown
2025
+ // ----------------------------------------------------------------
2026
+ var $dropdowns = context.find('[data-hover="dropdown"]');
2027
+ if ($dropdowns.length > 0) {
2028
+ $document.themeLoadPlugin(["bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"], [], null, 'append');
2029
+ }
2030
+ };
2031
+
2032
+
2033
+
2034
+ // Object of plugins to add to Globals.PLUGINS
2035
+ Globals.PLUGINS.themePluginFakeLoader = function(context) {
2036
+ // ----------------------------------------------------------------
2037
+ // fakeLoader.js - page loading indicator/icon
2038
+ // @see: http://joaopereirawd.github.io/fakeLoader.js/
2039
+ // NOTE: This can effect SEO
2040
+ // ----------------------------------------------------------------
2041
+ var $fakeLoaders = context.find('[data-toggle=page-loader]');
2042
+ if ($fakeLoaders.length > 0) {
2043
+ $('html').addClass('has-page-loader');
2044
+
2045
+ var themePluginFakeLoaderInit = function() {
2046
+ var $pageLoader = jQuery('[data-toggle=page-loader]'),
2047
+ options = {
2048
+ zIndex: 9999999,
2049
+ spinner: $pageLoader.data('spinner') || 'spinner6',
2050
+ timeToHide: 1000
2051
+ };
2052
+ $pageLoader.fakeLoader(options);
2053
+ //$('body').removeClass('page-loader-spacer');
2054
+
2055
+ $document.isPageLoaderDone(function() {
2056
+ $('html').removeClass('has-page-loader');
2057
+ $(window).trigger('resize');
2058
+ });
2059
+ };
2060
+ $document.themeLoadPlugin(["fakeLoader/fakeLoader.min.js"], ["fakeLoader/fakeLoader.css"], themePluginFakeLoaderInit);
2061
+ }
2062
+ };
2063
+
2064
+
2065
+
2066
+ // Object of plugins to add to Globals.PLUGINS
2067
+ Globals.PLUGINS.themePluginFitVids = function(context) {
2068
+ // ----------------------------------------------------------------
2069
+ // Plugin: FitVids.js
2070
+ // @see: http://fitvidsjs.com/
2071
+ // ----------------------------------------------------------------
2072
+ var selectors = [
2073
+ "iframe[src*='player.vimeo.com']",
2074
+ "iframe[src*='youtube.com']",
2075
+ "iframe[src*='youtube-nocookie.com']",
2076
+ "iframe[src*='kickstarter.com'][src*='video.html']",
2077
+ "object",
2078
+ "embed"
2079
+ ];
2080
+ var $fitVids = context.find(selectors.join(','));
2081
+ if ($fitVids.length > 0) {
2082
+ var themePluginFitVidsInit = function() {
2083
+ $('body').fitVids({
2084
+ ignore: '.no-fitvids'
2085
+ });
2086
+ };
2087
+ $document.themeLoadPlugin(["fitvidsjs/jquery.fitvids.js"], [], themePluginFitVidsInit);
2088
+ }
2089
+ };
2090
+
2091
+
2092
+
2093
+ // Object of plugins to add to Globals.PLUGINS
2094
+ Globals.PLUGINS.themePluginFixTo = function(context) {
2095
+ // ----------------------------------------------------------------
2096
+ // Plugin: fixto(sticky navbar)
2097
+ // @see: https://bbarakaci.github.io/fixto/
2098
+ // ----------------------------------------------------------------
2099
+ var $fixTos = context.find('[data-toggle=clingify], [data-toggle=sticky]');
2100
+ if ($fixTos.length > 0) {
2101
+ var themePluginFixToInit = function() {
2102
+ var stickySetSettings = function(sticky) {
2103
+ var stickySettings = {};
2104
+ stickySettings = sticky.data('settings') || {};
2105
+ stickySettings.className = 'is-sticky';
2106
+ stickySettings.useNativeSticky = false;
2107
+ sticky.data('stickSettings', stickySettings);
2108
+ return stickySettings;
2109
+ };
2110
+
2111
+ /*! Computed Style - v0.1.0 - 2012-07-19
2112
+ * https://github.com/bbarakaci/computed-style
2113
+ * Copyright (c) 2012 Burak Barakaci; Licensed MIT */
2114
+ var computedStyle = (function() {
2115
+ var computedStyle = {
2116
+ getAll: function(element) {
2117
+ return document.defaultView.getComputedStyle(element);
2118
+ },
2119
+ get: function(element, name) {
2120
+ return this.getAll(element)[name];
2121
+ },
2122
+ toFloat: function(value) {
2123
+ return parseFloat(value, 10) || 0;
2124
+ },
2125
+ getFloat: function(element, name) {
2126
+ return this.toFloat(this.get(element, name));
2127
+ },
2128
+ _getAllCurrentStyle: function(element) {
2129
+ return element.currentStyle;
2130
+ }
2131
+ };
2132
+
2133
+ if (document.documentElement.currentStyle) {
2134
+ computedStyle.getAll = computedStyle._getAllCurrentStyle;
2135
+ }
2136
+
2137
+ return computedStyle;
2138
+
2139
+ }());
2140
+
2141
+ // Overwrite fixTo function
2142
+ var fixToProto = fixto.FixToContainer.prototype;
2143
+ $.extend(fixto.FixToContainer.prototype, {
2144
+ _shouldFix: function() {
2145
+ var _sticky = this._$child;
2146
+ var _stickySettings = _sticky.data('stickSettings');
2147
+ var _stickyTopOffset = _sticky.topOffset || 0;
2148
+ var _stickyPersist = _stickySettings.persist || false;
2149
+ var _sticking = _sticky.data('sticking') || false;
2150
+ var _unsticking = _sticky.data('unsticking') || false;
2151
+
2152
+ if (_stickyPersist) {
2153
+ return true;
2154
+ }
2155
+
2156
+ // Already at the top
2157
+ var _scroll = $(window).scrollTop();
2158
+ var _isStickyHeader = _sticky.find('.header');
2159
+ if (_isStickyHeader && _scroll === 0 && _unsticking === false) {
2160
+ return false;
2161
+ }
2162
+
2163
+ var _top = (this._fullOffset('offsetTop', this.child) - this.options.top - this._mindtop()) + _stickyTopOffset;
2164
+ if (this._scrollTop < this._parentBottom && this._scrollTop > _top) {
2165
+ if (this.options.mindViewport && !this._isViewportAvailable() && _unsticking === false) {
2166
+ return false;
2167
+ }
2168
+
2169
+ if (_sticking === false) {
2170
+ return true;
2171
+ }
2172
+ }
2173
+ }
2174
+ });
2175
+
2176
+ var stickyStart = function(sticky, state) {
2177
+ var stickySettings = stickySetSettings(sticky);
2178
+ var stickyParent = stickySettings.parent || 'body';
2179
+ var stickyPersist = stickySettings.persist || false;
2180
+ var stickyDelay = stickySettings.delay || false;
2181
+ var stickyBreakpoint = stickySettings.breakpoint || false;
2182
+ var isStickyHeader = sticky.find('.header') || false;
2183
+ var $window = $(window);
2184
+ state = state || 'init';
2185
+
2186
+ if (isStickyHeader) {
2187
+ sticky.wrapInner('<div class="sticky-inner"></div>');
2188
+ }
2189
+
2190
+ // Init
2191
+ sticky.addClass('sticky').fixTo(stickyParent, stickySettings);
2192
+
2193
+ // Sticky from the start - @todo
2194
+ if (stickyPersist) {
2195
+ stickySetPersist(sticky, stickySettings);
2196
+ }
2197
+
2198
+ $window.on('scroll', function() {
2199
+ // Make header unsticky when at the top
2200
+ var scroll = $(window).scrollTop();
2201
+ if (isStickyHeader && scroll === 0) {
2202
+ if (sticky.data('fixto-instance') !== '') {
2203
+ sticky.fixTo('refresh');
2204
+ }
2205
+ }
2206
+ });
2207
+
2208
+ $window.on('resize', function() {
2209
+ setTimeout(function() {
2210
+ if (stickyBreakpoint) {
2211
+ if ($(window).width() <= stickyBreakpoint) {
2212
+ sticky.fixTo('destroy');
2213
+ sticky.data('fixto-instance', '');
2214
+ sticky.removeClass('is-sticky-persist');
2215
+ } else {
2216
+ if (sticky.data('fixto-instance') === '') {
2217
+ sticky.addClass('sticky').fixTo(stickyParent, sticky.data('stickSettings'));
2218
+ }
2219
+ }
2220
+ }
2221
+
2222
+ if (stickyPersist) {
2223
+ stickySetPersist(sticky, stickySettings);
2224
+ }
2225
+ }, 400);
2226
+ });
2227
+
2228
+ $window.on('orientationchange', function() {
2229
+ if (isStickyHeader) {
2230
+ if (sticky.data('fixto-instance') !== '') {
2231
+ setTimeout(function() {
2232
+ sticky.fixTo('refresh');
2233
+ }, 400);
2234
+ }
2235
+ }
2236
+ });
2237
+ };
2238
+
2239
+ var stickySetPersist = function(sticky, stickySettings) {
2240
+ sticky.addClass('is-sticky-persist');
2241
+ var stickyInstance = sticky.data('fixto-instance') || null;
2242
+
2243
+ var persistTop = sticky.prev()[0].getBoundingClientRect().top + $(window).scrollTop();
2244
+ if (persistTop < 0) {
2245
+ persistTop = 0;
2246
+ }
2247
+
2248
+ if (stickySettings.mind !== '') {
2249
+ $(stickySettings.mind).each(function(key, value) {
2250
+ var $this = $(value);
2251
+ if ($this.length > 0) {
2252
+ persistTop -= $this.outerHeight();
2253
+ }
2254
+ });
2255
+ }
2256
+ if (stickyInstance !== null) {
2257
+ stickyInstance.fixed = true;
2258
+ sticky.data('fixto-instance', stickyInstance);
2259
+ sticky.fixTo('setOptions', {
2260
+ top: persistTop
2261
+ });
2262
+ } else {
2263
+ sticky.attr('style', 'top: auto;');
2264
+ }
2265
+ };
2266
+
2267
+ $fixTos.each(function(i) {
2268
+ stickyStart($(this));
2269
+ });
2270
+ };
2271
+ $document.themeLoadPlugin(
2272
+ ["https://cdnjs.cloudflare.com/ajax/libs/fixto/0.5.0/fixto.js"], ["plugin-css/plugin-sticky-classes.min.css"],
2273
+ themePluginFixToInit
2274
+ );
2275
+ }
2276
+ };
2277
+
2278
+
2279
+
2280
+ // Object of plugins to add to Globals.PLUGINS
2281
+ Globals.PLUGINS.themePluginFlexslider = function(context) {
2282
+ // ----------------------------------------------------------------
2283
+ // Plugin: flexslider
2284
+ // @see: http://www.woothemes.com/flexslider/
2285
+ //
2286
+ // To be deprecated in AppStrap 3.0.14
2287
+ // ----------------------------------------------------------------
2288
+ var $flexsliders = context.find('.flexslider');
2289
+ if ($flexsliders.length > 0) {
2290
+ var themePluginFlexsliderInit = function() {
2291
+ $flexsliders.each(function() {
2292
+ var sliderSettings = {
2293
+ animation: jQuery(this).attr('data-transition'),
2294
+ selector: ".slides > .slide",
2295
+ controlNav: true,
2296
+ smoothHeight: true,
2297
+ start: function(slider) {
2298
+ //hide all animated elements
2299
+ slider.find('[data-animate-in]').each(function() {
2300
+ jQuery(this).css('visibility', 'hidden');
2301
+ });
2302
+
2303
+ //slide backgrounds
2304
+ slider.find('.slide-bg').each(function() {
2305
+ jQuery(this).css({
2306
+ 'background-image': 'url(' + jQuery(this).data('bg-img') + ')'
2307
+ });
2308
+ jQuery(this).css('visibility', 'visible').addClass('animated').addClass(jQuery(this).data('animate-in'));
2309
+ });
2310
+
2311
+ //animate in first slide
2312
+ slider.find('.slide').eq(1).find('[data-animate-in]').each(function() {
2313
+ jQuery(this).css('visibility', 'hidden');
2314
+ if (jQuery(this).data('animate-delay')) {
2315
+ jQuery(this).addClass(jQuery(this).data('animate-delay'));
2316
+ }
2317
+ if (jQuery(this).data('animate-duration')) {
2318
+ jQuery(this).addClass(jQuery(this).data('animate-duration'));
2319
+ }
2320
+ jQuery(this).css('visibility', 'visible').addClass('animated').addClass(jQuery(this).data('animate-in'));
2321
+ jQuery(this).one('webkitAnimationEnd oanimationend msAnimationEnd animationend',
2322
+ function() {
2323
+ jQuery(this).removeClass(jQuery(this).data('animate-in'));
2324
+ }
2325
+ );
2326
+ });
2327
+ },
2328
+ before: function(slider) {
2329
+ slider.find('.slide-bg').each(function() {
2330
+ jQuery(this).removeClass(jQuery(this).data('animate-in')).removeClass('animated').css('visibility', 'hidden');
2331
+ });
2332
+
2333
+ //hide next animate element so it can animate in
2334
+ slider.find('.slide').eq(slider.animatingTo + 1).find('[data-animate-in]').each(function() {
2335
+ jQuery(this).css('visibility', 'hidden');
2336
+ });
2337
+ },
2338
+ after: function(slider) {
2339
+ //hide animtaed elements so they can animate in again
2340
+ slider.find('.slide').find('[data-animate-in]').each(function() {
2341
+ jQuery(this).css('visibility', 'hidden');
2342
+ });
2343
+
2344
+ //animate in next slide
2345
+ slider.find('.slide').eq(slider.animatingTo + 1).find('[data-animate-in]').each(function() {
2346
+ if (jQuery(this).data('animate-delay')) {
2347
+ jQuery(this).addClass(jQuery(this).data('animate-delay'));
2348
+ }
2349
+ if (jQuery(this).data('animate-duration')) {
2350
+ jQuery(this).addClass(jQuery(this).data('animate-duration'));
2351
+ }
2352
+ jQuery(this).css('visibility', 'visible').addClass('animated').addClass(jQuery(this).data('animate-in'));
2353
+ jQuery(this).one('webkitAnimationEnd oanimationend msAnimationEnd animationend',
2354
+ function() {
2355
+ jQuery(this).removeClass(jQuery(this).data('animate-in'));
2356
+ }
2357
+ );
2358
+ });
2359
+
2360
+ $(window).trigger('resize');
2361
+
2362
+ }
2363
+ };
2364
+
2365
+ var sliderNav = jQuery(this).attr('data-slidernav');
2366
+ if (sliderNav !== 'auto') {
2367
+ sliderSettings = $.extend({}, sliderSettings, {
2368
+ manualControls: sliderNav + ' li a',
2369
+ controlsContainer: '.flexslider-wrapper'
2370
+ });
2371
+ }
2372
+
2373
+ jQuery('html').addClass('has-flexslider');
2374
+ jQuery(this).flexslider(sliderSettings);
2375
+ jQuery('.flexslider').resize(); //make sure height is right load assets loaded
2376
+ });
2377
+ };
2378
+ $document.themeLoadPlugin(["flexslider/jquery.flexslider-min.js"], ["plugin-css/plugin-flexslider.min.css", "flexslider/flexslider.css"], themePluginFlexsliderInit);
2379
+ }
2380
+ };
2381
+
2382
+
2383
+
2384
+ // Object of plugins to add to Globals.PLUGINS
2385
+ Globals.PLUGINS.themePluginHighlightJS = function(context) {
2386
+ // ----------------------------------------------------------------
2387
+ // Plugin: highlightjs (code highlighting)
2388
+ // @see: https://highlightjs.org
2389
+ // ----------------------------------------------------------------
2390
+ var $highlightJSs = context.find('code');
2391
+ if ($highlightJSs.length > 0) {
2392
+ var themePluginHighlightJSInit = function() {
2393
+ $('pre code').each(function(i, block) {
2394
+ hljs.highlightBlock(block);
2395
+ });
2396
+ };
2397
+ $document.themeLoadPlugin(
2398
+ ["https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"], ["https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css"],
2399
+ themePluginHighlightJSInit
2400
+ );
2401
+ }
2402
+ };
2403
+
2404
+
2405
+
2406
+ // Object of plugins to add to Globals.PLUGINS
2407
+ Globals.PLUGINS.themePluginIsotope = function(context) {
2408
+ // ----------------------------------------------------------------
2409
+ // Plugin: Isotope (blog/customers grid & sorting)
2410
+ // @see: http://isotope.metafizzy.co/
2411
+ // Also loads plugin: Imagesloaded (utility for Isotope plugin)
2412
+ // @see: https://github.com/desandro/imagesloaded
2413
+ // ----------------------------------------------------------------
2414
+ var $isoTopes = context.find('[data-toggle=isotope-grid]');
2415
+ if ($isoTopes.length > 0) {
2416
+ var themePluginIsotopeInit = function() {
2417
+ $isoTopes.each(function() {
2418
+ var $container = $(this),
2419
+ options = $container.data('isotope-options'),
2420
+ filters = $container.data('isotope-filter') || null;
2421
+
2422
+
2423
+ // If imagesLoaded avaliable use it
2424
+ if ($document.imagesLoaded) {
2425
+ $container.imagesLoaded(function() {
2426
+ $container.isotope(options);
2427
+ });
2428
+ } else {
2429
+ $container.isotope(options);
2430
+ }
2431
+
2432
+ // Filtering
2433
+ if (filters !== null) {
2434
+ var $filters = $(filters);
2435
+ $filters.on('click', function(e) {
2436
+ e.preventDefault();
2437
+ $filters.removeClass('active');
2438
+ var $this = $(this),
2439
+ filterValue = $this.data('isotope-fid') || null;
2440
+
2441
+ if (filterValue) {
2442
+ $this.addClass('active');
2443
+ $container.isotope({
2444
+ filter: filterValue
2445
+ });
2446
+ }
2447
+
2448
+ return false;
2449
+ });
2450
+ }
2451
+
2452
+ $('body').addClass('has-isotope');
2453
+ });
2454
+ };
2455
+ $document.themeLoadPlugin(
2456
+ ["https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js", "https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"], [], themePluginIsotopeInit
2457
+ );
2458
+ }
2459
+ };
2460
+
2461
+
2462
+
2463
+ // Object of plugins to add to Globals.PLUGINS
2464
+ Globals.PLUGINS.themePluginMagnificPopup = function(context) {
2465
+ // ----------------------------------------------------------------
2466
+ // Plugin: MagnificPopup (popup content)
2467
+ // @see: http://dimsemenov.com/plugins/magnific-popup/
2468
+ // ----------------------------------------------------------------
2469
+ var $magnificPopups = context.find('[data-toggle="magnific-popup"]');
2470
+ if ($magnificPopups.length > 0) {
2471
+ var themePluginMagnificPopupInit = function() {
2472
+ var magnificPopupSettingsDefault = {
2473
+ disableOn: 0,
2474
+ key: null,
2475
+ midClick: false,
2476
+ mainClass: 'mfp-fade-zoom',
2477
+ preloader: true,
2478
+ focus: '', // CSS selector of input to focus after popup is opened
2479
+ closeOnContentClick: false,
2480
+ closeOnBgClick: true,
2481
+ closeBtnInside: true,
2482
+ showCloseBtn: true,
2483
+ enableEscapeKey: true,
2484
+ modal: false,
2485
+ alignTop: false,
2486
+ removalDelay: 300,
2487
+ prependTo: null,
2488
+ fixedContentPos: 'auto',
2489
+ fixedBgPos: 'auto',
2490
+ overflowY: 'auto',
2491
+ closeMarkup: '<button title="%title%" type="button" class="mfp-close">&times;</button>',
2492
+ tClose: 'Close (Esc)',
2493
+ tLoading: 'Loading...',
2494
+ type: 'image',
2495
+ image: {
2496
+ titleSrc: 'data-title',
2497
+ verticalFit: true
2498
+ }
2499
+ };
2500
+
2501
+ $magnificPopups.each(function() {
2502
+ var magnificPopupSettings;
2503
+ var magnificPopupSettingsExtras = {};
2504
+ var $this = $(this);
2505
+ var magnificPopupItems = $this.data('magnific-popup-items') || null;
2506
+
2507
+ if ($this.data('magnific-popup-settings') !== '') {
2508
+ magnificPopupSettingsExtras = $this.data('magnific-popup-settings');
2509
+ }
2510
+ magnificPopupSettings = jQuery.extend(magnificPopupSettingsDefault, magnificPopupSettingsExtras);
2511
+
2512
+ // Pass items on a single item ie. a "View Gallery" button
2513
+ if (magnificPopupItems !== null) {
2514
+ var items = [];
2515
+ $.each(magnificPopupItems.split(','), function(k, img) {
2516
+ items.push({
2517
+ "src": img
2518
+ });
2519
+ });
2520
+ magnificPopupSettings.items = items;
2521
+ magnificPopupSettings.gallery.enabled = true;
2522
+ magnificPopupSettings.type = 'image';
2523
+ magnificPopupSettings.delegate = null;
2524
+ }
2525
+
2526
+ $this.magnificPopup(magnificPopupSettings);
2527
+
2528
+ // Transitions
2529
+ var mfpImgLoadedClass = 'mfp-image-in';
2530
+ $this.on('mfpOpen', function(e /*, params */ ) {
2531
+ $.magnificPopup.instance.next = function() {
2532
+ var self = this;
2533
+ self.wrap.removeClass(mfpImgLoadedClass);
2534
+ setTimeout(function() {
2535
+ $.magnificPopup.proto.next.call(self);
2536
+ }, 120);
2537
+ };
2538
+ $.magnificPopup.instance.prev = function() {
2539
+ var self = this;
2540
+ self.wrap.removeClass(mfpImgLoadedClass);
2541
+ setTimeout(function() {
2542
+ $.magnificPopup.proto.prev.call(self);
2543
+ }, 120);
2544
+ };
2545
+ }).on('mfpImageLoadComplete', function() {
2546
+ var $that = $.magnificPopup.instance;
2547
+ setTimeout(function() {
2548
+ $that.wrap.addClass(mfpImgLoadedClass);
2549
+ }, 10);
2550
+ });
2551
+ });
2552
+ };
2553
+ $document.themeLoadPlugin(
2554
+ ["magnific-popup/dist/jquery.magnific-popup.min.js"], ["plugin-css/plugin-magnific-popup.min.css", "magnific-popup/dist/magnific-popup.css"],
2555
+ themePluginMagnificPopupInit
2556
+ );
2557
+ }
2558
+ };
2559
+
2560
+
2561
+
2562
+ // Object of plugins to add to Globals.PLUGINS
2563
+ Globals.PLUGINS.themePluginNiceScroll = function(context) {
2564
+ // ----------------------------------------------------------------
2565
+ // Plugin: Custom Scrollbar
2566
+ // @see: https://github.com/inuyaksa/jquery.nicescroll
2567
+ // ----------------------------------------------------------------
2568
+ var $scrollbars = context.find('[data-toggle="scrollbar"]');
2569
+ if ($scrollbars.length > 0) {
2570
+ var themePluginCustomScrollbarInit = function() {
2571
+ $scrollbars.each(function() {
2572
+ var $this = $(this);
2573
+ var settings = $this.data('settings') || {
2574
+ "emulatetouch": true
2575
+ };
2576
+ $this.niceScroll(settings);
2577
+ });
2578
+ };
2579
+
2580
+ $document.themeLoadPlugin(
2581
+ ["https://cdnjs.cloudflare.com/ajax/libs/jquery.nicescroll/3.7.6/jquery.nicescroll.min.js"], [],
2582
+ themePluginCustomScrollbarInit
2583
+ );
2584
+ }
2585
+ };
2586
+
2587
+
2588
+
2589
+ // Object of plugins to add to Globals.PLUGINS
2590
+ Globals.PLUGINS.themePluginOffCanvas = function(context) {
2591
+ // ----------------------------------------------------------------
2592
+ // Plugin: Off Canvas
2593
+ // data-toggle=off-canvas must be present in HTML
2594
+ // @see: http://offcanvas.vasilis.co/index.html
2595
+ // ----------------------------------------------------------------
2596
+ var $offCanvass = context.find('[data-toggle="jpanel-menu"],[data-toggle="off-canvas"]');
2597
+ if ($offCanvass.length > 0) {
2598
+ var themePluginOffCanvasInit = function() {
2599
+ var $bodyWrap = $('<div class="c-offcanvas-content-wrap"></div>');
2600
+ var $sideBarWrap = $('<aside class="js-offcanvas"></aisde>');
2601
+ var $excludedContent = $('.jpanel-menu-exclude,.js-off-canvas-exclude,.modal,.colour-switcher') || null;
2602
+ $('body').wrapInner($bodyWrap);
2603
+
2604
+ // Move any excluded content outside wrapper (.c-offcanvas-content-wrap)
2605
+ if ($excludedContent) {
2606
+ $excludedContent.appendTo('body');
2607
+ }
2608
+
2609
+ var defaultSettings = {
2610
+ modifiers: 'right,reveal',
2611
+ resize: true,
2612
+ modal: true,
2613
+ cloneTarget: true,
2614
+ modalClassExtras: "overlay overlay-dark overlay-op-4 overlay-close-cursor",
2615
+ targetClassExtras: ""
2616
+ };
2617
+
2618
+ var enforcedSettings = {
2619
+ modalClass: "c-offcanvas-bg",
2620
+ contentClass: 'c-offcanvas-content-wrap',
2621
+ onInit: function() {
2622
+ var $oc = $(this);
2623
+ var dataOffcanvas = $oc.data('offcanvas-component');
2624
+ var settings = dataOffcanvas.options;
2625
+
2626
+ if (settings.modalClassExtras && settings.modal) {
2627
+ // Add extra classes
2628
+ dataOffcanvas.$modal.addClass(settings.modalClassExtras);
2629
+ }
2630
+ if (settings.targetClassExtras) {
2631
+ // Add extra classes
2632
+ dataOffcanvas.$element.addClass(settings.targetClassExtras);
2633
+ }
2634
+ if (settings.autoOpen) {
2635
+ // Auto open
2636
+ dataOffcanvas.open();
2637
+ }
2638
+ },
2639
+ onClose: function() {
2640
+ // Toggle bug, reopen target
2641
+ var targetReopen = $(document).data('target-reopen') || false;
2642
+ if (targetReopen) {
2643
+ setTimeout(function() {
2644
+ $(document).data('target-reopen', false);
2645
+ targetReopen.data('offcanvas-component').open();
2646
+ }, 500);
2647
+ }
2648
+ }
2649
+ }
2650
+
2651
+ $offCanvass.each(function() {
2652
+ var $offCanvas = $(this);
2653
+ var uniqid = Date.now();
2654
+ var target = $offCanvas.data('target');
2655
+ var $target = target ? $(target) : null;
2656
+ var customSettings = $offCanvas.data('settings') || {};
2657
+ var settings = $.extend({}, defaultSettings, customSettings, enforcedSettings);
2658
+ var targetID;
2659
+ var targetClasses = 'js-offcanvas-target js-offcanvas-target-' + uniqid;
2660
+
2661
+ $offCanvas.addClass('js-offcanvas-trigger js-offcanvas-trigger-' + uniqid);
2662
+ settings.triggerButton = '.js-offcanvas-trigger-' + uniqid;
2663
+
2664
+ if ($target) {
2665
+ // Target must have ID
2666
+ if (typeof $target.attr('id') === 'undefined') {
2667
+ targetID = 'js-offcanvas-target-' + uniqid;
2668
+ } else {
2669
+ targetID = $target.attr('id');
2670
+ }
2671
+
2672
+ if (settings.cloneTarget) {
2673
+ // clone target not move
2674
+ targetID += '-clone';
2675
+ var $targetClone = $target.clone(true);
2676
+ $sideBarWrap.addClass(targetClasses + ' js-offcanvas-target-clone').attr('id', targetID).append($targetClone).appendTo('body');
2677
+ $target = $sideBarWrap;
2678
+ } else {
2679
+ // Move outside of wrap
2680
+ $target.hide();
2681
+ $target.attr('id', targetID).addClass(targetClasses).appendTo('body').show();
2682
+ }
2683
+
2684
+ $offCanvas.data('offcanvas-trigger', targetID);
2685
+ $offCanvas.data('offcanvas-target', $target);
2686
+
2687
+ settings.offcanvas = targetID;
2688
+ settings.$trigger = $offCanvas;
2689
+ $offCanvas.data('js-offcanvas-settings', settings);
2690
+ $target.offcanvas(settings);
2691
+
2692
+ // Toggle bug if already open
2693
+ $offCanvas.off("click");
2694
+ $offCanvas.on("click", function(e) {
2695
+ // Item already open, close it & init opening again
2696
+ var $this = $(this);
2697
+ var $target = $this.data('offcanvas-target');
2698
+ var $targets = $('.js-offcanvas-target');
2699
+ var targetOpen = $target.hasClass('is-open') || false;
2700
+ var targetDataOffcanvas = $target.data('offcanvas-component');
2701
+
2702
+ if ($('body').hasClass('has-offcanvas--visible')) {
2703
+ // Already open
2704
+ if (!targetOpen) {
2705
+ $(document).data('target-reopen', $target);
2706
+ }
2707
+ $targets.each(function() {
2708
+ var $that = $(this);
2709
+ var tDataOffcanvas = $that.data('offcanvas-component');
2710
+ tDataOffcanvas.close();
2711
+ });
2712
+ return false;
2713
+ } else {
2714
+ // Fire defaults
2715
+ targetDataOffcanvas.open();
2716
+ }
2717
+ });
2718
+ }
2719
+ });
2720
+ };
2721
+
2722
+ $document.themeLoadPlugin(
2723
+ ["https://unpkg.com/js-offcanvas@1.2.8/dist/_js/js-offcanvas.pkgd.js"], ["https://unpkg.com/js-offcanvas@1.2.8/dist/_css/prefixed/js-offcanvas.css", "plugin-css/plugin-offcanvas.min.css"],
2724
+ themePluginOffCanvasInit
2725
+ );
2726
+ }
2727
+ };
2728
+
2729
+
2730
+
2731
+ // Object of plugins to add to Globals.PLUGINS
2732
+ Globals.PLUGINS.themePluginOwlCarousel = function(context) {
2733
+ // ----------------------------------------------------------------
2734
+ // Plugin: OwlCarousel (carousel displays)
2735
+ // @see: http://owlgraphic.com/owlcarousel/
2736
+ // ----------------------------------------------------------------
2737
+ var $owlCarousels = context.find('[data-toggle="owl-carousel"]');
2738
+ var $owlCarouselThumbs = context.find('[data-owl-carousel-thumbs]');
2739
+ if ($owlCarousels.length > 0) {
2740
+ var themePluginOwlCarouselInit = function(context) {
2741
+ $owlCarousels.each(function() {
2742
+ var $owlCarousel = $(this),
2743
+ owlCarouselSettings = $owlCarousel.data('owl-carousel-settings') || null;
2744
+
2745
+ $owlCarousel.addClass('owl-carousel').owlCarousel(owlCarouselSettings);
2746
+ });
2747
+
2748
+ $owlCarouselThumbs.each(function() {
2749
+ var $owlThumbsWrap = $(this),
2750
+ $owlThumbs = $owlThumbsWrap.find('.owl-thumb'),
2751
+ $owlTarget = $($owlThumbsWrap.data('owl-carousel-thumbs')) || null,
2752
+ owlThumbsCarousel = $owlThumbsWrap.data('toggle') !== '' && $owlThumbsWrap.data('toggle') == 'owl-carousel' || false;
2753
+
2754
+ if ($owlTarget) {
2755
+ $owlThumbsWrap.find('owl-item').removeClass('active');
2756
+ $owlThumbs.removeClass('active');
2757
+ $owlThumbs.eq(0).addClass('active');
2758
+ $owlThumbs.on('click', function(event) {
2759
+ $owlTarget.trigger('to.owl.carousel', [$(this).parent().index(), 300, true]);
2760
+
2761
+ });
2762
+ if (owlThumbsCarousel) {
2763
+ $owlThumbsWrap.owlCarousel();
2764
+ }
2765
+
2766
+ // Owl API
2767
+ $owlTarget.owlCarousel();
2768
+ $owlTarget.on('changed.owl.carousel', function(event) {
2769
+ var item = event.item.index;
2770
+ $owlThumbs.removeClass('active');
2771
+ $owlThumbs.eq(item).addClass('active');
2772
+
2773
+ if (owlThumbsCarousel) {
2774
+ if (event.namespace && event.property.name === 'position') {
2775
+ var target = event.relatedTarget.relative(event.property.value, true);
2776
+ $owlThumbsWrap.owlCarousel('to', target, 300, true);
2777
+ }
2778
+ }
2779
+ });
2780
+ }
2781
+ });
2782
+ };
2783
+ $document.themeLoadPlugin(
2784
+ ["https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/owl.carousel.min.js"], ["plugin-css/plugin-owl-carousel.min.css", "https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.carousel.min.css", "https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"],
2785
+ themePluginOwlCarouselInit
2786
+ );
2787
+ }
2788
+ };
2789
+
2790
+
2791
+
2792
+ // Object of plugins to add to Globals.PLUGINS
2793
+ Globals.PLUGINS.themePluginSliderRevolution = function(context) {
2794
+ // ----------------------------------------------------------------
2795
+ // Plugin: Slider Revolution
2796
+ // @see: http://codecanyon.net/item/slider-revolution-responsive-jquery-plugin/2580848
2797
+ // ----------------------------------------------------------------
2798
+ var SLIDER_REV_VERSION = '5.4.4';
2799
+ $sliderRevolutions = context.find('[data-toggle=slider-rev]');
2800
+ if ($sliderRevolutions.length > 0) {
2801
+ var themePluginSliderRevolutionInit = function() {
2802
+ if ($sliderRevolutions.length === 0) {
2803
+ $sliderRevolutions = context.find('[data-toggle=slider-rev]');
2804
+ }
2805
+
2806
+ $sliderRevolutions.each(function() {
2807
+ var sliderRevEl = $(this);
2808
+ var customInit = sliderRevEl.data('custom-init') || false;
2809
+ sliderRevEl.data('version', SLIDER_REV_VERSION);
2810
+
2811
+ var slides = sliderRevEl.find('li') || 0;
2812
+ var pluginsLocation = $document.getScriptLocation();
2813
+ var sliderRevSettingsDefaults = {
2814
+ extensions: 'slider-revolution/revolution/js/extensions/',
2815
+ jsFileLocation: pluginsLocation,
2816
+ responsiveLevels: [1240, 1024, 778, 480],
2817
+ visibilityLevels: [1240, 1024, 778, 480],
2818
+ spinner: 'spinner5',
2819
+ lazyType: "smart",
2820
+ navigation: {
2821
+ arrows: {
2822
+ enable: slides.length > 1 ? true : false,
2823
+ style: 'appstrap',
2824
+ tmp: '',
2825
+ rtl: false,
2826
+ hide_onleave: false,
2827
+ hide_onmobile: true,
2828
+ hide_under: 481,
2829
+ hide_over: 9999,
2830
+ hide_delay: 200,
2831
+ hide_delay_mobile: 1200,
2832
+ left: {
2833
+ container: 'slider',
2834
+ h_align: 'left',
2835
+ v_align: 'center',
2836
+ h_offset: 20,
2837
+ v_offset: 0
2838
+ },
2839
+ right: {
2840
+ container: 'slider',
2841
+ h_align: 'right',
2842
+ v_align: 'center',
2843
+ h_offset: 20,
2844
+ v_offset: 0
2845
+ },
2846
+ },
2847
+ },
2848
+ };
2849
+ var sliderRevSettings;
2850
+ sliderRevSettings = $.extend(sliderRevSettingsDefaults, sliderRevEl.data('settings'));
2851
+
2852
+ if (customInit) {
2853
+ sliderRevEl.addClass('custom-init').trigger("appstrap:sliderRev:customInit", [sliderRevSettings]);
2854
+ return;
2855
+ } else {
2856
+ sliderRevEl.hide();
2857
+ var sliderAPI = sliderRevEl.addClass('standard-init').show().revolution(sliderRevSettings);
2858
+ sliderRevEl.trigger("appstrap:sliderRev:standardInit", [sliderRevSettings]);
2859
+
2860
+ // Pause sliders on modals open
2861
+ $('.modal').on('shown.bs.modal', function() {
2862
+ if (sliderAPI) {
2863
+ sliderAPI.revpause();
2864
+ }
2865
+ }).on('hidden.bs.modal', function(e) {
2866
+ if (sliderAPI) {
2867
+ sliderAPI.revresume();
2868
+ }
2869
+ });
2870
+ }
2871
+ });
2872
+ };
2873
+
2874
+ $document.themeLoadPlugin(
2875
+ ["slider-revolution/revolution/js/jquery.themepunch.tools.min.js?v=" + SLIDER_REV_VERSION,
2876
+ "slider-revolution/revolution/js/source/jquery.themepunch.revolution.js?v=" + SLIDER_REV_VERSION
2877
+ ], ["plugin-css/plugin-slider-revolution.min.css", "slider-revolution/revolution/css/settings.css?v=" + SLIDER_REV_VERSION],
2878
+ function() {
2879
+ $document.isPageLoaderDone(themePluginSliderRevolutionInit);
2880
+ }
2881
+ );
2882
+ }
2883
+ };
2884
+
2885
+
2886
+
2887
+ // Object of plugins to add to Globals.PLUGINS
2888
+ Globals.PLUGINS.themePluginTyped = function(context) {
2889
+ // ----------------------------------------------------------------
2890
+ // typed.js - typewriter effect
2891
+ // @see: https://github.com/mattboldt/typed.js
2892
+ // ----------------------------------------------------------------
2893
+ var $typeds = context.find('[data-typed]');
2894
+ if ($typeds.length > 0) {
2895
+ var themePluginTypedInit = function() {
2896
+ $typeds.each(function() {
2897
+ var $this = $(this),
2898
+ typedStrings = $this.data('typed') || null,
2899
+ typedSettings = $this.data('typed-settings') || {},
2900
+ typedDelay = typedSettings.delay || 0;
2901
+ typedSettings.autoStart = true;
2902
+ typedSettings.callback = function() {
2903
+ if (typedSettings.doneClass !== '') {
2904
+ $.each(typedSettings.doneClass, function(e, c) {
2905
+ $(e).addClass(c);
2906
+ });
2907
+ }
2908
+ };
2909
+
2910
+ if (typedStrings !== '') {
2911
+ if (typeof typedStrings === 'object') {
2912
+ typedSettings.strings = typedStrings;
2913
+ }
2914
+ $this.waypoint(function() {
2915
+ setTimeout(function() {
2916
+ $this.typeIt(typedSettings);
2917
+ }, typedDelay);
2918
+ this.destroy();
2919
+ }, {
2920
+ offset: '100%',
2921
+ });
2922
+ }
2923
+ });
2924
+ };
2925
+
2926
+ $document.themeLoadPlugin(["https://cdn.jsdelivr.net/jquery.typeit/4.4.0/typeit.min.js"], [], function() {
2927
+ $document.includeWaypoints(function() {
2928
+ $document.isPageLoaderDone(themePluginTypedInit);
2929
+ });
2930
+ });
2931
+ }
2932
+ };
2933
+
2934
+
2935
+
2936
+ // Object of plugins to add to Globals.PLUGINS
2937
+ Globals.PLUGINS.themePluginVide = function(context) {
2938
+ // ----------------------------------------------------------------
2939
+ // Plugin: Video Backgrounds
2940
+ // @see: https://github.com/VodkaBears/Vide
2941
+ // ----------------------------------------------------------------
2942
+ var $vides = context.find('[data-bg-video]');
2943
+ if ($vides.length > 0) {
2944
+ var themePluginVideInit = function() {
2945
+ $vides.each(function() {
2946
+ var videoBg = $(this);
2947
+ var videoBgVideos = videoBg.data('bg-video') || null;
2948
+ var videoBgOptions = videoBg.data('settings') || {};
2949
+ var videoBgDefaultOptions = {
2950
+ 'className': 'bg-video-video'
2951
+ };
2952
+ videoBgOptions = jQuery.extend(videoBgDefaultOptions, videoBgOptions);
2953
+
2954
+ if (videoBgVideos !== null) {
2955
+ videoBg.addClass('bg-video').vide(videoBgVideos, videoBgOptions);
2956
+ }
2957
+ });
2958
+ };
2959
+ $document.themeLoadPlugin(['https://cdnjs.cloudflare.com/ajax/libs/vide/0.5.1/jquery.vide.min.js'], [], themePluginVideInit);
2960
+ }
2961
+ };
2962
+
2963
+
2964
+
2965
+ // Object of plugins to add to Globals.PLUGINS
2966
+ Globals.PLUGINS.themePluginZoom = function(context) {
2967
+ // ----------------------------------------------------------------
2968
+ // Plugin: jQuery Zoom (image zoon)
2969
+ // @see: http://www.jacklmoore.com/zoom/
2970
+ // ----------------------------------------------------------------
2971
+ var $zooms = context.find('[data-img-zoom]');
2972
+ if ($zooms.length > 0) {
2973
+ var themePluginZoomInit = function() {
2974
+ $zooms.each(function() {
2975
+ var $this = $(this),
2976
+ imgLarge = $this.data('img-zoom'),
2977
+ imgZoomSettings = $this.data('img-zoom-settings') || {};
2978
+
2979
+ imgZoomSettings.url = imgLarge;
2980
+
2981
+ $this.addClass('d-block').zoom(imgZoomSettings);
2982
+ });
2983
+ };
2984
+ $document.themeLoadPlugin(
2985
+ ["https://cdnjs.cloudflare.com/ajax/libs/jquery-zoom/1.7.20/jquery.zoom.min.js"], [], themePluginZoomInit);
2986
+ }
2987
+ };
2988
+
2989
+
2990
+
2991
+ // ===============================================================
2992
+ // @group: Base functions that init theme
2993
+ // ===============================================================
2994
+
2995
+ (function($) {
2996
+ $.extend($.fn, {
2997
+
2998
+ themePreInit: function() {
2999
+ // Before DOM ready
3000
+ $.each(Globals.PREINITPLUGINS, function(key, func) {
3001
+ if (typeof func === 'function') {
3002
+ func($(this));
3003
+ }
3004
+ });
3005
+ },
3006
+
3007
+ // ===============================================================
3008
+ // Initiates all theme JS
3009
+ // ===============================================================
3010
+ themeInit: function(refresh) {
3011
+ var context = $(this);
3012
+ refresh = refresh || false;
3013
+
3014
+ // themePreload: Allow custom callbacks from custom-script.js
3015
+ if (typeof $.fn.themePreload === 'function') {
3016
+ $.fn.themePreload(context, refresh);
3017
+ }
3018
+
3019
+ // Custom
3020
+ if (typeof $.fn.themeCustomScripts === 'function') {
3021
+ context.themeCustomScripts(refresh);
3022
+ }
3023
+
3024
+ // themePrePlugins: Allow custom callbacks from custom-script.js
3025
+ if (typeof $.fn.themePrePlugins === 'function') {
3026
+ $.fn.themePrePlugins(context, refresh);
3027
+ }
3028
+
3029
+ // Plugins
3030
+ // Call single plugins like context.themePluginsLoad(false).themePluginSidr();
3031
+ var plugins = context.themePluginsLoad(refresh);
3032
+ $.each(plugins, function(key, func) {
3033
+ if (typeof func === 'function') {
3034
+ func(context, refresh);
3035
+ }
3036
+ });
3037
+
3038
+ // themeLoaded: Allow custom callbacks from custom-script.js
3039
+ if (typeof $.fn.themeLoaded === 'function') {
3040
+ $.fn.themeLoaded(context, refresh);
3041
+ }
3042
+ },
3043
+
3044
+ // ===============================================================
3045
+ // Refresh scripts after ajax calls
3046
+ // ===============================================================
3047
+ themeRefresh: function() {
3048
+ var context = $(this);
3049
+ if (typeof context.context === "undefined" || context.context === null) {
3050
+ context.context = context;
3051
+ }
3052
+
3053
+ context.themeInit(true);
3054
+ context.refreshWaypoints();
3055
+ },
3056
+
3057
+ // ===============================================================
3058
+ // Third-party plugin intergration/init
3059
+ // ===============================================================
3060
+ themePluginsLoad: function(refresh) {
3061
+ var context = $(this);
3062
+ if (typeof context === "undefined" || context === null) {
3063
+ context = $(document);
3064
+ }
3065
+ $document = $(document);
3066
+
3067
+ // Plugin functions
3068
+ // name pattern themePluginPLUGINNAME
3069
+ // items: PLUGINNAMEs
3070
+ //
3071
+ // Loaded from plugins.js & custom-script.js
3072
+ // ----------------------------------------------------------------
3073
+ var plugins = Globals.PLUGINS || {};
3074
+ var pluginsDefault = {};
3075
+ var pluginsExtras = {};
3076
+ if (typeof $.fn.themePlugins !== 'undefined') {
3077
+ pluginsDefault = $.fn.themePlugins;
3078
+ }
3079
+ if (typeof $.fn.themePluginsExtras !== 'undefined') {
3080
+ pluginsExtras = $.fn.themePluginsExtras;
3081
+ }
3082
+ Globals.PLUGINS = $.extend(plugins, pluginsDefault, pluginsExtras);
3083
+ return Globals.PLUGINS;
3084
+ },
3085
+ });
3086
+ })(jQuery);
3087
+
3088
+ $('html').addClass('js');
3089
+ $(document).themePreInit();
3090
+
3091
+ $(document).ready(function() {
3092
+ "use strict";
3093
+
3094
+ // Init theme functions
3095
+ $(document).themeInit();
3096
+ });