phcthemes_web_theme_pack 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +0 -0
- data/Rakefile +32 -0
- data/app/assets/config/phcthemes_web_theme_pack_manifest.js +3 -0
- data/app/assets/javascripts/common/backstretch/jquery.backstretch.js +1602 -0
- data/app/assets/javascripts/common/bootstrap-datepicker/bootstrap-datepicker.js +2039 -0
- data/app/assets/javascripts/common/bootstrap-markdown/bootstrap-markdown.js +1390 -0
- data/app/assets/javascripts/common/bootstrap-select/bootstrap-select.js +3139 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.js +51 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.js +41 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.js +40 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.js +40 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.js +44 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.js +46 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.js +39 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.js.map +1 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.min.js +8 -0
- data/app/assets/javascripts/common/bootstrap/bootstrap.bundle.js +7013 -0
- data/app/assets/javascripts/common/custom/custom.js +0 -0
- data/app/assets/javascripts/common/daterangepicker/daterangepicker.js +1565 -0
- data/app/assets/javascripts/common/flexslider/jquery.flexslider.js +1252 -0
- data/app/assets/javascripts/common/greenstock/greensock.js +36 -0
- data/app/assets/javascripts/common/icheck/icheck.js +509 -0
- data/app/assets/javascripts/common/imagesloaded/imagesloaded.pkgd.js +497 -0
- data/app/assets/javascripts/common/isotope/isotope.pkgd.js +3563 -0
- data/app/assets/javascripts/common/jquery-countdown/jquery.countdown.js +246 -0
- data/app/assets/javascripts/common/jquery-filterizer/jquery.filterizr.min.js +1 -0
- data/app/assets/javascripts/common/jquery-placeholder/jquery.placeholder.js +281 -0
- data/app/assets/javascripts/common/jquery-validation/jquery.validate.js +1650 -0
- data/app/assets/javascripts/common/jqvmap/jquery.vmap.js +1281 -0
- data/app/assets/javascripts/common/jqvmap/jquery.vmap.min.js +10 -0
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.africa.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.asia.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.australia.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.europe.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.north-america.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.south-america.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.algeria.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.argentina.js +1 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.brazil.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.canada.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.europe.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.france.js +1 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.germany.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.greece.js +1 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.iran.js +6 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.iraq.js +1 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.russia.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.tunisia.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.turkey.js +11 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.usa.js +2 -0
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.world.js +2 -0
- data/app/assets/javascripts/common/js-cookie/js.cookie.js +165 -0
- data/app/assets/javascripts/common/layerslider/layerslider.kreaturamedia.jquery.js +13 -0
- data/app/assets/javascripts/common/layerslider/layerslider.origami.js +13 -0
- data/app/assets/javascripts/common/layerslider/layerslider.timeline.js +13 -0
- data/app/assets/javascripts/common/layerslider/layerslider.transitions.js +13 -0
- data/app/assets/javascripts/common/leaflet/leaflet.js +5 -0
- data/app/assets/javascripts/common/magnific-popup/jquery.magnific-popup.js +1860 -0
- data/app/assets/javascripts/common/mapbox/mapbox.js +51 -0
- data/app/assets/javascripts/common/moderizer/modernizr.js +11 -0
- data/app/assets/javascripts/common/owl-carousel/owl.carousel.js +3448 -0
- data/app/assets/javascripts/common/pace/pace.js +935 -0
- data/app/assets/javascripts/common/paroller/jquery.paroller.js +228 -0
- data/app/assets/javascripts/common/particlejs/particles.js +1541 -0
- data/app/assets/javascripts/common/plyr/plyr.js +9137 -0
- data/app/assets/javascripts/common/rangeslider/rangeslider.js +498 -0
- data/app/assets/javascripts/common/retina/retina.js +100 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.actions.js +386 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.carousel.js +365 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.kenburn.js +199 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.layeranimation.js +2524 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.migration.js +260 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.navigation.js +1156 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.parallax.js +465 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.slideanims.js +1447 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.video.js +1464 -0
- data/app/assets/javascripts/common/rev-slider/jquery.themepunch.revolution.js +3286 -0
- data/app/assets/javascripts/common/rev-slider/jquery.themepunch.tools.min.js +8710 -0
- data/app/assets/javascripts/common/scrollup/jquery.scrollUp.js +168 -0
- data/app/assets/javascripts/common/select2/select2.full.js +6597 -0
- data/app/assets/javascripts/common/selectbox/jquery.selectBox.js +1092 -0
- data/app/assets/javascripts/common/smooth-scroll/SmoothScroll.js +788 -0
- data/app/assets/javascripts/common/spectrum/spectrum.js +2323 -0
- data/app/assets/javascripts/common/stepper/jquery.fs.stepper.js +339 -0
- data/app/assets/javascripts/common/swiper/swiper.js +8124 -0
- data/app/assets/javascripts/common/typed/typed.js +1045 -0
- data/app/assets/javascripts/common/visable/jquery.visible.js +68 -0
- data/app/assets/javascripts/common/waypoints/jquery.waypoints.js +662 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_appstrap.js +11 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_basic.js +39 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_bold.js +34 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_coloradmin.js +12 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_devine_villas.js +20 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_smarty.js +57 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_xero.js +18 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_zoner.js +24 -0
- data/app/assets/javascripts/themes/appstrap/custom/custom.js +0 -0
- data/app/assets/javascripts/themes/appstrap/theme/custom-script.js +69 -0
- data/app/assets/javascripts/themes/appstrap/theme/script.js +3096 -0
- data/app/assets/javascripts/themes/basic/custom/custom.js +0 -0
- data/app/assets/javascripts/themes/bold/custom/custom.js +0 -0
- data/app/assets/javascripts/themes/coloradmin/custom/custom.js +0 -0
- data/app/assets/javascripts/themes/coloradmin/theme/apps.js +236 -0
- data/app/assets/javascripts/themes/devine_villas/custom/custom.js +0 -0
- data/app/assets/javascripts/themes/devine_villas/theme/dashboard.js +19 -0
- data/app/assets/javascripts/themes/devine_villas/theme/main.js +384 -0
- data/app/assets/javascripts/themes/devine_villas/theme/map.js +563 -0
- data/app/assets/javascripts/themes/devine_villas/theme/searchmap.js +69 -0
- data/app/assets/javascripts/themes/smarty/custom/custom.js +0 -0
- data/app/assets/javascripts/themes/smarty/theme/scripts.js +4271 -0
- data/app/assets/javascripts/themes/xero/custom/custom.js +0 -0
- data/app/assets/javascripts/themes/xero/theme/app.js +696 -0
- data/app/assets/javascripts/themes/zoner/custom-maps/custom-map.js +289 -0
- data/app/assets/javascripts/themes/zoner/custom/custom.js +0 -0
- data/app/assets/javascripts/themes/zoner/draggable/draggable.js +196 -0
- data/app/assets/javascripts/themes/zoner/jquery-dependclass/dependclass.js +56 -0
- data/app/assets/javascripts/themes/zoner/jquery-slider/jquery.slider.js +700 -0
- data/app/assets/javascripts/themes/zoner/jquery-vanillabox/jquery.vanillabox.min.js +24 -0
- data/app/assets/javascripts/themes/zoner/jshashtable/hashtable.js +402 -0
- data/app/assets/javascripts/themes/zoner/numberformatter/numberformatter.js +566 -0
- data/app/assets/javascripts/themes/zoner/simple-js-templating/tmpl.js +35 -0
- data/app/assets/javascripts/themes/zoner/theme/main.js +667 -0
- data/app/assets/stylesheets/common/custom/custom.scss +0 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_appstrap.scss +28 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_basic.scss +0 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_bold.scss +21 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_coloradmin.scss +22 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_devine_villas.scss +28 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_smarty.scss +47 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_xero.scss +28 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_zoner.scss +22 -0
- data/app/assets/stylesheets/themes/appstrap/custom/custom.scss +0 -0
- data/app/assets/stylesheets/themes/bold/custom/custom.scss +0 -0
- data/app/assets/stylesheets/themes/coloradmin/custom/custom.scss +0 -0
- data/app/assets/stylesheets/themes/devine_villas/custom/custom.scss +0 -0
- data/app/assets/stylesheets/themes/smarty/custom/custom.scss +0 -0
- data/app/assets/stylesheets/themes/xero/custom/custom.scss +0 -0
- data/app/assets/stylesheets/themes/zoner/custom/custom.scss +0 -0
- data/lib/phcthemes_web_theme_pack.rb +5 -0
- data/lib/phcthemes_web_theme_pack/engine.rb +13 -0
- data/lib/phcthemes_web_theme_pack/version.rb +3 -0
- data/lib/tasks/phcthemes_web_theme_pack_tasks.rake +4 -0
- metadata +375 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
if(document.getElementById('searchMap') != null){
|
4
|
+
L.HtmlIcon = L.Icon.extend({
|
5
|
+
options: {
|
6
|
+
/*
|
7
|
+
html: (String) (required)
|
8
|
+
iconAnchor: (Point)
|
9
|
+
popupAnchor: (Point)
|
10
|
+
*/
|
11
|
+
},
|
12
|
+
|
13
|
+
initialize: function (options) {
|
14
|
+
L.Util.setOptions(this, options);
|
15
|
+
},
|
16
|
+
|
17
|
+
createIcon: function () {
|
18
|
+
var div = document.createElement('div');
|
19
|
+
div.innerHTML = this.options.html;
|
20
|
+
if (div.classList)
|
21
|
+
div.classList.add('leaflet-marker-icon');
|
22
|
+
else
|
23
|
+
div.className += ' ' + 'leaflet-marker-icon';
|
24
|
+
return div;
|
25
|
+
},
|
26
|
+
|
27
|
+
createShadow: function () {
|
28
|
+
return null;
|
29
|
+
}
|
30
|
+
});
|
31
|
+
|
32
|
+
var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
33
|
+
maxZoom: 18,
|
34
|
+
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Points © 2012 LINZ'
|
35
|
+
}),
|
36
|
+
latlng = L.latLng(-37.82, 175.24);
|
37
|
+
|
38
|
+
var map = L.map('searchMap', {center: latlng, zoom: 13, layers: [tiles]});
|
39
|
+
|
40
|
+
var markers = L.markerClusterGroup();
|
41
|
+
var k = 1;
|
42
|
+
for (var i = 0; i < addressPoints.length; i++) {
|
43
|
+
var a = addressPoints[i];
|
44
|
+
|
45
|
+
if(k == 30){
|
46
|
+
k = 1;
|
47
|
+
}
|
48
|
+
|
49
|
+
var markerHTML = new L.HtmlIcon({
|
50
|
+
html : "<img class='leaflet-marker-icon leaflet-zoom-animated leaflet-interactive' src='images/marker/"+k+".png' alt='markericon' />",
|
51
|
+
});
|
52
|
+
|
53
|
+
markers.on('clusterclick', function() {
|
54
|
+
k = 1;
|
55
|
+
var markerHTML = new L.HtmlIcon({
|
56
|
+
html : "<img class='leaflet-marker-icon leaflet-zoom-animated leaflet-interactive' src='images/marker/"+k+".png' alt='markericon' />",
|
57
|
+
});
|
58
|
+
});
|
59
|
+
|
60
|
+
|
61
|
+
var title = a[2];
|
62
|
+
var marker = L.marker(new L.LatLng(a[0], a[1]), {icon: markerHTML});
|
63
|
+
marker.bindPopup(title, {offset: new L.Point(0, -170)});
|
64
|
+
markers.addLayer(marker);
|
65
|
+
k++;
|
66
|
+
}
|
67
|
+
|
68
|
+
map.addLayer(markers);
|
69
|
+
}
|
File without changes
|
@@ -0,0 +1,4271 @@
|
|
1
|
+
/** ********************************************** **
|
2
|
+
@Author Dorin Grigoras
|
3
|
+
@Website www.stepofweb.com
|
4
|
+
@Last Update Thursay, February 22, 2018
|
5
|
+
|
6
|
+
NOTE! Do not change anything here if you want to
|
7
|
+
be able to update in the future! Please use
|
8
|
+
your custom script (eg. custom.js).
|
9
|
+
|
10
|
+
|
11
|
+
TABLE CONTENTS
|
12
|
+
-------------------------------
|
13
|
+
|
14
|
+
|
15
|
+
INLINE SCRIPTS
|
16
|
+
-------------------------------
|
17
|
+
COUNT TO
|
18
|
+
https://github.com/mhuggins/jquery-countTo
|
19
|
+
|
20
|
+
BROWSER DETECT
|
21
|
+
|
22
|
+
Appear
|
23
|
+
https://github.com/bas2k/jquery.appear/
|
24
|
+
|
25
|
+
Parallax v1.1.3
|
26
|
+
http://www.ianlunn.co.uk/plugins/jquery-parallax/
|
27
|
+
|
28
|
+
jQuery Easing v1.3
|
29
|
+
http://gsgd.co.uk/sandbox/jquery/easing/
|
30
|
+
|
31
|
+
WOW - v1.0.3
|
32
|
+
http://mynameismatthieu.com/WOW/
|
33
|
+
|
34
|
+
Modernizr 3.3.1
|
35
|
+
http://modernizr.com/download/#-csstransforms3d-csstransitions-video-touch-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
|
36
|
+
|
37
|
+
Popper - required by bootstrap
|
38
|
+
https://popper.js.org/
|
39
|
+
*************************************************** **/
|
40
|
+
var plugin_path = 'https://frmwrks.phcnetworks.net/smarty/version-2.2.1/HTML_BS4/assets/plugins/';
|
41
|
+
|
42
|
+
window.width = jQuery(window).width();
|
43
|
+
window.height = jQuery(window).height();
|
44
|
+
|
45
|
+
|
46
|
+
/* Init */
|
47
|
+
jQuery(window).ready(function () {
|
48
|
+
|
49
|
+
// jQuery 3.x do no support size() - should be replaceced with .length
|
50
|
+
// We use this hack to make old plugins working
|
51
|
+
jQuery.fn.extend({
|
52
|
+
size: function() {
|
53
|
+
return this.length;
|
54
|
+
}
|
55
|
+
});
|
56
|
+
|
57
|
+
// Popper user by Bootstrap
|
58
|
+
_loadPopperBS4();
|
59
|
+
|
60
|
+
// Load Bootstrap JS
|
61
|
+
loadScript(plugin_path + 'bootstrap/js/bootstrap.min.js', function() {
|
62
|
+
|
63
|
+
// Load Material Design Js
|
64
|
+
if(jQuery("body").hasClass('enable-materialdesign')) {
|
65
|
+
loadScript(plugin_path + 'mdl/material.min.js');
|
66
|
+
}
|
67
|
+
|
68
|
+
// Init
|
69
|
+
Init(false);
|
70
|
+
|
71
|
+
});
|
72
|
+
|
73
|
+
|
74
|
+
/* --- */
|
75
|
+
if(jQuery("body").hasClass("smoothscroll") && navigator.platform.indexOf('Mac') < 0) {
|
76
|
+
|
77
|
+
loadScript(plugin_path + 'smoothscroll.js', function() {
|
78
|
+
jQuery.smoothScroll();
|
79
|
+
});
|
80
|
+
|
81
|
+
}
|
82
|
+
/* --- */
|
83
|
+
});
|
84
|
+
|
85
|
+
|
86
|
+
/** Init
|
87
|
+
Ajax Reinit: Init(true);
|
88
|
+
**************************************************************** **/
|
89
|
+
function Init(is_ajax) {
|
90
|
+
|
91
|
+
// First Load Only
|
92
|
+
if(is_ajax != true) {
|
93
|
+
|
94
|
+
_afterResize();
|
95
|
+
_slider_full();
|
96
|
+
_topNav();
|
97
|
+
_megaNavHorizontal();
|
98
|
+
_sideNav();
|
99
|
+
_stickyFooter();
|
100
|
+
_infiniteScroll();
|
101
|
+
|
102
|
+
}
|
103
|
+
|
104
|
+
// Reinit on Ajax
|
105
|
+
_owl_carousel();
|
106
|
+
_flexslider();
|
107
|
+
_lightbox();
|
108
|
+
_mixitup();
|
109
|
+
_animate();
|
110
|
+
_onepageNav();
|
111
|
+
_scrollTo(false, 0);
|
112
|
+
_parallax();
|
113
|
+
_video();
|
114
|
+
_youtubeBG();
|
115
|
+
_toggle();
|
116
|
+
_placeholder();
|
117
|
+
_wrotate();
|
118
|
+
_lazyload();
|
119
|
+
_misc();
|
120
|
+
_countDown();
|
121
|
+
_masonryGallery();
|
122
|
+
_toastr(false,false,false,false);
|
123
|
+
_charts();
|
124
|
+
_select2();
|
125
|
+
_form();
|
126
|
+
_pickers();
|
127
|
+
_editors();
|
128
|
+
_pajinate();
|
129
|
+
_zoom();
|
130
|
+
_autosuggest();
|
131
|
+
_stepper();
|
132
|
+
_slimScroll();
|
133
|
+
_modalAutoLoad();
|
134
|
+
_bgimage();
|
135
|
+
_cookie_alert();
|
136
|
+
_widget_flickr();
|
137
|
+
_widget_twitter();
|
138
|
+
_widget_facebook();
|
139
|
+
_widget_dribbble();
|
140
|
+
_widget_media();
|
141
|
+
|
142
|
+
/** Bootstrap Tooltip **/
|
143
|
+
jQuery("[data-toggle=tooltip]").tooltip();
|
144
|
+
|
145
|
+
/** Bootstrap Popover **/
|
146
|
+
jQuery("[data-toggle=popover]").popover();
|
147
|
+
|
148
|
+
}
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
/** Preloader
|
153
|
+
**************************************************************** **/
|
154
|
+
if(jQuery('#preloader').length > 0) {
|
155
|
+
|
156
|
+
jQuery(window).on("load", function() {
|
157
|
+
|
158
|
+
jQuery('#preloader').fadeOut(1000, function() {
|
159
|
+
jQuery('#preloader').remove();
|
160
|
+
});
|
161
|
+
|
162
|
+
// setTimeout(function() {}, 1000);
|
163
|
+
|
164
|
+
});
|
165
|
+
|
166
|
+
}
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
/** After Resize
|
171
|
+
**************************************************************** **/
|
172
|
+
function _afterResize() {
|
173
|
+
|
174
|
+
jQuery(window).on("load", function() {
|
175
|
+
"use strict";
|
176
|
+
|
177
|
+
// On Resize
|
178
|
+
jQuery(window).resize(function() {
|
179
|
+
|
180
|
+
if(window.afterResizeApp) {
|
181
|
+
clearTimeout(window.afterResizeApp);
|
182
|
+
}
|
183
|
+
|
184
|
+
window.afterResizeApp = setTimeout(function() {
|
185
|
+
|
186
|
+
/**
|
187
|
+
After Resize Code
|
188
|
+
.................
|
189
|
+
**/
|
190
|
+
|
191
|
+
_slider_full();
|
192
|
+
|
193
|
+
window.width = jQuery(window).width();
|
194
|
+
window.height = jQuery(window).height();
|
195
|
+
|
196
|
+
// Resize Flex Slider if exists!
|
197
|
+
if(jQuery('.flexslider').length > 0) {
|
198
|
+
jQuery('.flexslider').resize();
|
199
|
+
}
|
200
|
+
|
201
|
+
|
202
|
+
}, 300);
|
203
|
+
|
204
|
+
});
|
205
|
+
|
206
|
+
});
|
207
|
+
|
208
|
+
}
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
/** Load Script
|
213
|
+
|
214
|
+
USAGE
|
215
|
+
var pageInit = function() {}
|
216
|
+
loadScript(plugin_path + "script.js", function);
|
217
|
+
|
218
|
+
Load multiple scripts and call a final function
|
219
|
+
loadScript(plugin_path + "script1.js", function(){
|
220
|
+
loadScript(plugin_path + "script2.js", function(){
|
221
|
+
loadScript(plugin_path + "script3.js", function(){
|
222
|
+
loadScript(plugin_path + "script4.js", function);
|
223
|
+
});
|
224
|
+
});
|
225
|
+
});
|
226
|
+
**************************************************************** **/
|
227
|
+
var _arr = {};
|
228
|
+
function loadScript(scriptName, callback) {
|
229
|
+
|
230
|
+
if (!_arr[scriptName]) {
|
231
|
+
_arr[scriptName] = true;
|
232
|
+
|
233
|
+
var body = document.getElementsByTagName('body')[0];
|
234
|
+
var script = document.createElement('script');
|
235
|
+
script.type = 'text/javascript';
|
236
|
+
script.src = scriptName;
|
237
|
+
|
238
|
+
// then bind the event to the callback function
|
239
|
+
// there are several events for cross browser compatibility
|
240
|
+
// script.onreadystatechange = callback;
|
241
|
+
script.onload = callback;
|
242
|
+
|
243
|
+
// fire the loading
|
244
|
+
body.appendChild(script);
|
245
|
+
|
246
|
+
} else if (callback) {
|
247
|
+
|
248
|
+
callback();
|
249
|
+
|
250
|
+
}
|
251
|
+
|
252
|
+
};
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
/** 00. Slider Full Height
|
261
|
+
**************************************************************** **/
|
262
|
+
function _slider_full() {
|
263
|
+
_headerHeight = 0;
|
264
|
+
|
265
|
+
if(jQuery("#header").hasClass('transparent') || jQuery("#header").hasClass('translucent')) {
|
266
|
+
_headerHeight = 0;
|
267
|
+
} else {
|
268
|
+
_headerHeight = jQuery("#header").outerHeight() || 0;
|
269
|
+
|
270
|
+
if(jQuery("#topBar").length > 0) {
|
271
|
+
_topBarHeight = jQuery("#topBar").outerHeight() || 0;
|
272
|
+
_headerHeight = _headerHeight + _topBarHeight;
|
273
|
+
}
|
274
|
+
}
|
275
|
+
|
276
|
+
_screenHeight = jQuery(window).height() - _headerHeight;
|
277
|
+
|
278
|
+
if(jQuery("#header").hasClass('static'))
|
279
|
+
_screenHeight = jQuery(window).height();
|
280
|
+
|
281
|
+
if(jQuery("#slider").hasClass('halfheight')) {
|
282
|
+
jQuery("#slider.halfheight").height(_screenHeight / 2);
|
283
|
+
}
|
284
|
+
|
285
|
+
if(jQuery("#slider").hasClass('thirdheight')) {
|
286
|
+
jQuery("#slider.thirdheight").height(_screenHeight / 1.5);
|
287
|
+
}
|
288
|
+
|
289
|
+
if(jQuery("#slider").hasClass('fullheight')) {
|
290
|
+
jQuery("#slider.fullheight").height(_screenHeight);
|
291
|
+
jQuery("#slider.fullheight-min").css({"min-height":_screenHeight + "px"});
|
292
|
+
}
|
293
|
+
|
294
|
+
if(window.width < 960) {
|
295
|
+
jQuery("#slider.mobile-fullheight").height(_screenHeight);
|
296
|
+
}
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
/** 01. Top Nav
|
307
|
+
**************************************************************** **/
|
308
|
+
function _topNav() {
|
309
|
+
window.scrollTop = 0;
|
310
|
+
window._cmScroll = 0;
|
311
|
+
var _header_el = jQuery("#header");
|
312
|
+
|
313
|
+
|
314
|
+
jQuery(window).scroll(function() {
|
315
|
+
_toTop();
|
316
|
+
});
|
317
|
+
|
318
|
+
/* Scroll To Top */
|
319
|
+
function _toTop() {
|
320
|
+
_scrollTop = jQuery(document).scrollTop();
|
321
|
+
|
322
|
+
if(_scrollTop > 100) {
|
323
|
+
|
324
|
+
if(jQuery("#toTop").is(":hidden")) {
|
325
|
+
jQuery("#toTop").show();
|
326
|
+
}
|
327
|
+
|
328
|
+
} else {
|
329
|
+
|
330
|
+
if(jQuery("#toTop").is(":visible")) {
|
331
|
+
jQuery("#toTop").hide();
|
332
|
+
}
|
333
|
+
|
334
|
+
}
|
335
|
+
|
336
|
+
}
|
337
|
+
|
338
|
+
|
339
|
+
// Mobile Submenu
|
340
|
+
var addActiveClass = false;
|
341
|
+
jQuery("#topMain a.dropdown-toggle").bind("click", function(e) {
|
342
|
+
|
343
|
+
if(jQuery(this).attr('href') == "#") {
|
344
|
+
e.preventDefault();
|
345
|
+
}
|
346
|
+
|
347
|
+
addActiveClass = jQuery(this).parent().hasClass("resp-active");
|
348
|
+
jQuery("#topMain").find(".resp-active").removeClass("resp-active");
|
349
|
+
|
350
|
+
if(!addActiveClass) {
|
351
|
+
jQuery(this).parents("li").addClass("resp-active");
|
352
|
+
}
|
353
|
+
|
354
|
+
return;
|
355
|
+
|
356
|
+
});
|
357
|
+
|
358
|
+
|
359
|
+
// Srearch
|
360
|
+
jQuery('li.search i.fa').click(function () {
|
361
|
+
if(jQuery('#header .search-box').is(":visible")) {
|
362
|
+
jQuery('#header .search-box').fadeOut(300);
|
363
|
+
} else {
|
364
|
+
jQuery('.search-box').fadeIn(300);
|
365
|
+
jQuery('#header .search-box form input').focus();
|
366
|
+
|
367
|
+
// hide quick cart if visible
|
368
|
+
if (jQuery('#header li.quick-cart div.quick-cart-box').is(":visible")) {
|
369
|
+
jQuery('#header li.quick-cart div.quick-cart-box').fadeOut(300);
|
370
|
+
}
|
371
|
+
}
|
372
|
+
});
|
373
|
+
|
374
|
+
// close search box on body click
|
375
|
+
if(jQuery('#header li.search i.fa').size() != 0) {
|
376
|
+
jQuery('#header .search-box, #header li.search i.fa').on('click', function(e){
|
377
|
+
e.stopPropagation();
|
378
|
+
});
|
379
|
+
|
380
|
+
jQuery('body').on('click', function() {
|
381
|
+
if(jQuery('#header li.search .search-box').is(":visible")) {
|
382
|
+
jQuery('#header .search-box').fadeOut(300);
|
383
|
+
}
|
384
|
+
});
|
385
|
+
}
|
386
|
+
|
387
|
+
jQuery(document).bind("click", function() {
|
388
|
+
if(jQuery('#header li.search .search-box').is(":visible")) {
|
389
|
+
jQuery('#header .search-box').fadeOut(300);
|
390
|
+
}
|
391
|
+
});
|
392
|
+
|
393
|
+
|
394
|
+
// Close Fullscreen Search
|
395
|
+
jQuery("#closeSearch").bind("click", function(e) {
|
396
|
+
e.preventDefault();
|
397
|
+
|
398
|
+
jQuery('#header .search-box').fadeOut(300);
|
399
|
+
});
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
// Page Menu [mobile]
|
404
|
+
jQuery("button#page-menu-mobile").bind("click", function() {
|
405
|
+
jQuery(this).next('ul').slideToggle(150);
|
406
|
+
});
|
407
|
+
|
408
|
+
|
409
|
+
// Quick Cart
|
410
|
+
jQuery('li.quick-cart>a').click(function (e) {
|
411
|
+
e.preventDefault();
|
412
|
+
|
413
|
+
var _quick_cart_box = jQuery('li.quick-cart div.quick-cart-box');
|
414
|
+
|
415
|
+
if(_quick_cart_box.is(":visible")) {
|
416
|
+
_quick_cart_box.fadeOut(300);
|
417
|
+
} else {
|
418
|
+
_quick_cart_box.fadeIn(300);
|
419
|
+
|
420
|
+
// close search if visible
|
421
|
+
if(jQuery('li.search .search-box').is(":visible")) {
|
422
|
+
jQuery('.search-box').fadeOut(300);
|
423
|
+
}
|
424
|
+
}
|
425
|
+
});
|
426
|
+
// close quick cart on body click
|
427
|
+
if(jQuery('li.quick-cart>a').size() != 0) {
|
428
|
+
jQuery('li.quick-cart').on('click', function(e){
|
429
|
+
e.stopPropagation();
|
430
|
+
});
|
431
|
+
|
432
|
+
jQuery('body').on('click', function() {
|
433
|
+
if (jQuery('li.quick-cart div.quick-cart-box').is(":visible")) {
|
434
|
+
jQuery('li.quick-cart div.quick-cart-box').fadeOut(300);
|
435
|
+
}
|
436
|
+
});
|
437
|
+
}
|
438
|
+
|
439
|
+
|
440
|
+
// Page Menu [scrollTo]
|
441
|
+
jQuery("#page-menu ul.menu-scrollTo>li").bind("click", function(e) {
|
442
|
+
|
443
|
+
// calculate padding-top for scroll offset
|
444
|
+
var _href = jQuery('a', this).attr('href');
|
445
|
+
|
446
|
+
if(!jQuery('a', this).hasClass('external')) {
|
447
|
+
e.preventDefault();
|
448
|
+
|
449
|
+
jQuery("#page-menu ul.menu-scrollTo>li").removeClass('active');
|
450
|
+
jQuery(this).addClass('active');
|
451
|
+
|
452
|
+
if(jQuery(_href).length > 0) {
|
453
|
+
|
454
|
+
_padding_top = 0;
|
455
|
+
|
456
|
+
if(jQuery("#header").hasClass('sticky')) {
|
457
|
+
_padding_top = jQuery(_href).css('padding-top');
|
458
|
+
_padding_top = _padding_top.replace('px', '');
|
459
|
+
}
|
460
|
+
|
461
|
+
jQuery('html,body').animate({scrollTop: jQuery(_href).offset().top - _padding_top}, 800, 'easeInOutExpo');
|
462
|
+
|
463
|
+
}
|
464
|
+
|
465
|
+
}
|
466
|
+
|
467
|
+
});
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
// MOBILE TOGGLE BUTTON
|
473
|
+
window.currentScroll = 0;
|
474
|
+
jQuery("button.btn-mobile").bind("click", function(e) {
|
475
|
+
e.preventDefault();
|
476
|
+
|
477
|
+
jQuery(this).toggleClass('btn-mobile-active');
|
478
|
+
jQuery('html').removeClass('noscroll');
|
479
|
+
jQuery('#menu-overlay').remove();
|
480
|
+
jQuery("#topNav div.nav-main-collapse").hide(0);
|
481
|
+
|
482
|
+
if(jQuery(this).hasClass('btn-mobile-active')) {
|
483
|
+
jQuery("#topNav div.nav-main-collapse").show(0);
|
484
|
+
jQuery('body').append('<div id="menu-overlay"></div>');
|
485
|
+
|
486
|
+
if(!jQuery("#topMain").hasClass('nav-onepage') || window.width > 960) { /* onepage fix */
|
487
|
+
jQuery('html').addClass('noscroll');
|
488
|
+
window.currentScroll = jQuery(window).scrollTop();
|
489
|
+
}
|
490
|
+
|
491
|
+
} else {
|
492
|
+
|
493
|
+
if(!jQuery("#topMain").hasClass('nav-onepage') || window.width > 960) { /* onepage fix */
|
494
|
+
jQuery('html,body').animate({scrollTop: currentScroll}, 300, 'easeInOutExpo');
|
495
|
+
}
|
496
|
+
|
497
|
+
}
|
498
|
+
});
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
// BOTTOM NAV
|
504
|
+
if(_header_el.hasClass('bottom')) {
|
505
|
+
|
506
|
+
// Add dropup class
|
507
|
+
_header_el.addClass('dropup');
|
508
|
+
window.homeHeight = jQuery(window).outerHeight() - 55;
|
509
|
+
|
510
|
+
|
511
|
+
// sticky header
|
512
|
+
if(_header_el.hasClass('sticky')) {
|
513
|
+
window.isOnTop = true;
|
514
|
+
|
515
|
+
|
516
|
+
// if scroll is > 60%, remove class dropup
|
517
|
+
jQuery(window).scroll(function() {
|
518
|
+
if(jQuery(document).scrollTop() > window.homeHeight / 2) {
|
519
|
+
_header_el.removeClass('dropup');
|
520
|
+
} else {
|
521
|
+
_header_el.addClass('dropup');
|
522
|
+
}
|
523
|
+
});
|
524
|
+
|
525
|
+
|
526
|
+
// Add fixed|not fixed & dropup|no dropup
|
527
|
+
jQuery(window).scroll(function() {
|
528
|
+
if(jQuery(document).scrollTop() > window.homeHeight) {
|
529
|
+
if(window.isOnTop === true) {
|
530
|
+
jQuery('#header').addClass('fixed');
|
531
|
+
_header_el.removeClass('dropup');
|
532
|
+
window.isOnTop = false;
|
533
|
+
}
|
534
|
+
} else {
|
535
|
+
if(window.isOnTop === false) {
|
536
|
+
jQuery('#header').removeClass('fixed');
|
537
|
+
_header_el.addClass('dropup');
|
538
|
+
window.isOnTop = true;
|
539
|
+
}
|
540
|
+
}
|
541
|
+
});
|
542
|
+
|
543
|
+
// get window height on resize
|
544
|
+
jQuery(window).resize(function() {
|
545
|
+
window.homeHeight = jQuery(window).outerHeight();
|
546
|
+
});
|
547
|
+
|
548
|
+
}
|
549
|
+
|
550
|
+
} else
|
551
|
+
|
552
|
+
// STICKY
|
553
|
+
if(_header_el.hasClass('sticky')) {
|
554
|
+
|
555
|
+
_topBar_H = jQuery("#topBar").outerHeight() || 0;
|
556
|
+
|
557
|
+
// Force fixed header on mobile to avoid "jump" effect.
|
558
|
+
if(window.width <= 992 && _topBar_H < 1) {
|
559
|
+
|
560
|
+
var _scrollTop = jQuery(document).scrollTop();
|
561
|
+
_header_H = _header_el.outerHeight() || 0;
|
562
|
+
|
563
|
+
_header_el.addClass('fixed');
|
564
|
+
jQuery('body').css({"padding-top":_header_H+"px"});
|
565
|
+
|
566
|
+
}
|
567
|
+
|
568
|
+
|
569
|
+
// Header Switch - outside of scroll
|
570
|
+
if(_header_el.hasClass('transparent')) {
|
571
|
+
var _el = jQuery("#topNav div.nav-main-collapse"),
|
572
|
+
_data_switch_default = _el.attr('data-switch-default') || '',
|
573
|
+
_data_switch_scroll = _el.attr('data-switch-scroll') || '';
|
574
|
+
}
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
jQuery(window).scroll(function() {
|
579
|
+
|
580
|
+
if((window.width > 992 && _topBar_H < 1) || _topBar_H > 0) { // 992 to disable on mobile
|
581
|
+
|
582
|
+
var _scrollTop = jQuery(document).scrollTop();
|
583
|
+
|
584
|
+
if(_scrollTop > _topBar_H) {
|
585
|
+
_header_el.addClass('fixed');
|
586
|
+
|
587
|
+
_header_H = _header_el.outerHeight() || 0;
|
588
|
+
|
589
|
+
if(!_header_el.hasClass('transparent') && !_header_el.hasClass('translucent')) {
|
590
|
+
jQuery('body').css({"padding-top":_header_H+"px"});
|
591
|
+
}
|
592
|
+
|
593
|
+
} else {
|
594
|
+
if(!_header_el.hasClass('transparent') && !_header_el.hasClass('translucent')) {
|
595
|
+
jQuery('body').css({"padding-top":"0px"});
|
596
|
+
}
|
597
|
+
|
598
|
+
_header_el.removeClass('fixed');
|
599
|
+
}
|
600
|
+
|
601
|
+
}
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
// SWITCH DROPDOWN MENU CLASS ON SCROLL
|
606
|
+
if(_header_el.hasClass('transparent')) {
|
607
|
+
|
608
|
+
|
609
|
+
if(_data_switch_default != '' || _data_switch_scroll != '') {
|
610
|
+
|
611
|
+
if(_scrollTop > 0) {
|
612
|
+
|
613
|
+
if(window._cmScroll < 1) {
|
614
|
+
|
615
|
+
_el.removeClass(_data_switch_default, _data_switch_scroll).addClass(_data_switch_scroll);
|
616
|
+
|
617
|
+
// set to 1, we want to change classes once, not for each pixel on scroll
|
618
|
+
window._cmScroll = 1;
|
619
|
+
|
620
|
+
}
|
621
|
+
|
622
|
+
} else
|
623
|
+
|
624
|
+
if(_scrollTop < 1) {
|
625
|
+
|
626
|
+
_el.removeClass(_data_switch_default, _data_switch_scroll).addClass(_data_switch_default);
|
627
|
+
|
628
|
+
// Set back to 0
|
629
|
+
window._cmScroll = 0;
|
630
|
+
|
631
|
+
}
|
632
|
+
|
633
|
+
}
|
634
|
+
|
635
|
+
|
636
|
+
}
|
637
|
+
|
638
|
+
|
639
|
+
});
|
640
|
+
|
641
|
+
} else
|
642
|
+
|
643
|
+
|
644
|
+
// REVEAL ON SCROLL UP
|
645
|
+
if(_header_el.hasClass('scroll')) {
|
646
|
+
jQuery('body').addClass('header-scroll-reveal');
|
647
|
+
|
648
|
+
|
649
|
+
// Hide Header on on scroll down
|
650
|
+
var didScroll;
|
651
|
+
var lastScrollTop = 0;
|
652
|
+
var delta = 5;
|
653
|
+
var _header_H = _header_el.outerHeight() || 0;
|
654
|
+
|
655
|
+
|
656
|
+
jQuery(window).scroll(function(event){
|
657
|
+
didScroll = true;
|
658
|
+
});
|
659
|
+
|
660
|
+
setInterval(function() {
|
661
|
+
if (didScroll) {
|
662
|
+
hasScrolled();
|
663
|
+
didScroll = false;
|
664
|
+
}
|
665
|
+
}, 100);
|
666
|
+
|
667
|
+
function hasScrolled() {
|
668
|
+
var st = $(this).scrollTop();
|
669
|
+
|
670
|
+
// Make sure they scroll more than delta
|
671
|
+
if(Math.abs(lastScrollTop - st) <= delta)
|
672
|
+
return;
|
673
|
+
|
674
|
+
// If they scrolled down and are past the navbar, add class .nav-up.
|
675
|
+
// This is necessary so you never see what is "behind" the navbar.
|
676
|
+
if (st > lastScrollTop && st > _header_H){
|
677
|
+
|
678
|
+
// Scroll Down
|
679
|
+
_header_el.removeClass('nav-down').addClass('nav-up');
|
680
|
+
|
681
|
+
} else {
|
682
|
+
|
683
|
+
// Scroll Up
|
684
|
+
if(st + jQuery(window).height() < jQuery(document).height()) {
|
685
|
+
_header_el.removeClass('nav-up').addClass('nav-down');
|
686
|
+
}
|
687
|
+
|
688
|
+
}
|
689
|
+
|
690
|
+
lastScrollTop = st;
|
691
|
+
}
|
692
|
+
|
693
|
+
} else
|
694
|
+
|
695
|
+
|
696
|
+
// STATIC + TRANSPARENT
|
697
|
+
if(_header_el.hasClass('static') && _header_el.hasClass('transparent')) {
|
698
|
+
|
699
|
+
_topBar_H = jQuery("#topBar").outerHeight() || 0;
|
700
|
+
|
701
|
+
// Force fixed header on mobile to avoid "jump" effect.
|
702
|
+
if(window.width <= 992 && _topBar_H < 1) {
|
703
|
+
|
704
|
+
var _scrollTop = jQuery(document).scrollTop();
|
705
|
+
_header_H = _header_el.outerHeight() || 0;
|
706
|
+
|
707
|
+
_header_el.addClass('fixed');
|
708
|
+
|
709
|
+
}
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
jQuery(window).scroll(function() {
|
714
|
+
|
715
|
+
if((window.width > 992 && _topBar_H < 1) || _topBar_H > 0) { // 992 to disable on mobile
|
716
|
+
|
717
|
+
var _scrollTop = jQuery(document).scrollTop();
|
718
|
+
|
719
|
+
if(_scrollTop > _topBar_H) {
|
720
|
+
_header_el.addClass('fixed');
|
721
|
+
|
722
|
+
_header_H = _header_el.outerHeight() || 0;
|
723
|
+
|
724
|
+
} else {
|
725
|
+
|
726
|
+
|
727
|
+
_header_el.removeClass('fixed');
|
728
|
+
}
|
729
|
+
|
730
|
+
}
|
731
|
+
|
732
|
+
});
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
} else
|
737
|
+
|
738
|
+
if(_header_el.hasClass('static')) {
|
739
|
+
// _header_H = _header_el.outerHeight() + "px";
|
740
|
+
// jQuery('body').css({"padding-top":_header_H});
|
741
|
+
}
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
// Slide Top
|
746
|
+
jQuery("#slidetop a.slidetop-toggle").bind("click", function() {
|
747
|
+
jQuery("#slidetop .container").slideToggle(150, function() {
|
748
|
+
|
749
|
+
if(jQuery("#slidetop .container").is(":hidden")) {
|
750
|
+
jQuery("#slidetop").removeClass('active');
|
751
|
+
} else {
|
752
|
+
jQuery("#slidetop").addClass('active');
|
753
|
+
}
|
754
|
+
|
755
|
+
});
|
756
|
+
});
|
757
|
+
// 'esc' key
|
758
|
+
jQuery(document).keyup(function(e) {
|
759
|
+
if(e.keyCode == 27) {
|
760
|
+
if(jQuery("#slidetop").hasClass("active")) {
|
761
|
+
jQuery("#slidetop .container").slideToggle(150, function() {
|
762
|
+
jQuery("#slidetop").removeClass('active');
|
763
|
+
});
|
764
|
+
}
|
765
|
+
}
|
766
|
+
});
|
767
|
+
|
768
|
+
// Slide Panel
|
769
|
+
jQuery("a#sidepanel_btn").bind("click", function(e) {
|
770
|
+
e.preventDefault();
|
771
|
+
|
772
|
+
_pos = "right";
|
773
|
+
if(jQuery("#sidepanel").hasClass('sidepanel-inverse')) {
|
774
|
+
_pos = "left";
|
775
|
+
}
|
776
|
+
|
777
|
+
if(jQuery("#sidepanel").is(":hidden")) {
|
778
|
+
|
779
|
+
jQuery("body").append('<span id="sidepanel_overlay"></span>');
|
780
|
+
|
781
|
+
if(_pos == "left") {
|
782
|
+
jQuery("#sidepanel").stop().show().animate({"left":"0px"}, 150);
|
783
|
+
} else {
|
784
|
+
jQuery("#sidepanel").stop().show().animate({"right":"0px"}, 150);
|
785
|
+
}
|
786
|
+
|
787
|
+
} else {
|
788
|
+
|
789
|
+
jQuery("#sidepanel_overlay").remove();
|
790
|
+
|
791
|
+
if(_pos == "left") {
|
792
|
+
jQuery("#sidepanel").stop().animate({"left":"-300px"}, 300);
|
793
|
+
} else {
|
794
|
+
jQuery("#sidepanel").stop().animate({"right":"-300px"}, 300);
|
795
|
+
}
|
796
|
+
|
797
|
+
setTimeout(function() {
|
798
|
+
jQuery("#sidepanel").hide();
|
799
|
+
}, 500);
|
800
|
+
|
801
|
+
}
|
802
|
+
|
803
|
+
_sidepanel_overlay();
|
804
|
+
|
805
|
+
});
|
806
|
+
// button close
|
807
|
+
jQuery("#sidepanel_close").bind("click", function(e) {
|
808
|
+
e.preventDefault();
|
809
|
+
jQuery("a#sidepanel_btn").trigger('click');
|
810
|
+
});
|
811
|
+
// overlay click
|
812
|
+
function _sidepanel_overlay() {
|
813
|
+
jQuery("#sidepanel_overlay").unbind();
|
814
|
+
jQuery("#sidepanel_overlay").bind("click", function() {
|
815
|
+
jQuery("a#sidepanel_btn").trigger('click');
|
816
|
+
});
|
817
|
+
}
|
818
|
+
// 'esc' key
|
819
|
+
jQuery(document).keyup(function(e) {
|
820
|
+
if(e.keyCode == 27) {
|
821
|
+
if(jQuery("#sidepanel").is(":visible")) {
|
822
|
+
jQuery("a#sidepanel_btn").trigger('click');
|
823
|
+
}
|
824
|
+
}
|
825
|
+
});
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
/** OVERLAY MENU
|
830
|
+
*************************** **/
|
831
|
+
if(jQuery("#menu_overlay_open").length > 0) {
|
832
|
+
var is_ie9 = jQuery('html').hasClass('ie9') ? true : false;
|
833
|
+
|
834
|
+
if(is_ie9 == true) {
|
835
|
+
jQuery("#topMain").hide();
|
836
|
+
}
|
837
|
+
|
838
|
+
// open
|
839
|
+
jQuery("#menu_overlay_open").bind("click", function(e) {
|
840
|
+
e.preventDefault();
|
841
|
+
|
842
|
+
jQuery('body').addClass('show-menu');
|
843
|
+
|
844
|
+
if(is_ie9 == true) {
|
845
|
+
jQuery("#topMain").show();
|
846
|
+
}
|
847
|
+
|
848
|
+
});
|
849
|
+
|
850
|
+
// close
|
851
|
+
jQuery("#menu_overlay_close").bind("click", function(e) {
|
852
|
+
e.preventDefault();
|
853
|
+
|
854
|
+
if(jQuery('body').hasClass('show-menu')) {
|
855
|
+
jQuery('body').removeClass('show-menu');
|
856
|
+
}
|
857
|
+
|
858
|
+
if(is_ie9 == true) {
|
859
|
+
jQuery("#topMain").hide();
|
860
|
+
}
|
861
|
+
|
862
|
+
});
|
863
|
+
|
864
|
+
// 'esc' key
|
865
|
+
jQuery(document).keyup(function(e) {
|
866
|
+
if(e.keyCode == 27) {
|
867
|
+
if(jQuery('body').hasClass('show-menu')) {
|
868
|
+
jQuery('body').removeClass('show-menu');
|
869
|
+
}
|
870
|
+
|
871
|
+
if(is_ie9 == true) {
|
872
|
+
jQuery("#topMain").hide();
|
873
|
+
}
|
874
|
+
}
|
875
|
+
});
|
876
|
+
|
877
|
+
}
|
878
|
+
|
879
|
+
/** VERTICAL MENU SHOW|HIDE
|
880
|
+
*************************** **/
|
881
|
+
// RTL supported!
|
882
|
+
if(jQuery("#sidebar_vertical_btn").length > 0) {
|
883
|
+
if(jQuery("body").hasClass('menu-vertical-hide')) {
|
884
|
+
|
885
|
+
// Determine the position (left or right?)
|
886
|
+
_paddingStatusL = jQuery("#mainMenu.sidebar-vertical").css('left');
|
887
|
+
_paddingStatusR = jQuery("#mainMenu.sidebar-vertical").css('right');
|
888
|
+
|
889
|
+
if(parseInt(_paddingStatusL) < 0) {
|
890
|
+
var _pos = "left";
|
891
|
+
} else
|
892
|
+
|
893
|
+
if(parseInt(_paddingStatusR) < 0) {
|
894
|
+
var _pos = "right";
|
895
|
+
}
|
896
|
+
|
897
|
+
else {
|
898
|
+
var _pos = "left";
|
899
|
+
}
|
900
|
+
|
901
|
+
// Show|Hide Vertical Menu
|
902
|
+
jQuery("#sidebar_vertical_btn").bind("click", function(e) {
|
903
|
+
|
904
|
+
_paddingStatus = jQuery("#mainMenu.sidebar-vertical").css(_pos);
|
905
|
+
|
906
|
+
if(parseInt(_paddingStatus) < 0) {
|
907
|
+
if(_pos == "right") {
|
908
|
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"right":"0px"}, 200);
|
909
|
+
} else {
|
910
|
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"left":"0px"}, 200);
|
911
|
+
}
|
912
|
+
} else {
|
913
|
+
if(_pos == "right") {
|
914
|
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"right":"-263px"}, 200);
|
915
|
+
} else {
|
916
|
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"left":"-263px"}, 200);
|
917
|
+
}
|
918
|
+
}
|
919
|
+
});
|
920
|
+
|
921
|
+
// Hide on scroll
|
922
|
+
jQuery(window).scroll(function() {
|
923
|
+
|
924
|
+
_paddingStatus = parseInt(jQuery("#mainMenu.sidebar-vertical").css(_pos));
|
925
|
+
|
926
|
+
if(_paddingStatus >= 0) {
|
927
|
+
if(_pos == "right") {
|
928
|
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"right":"-263px"}, 200);
|
929
|
+
} else {
|
930
|
+
jQuery("#mainMenu.sidebar-vertical").stop().animate({"left":"-263px"}, 200);
|
931
|
+
}
|
932
|
+
}
|
933
|
+
|
934
|
+
});
|
935
|
+
|
936
|
+
}
|
937
|
+
}
|
938
|
+
|
939
|
+
// quick cart & search for mobile - top calculate
|
940
|
+
// Quick Cart & top Search Fix (if #topBar exists).
|
941
|
+
if(jQuery("#topBar").length > 0) {
|
942
|
+
jQuery("#topNav ul").addClass('has-topBar');
|
943
|
+
}
|
944
|
+
|
945
|
+
// Hide Cart & Search on Scroll
|
946
|
+
jQuery(window).scroll(function() {
|
947
|
+
if(window.width < 769) {
|
948
|
+
// hide quick cart if visible
|
949
|
+
if (jQuery('#header li.quick-cart div.quick-cart-box').is(":visible")) {
|
950
|
+
jQuery('#header li.quick-cart div.quick-cart-box').fadeOut(0);
|
951
|
+
}
|
952
|
+
// hide search if visible
|
953
|
+
if(jQuery('#header li.search .search-box').is(":visible")) {
|
954
|
+
jQuery('#header .search-box').fadeOut(0);
|
955
|
+
}
|
956
|
+
}
|
957
|
+
});
|
958
|
+
}
|
959
|
+
|
960
|
+
|
961
|
+
|
962
|
+
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
/** Mega Horizontal Navigation
|
967
|
+
**************************************************************** **/
|
968
|
+
function _megaNavHorizontal() {
|
969
|
+
|
970
|
+
// WRAPPER MAIN MENU
|
971
|
+
if(jQuery("#wrapper nav.main-nav").length > 0) {
|
972
|
+
|
973
|
+
var _sliderWidth = jQuery("#slider").width(),
|
974
|
+
_sliderHeight = jQuery("#wrapper nav.main-nav").height();
|
975
|
+
|
976
|
+
// Submenu widh & height
|
977
|
+
jQuery("#wrapper nav.main-nav>div>ul>li>.main-nav-submenu").css({"min-height":_sliderHeight+"px"});
|
978
|
+
jQuery("#wrapper nav.main-nav>div>ul>li.main-nav-expanded>.main-nav-submenu").css({"width":_sliderWidth+"px"});
|
979
|
+
|
980
|
+
// SUBMENUS
|
981
|
+
jQuery("#wrapper nav.main-nav>div>ul>li").bind("click", function(e) {
|
982
|
+
var _this = jQuery(this);
|
983
|
+
|
984
|
+
if(!jQuery('div', _this).hasClass('main-nav-open')) {
|
985
|
+
jQuery("#wrapper nav.main-nav>div>ul>li>.main-nav-submenu").removeClass('main-nav-open');
|
986
|
+
}
|
987
|
+
|
988
|
+
jQuery('div', _this).toggleClass('main-nav-open');
|
989
|
+
});
|
990
|
+
|
991
|
+
}
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
// HEADER MAIN MENU
|
999
|
+
var _hsliderWidth = jQuery("#header>.container").width() - 278,
|
1000
|
+
_hsliderHeight = jQuery("#header nav.main-nav").height();
|
1001
|
+
|
1002
|
+
// Submenu widh & height
|
1003
|
+
jQuery("#header nav.main-nav>div>ul>li>.main-nav-submenu").css({"min-height":_hsliderHeight+"px"});
|
1004
|
+
jQuery("#header nav.main-nav>div>ul>li.main-nav-expanded>.main-nav-submenu").css({"width":_hsliderWidth+"px"});
|
1005
|
+
|
1006
|
+
|
1007
|
+
// SUBMENUS
|
1008
|
+
jQuery("#header nav.main-nav>div>ul>li").bind("click", function(e) {
|
1009
|
+
var _this = jQuery(this);
|
1010
|
+
|
1011
|
+
if(!jQuery('div', _this).hasClass('main-nav-open')) {
|
1012
|
+
jQuery("#header nav.main-nav>div>ul>li>.main-nav-submenu").removeClass('main-nav-open');
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
jQuery('div', _this).toggleClass('main-nav-open');
|
1016
|
+
});
|
1017
|
+
|
1018
|
+
|
1019
|
+
|
1020
|
+
|
1021
|
+
// HEADER MAIN MENU
|
1022
|
+
if(window.width > 767) { // desktop|tablet
|
1023
|
+
|
1024
|
+
jQuery("#header button.nav-toggle").mouseover(function(e) {
|
1025
|
+
e.preventDefault();
|
1026
|
+
|
1027
|
+
_initMainNav();
|
1028
|
+
|
1029
|
+
});
|
1030
|
+
|
1031
|
+
|
1032
|
+
} else { // mobile
|
1033
|
+
|
1034
|
+
jQuery("#header button.nav-toggle").bind("click", function(e) {
|
1035
|
+
e.preventDefault();
|
1036
|
+
|
1037
|
+
_initMainNav();
|
1038
|
+
|
1039
|
+
});
|
1040
|
+
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
jQuery('body').on('click', '#header button.nav-toggle, #header nav.main-nav', function (e) {
|
1044
|
+
e.stopPropagation();
|
1045
|
+
});
|
1046
|
+
|
1047
|
+
jQuery("#header button.nav-toggle, #header nav.main-nav").mouseover(function(e) {
|
1048
|
+
e.stopPropagation();
|
1049
|
+
});
|
1050
|
+
|
1051
|
+
|
1052
|
+
jQuery(document).bind("click", function() {
|
1053
|
+
|
1054
|
+
_hideMainNav();
|
1055
|
+
|
1056
|
+
});
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
function _initMainNav() {
|
1061
|
+
|
1062
|
+
// remove overlay first, no matter what
|
1063
|
+
jQuery("#main-nav-overlay").remove();
|
1064
|
+
|
1065
|
+
// open menu
|
1066
|
+
jQuery("#header nav.main-nav").addClass('min-nav-active');
|
1067
|
+
|
1068
|
+
// add overlay
|
1069
|
+
jQuery('body').append('<div id="main-nav-overlay"></div>');
|
1070
|
+
|
1071
|
+
// Mobile menu open|close on click
|
1072
|
+
jQuery('#header button.nav-toggle-close').bind("click", function() {
|
1073
|
+
jQuery("#header nav.main-nav").removeClass('min-nav-active');
|
1074
|
+
});
|
1075
|
+
|
1076
|
+
// Close menu on hover
|
1077
|
+
jQuery("#main-nav-overlay, #header").mouseover(function() {
|
1078
|
+
|
1079
|
+
_hideMainNav();
|
1080
|
+
|
1081
|
+
});
|
1082
|
+
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
function _hideMainNav() {
|
1086
|
+
jQuery("#main-nav-overlay").remove();
|
1087
|
+
jQuery("#header nav.main-nav").removeClass('min-nav-active');
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
|
1091
|
+
// Menu Click
|
1092
|
+
jQuery("nav.main-nav>div>ul>li a").bind("click", function(e) {
|
1093
|
+
var _href = jQuery(this).attr('href');
|
1094
|
+
|
1095
|
+
if(_href == '#') {
|
1096
|
+
e.preventDefault();
|
1097
|
+
}
|
1098
|
+
});
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
|
1102
|
+
|
1103
|
+
|
1104
|
+
|
1105
|
+
|
1106
|
+
|
1107
|
+
/** 02. Side Nav
|
1108
|
+
**************************************************************** **/
|
1109
|
+
function _sideNav() {
|
1110
|
+
|
1111
|
+
|
1112
|
+
/* Mobile Button */
|
1113
|
+
jQuery("div.side-nav").each(function() {
|
1114
|
+
var _t = jQuery('ul', this);
|
1115
|
+
jQuery('button', this).bind("click", function() {
|
1116
|
+
_t.slideToggle(300);
|
1117
|
+
});
|
1118
|
+
});
|
1119
|
+
|
1120
|
+
|
1121
|
+
/* Submenus */
|
1122
|
+
jQuery("div.side-nav li>a.dropdown-toggle").bind("click", function(e) {
|
1123
|
+
e.preventDefault();
|
1124
|
+
|
1125
|
+
jQuery(this).next('ul').slideToggle(200);
|
1126
|
+
jQuery(this).closest('li').toggleClass('active');
|
1127
|
+
});
|
1128
|
+
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
|
1132
|
+
|
1133
|
+
/** 02. Animate
|
1134
|
+
|
1135
|
+
EXAMPLE USAGE
|
1136
|
+
<img class="wow fadeInUp" data-wow-delay="0.1s" src="image.jpg" alt="" />
|
1137
|
+
**************************************************************** **/
|
1138
|
+
function _animate() {
|
1139
|
+
|
1140
|
+
if(jQuery("body").hasClass('enable-animation')) {
|
1141
|
+
|
1142
|
+
var wow = new WOW({
|
1143
|
+
boxClass: 'wow',
|
1144
|
+
animateClass: 'animated',
|
1145
|
+
offset: 15,
|
1146
|
+
mobile: false,
|
1147
|
+
live: true
|
1148
|
+
});
|
1149
|
+
|
1150
|
+
wow.init();
|
1151
|
+
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
// Count To
|
1155
|
+
jQuery(".countTo").appear(function(){
|
1156
|
+
var _t = jQuery(this),
|
1157
|
+
_from = _t.attr('data-from') || 0,
|
1158
|
+
_speed = _t.attr('data-speed') || 1300,
|
1159
|
+
_refreshInterval = _t.attr('data-refreshInterval') || 60;
|
1160
|
+
|
1161
|
+
|
1162
|
+
_t.countTo({
|
1163
|
+
from: parseInt(_from),
|
1164
|
+
to: _t.html(),
|
1165
|
+
speed: parseInt(_speed),
|
1166
|
+
refreshInterval: parseInt(_refreshInterval),
|
1167
|
+
});
|
1168
|
+
|
1169
|
+
});
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
|
1173
|
+
|
1174
|
+
/** Onepage Nav
|
1175
|
+
**************************************************************** **/
|
1176
|
+
function _onepageNav() {
|
1177
|
+
|
1178
|
+
|
1179
|
+
// Top Navigation
|
1180
|
+
var _container1 = jQuery(".nav-onepage");
|
1181
|
+
|
1182
|
+
if(_container1.length > 0) {
|
1183
|
+
|
1184
|
+
loadScript(plugin_path + 'jquery.nav.min.js', function() {
|
1185
|
+
|
1186
|
+
jQuery(_container1).onePageNav({
|
1187
|
+
currentClass: 'active',
|
1188
|
+
changeHash: false,
|
1189
|
+
scrollSpeed: 750,
|
1190
|
+
scrollThreshold: 0.5,
|
1191
|
+
filter: ':not(.external)',
|
1192
|
+
easing: 'easeInOutExpo'
|
1193
|
+
});
|
1194
|
+
|
1195
|
+
// Close Nav on menu click
|
1196
|
+
jQuery("#topMain.nav-onepage li>a").bind("click", function() {
|
1197
|
+
if(window.width < 960) {
|
1198
|
+
jQuery("button.btn-mobile").trigger('click');
|
1199
|
+
}
|
1200
|
+
});
|
1201
|
+
|
1202
|
+
});
|
1203
|
+
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
|
1207
|
+
// Bullet Navigation
|
1208
|
+
var _container2 = jQuery("#nav-bullet");
|
1209
|
+
|
1210
|
+
if(_container2.length > 0) {
|
1211
|
+
|
1212
|
+
loadScript(plugin_path + 'jquery.nav.min.js', function() {
|
1213
|
+
|
1214
|
+
jQuery(_container2).onePageNav({
|
1215
|
+
currentClass: 'active',
|
1216
|
+
changeHash: false,
|
1217
|
+
scrollSpeed: 750,
|
1218
|
+
scrollThreshold: 0.5,
|
1219
|
+
filter: ':not(.external)',
|
1220
|
+
easing: 'easeInOutExpo'
|
1221
|
+
});
|
1222
|
+
|
1223
|
+
});
|
1224
|
+
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
|
1228
|
+
}
|
1229
|
+
|
1230
|
+
|
1231
|
+
|
1232
|
+
/** 03. OWL Carousel
|
1233
|
+
**************************************************************** **/
|
1234
|
+
function _owl_carousel() {
|
1235
|
+
|
1236
|
+
|
1237
|
+
// OWL CAROUSEL 1
|
1238
|
+
var _container = jQuery("div.owl-carousel");
|
1239
|
+
|
1240
|
+
if(_container.length > 0) {
|
1241
|
+
|
1242
|
+
loadScript(plugin_path + 'owl-carousel/owl.carousel.min.js', function() {
|
1243
|
+
|
1244
|
+
_container.each(function() {
|
1245
|
+
|
1246
|
+
var slider = jQuery(this);
|
1247
|
+
var options = slider.attr('data-plugin-options');
|
1248
|
+
|
1249
|
+
// Progress Bar
|
1250
|
+
var $opt = eval('(' + options + ')'); // convert text to json
|
1251
|
+
|
1252
|
+
if($opt.progressBar == 'true') {
|
1253
|
+
var afterInit = progressBar;
|
1254
|
+
} else {
|
1255
|
+
var afterInit = false;
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
var defaults = {
|
1259
|
+
items: 5,
|
1260
|
+
itemsCustom: false,
|
1261
|
+
itemsDesktop: [1199,4],
|
1262
|
+
itemsDesktopSmall: [980,3],
|
1263
|
+
itemsTablet: [768,2],
|
1264
|
+
itemsTabletSmall: false,
|
1265
|
+
itemsMobile: [479,1],
|
1266
|
+
singleItem: true,
|
1267
|
+
itemsScaleUp: false,
|
1268
|
+
|
1269
|
+
slideSpeed: 200,
|
1270
|
+
paginationSpeed: 800,
|
1271
|
+
rewindSpeed: 1000,
|
1272
|
+
|
1273
|
+
autoPlay: false,
|
1274
|
+
stopOnHover: false,
|
1275
|
+
|
1276
|
+
navigation: false,
|
1277
|
+
navigationText: [
|
1278
|
+
'<i class="fa fa-angle-left"></i>',
|
1279
|
+
'<i class="fa fa-angle-right"></i>'
|
1280
|
+
],
|
1281
|
+
rewindNav: true,
|
1282
|
+
scrollPerPage: false,
|
1283
|
+
|
1284
|
+
pagination: true,
|
1285
|
+
paginationNumbers: false,
|
1286
|
+
|
1287
|
+
responsive: true,
|
1288
|
+
responsiveRefreshRate: 200,
|
1289
|
+
responsiveBaseWidth: window,
|
1290
|
+
|
1291
|
+
baseClass: "owl-carousel",
|
1292
|
+
theme: "owl-theme",
|
1293
|
+
|
1294
|
+
lazyLoad: false,
|
1295
|
+
lazyFollow: true,
|
1296
|
+
lazyEffect: "fade",
|
1297
|
+
|
1298
|
+
autoHeight: false,
|
1299
|
+
|
1300
|
+
jsonPath: false,
|
1301
|
+
jsonSuccess: false,
|
1302
|
+
|
1303
|
+
dragBeforeAnimFinish: true,
|
1304
|
+
mouseDrag: true,
|
1305
|
+
touchDrag: true,
|
1306
|
+
|
1307
|
+
transitionStyle: false,
|
1308
|
+
|
1309
|
+
addClassActive: false,
|
1310
|
+
|
1311
|
+
beforeUpdate: false,
|
1312
|
+
afterUpdate: false,
|
1313
|
+
beforeInit: false,
|
1314
|
+
afterInit: afterInit,
|
1315
|
+
beforeMove: false,
|
1316
|
+
afterMove: (afterInit == false) ? false : moved,
|
1317
|
+
afterAction: false,
|
1318
|
+
startDragging: false,
|
1319
|
+
afterLazyLoad: false
|
1320
|
+
}
|
1321
|
+
|
1322
|
+
var config = jQuery.extend({}, defaults, options, slider.data("plugin-options"));
|
1323
|
+
slider.owlCarousel(config).addClass("owl-carousel-init");
|
1324
|
+
|
1325
|
+
|
1326
|
+
// Progress Bar
|
1327
|
+
var elem = jQuery(this);
|
1328
|
+
|
1329
|
+
//Init progressBar where elem is $("#owl-demo")
|
1330
|
+
function progressBar(elem){
|
1331
|
+
$elem = elem;
|
1332
|
+
//build progress bar elements
|
1333
|
+
buildProgressBar();
|
1334
|
+
//start counting
|
1335
|
+
start();
|
1336
|
+
}
|
1337
|
+
|
1338
|
+
//create div#progressBar and div#bar then prepend to $("#owl-demo")
|
1339
|
+
function buildProgressBar(){
|
1340
|
+
$progressBar = jQuery("<div>",{
|
1341
|
+
id:"progressBar"
|
1342
|
+
});
|
1343
|
+
$bar = jQuery("<div>",{
|
1344
|
+
id:"bar"
|
1345
|
+
});
|
1346
|
+
$progressBar.append($bar).prependTo($elem);
|
1347
|
+
}
|
1348
|
+
|
1349
|
+
function start() {
|
1350
|
+
//reset timer
|
1351
|
+
percentTime = 0;
|
1352
|
+
isPause = false;
|
1353
|
+
//run interval every 0.01 second
|
1354
|
+
tick = setInterval(interval, 10);
|
1355
|
+
};
|
1356
|
+
|
1357
|
+
|
1358
|
+
var time = 7; // time in seconds
|
1359
|
+
function interval() {
|
1360
|
+
if(isPause === false){
|
1361
|
+
percentTime += 1 / time;
|
1362
|
+
$bar.css({
|
1363
|
+
width: percentTime+"%"
|
1364
|
+
});
|
1365
|
+
//if percentTime is equal or greater than 100
|
1366
|
+
if(percentTime >= 100){
|
1367
|
+
//slide to next item
|
1368
|
+
$elem.trigger('owl.next')
|
1369
|
+
}
|
1370
|
+
}
|
1371
|
+
}
|
1372
|
+
|
1373
|
+
//pause while dragging
|
1374
|
+
function pauseOnDragging(){
|
1375
|
+
isPause = true;
|
1376
|
+
}
|
1377
|
+
|
1378
|
+
//moved callback
|
1379
|
+
function moved(){
|
1380
|
+
//clear interval
|
1381
|
+
clearTimeout(tick);
|
1382
|
+
//start again
|
1383
|
+
start();
|
1384
|
+
}
|
1385
|
+
|
1386
|
+
});
|
1387
|
+
|
1388
|
+
});
|
1389
|
+
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
|
1393
|
+
|
1394
|
+
// OWL CAROUSEL 2
|
1395
|
+
var _container2 = jQuery("div.owl-carousel-2");
|
1396
|
+
|
1397
|
+
if(_container2.length > 0) {
|
1398
|
+
|
1399
|
+
loadScript(plugin_path + 'owl-carousel-2/owl.carousel.min.js', function() {
|
1400
|
+
|
1401
|
+
|
1402
|
+
_container2.each(function() {
|
1403
|
+
var _this = jQuery(this),
|
1404
|
+
_options = _this.attr('data-plugin-options');
|
1405
|
+
|
1406
|
+
_defaults = {
|
1407
|
+
loop: true,
|
1408
|
+
margin: 10,
|
1409
|
+
nav: true,
|
1410
|
+
|
1411
|
+
center: false,
|
1412
|
+
mouseDrag: true,
|
1413
|
+
touchDrag: true,
|
1414
|
+
pullDrag: true,
|
1415
|
+
freeDrag: false,
|
1416
|
+
stagePadding: 0,
|
1417
|
+
merge: false,
|
1418
|
+
mergeFit: true,
|
1419
|
+
autoWidth: false,
|
1420
|
+
startPosition: 0,
|
1421
|
+
URLhashListener: false,
|
1422
|
+
navRewind: true,
|
1423
|
+
navText: [
|
1424
|
+
'<i class="fa fa-angle-left"></i>',
|
1425
|
+
'<i class="fa fa-angle-right"></i>'
|
1426
|
+
],
|
1427
|
+
slideBy: 1,
|
1428
|
+
dots: true,
|
1429
|
+
dotsEach: false,
|
1430
|
+
dotData: false,
|
1431
|
+
lazyLoad: false,
|
1432
|
+
lazyContent: false,
|
1433
|
+
autoplay: false,
|
1434
|
+
autoplayTimeout: 3000,
|
1435
|
+
autoplayHoverPause: false,
|
1436
|
+
smartSpeed: 250,
|
1437
|
+
//fluidSpeed: 'Number',
|
1438
|
+
autoplaySpeed: false,
|
1439
|
+
navSpeed: false,
|
1440
|
+
//dotsSpeed: 'Number/Boolean',
|
1441
|
+
dragEndSpeed: false,
|
1442
|
+
callbacks: true,
|
1443
|
+
responsiveRefreshRate: 200,
|
1444
|
+
responsiveBaseElement: '#wrapper',
|
1445
|
+
responsiveClass: true,
|
1446
|
+
video: false,
|
1447
|
+
videoHeight: false,
|
1448
|
+
videoWidth: false,
|
1449
|
+
animateOut: false,
|
1450
|
+
animateIn: false,
|
1451
|
+
fallbackEasing: 'swing',
|
1452
|
+
info: false,
|
1453
|
+
nestedItemSelector: false,
|
1454
|
+
itemElement: 'div',
|
1455
|
+
navContainer: false,
|
1456
|
+
dotsContainer: false,
|
1457
|
+
|
1458
|
+
animateOut: "slideOutDown",
|
1459
|
+
animateIn: "flipInX",
|
1460
|
+
|
1461
|
+
responsive:{
|
1462
|
+
0:{
|
1463
|
+
items:1
|
1464
|
+
},
|
1465
|
+
600:{
|
1466
|
+
items:2
|
1467
|
+
},
|
1468
|
+
1000:{
|
1469
|
+
items:5
|
1470
|
+
}
|
1471
|
+
}
|
1472
|
+
};
|
1473
|
+
|
1474
|
+
|
1475
|
+
var _config = jQuery.extend({}, _defaults, JSON.parse(_options));
|
1476
|
+
_this.owlCarousel(_config).addClass("owl-loaded");
|
1477
|
+
|
1478
|
+
|
1479
|
+
});
|
1480
|
+
|
1481
|
+
|
1482
|
+
});
|
1483
|
+
|
1484
|
+
}
|
1485
|
+
|
1486
|
+
|
1487
|
+
}
|
1488
|
+
|
1489
|
+
|
1490
|
+
/** 04. Flexslider
|
1491
|
+
**************************************************************** **/
|
1492
|
+
function _flexslider() {
|
1493
|
+
var _container = jQuery(".flexslider");
|
1494
|
+
|
1495
|
+
if(_container.length > 0) {
|
1496
|
+
|
1497
|
+
loadScript(plugin_path + 'slider.flexslider/jquery.flexslider-min.js', function() {
|
1498
|
+
|
1499
|
+
if(jQuery().flexslider) {
|
1500
|
+
var _controlNav = _container.attr('data-controlNav'),
|
1501
|
+
_slideshowSpeed = _container.attr('data-slideshowSpeed') || 7000,
|
1502
|
+
_pauseOnHover = _container.attr('data-pauseOnHover') || false;
|
1503
|
+
|
1504
|
+
if(_pauseOnHover == "true") {
|
1505
|
+
_pauseOnHover = true;
|
1506
|
+
} else{
|
1507
|
+
_pauseOnHover = false;
|
1508
|
+
}
|
1509
|
+
|
1510
|
+
if(_controlNav == 'thumbnails') {
|
1511
|
+
_controlNav = 'thumbnails';
|
1512
|
+
} else
|
1513
|
+
if(_controlNav == 'true') {
|
1514
|
+
_controlNav = true;
|
1515
|
+
} else
|
1516
|
+
if(_controlNav == 'false') {
|
1517
|
+
_controlNav = false;
|
1518
|
+
} else {
|
1519
|
+
_controlNav = true;
|
1520
|
+
}
|
1521
|
+
|
1522
|
+
if(_controlNav == 'thumbnails' || _controlNav == false) {
|
1523
|
+
_directionNav = false;
|
1524
|
+
} else {
|
1525
|
+
_directionNav = true;
|
1526
|
+
}
|
1527
|
+
|
1528
|
+
jQuery(_container).flexslider({
|
1529
|
+
animation : "slide",
|
1530
|
+
controlNav : _controlNav,
|
1531
|
+
slideshowSpeed : parseInt(_slideshowSpeed) || 7000,
|
1532
|
+
directionNav : _directionNav,
|
1533
|
+
pauseOnHover : _pauseOnHover,
|
1534
|
+
start: function(slider){
|
1535
|
+
jQuery('.flex-prev').html('<i class="fa fa-angle-left"></i>');
|
1536
|
+
jQuery('.flex-next').html('<i class="fa fa-angle-right"></i>');
|
1537
|
+
}
|
1538
|
+
});
|
1539
|
+
|
1540
|
+
// Resize Flex Slider if exists!
|
1541
|
+
_container.resize();
|
1542
|
+
|
1543
|
+
}
|
1544
|
+
|
1545
|
+
});
|
1546
|
+
}
|
1547
|
+
}
|
1548
|
+
|
1549
|
+
|
1550
|
+
|
1551
|
+
|
1552
|
+
|
1553
|
+
/** 05. LightBox
|
1554
|
+
**************************************************************** **/
|
1555
|
+
function _lightbox() {
|
1556
|
+
var _el = jQuery(".lightbox");
|
1557
|
+
|
1558
|
+
if(_el.length > 0) {
|
1559
|
+
|
1560
|
+
loadScript(plugin_path + 'magnific-popup/jquery.magnific-popup.min.js', function() {
|
1561
|
+
|
1562
|
+
if(typeof(jQuery.magnificPopup) == "undefined") {
|
1563
|
+
return false;
|
1564
|
+
}
|
1565
|
+
|
1566
|
+
jQuery.extend(true, jQuery.magnificPopup.defaults, {
|
1567
|
+
tClose: 'Close',
|
1568
|
+
tLoading: 'Loading...',
|
1569
|
+
|
1570
|
+
gallery: {
|
1571
|
+
tPrev: 'Previous',
|
1572
|
+
tNext: 'Next',
|
1573
|
+
tCounter: '%curr% / %total%'
|
1574
|
+
},
|
1575
|
+
|
1576
|
+
image: {
|
1577
|
+
tError: 'Image not loaded!'
|
1578
|
+
},
|
1579
|
+
|
1580
|
+
ajax: {
|
1581
|
+
tError: 'Content not loaded!'
|
1582
|
+
}
|
1583
|
+
});
|
1584
|
+
|
1585
|
+
_el.each(function() {
|
1586
|
+
|
1587
|
+
var _t = jQuery(this),
|
1588
|
+
options = _t.attr('data-plugin-options'),
|
1589
|
+
config = {},
|
1590
|
+
defaults = {
|
1591
|
+
type: 'image',
|
1592
|
+
fixedContentPos: false,
|
1593
|
+
fixedBgPos: false,
|
1594
|
+
mainClass: 'mfp-no-margins mfp-with-zoom',
|
1595
|
+
closeOnContentClick: true,
|
1596
|
+
closeOnBgClick: true,
|
1597
|
+
image: {
|
1598
|
+
verticalFit: true
|
1599
|
+
},
|
1600
|
+
|
1601
|
+
zoom: {
|
1602
|
+
enabled: false,
|
1603
|
+
duration: 300
|
1604
|
+
},
|
1605
|
+
|
1606
|
+
gallery: {
|
1607
|
+
enabled: false,
|
1608
|
+
navigateByImgClick: true,
|
1609
|
+
preload: [0,1],
|
1610
|
+
arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
|
1611
|
+
tPrev: 'Previous',
|
1612
|
+
tNext: 'Next',
|
1613
|
+
tCounter: '<span class="mfp-counter">%curr% / %total%</span>'
|
1614
|
+
},
|
1615
|
+
};
|
1616
|
+
|
1617
|
+
if(_t.data("plugin-options")) {
|
1618
|
+
config = jQuery.extend({}, defaults, options, _t.data("plugin-options"));
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
jQuery(this).magnificPopup(config);
|
1622
|
+
|
1623
|
+
});
|
1624
|
+
|
1625
|
+
});
|
1626
|
+
|
1627
|
+
}
|
1628
|
+
|
1629
|
+
}
|
1630
|
+
|
1631
|
+
|
1632
|
+
|
1633
|
+
|
1634
|
+
/** 06. ScrollTo
|
1635
|
+
**************************************************************** **/
|
1636
|
+
function _scrollTo(to, offset) {
|
1637
|
+
|
1638
|
+
if(to == false) {
|
1639
|
+
|
1640
|
+
jQuery("a.scrollTo").bind("click", function(e) {
|
1641
|
+
e.preventDefault();
|
1642
|
+
|
1643
|
+
var href = jQuery(this).attr('href'),
|
1644
|
+
_offset = jQuery(this).attr('data-offset') || 0;
|
1645
|
+
|
1646
|
+
if(href != '#' && href != '#top') {
|
1647
|
+
jQuery('html,body').animate({scrollTop: jQuery(href).offset().top - parseInt(_offset)}, 800, 'easeInOutExpo');
|
1648
|
+
}
|
1649
|
+
|
1650
|
+
if(href == '#top') {
|
1651
|
+
jQuery('html,body').animate({scrollTop: 0}, 800, 'easeInOutExpo');
|
1652
|
+
}
|
1653
|
+
});
|
1654
|
+
|
1655
|
+
jQuery("#toTop").bind("click", function(e) {
|
1656
|
+
e.preventDefault();
|
1657
|
+
jQuery('html,body').animate({scrollTop: 0}, 800, 'easeInOutExpo');
|
1658
|
+
});
|
1659
|
+
|
1660
|
+
} else {
|
1661
|
+
|
1662
|
+
// USAGE: _scrollTo("#footer", 150);
|
1663
|
+
jQuery('html,body').animate({scrollTop: jQuery(to).offset().top - offset}, 800, 'easeInOutExpo');
|
1664
|
+
|
1665
|
+
}
|
1666
|
+
}
|
1667
|
+
|
1668
|
+
|
1669
|
+
|
1670
|
+
|
1671
|
+
/** 07. Parallax
|
1672
|
+
**************************************************************** **/
|
1673
|
+
function _parallax() {
|
1674
|
+
|
1675
|
+
|
1676
|
+
if(jQuery().parallax) {
|
1677
|
+
|
1678
|
+
jQuery(".parallax-auto, .parallax-1, .parallax-2, .parallax-3, .parallax-4, section.page-header.page-header-parallax").each(function() {
|
1679
|
+
var _t = jQuery(this);
|
1680
|
+
|
1681
|
+
jQuery(this).parallax("50%","0.2");
|
1682
|
+
});
|
1683
|
+
|
1684
|
+
}
|
1685
|
+
|
1686
|
+
|
1687
|
+
|
1688
|
+
|
1689
|
+
/** Slider Parallax
|
1690
|
+
Do not use overlay - will be very slow!
|
1691
|
+
**************************** **/
|
1692
|
+
var _slider = jQuery('#slider');
|
1693
|
+
|
1694
|
+
if(_slider.length > 0) {
|
1695
|
+
if(_slider.hasClass('parallax-slider')) {
|
1696
|
+
|
1697
|
+
if(window.width < 768 && _slider.hasClass('pallax-slider-mobile-deisable')) {
|
1698
|
+
return false;
|
1699
|
+
}
|
1700
|
+
|
1701
|
+
var block_intro_top = _slider.offset().top;
|
1702
|
+
|
1703
|
+
jQuery(window).scroll(function() {
|
1704
|
+
|
1705
|
+
var _currentTop = jQuery(document).scrollTop(),
|
1706
|
+
_offset = _slider.attr('data-parallax-offset') || 0;
|
1707
|
+
|
1708
|
+
if(_currentTop < 768) {
|
1709
|
+
var _sliderH = jQuery('#slider').height();
|
1710
|
+
|
1711
|
+
jQuery('#slider>div').css('top', (_currentTop*0.5 - Number(_offset)));
|
1712
|
+
if(!_slider.hasClass('parallax-slider-noopacity')) {
|
1713
|
+
jQuery('#slider>div').css('opacity', (1 - _currentTop/_sliderH*1));
|
1714
|
+
}
|
1715
|
+
}
|
1716
|
+
|
1717
|
+
});
|
1718
|
+
|
1719
|
+
}
|
1720
|
+
}
|
1721
|
+
|
1722
|
+
}
|
1723
|
+
|
1724
|
+
|
1725
|
+
|
1726
|
+
|
1727
|
+
/** 07. Video
|
1728
|
+
**************************************************************** **/
|
1729
|
+
function _video() {
|
1730
|
+
|
1731
|
+
if(jQuery("section.section-video").length > 0) {
|
1732
|
+
var _t = jQuery("section.section-video .section-container-video>video");
|
1733
|
+
_w = jQuery(window).width();
|
1734
|
+
|
1735
|
+
_t.width(_w);
|
1736
|
+
|
1737
|
+
}
|
1738
|
+
|
1739
|
+
}
|
1740
|
+
|
1741
|
+
|
1742
|
+
|
1743
|
+
/** 07. Youtube Backround
|
1744
|
+
**************************************************************** **/
|
1745
|
+
function _youtubeBG() {
|
1746
|
+
var _container = jQuery('#YTPlayer');
|
1747
|
+
|
1748
|
+
if(_container.length > 0) {
|
1749
|
+
loadScript(plugin_path + 'jquery.mb.YTPlayer.min.js', function() {
|
1750
|
+
|
1751
|
+
|
1752
|
+
if(jQuery().mb_YTPlayer) {
|
1753
|
+
var disableMobile = false;
|
1754
|
+
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
|
1755
|
+
// disableMobile = true;
|
1756
|
+
}
|
1757
|
+
|
1758
|
+
if(disableMobile === false) {
|
1759
|
+
|
1760
|
+
jQuery(".player").mb_YTPlayer();
|
1761
|
+
|
1762
|
+
jQuery("#video-volume").bind("click", function(e) {
|
1763
|
+
e.preventDefault();
|
1764
|
+
|
1765
|
+
jQuery('#YTPlayer').toggleVolume();
|
1766
|
+
});
|
1767
|
+
|
1768
|
+
// audio control
|
1769
|
+
jQuery("#video-volume").bind("click", function() {
|
1770
|
+
if(jQuery('i.fa', this).hasClass('fa-volume-down')) {
|
1771
|
+
jQuery('i.fa', this).removeClass('fa-volume-down');
|
1772
|
+
jQuery('i.fa', this).removeClass('fa-volume-up');
|
1773
|
+
jQuery('i.fa', this).addClass('fa-volume-up');
|
1774
|
+
} else {
|
1775
|
+
jQuery('i.fa', this).removeClass('fa-volume-up');
|
1776
|
+
jQuery('i.fa', this).removeClass('fa-volume-v');
|
1777
|
+
jQuery('i.fa', this).addClass('fa-volume-down');
|
1778
|
+
}
|
1779
|
+
});
|
1780
|
+
|
1781
|
+
} else {
|
1782
|
+
|
1783
|
+
jQuery(".player , #video-volume").hide();
|
1784
|
+
|
1785
|
+
}
|
1786
|
+
|
1787
|
+
}
|
1788
|
+
|
1789
|
+
});
|
1790
|
+
}
|
1791
|
+
}
|
1792
|
+
|
1793
|
+
|
1794
|
+
/** 08. Mixitup Filter
|
1795
|
+
**************************************************************** **/
|
1796
|
+
function _mixitup() {
|
1797
|
+
var _container = jQuery('.mix-grid');
|
1798
|
+
|
1799
|
+
if(_container.length > 0) {
|
1800
|
+
loadScript(plugin_path + 'mixitup/jquery.mixitup.min.js', function() {
|
1801
|
+
|
1802
|
+
if(jQuery().mixitup) {
|
1803
|
+
|
1804
|
+
_container.mixitup();
|
1805
|
+
jQuery("ul.mix-filter a").bind("click", function(e) {
|
1806
|
+
e.preventDefault();
|
1807
|
+
});
|
1808
|
+
|
1809
|
+
}
|
1810
|
+
|
1811
|
+
});
|
1812
|
+
|
1813
|
+
}
|
1814
|
+
|
1815
|
+
}
|
1816
|
+
|
1817
|
+
|
1818
|
+
|
1819
|
+
/** 09. Toggle
|
1820
|
+
**************************************************************** **/
|
1821
|
+
function _toggle() {
|
1822
|
+
|
1823
|
+
var $_t = this,
|
1824
|
+
previewParClosedHeight = 25;
|
1825
|
+
|
1826
|
+
jQuery("div.toggle.active > p").addClass("preview-active");
|
1827
|
+
jQuery("div.toggle.active > div.toggle-content").slideDown(400);
|
1828
|
+
jQuery("div.toggle > label").click(function(e) {
|
1829
|
+
|
1830
|
+
var parentSection = jQuery(this).parent(),
|
1831
|
+
parentWrapper = jQuery(this).parents("div.toggle"),
|
1832
|
+
previewPar = false,
|
1833
|
+
isAccordion = parentWrapper.hasClass("toggle-accordion");
|
1834
|
+
|
1835
|
+
if(isAccordion && typeof(e.originalEvent) != "undefined") {
|
1836
|
+
parentWrapper.find("div.toggle.active > label").trigger("click");
|
1837
|
+
}
|
1838
|
+
|
1839
|
+
parentSection.toggleClass("active");
|
1840
|
+
|
1841
|
+
if(parentSection.find("> p").get(0)) {
|
1842
|
+
|
1843
|
+
previewPar = parentSection.find("> p");
|
1844
|
+
var previewParCurrentHeight = previewPar.css("height");
|
1845
|
+
var previewParAnimateHeight = previewPar.css("height");
|
1846
|
+
previewPar.css("height", "auto");
|
1847
|
+
previewPar.css("height", previewParCurrentHeight);
|
1848
|
+
|
1849
|
+
}
|
1850
|
+
|
1851
|
+
var toggleContent = parentSection.find("> div.toggle-content");
|
1852
|
+
|
1853
|
+
if(parentSection.hasClass("active")) {
|
1854
|
+
|
1855
|
+
jQuery(previewPar).animate({height: previewParAnimateHeight}, 350, function() {jQuery(this).addClass("preview-active");});
|
1856
|
+
toggleContent.slideDown(350);
|
1857
|
+
|
1858
|
+
} else {
|
1859
|
+
|
1860
|
+
jQuery(previewPar).animate({height: previewParClosedHeight}, 350, function() {jQuery(this).removeClass("preview-active");});
|
1861
|
+
toggleContent.slideUp(350);
|
1862
|
+
|
1863
|
+
}
|
1864
|
+
|
1865
|
+
});
|
1866
|
+
}
|
1867
|
+
|
1868
|
+
|
1869
|
+
|
1870
|
+
/** 11. Placeholder
|
1871
|
+
**************************************************************** **/
|
1872
|
+
function _placeholder() {
|
1873
|
+
|
1874
|
+
//check for IE
|
1875
|
+
if(navigator.appVersion.indexOf("MSIE")!=-1) {
|
1876
|
+
|
1877
|
+
jQuery('[placeholder]').focus(function() {
|
1878
|
+
|
1879
|
+
var input = jQuery(this);
|
1880
|
+
if (input.val() == input.attr('placeholder')) {
|
1881
|
+
input.val('');
|
1882
|
+
input.removeClass('placeholder');
|
1883
|
+
}
|
1884
|
+
|
1885
|
+
}).blur(function() {
|
1886
|
+
|
1887
|
+
var input = jQuery(this);
|
1888
|
+
if (input.val() == '' || input.val() == input.attr('placeholder')) {
|
1889
|
+
input.addClass('placeholder');
|
1890
|
+
input.val(input.attr('placeholder'));
|
1891
|
+
}
|
1892
|
+
|
1893
|
+
}).blur();
|
1894
|
+
|
1895
|
+
}
|
1896
|
+
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
|
1900
|
+
|
1901
|
+
/** 12. Word Rotate
|
1902
|
+
**************************************************************** **/
|
1903
|
+
function _wrotate() {
|
1904
|
+
jQuery(".word-rotator").each(function() {
|
1905
|
+
|
1906
|
+
var _t = jQuery(this),
|
1907
|
+
_items = _t.find(".items"),
|
1908
|
+
items = _items.find("> span"),
|
1909
|
+
firstItem = items.eq(0),
|
1910
|
+
firstItemClone = firstItem.clone(),
|
1911
|
+
_iHeight = jQuery(this).height(),
|
1912
|
+
_cItem = 1,
|
1913
|
+
_cTop = 0,
|
1914
|
+
_delay = jQuery(this).attr('data-delay') || 2000;
|
1915
|
+
|
1916
|
+
_items.append(firstItemClone);
|
1917
|
+
_t.height(_iHeight).addClass("active");
|
1918
|
+
|
1919
|
+
setInterval(function() {
|
1920
|
+
_cTop = (_cItem * _iHeight);
|
1921
|
+
|
1922
|
+
_items.animate({top: - (_cTop) + "px"}, 300, "easeOutQuad", function(){
|
1923
|
+
_cItem++;
|
1924
|
+
|
1925
|
+
if(_cItem > items.length) {
|
1926
|
+
_items.css("top", 0);
|
1927
|
+
_cItem = 1;
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
});
|
1931
|
+
|
1932
|
+
}, _delay);
|
1933
|
+
|
1934
|
+
});
|
1935
|
+
|
1936
|
+
|
1937
|
+
var _container = jQuery('span.rotate');
|
1938
|
+
|
1939
|
+
if(_container.length > 0) {
|
1940
|
+
|
1941
|
+
loadScript(plugin_path + 'text-rotator/jquery.simple-text-rotator.min.js', function() {
|
1942
|
+
|
1943
|
+
_container.each(function() {
|
1944
|
+
var _t = jQuery(this),
|
1945
|
+
_animation = _t.attr('data-animation') || 'fade', // fade|flip|flipCube|flipUp|spin
|
1946
|
+
_speed = _t.attr('data-speed') || 2000;
|
1947
|
+
|
1948
|
+
_t.textrotator({
|
1949
|
+
animation: _animation,
|
1950
|
+
speed: parseInt(_speed)
|
1951
|
+
});
|
1952
|
+
|
1953
|
+
});
|
1954
|
+
|
1955
|
+
});
|
1956
|
+
|
1957
|
+
}
|
1958
|
+
}
|
1959
|
+
|
1960
|
+
|
1961
|
+
|
1962
|
+
|
1963
|
+
/** 08. Lazy Load
|
1964
|
+
<img class="lazy" data-original="img/example.jpg" width="765" height="574">
|
1965
|
+
**************************************************************** **/
|
1966
|
+
function _lazyload() {
|
1967
|
+
var _container = jQuery('img.lazy');
|
1968
|
+
|
1969
|
+
if(_container.length > 0) {
|
1970
|
+
loadScript(plugin_path + 'lazyload/jquery.lazyload.min.js', function() {
|
1971
|
+
|
1972
|
+
if(jQuery().lazyload) {
|
1973
|
+
|
1974
|
+
_container.each(function () {
|
1975
|
+
var _t = jQuery(this),
|
1976
|
+
_effect = _t.attr('data-effect') || 'fadeIn';
|
1977
|
+
|
1978
|
+
_t.lazyload({
|
1979
|
+
effect : _effect
|
1980
|
+
});
|
1981
|
+
});
|
1982
|
+
|
1983
|
+
}
|
1984
|
+
|
1985
|
+
});
|
1986
|
+
|
1987
|
+
}
|
1988
|
+
|
1989
|
+
}
|
1990
|
+
|
1991
|
+
|
1992
|
+
|
1993
|
+
|
1994
|
+
|
1995
|
+
/** 13. Misc
|
1996
|
+
**************************************************************** **/
|
1997
|
+
function _misc() {
|
1998
|
+
|
1999
|
+
|
2000
|
+
/** Portfolio Bugfix
|
2001
|
+
*********************** **/
|
2002
|
+
if(jQuery("#portfolio").length > 0) {
|
2003
|
+
jQuery("#portfolio .item-box .owl-carousel").each(function() {
|
2004
|
+
|
2005
|
+
// Fix if has owl-carousel slider!
|
2006
|
+
jQuery(this).parent().parent().find('.item-box-desc').css({"padding-top":"29px"});
|
2007
|
+
|
2008
|
+
});
|
2009
|
+
}
|
2010
|
+
|
2011
|
+
/** Masonry
|
2012
|
+
*********************** **/
|
2013
|
+
if(jQuery().masonry) {
|
2014
|
+
jQuery(".masonry").masonry();
|
2015
|
+
}
|
2016
|
+
|
2017
|
+
|
2018
|
+
|
2019
|
+
/** Isotope Portfolio
|
2020
|
+
*********************** **/
|
2021
|
+
var portfolio_isotope_container = jQuery("#portfolio.portfolio-isotope");
|
2022
|
+
|
2023
|
+
if(portfolio_isotope_container.length > 0) {
|
2024
|
+
loadScript(plugin_path + 'isotope/isotope.pkgd.min.js', function() {
|
2025
|
+
|
2026
|
+
// Isotope Portfolio
|
2027
|
+
if(jQuery().isotope) {
|
2028
|
+
|
2029
|
+
var _container = jQuery('#portfolio');
|
2030
|
+
|
2031
|
+
// Calculate Item Width on Fullwidth portfolio
|
2032
|
+
if(_container.hasClass('portfolio-isotope-2')) {
|
2033
|
+
_cols = 2;
|
2034
|
+
} else
|
2035
|
+
if(_container.hasClass('portfolio-isotope-3')) {
|
2036
|
+
_cols = 3;
|
2037
|
+
} else
|
2038
|
+
if(_container.hasClass('portfolio-isotope-4')) {
|
2039
|
+
_cols = 4;
|
2040
|
+
} else
|
2041
|
+
if(_container.hasClass('portfolio-isotope-5')) {
|
2042
|
+
_cols = 5;
|
2043
|
+
} else
|
2044
|
+
if(_container.hasClass('portfolio-isotope-6')) {
|
2045
|
+
_cols = 6;
|
2046
|
+
} else { _cols = 4; }
|
2047
|
+
|
2048
|
+
|
2049
|
+
|
2050
|
+
function _recalcW() {
|
2051
|
+
_dw = jQuery(document).width();
|
2052
|
+
|
2053
|
+
if(_container.hasClass('fullwidth')) { // Fullwidth
|
2054
|
+
|
2055
|
+
// _w = jQuery(document).width(); // NOT USED - problems on aside header
|
2056
|
+
_w = _container.width();
|
2057
|
+
_wItem = (_w/_cols);
|
2058
|
+
|
2059
|
+
if(_dw < 760) {
|
2060
|
+
_wItem = (_w/2);
|
2061
|
+
}
|
2062
|
+
if(_dw < 480) {
|
2063
|
+
_wItem = jQuery("#portfolio").width();
|
2064
|
+
}
|
2065
|
+
|
2066
|
+
// Apply item width
|
2067
|
+
jQuery("#portfolio>.portfolio-item").css({"width":_wItem});
|
2068
|
+
|
2069
|
+
} else { // Non Fullwidth
|
2070
|
+
|
2071
|
+
_mR = parseInt(jQuery("#portfolio>.portfolio-item").css('margin-right'));
|
2072
|
+
_w = jQuery("#portfolio").closest('.container').width();
|
2073
|
+
_wItem = _w / _cols - _mR;
|
2074
|
+
|
2075
|
+
if(_dw < 760) {
|
2076
|
+
_wItem = (_w/2 - _mR);
|
2077
|
+
}
|
2078
|
+
if(_dw < 480) {
|
2079
|
+
_wItem = _w;
|
2080
|
+
}
|
2081
|
+
|
2082
|
+
// Apply item & container width
|
2083
|
+
jQuery("#portfolio.portfolio-isotope").css({"width":_w});
|
2084
|
+
jQuery("#portfolio>.portfolio-item").css({"width":_wItem});
|
2085
|
+
|
2086
|
+
}
|
2087
|
+
|
2088
|
+
// Resize Flex Slider if exists!
|
2089
|
+
if(jQuery('.flexslider').length > 0) {
|
2090
|
+
jQuery('.flexslider').resize();
|
2091
|
+
}
|
2092
|
+
|
2093
|
+
} _recalcW();
|
2094
|
+
|
2095
|
+
|
2096
|
+
|
2097
|
+
jQuery(window).on("load", function(){
|
2098
|
+
|
2099
|
+
var _t = setTimeout(function(){
|
2100
|
+
|
2101
|
+
_container.isotope({
|
2102
|
+
masonry: {},
|
2103
|
+
|
2104
|
+
filter: '*',
|
2105
|
+
animationOptions: {
|
2106
|
+
duration: 750,
|
2107
|
+
easing: 'linear',
|
2108
|
+
queue: false
|
2109
|
+
}
|
2110
|
+
});
|
2111
|
+
|
2112
|
+
jQuery('#portfolio_filter>li>a').bind("click", function(e){
|
2113
|
+
e.preventDefault();
|
2114
|
+
|
2115
|
+
jQuery('#portfolio_filter>li.active').removeClass('active');
|
2116
|
+
jQuery(this).parent('li').addClass('active');
|
2117
|
+
|
2118
|
+
var selector = jQuery(this).attr('data-filter');
|
2119
|
+
_container.isotope({
|
2120
|
+
filter: selector,
|
2121
|
+
animationOptions: {
|
2122
|
+
duration: 750,
|
2123
|
+
easing: 'linear',
|
2124
|
+
queue: false
|
2125
|
+
}
|
2126
|
+
});
|
2127
|
+
|
2128
|
+
});
|
2129
|
+
|
2130
|
+
|
2131
|
+
}, 50 );
|
2132
|
+
|
2133
|
+
setTimeout(function() {
|
2134
|
+
_container.isotope('layout');
|
2135
|
+
}, 300);
|
2136
|
+
|
2137
|
+
});
|
2138
|
+
|
2139
|
+
|
2140
|
+
|
2141
|
+
// On Resize
|
2142
|
+
jQuery(window).resize(function() {
|
2143
|
+
|
2144
|
+
if(window.afterResizeApp2) {
|
2145
|
+
clearTimeout(window.afterResizeApp2);
|
2146
|
+
}
|
2147
|
+
|
2148
|
+
window.afterResizeApp2 = setTimeout(function() {
|
2149
|
+
|
2150
|
+
_recalcW();
|
2151
|
+
|
2152
|
+
setTimeout(function() {
|
2153
|
+
_container.isotope('layout');
|
2154
|
+
}, 300);
|
2155
|
+
|
2156
|
+
}, 300);
|
2157
|
+
|
2158
|
+
});
|
2159
|
+
|
2160
|
+
|
2161
|
+
}
|
2162
|
+
|
2163
|
+
|
2164
|
+
});
|
2165
|
+
} /** end isotope **/
|
2166
|
+
|
2167
|
+
|
2168
|
+
|
2169
|
+
|
2170
|
+
/** Isotope Blog
|
2171
|
+
*********************** **/
|
2172
|
+
var blog_isotope_container = jQuery("#blog.blog-isotope");
|
2173
|
+
|
2174
|
+
if(blog_isotope_container.length > 0) {
|
2175
|
+
loadScript(plugin_path + 'isotope/isotope.pkgd.min.js', function() {
|
2176
|
+
|
2177
|
+
// Isotope blog
|
2178
|
+
if(jQuery().isotope) {
|
2179
|
+
|
2180
|
+
var _container = jQuery('#blog');
|
2181
|
+
|
2182
|
+
// Calculate Item Width on Fullwidth Blog
|
2183
|
+
if(_container.hasClass('blog-isotope-2')) {
|
2184
|
+
_cols = 2;
|
2185
|
+
} else
|
2186
|
+
if(_container.hasClass('blog-isotope-3')) {
|
2187
|
+
_cols = 3;
|
2188
|
+
} else
|
2189
|
+
if(_container.hasClass('blog-isotope-4')) {
|
2190
|
+
_cols = 4;
|
2191
|
+
} else { _cols = 4; }
|
2192
|
+
|
2193
|
+
|
2194
|
+
function _recalcW() {
|
2195
|
+
_dw = jQuery(document).width();
|
2196
|
+
|
2197
|
+
if(_container.hasClass('fullwidth')) { // Fullwidth
|
2198
|
+
|
2199
|
+
_w = jQuery(document).width();
|
2200
|
+
_wItem = (_w/_cols);
|
2201
|
+
|
2202
|
+
if(_dw < 760) {
|
2203
|
+
_wItem = (_w/2);
|
2204
|
+
}
|
2205
|
+
if(_dw < 480) {
|
2206
|
+
_wItem = jQuery("#blog").width();
|
2207
|
+
}
|
2208
|
+
|
2209
|
+
// Apply item width
|
2210
|
+
jQuery("#blog>.blog-post-item").css({"width":_wItem});
|
2211
|
+
|
2212
|
+
} else { // Non Fullwidth
|
2213
|
+
|
2214
|
+
_mR = parseInt(jQuery("#blog>.blog-post-item").css('margin-right'));
|
2215
|
+
_w = jQuery("#blog").closest('.container').width();
|
2216
|
+
_wItem = _w / _cols - _mR;
|
2217
|
+
|
2218
|
+
if(_dw < 760) {
|
2219
|
+
_wItem = (_w/2 - _mR);
|
2220
|
+
}
|
2221
|
+
if(_dw < 480) {
|
2222
|
+
_wItem = _w;
|
2223
|
+
}
|
2224
|
+
|
2225
|
+
// Apply item & container width
|
2226
|
+
jQuery("#blog.blog-isotope").css({"width":_w});
|
2227
|
+
jQuery("#blog>.blog-post-item").css({"width":_wItem});
|
2228
|
+
|
2229
|
+
}
|
2230
|
+
|
2231
|
+
// Resize Flex Slider if exists!
|
2232
|
+
if(jQuery('.flexslider').length > 0) {
|
2233
|
+
jQuery('.flexslider').resize();
|
2234
|
+
}
|
2235
|
+
|
2236
|
+
} _recalcW();
|
2237
|
+
|
2238
|
+
|
2239
|
+
|
2240
|
+
jQuery(window).on("load", function(){
|
2241
|
+
|
2242
|
+
var _t = setTimeout(function(){
|
2243
|
+
|
2244
|
+
_container.isotope({
|
2245
|
+
masonry: {},
|
2246
|
+
|
2247
|
+
filter: '*',
|
2248
|
+
animationOptions: {
|
2249
|
+
duration: 750,
|
2250
|
+
easing: 'linear',
|
2251
|
+
queue: false
|
2252
|
+
}
|
2253
|
+
});
|
2254
|
+
|
2255
|
+
jQuery('#blog_filter>li>a').bind("click", function(e){
|
2256
|
+
e.preventDefault();
|
2257
|
+
|
2258
|
+
jQuery('#blog_filter>li.active').removeClass('active');
|
2259
|
+
jQuery(this).parent('li').addClass('active');
|
2260
|
+
|
2261
|
+
var selector = jQuery(this).attr('data-filter');
|
2262
|
+
_container.isotope({
|
2263
|
+
filter: selector,
|
2264
|
+
animationOptions: {
|
2265
|
+
duration: 750,
|
2266
|
+
easing: 'linear',
|
2267
|
+
queue: false
|
2268
|
+
}
|
2269
|
+
});
|
2270
|
+
|
2271
|
+
});
|
2272
|
+
|
2273
|
+
|
2274
|
+
}, 50 );
|
2275
|
+
|
2276
|
+
setTimeout(function() {
|
2277
|
+
_container.isotope('layout');
|
2278
|
+
}, 300);
|
2279
|
+
|
2280
|
+
});
|
2281
|
+
|
2282
|
+
|
2283
|
+
|
2284
|
+
// On Resize
|
2285
|
+
jQuery(window).resize(function() {
|
2286
|
+
|
2287
|
+
if(window.afterResizeApp2) {
|
2288
|
+
clearTimeout(window.afterResizeApp2);
|
2289
|
+
}
|
2290
|
+
|
2291
|
+
window.afterResizeApp2 = setTimeout(function() {
|
2292
|
+
|
2293
|
+
_recalcW();
|
2294
|
+
|
2295
|
+
setTimeout(function() {
|
2296
|
+
_container.isotope('layout');
|
2297
|
+
}, 300);
|
2298
|
+
|
2299
|
+
}, 300);
|
2300
|
+
|
2301
|
+
});
|
2302
|
+
|
2303
|
+
|
2304
|
+
}
|
2305
|
+
|
2306
|
+
|
2307
|
+
});
|
2308
|
+
} /** end isotope **/
|
2309
|
+
|
2310
|
+
|
2311
|
+
|
2312
|
+
|
2313
|
+
/** Flip Boxes
|
2314
|
+
*********************** **/
|
2315
|
+
if(jQuery('.box-flip').length > 0) {
|
2316
|
+
|
2317
|
+
jQuery('.box-flip').each(function() {
|
2318
|
+
_height1 = jQuery('.box1',this).outerHeight();
|
2319
|
+
_height2 = jQuery('.box2',this).outerHeight();
|
2320
|
+
|
2321
|
+
if(_height1 >= _height2) {
|
2322
|
+
_height = _height1;
|
2323
|
+
} else {
|
2324
|
+
_height = _height2;
|
2325
|
+
}
|
2326
|
+
|
2327
|
+
jQuery(this).css({"min-height":_height+"px"});
|
2328
|
+
jQuery('.box1',this).css({"min-height":_height+"px"});
|
2329
|
+
jQuery('.box2',this).css({"min-height":_height+"px"});
|
2330
|
+
});
|
2331
|
+
|
2332
|
+
jQuery('.box-flip').hover(function() {
|
2333
|
+
jQuery(this).addClass('flip');
|
2334
|
+
},function(){
|
2335
|
+
jQuery(this).removeClass('flip');
|
2336
|
+
});
|
2337
|
+
}
|
2338
|
+
|
2339
|
+
|
2340
|
+
|
2341
|
+
|
2342
|
+
/** Sticky Side (social icons)
|
2343
|
+
*********************** **/
|
2344
|
+
if(jQuery("div.sticky-side").length > 0) {
|
2345
|
+
|
2346
|
+
var _t = jQuery("div.sticky-side");
|
2347
|
+
_h = _t.height() / 2;
|
2348
|
+
|
2349
|
+
_t.css({"margin-top":"-"+_h+"px"});
|
2350
|
+
}
|
2351
|
+
|
2352
|
+
|
2353
|
+
|
2354
|
+
|
2355
|
+
/** Increase / Decrease No.
|
2356
|
+
Example: shop-single-left.html
|
2357
|
+
*********************** **/
|
2358
|
+
jQuery(".incr").bind("click", function(e) {
|
2359
|
+
e.preventDefault();
|
2360
|
+
|
2361
|
+
var _for = jQuery(this).attr('data-for'),
|
2362
|
+
_max = parseInt(jQuery(this).attr('data-max')),
|
2363
|
+
_curVal = parseInt(jQuery("#" + _for).val());
|
2364
|
+
|
2365
|
+
if(_curVal < _max) {
|
2366
|
+
jQuery("#" + _for).val(_curVal + 1);
|
2367
|
+
}
|
2368
|
+
});
|
2369
|
+
|
2370
|
+
jQuery(".decr").bind("click", function(e) {
|
2371
|
+
e.preventDefault();
|
2372
|
+
|
2373
|
+
var _for = jQuery(this).attr('data-for'),
|
2374
|
+
_min = parseInt(jQuery(this).attr('data-min')),
|
2375
|
+
_curVal = parseInt(jQuery("#" + _for).val());
|
2376
|
+
|
2377
|
+
if(_curVal > _min) {
|
2378
|
+
jQuery("#" + _for).val(_curVal - 1);
|
2379
|
+
}
|
2380
|
+
});
|
2381
|
+
|
2382
|
+
|
2383
|
+
|
2384
|
+
|
2385
|
+
|
2386
|
+
/** Default Button Toggle
|
2387
|
+
*********************** **/
|
2388
|
+
jQuery("a.toggle-default").bind("click", function(e) {
|
2389
|
+
e.preventDefault();
|
2390
|
+
|
2391
|
+
var _href = jQuery(this).attr('href');
|
2392
|
+
|
2393
|
+
if(jQuery(_href).is(":hidden")) {
|
2394
|
+
|
2395
|
+
jQuery(_href).slideToggle(200);
|
2396
|
+
jQuery('i.fa', this).removeClass('fa-plus-square').addClass('fa-minus-square');
|
2397
|
+
|
2398
|
+
} else {
|
2399
|
+
|
2400
|
+
jQuery(_href).slideToggle(200);
|
2401
|
+
jQuery('i.fa', this).removeClass('fa-minus-square').addClass('fa-plus-square');
|
2402
|
+
|
2403
|
+
}
|
2404
|
+
|
2405
|
+
});
|
2406
|
+
|
2407
|
+
|
2408
|
+
|
2409
|
+
|
2410
|
+
|
2411
|
+
/** Custom File Upload
|
2412
|
+
<input class="custom-file-upload" type="file" id="file" name="myfiles[]" multiple />
|
2413
|
+
*********************** **/
|
2414
|
+
var file_container = jQuery("input[type=file]");
|
2415
|
+
|
2416
|
+
if(file_container.length > 0) {
|
2417
|
+
loadScript(plugin_path + 'custom.fle_upload.js');
|
2418
|
+
}
|
2419
|
+
|
2420
|
+
|
2421
|
+
|
2422
|
+
/** Textarea Words Limit
|
2423
|
+
*********************** **/
|
2424
|
+
jQuery("textarea.word-count").on('keyup', function() {
|
2425
|
+
var _t = jQuery(this),
|
2426
|
+
words = this.value.match(/\S+/g).length,
|
2427
|
+
_limit = _t.attr('data-maxlength') || 200;
|
2428
|
+
|
2429
|
+
if (words > parseInt(_limit)) {
|
2430
|
+
|
2431
|
+
// Split the string on first 200 words and rejoin on spaces
|
2432
|
+
var trimmed = _t.val().split(/\s+/, 200).join(" ");
|
2433
|
+
// Add a space at the end to keep new typing making new words
|
2434
|
+
_t.val(trimmed + " ");
|
2435
|
+
|
2436
|
+
} else {
|
2437
|
+
|
2438
|
+
var _data_info = _t.attr('data-info');
|
2439
|
+
|
2440
|
+
if(_data_info == '' || _data_info == undefined) {
|
2441
|
+
var _infoContainer = _t.next('div');
|
2442
|
+
jQuery('span', _infoContainer).text(words + '/' + _limit);
|
2443
|
+
} else {
|
2444
|
+
jQuery('#' +_data_info).text(words + '/' + _limit);
|
2445
|
+
}
|
2446
|
+
|
2447
|
+
|
2448
|
+
}
|
2449
|
+
});
|
2450
|
+
|
2451
|
+
|
2452
|
+
|
2453
|
+
|
2454
|
+
}
|
2455
|
+
|
2456
|
+
|
2457
|
+
|
2458
|
+
/** Sticky Footer
|
2459
|
+
**************************************************************** **/
|
2460
|
+
function _stickyFooter() {
|
2461
|
+
if(jQuery("#footer").hasClass('sticky')) {
|
2462
|
+
|
2463
|
+
var footerHeight = 0,
|
2464
|
+
footerTop = 0,
|
2465
|
+
_footer = jQuery("#footer.sticky");
|
2466
|
+
|
2467
|
+
positionFooter();
|
2468
|
+
|
2469
|
+
function positionFooter() {
|
2470
|
+
footerHeight = _footer.height();
|
2471
|
+
footerTop = (jQuery(window).scrollTop()+jQuery(window).height()-footerHeight)+"px";
|
2472
|
+
|
2473
|
+
if((jQuery(document.body).height()+footerHeight) > jQuery(window).height()) {
|
2474
|
+
_footer.css({
|
2475
|
+
position: "absolute"
|
2476
|
+
}).stop().animate({
|
2477
|
+
top: footerTop
|
2478
|
+
},0);
|
2479
|
+
} else {
|
2480
|
+
_footer.css({position: "static"});
|
2481
|
+
}
|
2482
|
+
|
2483
|
+
}
|
2484
|
+
|
2485
|
+
jQuery(window).scroll(positionFooter).resize(positionFooter);
|
2486
|
+
|
2487
|
+
}
|
2488
|
+
}
|
2489
|
+
|
2490
|
+
|
2491
|
+
|
2492
|
+
|
2493
|
+
|
2494
|
+
/** Countdown
|
2495
|
+
**************************************************************** **/
|
2496
|
+
function _countDown() {
|
2497
|
+
var _container = jQuery(".countdown"),
|
2498
|
+
_container2 = jQuery(".countdown-download");
|
2499
|
+
|
2500
|
+
if(_container.length > 0 || _container2.length > 0) {
|
2501
|
+
|
2502
|
+
loadScript(plugin_path + 'countdown/jquery.countdown.pack.min.js', function() {
|
2503
|
+
|
2504
|
+
/** On Page Load **/
|
2505
|
+
_container.each(function() {
|
2506
|
+
var _t = jQuery(this),
|
2507
|
+
_date = _t.attr('data-from'),
|
2508
|
+
_labels = _t.attr('data-labels');
|
2509
|
+
|
2510
|
+
if(_labels) {
|
2511
|
+
_labels = _labels.split(",");
|
2512
|
+
}
|
2513
|
+
|
2514
|
+
if(_date) {
|
2515
|
+
var _d = new Date(_date);
|
2516
|
+
jQuery(this).countdown({
|
2517
|
+
until: new Date(_d),
|
2518
|
+
labels: _labels || ["Years","Months","Weeks","Days","Hours","Minutes","Seconds"]
|
2519
|
+
});
|
2520
|
+
}
|
2521
|
+
});
|
2522
|
+
|
2523
|
+
|
2524
|
+
/** Download **/
|
2525
|
+
_container2.bind("click", function(e){
|
2526
|
+
e.preventDefault();
|
2527
|
+
|
2528
|
+
var _t = jQuery(this),
|
2529
|
+
cd_container = _t.attr('data-for'),
|
2530
|
+
_countdown = jQuery("#"+cd_container+' span.download-wait>.countdown'),
|
2531
|
+
_seconds = parseInt(_t.attr('data-seconds')),
|
2532
|
+
_dataURL = _t.attr('href');
|
2533
|
+
|
2534
|
+
_t.fadeOut(250, function(){
|
2535
|
+
jQuery("#"+cd_container).fadeIn(250, function() {
|
2536
|
+
|
2537
|
+
var currentDate = new Date();
|
2538
|
+
currentDate.setSeconds(currentDate.getSeconds() + _seconds);
|
2539
|
+
|
2540
|
+
_countdown.countdown({
|
2541
|
+
until: currentDate,
|
2542
|
+
format: 'S',
|
2543
|
+
expiryUrl: _dataURL,
|
2544
|
+
onExpiry: function(){
|
2545
|
+
jQuery("#"+cd_container+' span.download-message').removeClass('hide');
|
2546
|
+
jQuery("#"+cd_container+' span.download-wait').addClass('hide');
|
2547
|
+
}
|
2548
|
+
});
|
2549
|
+
|
2550
|
+
});
|
2551
|
+
});
|
2552
|
+
|
2553
|
+
return false;
|
2554
|
+
|
2555
|
+
});
|
2556
|
+
|
2557
|
+
|
2558
|
+
});
|
2559
|
+
|
2560
|
+
}
|
2561
|
+
|
2562
|
+
}
|
2563
|
+
|
2564
|
+
|
2565
|
+
|
2566
|
+
/** Masonry Gallery
|
2567
|
+
**************************************************************** **/
|
2568
|
+
function _masonryGallery() {
|
2569
|
+
|
2570
|
+
if(jQuery(".masonry-gallery").length > 0) {
|
2571
|
+
|
2572
|
+
jQuery(".masonry-gallery").each(function() {
|
2573
|
+
var _container = jQuery(this),
|
2574
|
+
columns = 4;
|
2575
|
+
|
2576
|
+
if(_container.hasClass('columns-2')) columns = 2;
|
2577
|
+
else if(_container.hasClass('columns-3')) columns = 3;
|
2578
|
+
else if(_container.hasClass('columns-4')) columns = 4;
|
2579
|
+
else if(_container.hasClass('columns-5')) columns = 5;
|
2580
|
+
else if(_container.hasClass('columns-6')) columns = 6;
|
2581
|
+
|
2582
|
+
var _firstElemWidth = _container.find('a:eq(0)').outerWidth(),
|
2583
|
+
_bigImageNo = _container.attr('data-img-big'),
|
2584
|
+
_containerWidth = _container.width();
|
2585
|
+
|
2586
|
+
|
2587
|
+
// Fix margins & Width
|
2588
|
+
var postWidth = (_containerWidth/columns);
|
2589
|
+
postWidth = Math.floor(postWidth);
|
2590
|
+
if((postWidth * columns) >= _containerWidth) {
|
2591
|
+
_container.css({ 'margin-right': '-1px' });
|
2592
|
+
}
|
2593
|
+
if(columns < 6) {
|
2594
|
+
_container.children('a').css({"width":postWidth+"px"});
|
2595
|
+
}
|
2596
|
+
|
2597
|
+
|
2598
|
+
// Set Big Image
|
2599
|
+
if(parseInt(_bigImageNo) > 0) {
|
2600
|
+
|
2601
|
+
_bigImageNo = Number(_bigImageNo) - 1;
|
2602
|
+
_container.find('a:eq('+_bigImageNo+')').css({ width: _firstElemWidth*2 + 'px'});
|
2603
|
+
|
2604
|
+
loadScript(plugin_path + 'isotope/isotope.pkgd.min.js', function() {
|
2605
|
+
|
2606
|
+
setTimeout( function() {
|
2607
|
+
_container.isotope({
|
2608
|
+
masonry: {
|
2609
|
+
columnWidth: _firstElemWidth
|
2610
|
+
}
|
2611
|
+
});
|
2612
|
+
|
2613
|
+
_container.isotope('layout');
|
2614
|
+
|
2615
|
+
}, 1000);
|
2616
|
+
|
2617
|
+
});
|
2618
|
+
|
2619
|
+
}
|
2620
|
+
|
2621
|
+
});
|
2622
|
+
|
2623
|
+
|
2624
|
+
}
|
2625
|
+
|
2626
|
+
}
|
2627
|
+
|
2628
|
+
|
2629
|
+
|
2630
|
+
|
2631
|
+
/** Toastr
|
2632
|
+
|
2633
|
+
TYPE:
|
2634
|
+
primary
|
2635
|
+
info
|
2636
|
+
error
|
2637
|
+
sucess
|
2638
|
+
warning
|
2639
|
+
|
2640
|
+
POSITION
|
2641
|
+
top-right
|
2642
|
+
top-left
|
2643
|
+
top-center
|
2644
|
+
top-full-width
|
2645
|
+
bottom-right
|
2646
|
+
bottom-left
|
2647
|
+
bottom-center
|
2648
|
+
bottom-full-width
|
2649
|
+
|
2650
|
+
USAGE:
|
2651
|
+
_toastr("My Message here","top-right","error",false);
|
2652
|
+
|
2653
|
+
NOTE:
|
2654
|
+
_onclick = url to redirect (example: http://www.stepofweb.com)
|
2655
|
+
**************************************************************** **/
|
2656
|
+
function _toastr(_message,_position,_notifyType,_onclick) {
|
2657
|
+
var _btn = jQuery(".toastr-notify");
|
2658
|
+
|
2659
|
+
if(_btn.length > 0 && _message != false) {
|
2660
|
+
|
2661
|
+
loadScript(plugin_path + 'toastr/toastr.js', function() {
|
2662
|
+
// toastr.clear();
|
2663
|
+
|
2664
|
+
/** BUTTON CLICK
|
2665
|
+
********************* **/
|
2666
|
+
_btn.bind("click", function(e) {
|
2667
|
+
e.preventDefault();
|
2668
|
+
|
2669
|
+
|
2670
|
+
var _message = jQuery(this).attr('data-message'),
|
2671
|
+
_notifyType = jQuery(this).attr('data-notifyType') || "default",
|
2672
|
+
_position = jQuery(this).attr('data-position') || "top-right",
|
2673
|
+
_progressBar = jQuery(this).attr('data-progressBar') == "true" ? true : false,
|
2674
|
+
_closeButton = jQuery(this).attr('data-closeButton') == "true" ? true : false,
|
2675
|
+
_debug = jQuery(this).attr('data-debug') == "true" ? true : false,
|
2676
|
+
_newestOnTop = jQuery(this).attr('data-newestOnTop') == "true" ? true : false,
|
2677
|
+
_preventDuplicates = jQuery(this).attr('data-preventDuplicates') == "true" ? true : false,
|
2678
|
+
_showDuration = jQuery(this).attr('data-showDuration') || "300",
|
2679
|
+
_hideDuration = jQuery(this).attr('data-hideDuration') || "1000",
|
2680
|
+
_timeOut = jQuery(this).attr('data-timeOut') || "5000",
|
2681
|
+
_extendedTimeOut = jQuery(this).attr('data-extendedTimeOut') || "1000",
|
2682
|
+
_showEasing = jQuery(this).attr('data-showEasing') || "swing",
|
2683
|
+
_hideEasing = jQuery(this).attr('data-hideEasing') || "linear",
|
2684
|
+
_showMethod = jQuery(this).attr('data-showMethod') || "fadeIn",
|
2685
|
+
_hideMethod = jQuery(this).attr('data-hideMethod') || "fadeOut";
|
2686
|
+
|
2687
|
+
toastr.options = {
|
2688
|
+
"closeButton": _closeButton,
|
2689
|
+
"debug": _debug,
|
2690
|
+
"newestOnTop": _newestOnTop,
|
2691
|
+
"progressBar": _progressBar,
|
2692
|
+
"positionClass": "toast-" + _position,
|
2693
|
+
"preventDuplicates": _preventDuplicates,
|
2694
|
+
"onclick": null,
|
2695
|
+
"showDuration": _showDuration,
|
2696
|
+
"hideDuration": _hideDuration,
|
2697
|
+
"timeOut": _timeOut,
|
2698
|
+
"extendedTimeOut": _extendedTimeOut,
|
2699
|
+
"showEasing": _showEasing,
|
2700
|
+
"hideEasing": _hideEasing,
|
2701
|
+
"showMethod": _showMethod,
|
2702
|
+
"hideMethod": _hideMethod
|
2703
|
+
}
|
2704
|
+
|
2705
|
+
toastr[_notifyType](_message);
|
2706
|
+
});
|
2707
|
+
|
2708
|
+
|
2709
|
+
/** JAVSCRIPT / ON LOAD
|
2710
|
+
************************* **/
|
2711
|
+
if(_message != false) {
|
2712
|
+
|
2713
|
+
if(_onclick != false) {
|
2714
|
+
onclick = function() {
|
2715
|
+
window.location = _onclick;
|
2716
|
+
}
|
2717
|
+
} else {
|
2718
|
+
onclick = null
|
2719
|
+
}
|
2720
|
+
|
2721
|
+
toastr.options = {
|
2722
|
+
"closeButton": true,
|
2723
|
+
"debug": false,
|
2724
|
+
"newestOnTop": false,
|
2725
|
+
"progressBar": true,
|
2726
|
+
"positionClass": "toast-" + _position,
|
2727
|
+
"preventDuplicates": false,
|
2728
|
+
"onclick": onclick,
|
2729
|
+
"showDuration": "300",
|
2730
|
+
"hideDuration": "1000",
|
2731
|
+
"timeOut": "5000",
|
2732
|
+
"extendedTimeOut": "1000",
|
2733
|
+
"showEasing": "swing",
|
2734
|
+
"hideEasing": "linear",
|
2735
|
+
"showMethod": "fadeIn",
|
2736
|
+
"hideMethod": "fadeOut"
|
2737
|
+
}
|
2738
|
+
|
2739
|
+
setTimeout(function(){
|
2740
|
+
toastr[_notifyType](_message);
|
2741
|
+
}, 1500); // delay 1.5s
|
2742
|
+
}
|
2743
|
+
});
|
2744
|
+
|
2745
|
+
}
|
2746
|
+
|
2747
|
+
}
|
2748
|
+
|
2749
|
+
|
2750
|
+
/** Chart
|
2751
|
+
**************************************************************** **/
|
2752
|
+
function _charts() {
|
2753
|
+
|
2754
|
+
/** Easy Pie Chart
|
2755
|
+
************************* **/
|
2756
|
+
var _container = jQuery(".piechart");
|
2757
|
+
|
2758
|
+
if(_container.length > 0) {
|
2759
|
+
|
2760
|
+
loadScript(plugin_path + 'chart.easypiechart/dist/jquery.easypiechart.min.js', function() {
|
2761
|
+
|
2762
|
+
jQuery(".piechart").each(function() {
|
2763
|
+
var _t = jQuery(this),
|
2764
|
+
_size = _t.attr('data-size') || 150,
|
2765
|
+
_animate = _t.attr('data-animate') || "3000";
|
2766
|
+
|
2767
|
+
_t.easyPieChart({
|
2768
|
+
size: _size,
|
2769
|
+
animate: _animate,
|
2770
|
+
scaleColor: false,
|
2771
|
+
trackColor: _t.attr('data-trackcolor') || 'rgba(0,0,0,0.04)',
|
2772
|
+
lineWidth: _t.attr('data-width') || '2',
|
2773
|
+
lineCap: 'square',
|
2774
|
+
barColor: _t.attr('data-color') || '#0093BF'
|
2775
|
+
});
|
2776
|
+
|
2777
|
+
/* fix element positioning */
|
2778
|
+
jQuery("*", this).attr('style', "line-height:"+_size+"px !important; height:"+_size+"px !important; width:"+_size+"px !important");
|
2779
|
+
|
2780
|
+
});
|
2781
|
+
|
2782
|
+
});
|
2783
|
+
|
2784
|
+
}
|
2785
|
+
|
2786
|
+
|
2787
|
+
}
|
2788
|
+
|
2789
|
+
|
2790
|
+
|
2791
|
+
/** Select2
|
2792
|
+
**************************************************************** **/
|
2793
|
+
function _select2() {
|
2794
|
+
var _container = jQuery('select.select2');
|
2795
|
+
|
2796
|
+
if(_container.length > 0) {
|
2797
|
+
|
2798
|
+
loadScript(plugin_path + 'select2/js/select2.full.min.js', function() {
|
2799
|
+
|
2800
|
+
_container.each(function() {
|
2801
|
+
var _t = jQuery(this);
|
2802
|
+
|
2803
|
+
if(!_t.hasClass('select2-custom')) {
|
2804
|
+
_t.select2();
|
2805
|
+
}
|
2806
|
+
|
2807
|
+
})
|
2808
|
+
|
2809
|
+
});
|
2810
|
+
}
|
2811
|
+
|
2812
|
+
}
|
2813
|
+
|
2814
|
+
|
2815
|
+
|
2816
|
+
|
2817
|
+
/** Form [form plugin + validation plugin]
|
2818
|
+
**************************************************************** **/
|
2819
|
+
function _form() {
|
2820
|
+
|
2821
|
+
|
2822
|
+
/** Form Validate
|
2823
|
+
LOAD PLUGIN ONLY!
|
2824
|
+
************************ **/
|
2825
|
+
if(jQuery('form.validate-plugin').length > 0) {
|
2826
|
+
|
2827
|
+
loadScript(plugin_path + 'form.validate/jquery.form.min.js', function() {
|
2828
|
+
loadScript(plugin_path + 'form.validate/jquery.validation.min.js');
|
2829
|
+
});
|
2830
|
+
|
2831
|
+
}
|
2832
|
+
|
2833
|
+
|
2834
|
+
|
2835
|
+
/** Form Validate
|
2836
|
+
************************ **/
|
2837
|
+
if(jQuery('form.validate').length > 0) {
|
2838
|
+
|
2839
|
+
loadScript(plugin_path + 'form.validate/jquery.form.min.js', function() {
|
2840
|
+
loadScript(plugin_path + 'form.validate/jquery.validation.min.js', function() {
|
2841
|
+
|
2842
|
+
if(jQuery().validate) {
|
2843
|
+
|
2844
|
+
jQuery('form.validate').each(function() {
|
2845
|
+
|
2846
|
+
var _t = jQuery(this),
|
2847
|
+
_Smessage = _t.attr('data-success') || "Successfully! Thank you!",
|
2848
|
+
_Cmessage = _t.attr('data-captcha') || "Invalid Captcha!",
|
2849
|
+
_Tposition = _t.attr('data-toastr-position') || "top-right",
|
2850
|
+
_Ttype = _t.attr('data-toastr-type') || "success";
|
2851
|
+
_Turl = _t.attr('data-toastr-url') || false;
|
2852
|
+
|
2853
|
+
// Append 'is_ajax' hidden input field!
|
2854
|
+
_t.append('<input type="hidden" name="is_ajax" value="true" />');
|
2855
|
+
|
2856
|
+
_t.validate({
|
2857
|
+
submitHandler: function(form) {
|
2858
|
+
|
2859
|
+
// Show spin icon
|
2860
|
+
jQuery(form).find('.input-group-addon').find('.fa-envelope').removeClass('fa-envelope').addClass('fa-refresh fa-spin');
|
2861
|
+
|
2862
|
+
jQuery(form).ajaxSubmit({
|
2863
|
+
|
2864
|
+
target: jQuery(form).find('.validate-result').length > 0 ? jQuery(form).find('.validate-result') : '',
|
2865
|
+
|
2866
|
+
error: function(data) {
|
2867
|
+
_toastr("Sent Failed!",_Tposition,"error",false);
|
2868
|
+
},
|
2869
|
+
|
2870
|
+
success: function(data) {
|
2871
|
+
var data = data.trim();
|
2872
|
+
|
2873
|
+
// SMTP ERROR
|
2874
|
+
if(data == '_failed_') {
|
2875
|
+
_toastr("SMTP ERROR! Please, check your config file!",_Tposition,"error",false);
|
2876
|
+
}
|
2877
|
+
|
2878
|
+
// CAPTCHA ERROR
|
2879
|
+
else if(data == '_captcha_') {
|
2880
|
+
_toastr("Invalid Captcha!",_Tposition,"error",false);
|
2881
|
+
|
2882
|
+
|
2883
|
+
// SUCCESS
|
2884
|
+
} else {
|
2885
|
+
|
2886
|
+
// Remove spin icon
|
2887
|
+
jQuery(form).find('.input-group-addon').find('.fa-refresh').removeClass('fa-refresh fa-spin').addClass('fa-envelope');
|
2888
|
+
|
2889
|
+
// Clear the form
|
2890
|
+
jQuery(form).find('input.form-control').val('');
|
2891
|
+
|
2892
|
+
// Toastr Message
|
2893
|
+
_toastr(_Smessage,_Tposition,_Ttype,_Turl);
|
2894
|
+
|
2895
|
+
}
|
2896
|
+
}
|
2897
|
+
});
|
2898
|
+
|
2899
|
+
}
|
2900
|
+
});
|
2901
|
+
|
2902
|
+
});
|
2903
|
+
|
2904
|
+
}
|
2905
|
+
|
2906
|
+
});
|
2907
|
+
});
|
2908
|
+
|
2909
|
+
}
|
2910
|
+
|
2911
|
+
|
2912
|
+
|
2913
|
+
|
2914
|
+
/** Masked Input
|
2915
|
+
************************ **/
|
2916
|
+
var _container = jQuery('input.masked');
|
2917
|
+
if(_container.length > 0) {
|
2918
|
+
|
2919
|
+
loadScript(plugin_path + 'form.masked/jquery.maskedinput.js', function() {
|
2920
|
+
|
2921
|
+
_container.each(function() {
|
2922
|
+
|
2923
|
+
var _t = jQuery(this);
|
2924
|
+
_format = _t.attr('data-format') || '(999) 999-999999',
|
2925
|
+
_placeholder = _t.attr('data-placeholder') || 'X';
|
2926
|
+
|
2927
|
+
jQuery.mask.definitions['f'] = "[A-Fa-f0-9]";
|
2928
|
+
_t.mask(_format, {placeholder:_placeholder});
|
2929
|
+
|
2930
|
+
});
|
2931
|
+
|
2932
|
+
});
|
2933
|
+
|
2934
|
+
}
|
2935
|
+
|
2936
|
+
}
|
2937
|
+
|
2938
|
+
|
2939
|
+
|
2940
|
+
|
2941
|
+
|
2942
|
+
/** Pickers
|
2943
|
+
**************************************************************** **/
|
2944
|
+
function _pickers() {
|
2945
|
+
|
2946
|
+
/** Date Picker
|
2947
|
+
<input type="text" class="form-control datepicker" data-format="yyyy-mm-dd" data-lang="en" data-RTL="false">
|
2948
|
+
******************* **/
|
2949
|
+
var _container_1 = jQuery('.datepicker');
|
2950
|
+
|
2951
|
+
if(_container_1.length > 0) {
|
2952
|
+
loadScript(plugin_path + 'bootstrap.datepicker/js/bootstrap-datepicker.min.js', function() {
|
2953
|
+
|
2954
|
+
if(jQuery().datepicker) {
|
2955
|
+
|
2956
|
+
_container_1.each(function() {
|
2957
|
+
var _t = jQuery(this),
|
2958
|
+
_lang = _t.attr('data-lang') || 'en';
|
2959
|
+
|
2960
|
+
if(_lang != 'en' && _lang != '') { // load language file
|
2961
|
+
loadScript(plugin_path + 'bootstrap.datepicker/locales/bootstrap-datepicker.'+_lang+'.min.js');
|
2962
|
+
}
|
2963
|
+
|
2964
|
+
jQuery(this).datepicker({
|
2965
|
+
format: _t.attr('data-format') || 'yyyy-mm-dd',
|
2966
|
+
language: _lang,
|
2967
|
+
rtl: _t.attr('data-RTL') == "true" ? true : false,
|
2968
|
+
changeMonth: _t.attr('data-changeMonth') == "false" ? false : true,
|
2969
|
+
todayBtn: _t.attr('data-todayBtn') == "false" ? false : "linked",
|
2970
|
+
calendarWeeks: _t.attr('data-calendarWeeks') == "false" ? false : true,
|
2971
|
+
autoclose: _t.attr('data-autoclose') == "false" ? false : true,
|
2972
|
+
todayHighlight: _t.attr('data-todayHighlight') == "false" ? false : true,
|
2973
|
+
|
2974
|
+
onRender: function(date) {
|
2975
|
+
// return date.valueOf() < nowDate.valueOf() ? 'disabled' : '';
|
2976
|
+
}
|
2977
|
+
}).on('changeDate', function(ev) {
|
2978
|
+
|
2979
|
+
// AJAX POST - OPTIONAL
|
2980
|
+
|
2981
|
+
}).data('datepicker');
|
2982
|
+
});
|
2983
|
+
|
2984
|
+
}
|
2985
|
+
|
2986
|
+
});
|
2987
|
+
}
|
2988
|
+
|
2989
|
+
|
2990
|
+
|
2991
|
+
|
2992
|
+
/** Range Picker
|
2993
|
+
<input type="text" class="form-control rangepicker" value="2015-01-01 - 2016-12-31" data-format="yyyy-mm-dd" data-from="2015-01-01" data-to="2016-12-31">
|
2994
|
+
******************* **/
|
2995
|
+
var _container_2 = jQuery('.rangepicker');
|
2996
|
+
|
2997
|
+
if(_container_2.length > 0) {
|
2998
|
+
loadScript(plugin_path + 'bootstrap.daterangepicker/moment.min.js', function() {
|
2999
|
+
loadScript(plugin_path + 'bootstrap.daterangepicker/daterangepicker.js', function() {
|
3000
|
+
|
3001
|
+
if(jQuery().datepicker) {
|
3002
|
+
|
3003
|
+
_container_2.each(function() {
|
3004
|
+
|
3005
|
+
var _t = jQuery(this),
|
3006
|
+
_format = _t.attr('data-format').toUpperCase() || 'YYYY-MM-DD';
|
3007
|
+
|
3008
|
+
_t.daterangepicker(
|
3009
|
+
{
|
3010
|
+
format: _format,
|
3011
|
+
startDate: _t.attr('data-from'),
|
3012
|
+
endDate: _t.attr('data-to'),
|
3013
|
+
|
3014
|
+
ranges: {
|
3015
|
+
'Today': [moment(), moment()],
|
3016
|
+
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
3017
|
+
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
3018
|
+
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
3019
|
+
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
3020
|
+
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
3021
|
+
}
|
3022
|
+
},
|
3023
|
+
function(start, end, label) {
|
3024
|
+
// alert("A new date range was chosen: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
|
3025
|
+
});
|
3026
|
+
|
3027
|
+
});
|
3028
|
+
|
3029
|
+
}
|
3030
|
+
|
3031
|
+
});
|
3032
|
+
});
|
3033
|
+
}
|
3034
|
+
|
3035
|
+
|
3036
|
+
|
3037
|
+
/** Time Picker
|
3038
|
+
<input type="text" class="form-control timepicker" value="11 : 55 : PM">
|
3039
|
+
******************* **/
|
3040
|
+
var _container_3 = jQuery('.timepicker');
|
3041
|
+
|
3042
|
+
if(_container_3.length > 0) {
|
3043
|
+
loadScript(plugin_path + 'timepicki/timepicki.min.js', function() {
|
3044
|
+
|
3045
|
+
if(jQuery().timepicki) {
|
3046
|
+
|
3047
|
+
_container_3.timepicki();
|
3048
|
+
|
3049
|
+
}
|
3050
|
+
|
3051
|
+
});
|
3052
|
+
}
|
3053
|
+
|
3054
|
+
|
3055
|
+
|
3056
|
+
/** Color Picker
|
3057
|
+
******************* **/
|
3058
|
+
var _container_4 = jQuery('.colorpicker');
|
3059
|
+
|
3060
|
+
if(_container_4.length > 0) {
|
3061
|
+
loadScript(plugin_path + 'spectrum/spectrum.min.js', function() {
|
3062
|
+
|
3063
|
+
if(jQuery().spectrum) {
|
3064
|
+
|
3065
|
+
_container_4.each(function() {
|
3066
|
+
var _t = jQuery(this),
|
3067
|
+
_preferredFormat = _t.attr('data-format') || "hex", // hex, hex3, hsl, rgb, name
|
3068
|
+
_palletteOnly = _t.attr('data-palletteOnly') || "false",
|
3069
|
+
_fullPicker = _t.attr('data-fullpicker') || "false",
|
3070
|
+
_allowEmpty = _t.attr('data-allowEmpty') || false;
|
3071
|
+
_flat = _t.attr('data-flat') || false;
|
3072
|
+
|
3073
|
+
if(_palletteOnly == "true" || _fullPicker == "true") {
|
3074
|
+
|
3075
|
+
var _palette = [
|
3076
|
+
["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
|
3077
|
+
["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
|
3078
|
+
["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
|
3079
|
+
["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
|
3080
|
+
["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
|
3081
|
+
["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
|
3082
|
+
["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
|
3083
|
+
["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
|
3084
|
+
];
|
3085
|
+
|
3086
|
+
} else {
|
3087
|
+
_palette = null;
|
3088
|
+
}
|
3089
|
+
|
3090
|
+
if(_t.attr('data-defaultColor')) {
|
3091
|
+
_color = _t.attr('data-defaultColor');
|
3092
|
+
} else {
|
3093
|
+
_color = "#ff0000";
|
3094
|
+
}
|
3095
|
+
|
3096
|
+
if(!_t.attr('data-defaultColor') && _allowEmpty == "true") {
|
3097
|
+
_color = null;
|
3098
|
+
}
|
3099
|
+
|
3100
|
+
_t.spectrum({
|
3101
|
+
showPaletteOnly: _palletteOnly == "true" ? true : false,
|
3102
|
+
togglePaletteOnly: _palletteOnly == "true" ? true : false,
|
3103
|
+
|
3104
|
+
flat: _flat == "true" ? true : false,
|
3105
|
+
showInitial: _allowEmpty == "true" ? true : false,
|
3106
|
+
showInput: _allowEmpty == "true" ? true : false,
|
3107
|
+
allowEmpty: _allowEmpty == "true" ? true : false,
|
3108
|
+
|
3109
|
+
chooseText: _t.attr('data-chooseText') || "Coose",
|
3110
|
+
cancelText: _t.attr('data-cancelText') || "Cancel",
|
3111
|
+
|
3112
|
+
color: _color,
|
3113
|
+
showInput: true,
|
3114
|
+
showPalette: true,
|
3115
|
+
preferredFormat: _preferredFormat,
|
3116
|
+
showAlpha: _preferredFormat == "rgb" ? true : false,
|
3117
|
+
palette: _palette
|
3118
|
+
});
|
3119
|
+
|
3120
|
+
});
|
3121
|
+
|
3122
|
+
}
|
3123
|
+
|
3124
|
+
});
|
3125
|
+
}
|
3126
|
+
|
3127
|
+
}
|
3128
|
+
|
3129
|
+
|
3130
|
+
|
3131
|
+
|
3132
|
+
|
3133
|
+
/** Editors
|
3134
|
+
**************************************************************** **/
|
3135
|
+
function _editors() {
|
3136
|
+
|
3137
|
+
/** Summernote HTML Editor
|
3138
|
+
<textarea class="summernote form-control" data-height="200"></textarea>
|
3139
|
+
***************************** **/
|
3140
|
+
var _container_1 = jQuery('textarea.summernote');
|
3141
|
+
|
3142
|
+
if(_container_1.length > 0) {
|
3143
|
+
|
3144
|
+
loadScript(plugin_path + 'editor.summernote/summernote.min.js', function() {
|
3145
|
+
|
3146
|
+
if(jQuery().summernote) {
|
3147
|
+
|
3148
|
+
_container_1.each(function() {
|
3149
|
+
|
3150
|
+
var _lang = jQuery(this).attr('data-lang') || 'en-US';
|
3151
|
+
|
3152
|
+
if(_lang != 'en-US') { // Language!
|
3153
|
+
alert(_lang);
|
3154
|
+
loadScript(plugin_path + 'editor.summernote/lang/summernote-'+_lang+'.js');
|
3155
|
+
}
|
3156
|
+
|
3157
|
+
jQuery(this).summernote({
|
3158
|
+
height: jQuery(this).attr('data-height') || 200,
|
3159
|
+
lang: jQuery(this).attr('data-lang') || 'en-US', // default: 'en-US'
|
3160
|
+
toolbar: [
|
3161
|
+
/* [groupname, [button list]] */
|
3162
|
+
['style', ['style']],
|
3163
|
+
['fontsize', ['fontsize']],
|
3164
|
+
['style', ['bold', 'italic', 'underline','strikethrough', 'clear']],
|
3165
|
+
['color', ['color']],
|
3166
|
+
['para', ['ul', 'ol', 'paragraph']],
|
3167
|
+
['table', ['table']],
|
3168
|
+
['media', ['link', 'picture', 'video']],
|
3169
|
+
['misc', ['codeview', 'fullscreen', 'help']]
|
3170
|
+
]
|
3171
|
+
});
|
3172
|
+
});
|
3173
|
+
|
3174
|
+
}
|
3175
|
+
});
|
3176
|
+
}
|
3177
|
+
|
3178
|
+
|
3179
|
+
|
3180
|
+
|
3181
|
+
|
3182
|
+
/** Markdown HTML Editor
|
3183
|
+
<textarea class="markdown" data-height="300" name="content" data-provide="markdown" data-lang="en" rows="10"></textarea>
|
3184
|
+
***************************** **/
|
3185
|
+
var _container_2 = jQuery('textarea.markdown');
|
3186
|
+
|
3187
|
+
if(_container_2.length > 0) {
|
3188
|
+
|
3189
|
+
loadScript(plugin_path + 'editor.markdown/js/bootstrap-markdown.min.js', function() {
|
3190
|
+
|
3191
|
+
if(jQuery().markdown) {
|
3192
|
+
|
3193
|
+
_container_2.each(function() {
|
3194
|
+
var _t = jQuery(this);
|
3195
|
+
|
3196
|
+
var _lang = _t.attr('data-lang') || 'en';
|
3197
|
+
|
3198
|
+
if(_lang != 'en') { // Language!
|
3199
|
+
loadScript(plugin_path + 'editor.markdown/locale/bootstrap-markdown.'+_lang+'.js');
|
3200
|
+
}
|
3201
|
+
|
3202
|
+
jQuery(this).markdown({
|
3203
|
+
autofocus: _t.attr('data-autofocus') == "true" ? true : false,
|
3204
|
+
savable: _t.attr('data-savable') == "true" ? true : false,
|
3205
|
+
height: _t.attr('data-height') || 'inherit',
|
3206
|
+
language: _lang == 'en' ? null : _lang
|
3207
|
+
});
|
3208
|
+
|
3209
|
+
});
|
3210
|
+
|
3211
|
+
}
|
3212
|
+
|
3213
|
+
});
|
3214
|
+
|
3215
|
+
}
|
3216
|
+
|
3217
|
+
}
|
3218
|
+
|
3219
|
+
|
3220
|
+
|
3221
|
+
|
3222
|
+
|
3223
|
+
|
3224
|
+
/** Pajinate [jQuery Pagination]
|
3225
|
+
USAGE
|
3226
|
+
|
3227
|
+
<div class="pajinate" data-pajinante-items-per-page="8" data-pajinate-container=".pajinate-container">
|
3228
|
+
|
3229
|
+
<div class="pajinate-container">
|
3230
|
+
|
3231
|
+
<div>item1</div>
|
3232
|
+
<div>item2</div>
|
3233
|
+
<div>item3</div>
|
3234
|
+
.....
|
3235
|
+
|
3236
|
+
</div>
|
3237
|
+
|
3238
|
+
<div class="pajinate-nav">
|
3239
|
+
<ul class="pagination"><!-- pages added by pajinate plugin --></ul>
|
3240
|
+
</div>
|
3241
|
+
|
3242
|
+
</div>
|
3243
|
+
**************************************************************** **/
|
3244
|
+
function _pajinate() {
|
3245
|
+
var _container = jQuery('div.pajinate');
|
3246
|
+
|
3247
|
+
if(_container.length > 0) {
|
3248
|
+
|
3249
|
+
loadScript(plugin_path + 'pajinate/jquery.pajinate.bootstrap.min.js', function() {
|
3250
|
+
|
3251
|
+
if(jQuery().pajinate) {
|
3252
|
+
|
3253
|
+
_container.each(function() {
|
3254
|
+
var _t = jQuery(this),
|
3255
|
+
_perPage = _t.attr('data-pajinante-items-per-page') || 8;
|
3256
|
+
_numLinks = _t.attr('data-pajinante-num-links') || 5;
|
3257
|
+
|
3258
|
+
_t.pajinate({
|
3259
|
+
items_per_page : parseInt(_perPage),
|
3260
|
+
num_page_links_to_display : parseInt(_numLinks),
|
3261
|
+
item_container_id : _t.attr('data-pajinate-container') || '.pajinate-container',
|
3262
|
+
nav_panel_id : '.pajinate-nav ul',
|
3263
|
+
show_first_last : false,
|
3264
|
+
wrap_around : true,
|
3265
|
+
abort_on_small_lists : true,
|
3266
|
+
start_page : 0,
|
3267
|
+
nav_label_prev : '«',
|
3268
|
+
nav_label_next : '»'
|
3269
|
+
});
|
3270
|
+
|
3271
|
+
});
|
3272
|
+
}
|
3273
|
+
|
3274
|
+
});
|
3275
|
+
|
3276
|
+
}
|
3277
|
+
|
3278
|
+
}
|
3279
|
+
|
3280
|
+
|
3281
|
+
|
3282
|
+
|
3283
|
+
|
3284
|
+
/** Infininte Scroll
|
3285
|
+
**************************************************************** **/
|
3286
|
+
function _infiniteScroll() {
|
3287
|
+
var _container = jQuery(".infinite-scroll");
|
3288
|
+
|
3289
|
+
if(_container.length > 0) {
|
3290
|
+
|
3291
|
+
loadScript(plugin_path + 'infinite-scroll/jquery.infinitescroll.min.js', function() {
|
3292
|
+
|
3293
|
+
_navSelector = _container.attr('data-nextSelector') || "#inf-load-nex",
|
3294
|
+
_itemSelector = _container.attr('data-itemSelector') || ".item",
|
3295
|
+
_nextSelector = _navSelector + " a";
|
3296
|
+
|
3297
|
+
_container.infinitescroll({
|
3298
|
+
loading: {
|
3299
|
+
finishedMsg : '<i class="fa fa-check"></i>',
|
3300
|
+
msgText : '<i class="fa fa-refresh fa-spin"></i>',
|
3301
|
+
img : "data:image/gif;base64,R0lGODlhGAAYAPUAABQSFCwuLBwaHAwKDKyurGxqbNze3CwqLCQmJLS2tOzu7OTi5JyenBweHBQWFJyanPz+/HRydLSytFxeXPz6/ExOTKSmpFRSVHR2dAwODAQCBOzq7PTy9ISChPT29IyKjIyOjISGhOTm5GRiZJSWlJSSlFRWVMTCxNza3ExKTNTS1KyqrHx6fGRmZKSipMzOzMTGxDQyNDw+PAQGBDQ2NERCRFxaXMzKzGxubDw6PCQiJLy+vERGRLy6vHx+fNTW1CH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBQAAACwAAAAAGAAYAEAGqECAcAhoRAiojQJFiAiI0Kh0qOsZOhqhDMK9ZadgAI0WBmhAXAhFVm5HbZR0aTYdsFpSkwqjo5sRLAtpIjxuUzZpECmGjI1QA4JcKH5lGVICDHFpGyoqGx4uDWENFh4iKjcbiR4MT1ItLJSPJWkUNo9uAyhpBpaOGjdpOY7ExcYaIQs9OsUpibfENZoQIF9gY1EpqlwiLAh+M4AqJmUCOBJJGz8EOKJRQQAh+QQJBQABACwAAAAAGAAYAAAGp8CAcBhoRBILDgdFKAiI0KHAB5rUZBUWDALxMJ5R4SCmiWpoJ67iEm4TZx0upOCuB1jyir2tuXE3DnthE3IlglENchwDh0QDG3ITjUQ7ciGTQxFybJgBGkcYGhoYPaGdARdyOKchcjunhH8znQAccmCYJZGnDpAQN2WdFXI+pwEFch2znRe+MDTBbzGMbQIPHlwwLBcyNSMgLIF2Ai0WKAocBhI4uERBACH5BAkFACwALAAAAAAYABgAAAaoQJZwyNIEJiAJCpWICIjQKFGD6Gw8D4d0C3UQIJsKd1wsQSgFMldjgUAu6q1jA27EpRg34x5FUCAeT3xDAx5uBQAMJyZ8GRxuFiRuFAF3B24QKguYE3cpmAubbil3I5gGKpgIdwF/EA9tgAN8JicMGQVuHLODQgKGEKu9QgxuGMNCDQpgAMgsF38rGs4Ffx/TyBUiECtayAIPHgohAdi9DRFKTCAj5VJBACH5BAkFAAAALAAAAAAYABgAAAa0QIBwSAQMaphHoVFsOoezlsEleFqJDsnmcu1qLJBW9zpQUSpjqwyycQgPBAIiLYRBGIDMAgJRaegREB4CE3wQFAN0NHwRYHwwdAANfBIqhlx0AXwGCnx+kQV8Cp0QBZEaL3wbBnwBkReGKgl8TGkadnwugRA0dBkUhhMNHhARdBqWEAsZAAwQkHQIEgQHQgIbFDKRTRUUL4nbRC0QFjPhRBcbEm7nQg0uBi3g7Q0RDxEyzFdBACH5BAkFAAgALAAAAAAYABgAAAaxQIRwSCwKHMWkssgLCZbQYmNnUgpMh6gQoIoUZQqIh6ZFHDjV7QLCLpURIcUTAWKzvWUBhYFwcOwnA28IOx4CBXY3AIMIJRAFEmwoSIwYEAQGbDWMQiwQBh4QKpxCjhyhbqQqEByZLKQ1bAaRr4wOKGwSiKlvADd2BQIeJ4MDJ3YcSA8UlFqWdiBCAgohbyR2C4tCJhwBZTQUEAo5RQUqzVAHJuhDJjsNpFIhKfFG7FFBACH5BAkFAAAALAAAAQAYABYAAAa3QIBQmEnlNMOkcgmoGSCQEJNIY048UIhhKqS1lClKFtLjClmmoWAzvunMgJmqIWRkDTYkHIBxARpiECUDe0MIHg0RUCV6hQAaGxESEAszjkkvEk8sl0kqKgoQCJ1CGiIKChuNlwcQCigvpGcQKBKxpAMLEBI4IpaXGiVQODoeb44DwhAUAgAuGIUaEyhZDEINKr9cCDdjG81CJpxmO2MUPEojVVy6UBQ2TDGEUyFQCzKyjzk880NBACH5BAkFAAEALAAAAAAYABgAAAazwIBwGABMOhcNcckUOkoKiJTVrAYqG6k2YWXiKFptpEs0gbWbXmFmHQwbWcjNJlCSYwIhQ9qxk4UaVAIeEB1/TCANBRAnfodCExEEEDSPSzUJKCeWSzQGHBicRBUcHimiQywKC5WoGjAoCTKoATQUBBETqDMnEAUNH6ghEBQOAT6OZBo+UgxCAjF/Mw0TN1IKeUJuVTMFPSJhEBePGOHEBZYJ4SI8nCxaHB/GnBoXISYATUEAIfkECQUAKgAsAAAAABgAGAAABqpAlXCoErQsr4WBlCE6nQ2XB0Ktup5Yk6LKhZywzgKlyplSKRfwsELdYA6DDCI1OaiFgg2EALirHxAfGn5gDR4rg4RPGhEbDopYAQkdkFgjBnaVTiEoiZpDCQmfRBooIKNDBwYjqEIdCQGtDgoFnpoaEh4NqBogEA+oDisQjn4xExUIAAMILCIQFBV+JmNUHh7VEAWEMF1VCmmELt4UDAKQGSUoCy8WI+dPQQAh+QQJBQAJACwAAAAAGAAYAAAGrMCEcJhoRCQoxUblmmSI0KGA4YFYr9bFIUqsbLBgK4ErLFAosEiuESi8sBKyifKqRTWXk+el4zYULgNkQhkaZBYShoOLOigAi5ARE5CQDzOUixGYi3abXANPnlE5olyapUQzD6hELaesDgYNrAkzEi5kMwOKnxYbs1EIKh4wF5dQNSoQF2QSWC8FATo0GDcUHi2DBGFgGymLBwvcEBQPDpQZNi4qGxsoEjgCXEEAIfkEBQUACAAsAAAAABgAGAAABqZAhHCIEBQIBg/HICk4iNCh4OGBWK9WTgkQHZoUlFMJwyKpsJCFrBvhhJ7QGgqrgA9tr0BX6HhhTUQNO3Z7ADBWFAdEIQJ7UAMRJTREAjyOl0MNmJucnZ6foKGio6SdmqQphDljA5wCIUQBVRAwXJcAO6dCJlg3tl0BPxdQAgpYKDVRAh8cOF05C2g/JSw+JTAeCsOFJRxoVx4PjZgORygcHCgETl1BADs=",
|
3302
|
+
speed : 'normal'
|
3303
|
+
},
|
3304
|
+
nextSelector : _nextSelector,
|
3305
|
+
navSelector : _navSelector,
|
3306
|
+
itemSelector : _itemSelector,
|
3307
|
+
behavior : '',
|
3308
|
+
|
3309
|
+
state: {
|
3310
|
+
isDone : false
|
3311
|
+
}
|
3312
|
+
},
|
3313
|
+
|
3314
|
+
function(newElements) {
|
3315
|
+
|
3316
|
+
Init(true);
|
3317
|
+
|
3318
|
+
if(jQuery().isotope) {
|
3319
|
+
|
3320
|
+
_container.isotope('appended', jQuery(newElements));
|
3321
|
+
|
3322
|
+
setTimeout( function(){
|
3323
|
+
_container.isotope('layout');
|
3324
|
+
}, 2000);
|
3325
|
+
|
3326
|
+
}
|
3327
|
+
|
3328
|
+
});
|
3329
|
+
|
3330
|
+
});
|
3331
|
+
|
3332
|
+
}
|
3333
|
+
|
3334
|
+
}
|
3335
|
+
|
3336
|
+
|
3337
|
+
|
3338
|
+
|
3339
|
+
|
3340
|
+
/** Image Zoom
|
3341
|
+
**************************************************************** **/
|
3342
|
+
function _zoom() {
|
3343
|
+
var _container = jQuery('figure.zoom');
|
3344
|
+
|
3345
|
+
if(_container.length > 0) {
|
3346
|
+
|
3347
|
+
loadScript(plugin_path + 'image.zoom/jquery.zoom.min.js', function() {
|
3348
|
+
|
3349
|
+
if(jQuery().zoom) {
|
3350
|
+
|
3351
|
+
_container.each(function() {
|
3352
|
+
var _t = jQuery(this),
|
3353
|
+
_mode = _t.attr('data-mode'),
|
3354
|
+
_id = _t.attr('id');
|
3355
|
+
|
3356
|
+
if(_mode == 'grab') {
|
3357
|
+
_t.zoom({ on:'grab' });
|
3358
|
+
} else
|
3359
|
+
|
3360
|
+
if(_mode == 'click') {
|
3361
|
+
_t.zoom({ on:'click' });
|
3362
|
+
} else
|
3363
|
+
|
3364
|
+
if(_mode == 'toggle') {
|
3365
|
+
_t.zoom({ on:'toggle' });
|
3366
|
+
} else {
|
3367
|
+
_t.zoom();
|
3368
|
+
}
|
3369
|
+
|
3370
|
+
if(isMobile.any()) {
|
3371
|
+
_t.zoom({ on:'toggle' });
|
3372
|
+
}
|
3373
|
+
|
3374
|
+
// Thumbnails
|
3375
|
+
if(_id) {
|
3376
|
+
jQuery('.zoom-more[data-for='+_id+'] a').bind("click", function(e) {
|
3377
|
+
e.preventDefault();
|
3378
|
+
|
3379
|
+
var _href = jQuery(this).attr('href');
|
3380
|
+
|
3381
|
+
if(_href != "#") {
|
3382
|
+
jQuery('.zoom-more[data-for='+_id+'] a').removeClass('active');
|
3383
|
+
jQuery(this).addClass('active');
|
3384
|
+
|
3385
|
+
jQuery('figure#'+_id + '>.lightbox').attr('href', _href);
|
3386
|
+
|
3387
|
+
jQuery('figure#'+_id + '>img').fadeOut(0, function() {
|
3388
|
+
jQuery('figure#'+_id + '>img').attr('src', _href);
|
3389
|
+
}).fadeIn(500);
|
3390
|
+
|
3391
|
+
|
3392
|
+
}
|
3393
|
+
});
|
3394
|
+
}
|
3395
|
+
|
3396
|
+
});
|
3397
|
+
|
3398
|
+
}
|
3399
|
+
|
3400
|
+
});
|
3401
|
+
|
3402
|
+
}
|
3403
|
+
|
3404
|
+
}
|
3405
|
+
|
3406
|
+
|
3407
|
+
|
3408
|
+
|
3409
|
+
|
3410
|
+
/** Autosuggest
|
3411
|
+
http://twitter.github.io/typeahead.js/
|
3412
|
+
**************************************************************** **/
|
3413
|
+
function _autosuggest() {
|
3414
|
+
_container = jQuery('div.autosuggest');
|
3415
|
+
|
3416
|
+
if(_container.length > 0) {
|
3417
|
+
|
3418
|
+
loadScript(plugin_path + 'typeahead.bundle.js', function() {
|
3419
|
+
|
3420
|
+
if(jQuery().typeahead) {
|
3421
|
+
|
3422
|
+
_container.each(function() {
|
3423
|
+
var _t = jQuery(this),
|
3424
|
+
_minLength = _t.attr('data-minLength') || 1,
|
3425
|
+
_qryURL = _t.attr('data-queryURL'),
|
3426
|
+
_limit = _t.attr('data-limit') || 10,
|
3427
|
+
_autoload = _t.attr('data-autoload');
|
3428
|
+
|
3429
|
+
if(_autoload == "false") {
|
3430
|
+
return false;
|
3431
|
+
}
|
3432
|
+
|
3433
|
+
/** **/
|
3434
|
+
/* Bloodhound (Suggestion Engine) */
|
3435
|
+
var _typeahead = new Bloodhound({
|
3436
|
+
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
|
3437
|
+
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
3438
|
+
limit: _limit,
|
3439
|
+
remote: {
|
3440
|
+
url: _qryURL + '%QUERY',
|
3441
|
+
},
|
3442
|
+
});
|
3443
|
+
|
3444
|
+
jQuery('.typeahead', _t).typeahead({
|
3445
|
+
limit: _limit,
|
3446
|
+
hint: _t.attr('data-hint') == "false" ? false : true,
|
3447
|
+
highlight: _t.attr('data-highlight') == "false" ? false : true,
|
3448
|
+
minLength: parseInt(_minLength),
|
3449
|
+
|
3450
|
+
cache: false,
|
3451
|
+
},
|
3452
|
+
{
|
3453
|
+
name: '_typeahead',
|
3454
|
+
source: _typeahead
|
3455
|
+
});
|
3456
|
+
/** **/
|
3457
|
+
|
3458
|
+
});
|
3459
|
+
|
3460
|
+
|
3461
|
+
}
|
3462
|
+
|
3463
|
+
});
|
3464
|
+
|
3465
|
+
}
|
3466
|
+
|
3467
|
+
}
|
3468
|
+
|
3469
|
+
|
3470
|
+
|
3471
|
+
|
3472
|
+
|
3473
|
+
|
3474
|
+
/** Form Stepper
|
3475
|
+
**************************************************************** **/
|
3476
|
+
function _stepper() {
|
3477
|
+
var _container = jQuery('input.stepper');
|
3478
|
+
|
3479
|
+
if(_container.length > 0) {
|
3480
|
+
|
3481
|
+
loadScript(plugin_path + 'form.stepper/jquery.stepper.min.js', function() {
|
3482
|
+
|
3483
|
+
if(jQuery().stepper) {
|
3484
|
+
|
3485
|
+
jQuery(_container).each(function() {
|
3486
|
+
var _t = jQuery(this),
|
3487
|
+
_min = _t.attr('min') || null,
|
3488
|
+
_max = _t.attr('max') || null;
|
3489
|
+
|
3490
|
+
_t.stepper({
|
3491
|
+
limit: [_min,_max],
|
3492
|
+
floatPrecission: _t.attr('data-floatPrecission') || 2,
|
3493
|
+
wheel_step: _t.attr('data-wheelstep') || 0.1,
|
3494
|
+
arrow_step: _t.attr('data-arrowstep') || 0.2,
|
3495
|
+
allowWheel: _t.attr('data-mousescrool') == "false" ? false : true,
|
3496
|
+
UI: _t.attr('data-UI') == "false" ? false : true,
|
3497
|
+
// --
|
3498
|
+
type: _t.attr('data-type') || "float",
|
3499
|
+
preventWheelAcceleration: _t.attr('data-preventWheelAcceleration') == "false" ? false : true,
|
3500
|
+
incrementButton: _t.attr('data-incrementButton') || "▴",
|
3501
|
+
decrementButton: _t.attr('data-decrementButton') || "▾",
|
3502
|
+
onStep: null,
|
3503
|
+
onWheel: null,
|
3504
|
+
onArrow: null,
|
3505
|
+
onButton: null,
|
3506
|
+
onKeyUp: null
|
3507
|
+
});
|
3508
|
+
|
3509
|
+
});
|
3510
|
+
|
3511
|
+
}
|
3512
|
+
|
3513
|
+
});
|
3514
|
+
|
3515
|
+
}
|
3516
|
+
|
3517
|
+
}
|
3518
|
+
|
3519
|
+
|
3520
|
+
|
3521
|
+
|
3522
|
+
|
3523
|
+
|
3524
|
+
/** Slimscroll
|
3525
|
+
**************************************************************** **/
|
3526
|
+
function _slimScroll() {
|
3527
|
+
var _container = jQuery('.slimscroll');
|
3528
|
+
|
3529
|
+
if(_container.length > 0) {
|
3530
|
+
|
3531
|
+
loadScript(plugin_path + 'slimscroll/jquery.slimscroll.min.js', function() {
|
3532
|
+
|
3533
|
+
if(jQuery().slimScroll) {
|
3534
|
+
|
3535
|
+
jQuery('.slimscroll').each(function () {
|
3536
|
+
|
3537
|
+
var height;
|
3538
|
+
if (jQuery(this).attr("data-height")) {
|
3539
|
+
height = jQuery(this).attr("data-height");
|
3540
|
+
} else {
|
3541
|
+
height = jQuery(this).height();
|
3542
|
+
}
|
3543
|
+
|
3544
|
+
jQuery(this).slimScroll({
|
3545
|
+
size: jQuery(this).attr("data-size") || '5px',
|
3546
|
+
opacity: jQuery(this).attr("data-opacity") || .6,
|
3547
|
+
position: jQuery(this).attr("data-position") || 'right',
|
3548
|
+
allowPageScroll: false, // not working
|
3549
|
+
disableFadeOut: false,
|
3550
|
+
railVisible: true,
|
3551
|
+
railColor: jQuery(this).attr("data-railColor") || '#222',
|
3552
|
+
railOpacity: jQuery(this).attr("data-railOpacity") || 0.05,
|
3553
|
+
alwaysVisible: (jQuery(this).attr("data-alwaysVisible") != "false" ? true : false),
|
3554
|
+
railVisible: (jQuery(this).attr("data-railVisible") != "false" ? true : false),
|
3555
|
+
color: jQuery(this).attr("data-color") || '#333',
|
3556
|
+
wrapperClass: jQuery(this).attr("data-wrapper-class") || 'slimScrollDiv',
|
3557
|
+
railColor: jQuery(this).attr("data-railColor") || '#eaeaea',
|
3558
|
+
height: height
|
3559
|
+
});
|
3560
|
+
|
3561
|
+
|
3562
|
+
// Disable body scroll on slimscroll hover
|
3563
|
+
if(jQuery(this).attr('disable-body-scroll') == 'true') {
|
3564
|
+
|
3565
|
+
jQuery(this).bind('mousewheel DOMMouseScroll', function(e) {
|
3566
|
+
var scrollTo = null;
|
3567
|
+
|
3568
|
+
if (e.type == 'mousewheel') {
|
3569
|
+
scrollTo = (e.originalEvent.wheelDelta * -1);
|
3570
|
+
}
|
3571
|
+
else if (e.type == 'DOMMouseScroll') {
|
3572
|
+
scrollTo = 40 * e.originalEvent.detail;
|
3573
|
+
}
|
3574
|
+
|
3575
|
+
if (scrollTo) {
|
3576
|
+
e.preventDefault();
|
3577
|
+
jQuery(this).scrollTop(scrollTo + jQuery(this).scrollTop());
|
3578
|
+
}
|
3579
|
+
});
|
3580
|
+
|
3581
|
+
}
|
3582
|
+
|
3583
|
+
});
|
3584
|
+
|
3585
|
+
}
|
3586
|
+
|
3587
|
+
});
|
3588
|
+
|
3589
|
+
}
|
3590
|
+
|
3591
|
+
}
|
3592
|
+
|
3593
|
+
|
3594
|
+
|
3595
|
+
|
3596
|
+
/** Modal Autoload
|
3597
|
+
|
3598
|
+
USAGE:
|
3599
|
+
|
3600
|
+
<div id="MODAL-ID-REQUIRED" class="modal fade" data-autoload="true" data-autoload-delay="2000">
|
3601
|
+
...
|
3602
|
+
</div>
|
3603
|
+
**************************************************************** **/
|
3604
|
+
function _modalAutoLoad() {
|
3605
|
+
if(jQuery("div.modal").length > 0) {
|
3606
|
+
|
3607
|
+
jQuery("div.modal").each(function() {
|
3608
|
+
var _t = jQuery(this),
|
3609
|
+
_id = _t.attr('id'),
|
3610
|
+
_autostart = _t.attr('data-autoload') || false;
|
3611
|
+
|
3612
|
+
|
3613
|
+
// reset allow
|
3614
|
+
// localStorage.removeItem(_id);
|
3615
|
+
|
3616
|
+
|
3617
|
+
if(_id != '') { // rewrite if set to hidden by the user
|
3618
|
+
if(localStorage.getItem(_id) == 'hidden') {
|
3619
|
+
_autostart = 'false';
|
3620
|
+
}
|
3621
|
+
}
|
3622
|
+
|
3623
|
+
|
3624
|
+
if(_autostart == 'true') {
|
3625
|
+
|
3626
|
+
jQuery(window).on("load", function() { // required on load!
|
3627
|
+
var _delay = _t.attr('data-autoload-delay') || 1000; // delay when modal apprear
|
3628
|
+
|
3629
|
+
setTimeout(
|
3630
|
+
function() {
|
3631
|
+
|
3632
|
+
_t.modal('toggle');
|
3633
|
+
|
3634
|
+
}, parseInt(_delay));
|
3635
|
+
|
3636
|
+
});
|
3637
|
+
|
3638
|
+
}
|
3639
|
+
|
3640
|
+
// LOCAL STORAGE - DO NOT HIDE ON NEXT PAGE LOAD!
|
3641
|
+
jQuery("input.loadModalHide", this).bind("click", function() {
|
3642
|
+
var _tt = jQuery(this);
|
3643
|
+
|
3644
|
+
if(_tt.is(":checked")) {
|
3645
|
+
localStorage.setItem(_id, 'hidden');
|
3646
|
+
console.log('[Modal Autoload #'+_id+'] Added to localStorage');
|
3647
|
+
} else {
|
3648
|
+
localStorage.removeItem(_id);
|
3649
|
+
console.log('[Modal Autoload #'+_id+'] Removed from localStorage');
|
3650
|
+
}
|
3651
|
+
|
3652
|
+
});
|
3653
|
+
|
3654
|
+
});
|
3655
|
+
|
3656
|
+
}
|
3657
|
+
}
|
3658
|
+
|
3659
|
+
|
3660
|
+
|
3661
|
+
|
3662
|
+
|
3663
|
+
/** 10. Background Image
|
3664
|
+
class="boxed" should be added to body.
|
3665
|
+
Add to body - example: data-background="assets/images/boxed_background/1.jpg"
|
3666
|
+
**************************************************************** **/
|
3667
|
+
function _bgimage() {
|
3668
|
+
|
3669
|
+
|
3670
|
+
// Section Background Slideshow
|
3671
|
+
var _t = jQuery('section[data-background], section div[data-background]');
|
3672
|
+
|
3673
|
+
if(_t.length > 0) {
|
3674
|
+
|
3675
|
+
loadScript(plugin_path + 'jquery.backstretch.min.js', function() {
|
3676
|
+
|
3677
|
+
jQuery(_t).each(function() {
|
3678
|
+
var _this = jQuery(this),
|
3679
|
+
data_background = _this.attr('data-background') || '';
|
3680
|
+
|
3681
|
+
|
3682
|
+
if(data_background != '') {
|
3683
|
+
|
3684
|
+
var data_background_delay = _this.attr('data-background-delay') || 3000,
|
3685
|
+
data_background_fade = _this.attr('data-background-fade') || 750;
|
3686
|
+
var instance;
|
3687
|
+
|
3688
|
+
|
3689
|
+
|
3690
|
+
var _db = data_background.split(',');
|
3691
|
+
var _db = data_background.replace(" ", "").split(',');
|
3692
|
+
|
3693
|
+
if(_db[1]) {
|
3694
|
+
_this.backstretch(_db, {duration: parseInt(data_background_delay), fade: parseInt(data_background_fade)});
|
3695
|
+
} else {
|
3696
|
+
_this.backstretch(_db);
|
3697
|
+
}
|
3698
|
+
|
3699
|
+
|
3700
|
+
/** NEXT|PREV
|
3701
|
+
<!-- Backstretch Navigation -->
|
3702
|
+
<a id="bs-next" href="#"></a>
|
3703
|
+
<a id="bs-prev" href="#"></a>
|
3704
|
+
**/
|
3705
|
+
jQuery(".bs-next", _this).bind("click", function(e) {
|
3706
|
+
e.preventDefault();
|
3707
|
+
|
3708
|
+
_this.data('backstretch').next();
|
3709
|
+
});
|
3710
|
+
|
3711
|
+
jQuery(".bs-prev", _this).bind("click", function(e) {
|
3712
|
+
e.preventDefault();
|
3713
|
+
|
3714
|
+
_this.data('backstretch').prev();
|
3715
|
+
});
|
3716
|
+
|
3717
|
+
|
3718
|
+
/** BACKSTRETCH BUGFIX
|
3719
|
+
For some reason, this plugin has some issues on window resize
|
3720
|
+
We use a small trick to force it to resize the background
|
3721
|
+
**/
|
3722
|
+
jQuery(window).resize(function() {
|
3723
|
+
|
3724
|
+
if(window.afterResizeBkstr) {
|
3725
|
+
clearTimeout(window.afterResizeBkstr);
|
3726
|
+
}
|
3727
|
+
|
3728
|
+
window.afterResizeBkstr = setTimeout(function() {
|
3729
|
+
|
3730
|
+
_this.data('backstretch').next();
|
3731
|
+
|
3732
|
+
}, 350);
|
3733
|
+
|
3734
|
+
});
|
3735
|
+
|
3736
|
+
|
3737
|
+
}
|
3738
|
+
|
3739
|
+
})
|
3740
|
+
|
3741
|
+
});
|
3742
|
+
|
3743
|
+
|
3744
|
+
|
3745
|
+
|
3746
|
+
}
|
3747
|
+
|
3748
|
+
|
3749
|
+
// BODY BACKGROUND ONLY
|
3750
|
+
var data_background = jQuery('body').attr('data-background') || '';
|
3751
|
+
|
3752
|
+
if(data_background != '') {
|
3753
|
+
|
3754
|
+
loadScript(plugin_path + 'jquery.backstretch.min.js', function() {
|
3755
|
+
|
3756
|
+
if(data_background) {
|
3757
|
+
jQuery.backstretch(data_background);
|
3758
|
+
jQuery('body').addClass('transparent'); // remove backround color of boxed class
|
3759
|
+
}
|
3760
|
+
|
3761
|
+
});
|
3762
|
+
|
3763
|
+
}
|
3764
|
+
}
|
3765
|
+
|
3766
|
+
|
3767
|
+
|
3768
|
+
|
3769
|
+
|
3770
|
+
/** Cookie Alert
|
3771
|
+
**************************************************************** **/
|
3772
|
+
function _cookie_alert() {
|
3773
|
+
|
3774
|
+
var _el = jQuery('#cookie-alert'),
|
3775
|
+
_elCookie = _getCookie('cookie-alert');
|
3776
|
+
|
3777
|
+
if(_el.length > 0 && _elCookie == null) { // only if cookie is not set
|
3778
|
+
var _expire = _el.attr('data-expire') || 30;
|
3779
|
+
|
3780
|
+
if(_el.hasClass('alert-position-bottom')){
|
3781
|
+
|
3782
|
+
_el.animate({"bottom":"0px"}, 800, 'easeInOutExpo');
|
3783
|
+
|
3784
|
+
} else {
|
3785
|
+
|
3786
|
+
_el.animate({"top":"0px"}, 800, 'easeInOutExpo');
|
3787
|
+
|
3788
|
+
}
|
3789
|
+
|
3790
|
+
// on close, set cookie as closed
|
3791
|
+
jQuery('button', _el).bind('click', function() {
|
3792
|
+
_setCookie('cookie-alert','closed',Number(_expire))
|
3793
|
+
});
|
3794
|
+
|
3795
|
+
}
|
3796
|
+
|
3797
|
+
// reset cookie on request
|
3798
|
+
if(_el.length > 0 && _el.hasClass('cookie-reset')) {
|
3799
|
+
_delCookie('cookie-alert');
|
3800
|
+
}
|
3801
|
+
|
3802
|
+
}
|
3803
|
+
|
3804
|
+
|
3805
|
+
|
3806
|
+
|
3807
|
+
|
3808
|
+
/** Flickr Widget
|
3809
|
+
<div class="widget-flickr clearfix lightbox margin-bottom-60" data-id="37304598@N02" data-limit="16" data-plugin-options='{"delegate": "a", "gallery": {"enabled": true}}'></div>
|
3810
|
+
**************************************************************** **/
|
3811
|
+
function _widget_flickr() {
|
3812
|
+
var _container = jQuery('.widget-flickr');
|
3813
|
+
|
3814
|
+
if(_container.length > 0) {
|
3815
|
+
|
3816
|
+
loadScript(plugin_path + 'widget.jflickr/jflickrfeed.min.js', function() {
|
3817
|
+
|
3818
|
+
if(jQuery().jflickrfeed) {
|
3819
|
+
if(jQuery('.widget-flickr')) {
|
3820
|
+
|
3821
|
+
/** **/
|
3822
|
+
_container.each(function() {
|
3823
|
+
var _t = jQuery(this),
|
3824
|
+
_id = _t.attr('data-id'),
|
3825
|
+
_limit = _t.attr('data-limit') || 14;
|
3826
|
+
|
3827
|
+
_t.jflickrfeed({
|
3828
|
+
limit: parseInt(_limit),
|
3829
|
+
qstrings: {
|
3830
|
+
id: _id
|
3831
|
+
},
|
3832
|
+
itemTemplate: '<li>'+
|
3833
|
+
'<a href="{{image}}" title="{{title}}">' +
|
3834
|
+
'<img src="{{image_s}}" alt="{{title}}" width="63" height="63" />' +
|
3835
|
+
'</a>' +
|
3836
|
+
'</li>'
|
3837
|
+
}, function(data) {
|
3838
|
+
_lightbox();
|
3839
|
+
});
|
3840
|
+
|
3841
|
+
});
|
3842
|
+
/** **/
|
3843
|
+
|
3844
|
+
}
|
3845
|
+
}
|
3846
|
+
|
3847
|
+
});
|
3848
|
+
|
3849
|
+
}
|
3850
|
+
|
3851
|
+
}
|
3852
|
+
|
3853
|
+
|
3854
|
+
|
3855
|
+
|
3856
|
+
/** Twitter Widget
|
3857
|
+
**************************************************************** **/
|
3858
|
+
function _widget_twitter() {
|
3859
|
+
var _container = jQuery(".widget-twitter");
|
3860
|
+
|
3861
|
+
if(_container.length > 0) {
|
3862
|
+
|
3863
|
+
loadScript(plugin_path + 'widget.twittie/twittie.min.js', function() {
|
3864
|
+
|
3865
|
+
if(jQuery().twittie) {
|
3866
|
+
// jQuery('.example1 .tweet').twittie({
|
3867
|
+
// dateFormat: '%b. %d, %Y',
|
3868
|
+
// template: '{{tweet}} <div class="date">{{date}}</div>',
|
3869
|
+
// count: 1,
|
3870
|
+
// loadingText: 'Loading!'
|
3871
|
+
// });
|
3872
|
+
|
3873
|
+
_container.each(function() {
|
3874
|
+
var _t = jQuery(this),
|
3875
|
+
_php = _t.attr('data-php'), // PHP Script Path
|
3876
|
+
_usr = _t.attr('data-username'), // Twitter Username
|
3877
|
+
_lmt = _t.attr('data-limit') || 3, // Tweets Limit
|
3878
|
+
|
3879
|
+
_url = _php + "?username=" + _usr + "&limit=" + _lmt;
|
3880
|
+
|
3881
|
+
jQuery.getJSON(_url, function(tweets){
|
3882
|
+
_t.html(format_twitter(tweets));
|
3883
|
+
});
|
3884
|
+
|
3885
|
+
});
|
3886
|
+
|
3887
|
+
}
|
3888
|
+
|
3889
|
+
});
|
3890
|
+
|
3891
|
+
}
|
3892
|
+
|
3893
|
+
}
|
3894
|
+
|
3895
|
+
function format_twitter(twitt) {
|
3896
|
+
var statusHTML = [];
|
3897
|
+
|
3898
|
+
for(var i=0; i<twitt.length; i++) {
|
3899
|
+
var username = twitt[i].user.screen_name;
|
3900
|
+
|
3901
|
+
var status = twitt[i].text.replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g, function(url) {
|
3902
|
+
return '<a href="'+url+'" target="_blank">'+url+'</a>';
|
3903
|
+
}).replace(/\B@([_a-z0-9]+)/ig, function(reply) {
|
3904
|
+
return reply.charAt(0)+'<a href="http://twitter.com/'+reply.substring(1)+'" target="_blank">'+reply.substring(1)+'</a>';
|
3905
|
+
});
|
3906
|
+
|
3907
|
+
statusHTML.push('<li><i class="fa fa-twitter"></i><span>'+status+'</span><small><a href="http://twitter.com/'+username+'/statuses/'+twitt[i].id_str+'" target="_blank">'+relative_time(twitt[i].created_at)+'</a></small></li>');
|
3908
|
+
}
|
3909
|
+
|
3910
|
+
return statusHTML.join('');
|
3911
|
+
}
|
3912
|
+
|
3913
|
+
|
3914
|
+
function relative_time(time_value) {
|
3915
|
+
var values = time_value.split(" "),
|
3916
|
+
parsed_date = Date.parse(time_value),
|
3917
|
+
relative_to = (arguments.length > 1) ? arguments[1] : new Date(),
|
3918
|
+
delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
|
3919
|
+
|
3920
|
+
time_value = values[1] + " " + values[2] + ", " + values[5] + " " + values[3];
|
3921
|
+
delta = delta + (relative_to.getTimezoneOffset() * 60);
|
3922
|
+
|
3923
|
+
if (delta < 60) {
|
3924
|
+
return 'less than a minute ago';
|
3925
|
+
} else if(delta < 120) {
|
3926
|
+
return 'about a minute ago';
|
3927
|
+
} else if(delta < (60*60)) {
|
3928
|
+
return (parseInt(delta / 60)).toString() + ' minutes ago';
|
3929
|
+
} else if(delta < (120*60)) {
|
3930
|
+
return 'about an hour ago';
|
3931
|
+
} else if(delta < (24*60*60)) {
|
3932
|
+
return 'about ' + (parseInt(delta / 3600)).toString() + ' hours ago';
|
3933
|
+
} else if(delta < (48*60*60)) {
|
3934
|
+
return '1 day ago';
|
3935
|
+
} else {
|
3936
|
+
return (parseInt(delta / 86400)).toString() + ' days ago';
|
3937
|
+
}
|
3938
|
+
}
|
3939
|
+
|
3940
|
+
|
3941
|
+
|
3942
|
+
|
3943
|
+
/** Facebook Widget
|
3944
|
+
<div class="fb-like" data-href="http://www.stepofweb.com" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div>
|
3945
|
+
**************************************************************** **/
|
3946
|
+
function _widget_facebook() {
|
3947
|
+
|
3948
|
+
/** Like & Share Button
|
3949
|
+
************************ **/
|
3950
|
+
var _container_1 = jQuery('div.fb-like');
|
3951
|
+
var _container_2 = jQuery('div.fb-share-button');
|
3952
|
+
|
3953
|
+
if(_container_1.length > 0 || _container_2.length > 0) {
|
3954
|
+
|
3955
|
+
jQuery('body').append('<div id="fb-root"></div>');
|
3956
|
+
|
3957
|
+
(function(d, s, id) {
|
3958
|
+
var js, fjs = d.getElementsByTagName(s)[0];
|
3959
|
+
if (d.getElementById(id)) return;
|
3960
|
+
js = d.createElement(s); js.id = id;
|
3961
|
+
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
|
3962
|
+
fjs.parentNode.insertBefore(js, fjs);
|
3963
|
+
}(document, 'script', 'facebook-jssdk'));
|
3964
|
+
|
3965
|
+
}
|
3966
|
+
|
3967
|
+
}
|
3968
|
+
|
3969
|
+
|
3970
|
+
|
3971
|
+
|
3972
|
+
|
3973
|
+
/** Dribbble Widget
|
3974
|
+
**************************************************************** **/
|
3975
|
+
function _widget_dribbble() {
|
3976
|
+
var _container = jQuery(".widget-dribbble");
|
3977
|
+
|
3978
|
+
if(_container.length > 0) {
|
3979
|
+
|
3980
|
+
loadScript(plugin_path + 'widget.dribbble/jribbble.min.js', function() {
|
3981
|
+
|
3982
|
+
var _token = _container.attr('data-token') || 'f688ac519289f19ce5cebc1383c15ad5c02bd58205cd83c86cbb0ce09170c1b4', // demo default
|
3983
|
+
_target = _container.attr('data-target') || '_blank',
|
3984
|
+
_shots = _container.attr('data-shots') || 2046896; // demo default
|
3985
|
+
|
3986
|
+
jQuery.jribbble.setToken(_token);
|
3987
|
+
|
3988
|
+
jQuery.jribbble.shots(_shots).rebounds().then(function(res) {
|
3989
|
+
var html = [];
|
3990
|
+
|
3991
|
+
res.forEach(function(shot) {
|
3992
|
+
html.push('<li>');
|
3993
|
+
html.push('<a href="' + shot.html_url + '" target="' + _target + '">');
|
3994
|
+
html.push('<img class="img-fluid" src="' + shot.images.normal + '" alt="image">');
|
3995
|
+
html.push('</a></li>');
|
3996
|
+
});
|
3997
|
+
|
3998
|
+
_container.html(html.join(''));
|
3999
|
+
});
|
4000
|
+
|
4001
|
+
|
4002
|
+
});
|
4003
|
+
|
4004
|
+
}
|
4005
|
+
|
4006
|
+
}
|
4007
|
+
|
4008
|
+
|
4009
|
+
|
4010
|
+
|
4011
|
+
|
4012
|
+
/** Media Widget [mediaelement plugin]
|
4013
|
+
**************************************************************** **/
|
4014
|
+
function _widget_media() {
|
4015
|
+
var _container = jQuery(".widget-media");
|
4016
|
+
|
4017
|
+
if(_container.length > 0) {
|
4018
|
+
|
4019
|
+
loadScript(plugin_path + 'widget.mediaelementbuild/mediaelement-and-player.min.js', function() {
|
4020
|
+
|
4021
|
+
|
4022
|
+
|
4023
|
+
});
|
4024
|
+
|
4025
|
+
}
|
4026
|
+
|
4027
|
+
}
|
4028
|
+
|
4029
|
+
|
4030
|
+
|
4031
|
+
/** **************************************************************************************************************** **/
|
4032
|
+
/** **************************************************************************************************************** **/
|
4033
|
+
/** **************************************************************************************************************** **/
|
4034
|
+
/** **************************************************************************************************************** **/
|
4035
|
+
|
4036
|
+
|
4037
|
+
/*
|
4038
|
+
Mobile Check
|
4039
|
+
|
4040
|
+
if( isMobile.any() ) alert('Mobile');
|
4041
|
+
if( isMobile.iOS() ) alert('iOS');
|
4042
|
+
*/
|
4043
|
+
|
4044
|
+
var isMobile = {
|
4045
|
+
iOS: function() {
|
4046
|
+
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
|
4047
|
+
},
|
4048
|
+
Android: function() {
|
4049
|
+
return navigator.userAgent.match(/Android/i);
|
4050
|
+
},
|
4051
|
+
BlackBerry: function() {
|
4052
|
+
return navigator.userAgent.match(/BlackBerry/i);
|
4053
|
+
},
|
4054
|
+
Opera: function() {
|
4055
|
+
return navigator.userAgent.match(/Opera Mini/i);
|
4056
|
+
},
|
4057
|
+
Windows: function() {
|
4058
|
+
return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i);
|
4059
|
+
},
|
4060
|
+
any: function() {
|
4061
|
+
return (isMobile.iOS() || isMobile.Android() || isMobile.BlackBerry() || isMobile.Opera() || isMobile.Windows());
|
4062
|
+
}
|
4063
|
+
};
|
4064
|
+
|
4065
|
+
|
4066
|
+
|
4067
|
+
|
4068
|
+
// Number Format
|
4069
|
+
Number.prototype.formatMoney = function(c, d, t){
|
4070
|
+
var n = this,
|
4071
|
+
c = isNaN(c = Math.abs(c)) ? 2 : c,
|
4072
|
+
d = d == undefined ? "." : d,
|
4073
|
+
t = t == undefined ? "," : t,
|
4074
|
+
s = n < 0 ? "-" : "",
|
4075
|
+
i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),
|
4076
|
+
j = (j = i.length) > 3 ? j % 3 : 0;
|
4077
|
+
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
|
4078
|
+
};
|
4079
|
+
|
4080
|
+
|
4081
|
+
// scroll
|
4082
|
+
function wheel(e) {
|
4083
|
+
e.preventDefault();
|
4084
|
+
}
|
4085
|
+
|
4086
|
+
function disable_scroll() {
|
4087
|
+
if (window.addEventListener) {
|
4088
|
+
window.addEventListener('DOMMouseScroll', wheel, false);
|
4089
|
+
}
|
4090
|
+
window.onmousewheel = document.onmousewheel = wheel;
|
4091
|
+
}
|
4092
|
+
|
4093
|
+
function enable_scroll() {
|
4094
|
+
if (window.removeEventListener) {
|
4095
|
+
window.removeEventListener('DOMMouseScroll', wheel, false);
|
4096
|
+
}
|
4097
|
+
window.onmousewheel = document.onmousewheel = document.onkeydown = null;
|
4098
|
+
}
|
4099
|
+
|
4100
|
+
// overlay
|
4101
|
+
function enable_overlay() {
|
4102
|
+
jQuery("span.global-overlay").remove(); // remove first!
|
4103
|
+
jQuery('body').append('<span class="global-overlay"></span>');
|
4104
|
+
}
|
4105
|
+
function disable_overlay() {
|
4106
|
+
jQuery("span.global-overlay").remove();
|
4107
|
+
}
|
4108
|
+
|
4109
|
+
|
4110
|
+
|
4111
|
+
|
4112
|
+
|
4113
|
+
|
4114
|
+
|
4115
|
+
/** Cookies
|
4116
|
+
**************************************************************** **/
|
4117
|
+
function _setCookie(name,value,days) {
|
4118
|
+
var expires = "";
|
4119
|
+
if (days) {
|
4120
|
+
var date = new Date();
|
4121
|
+
date.setTime(date.getTime() + (days*24*60*60*1000));
|
4122
|
+
expires = "; expires=" + date.toUTCString();
|
4123
|
+
}
|
4124
|
+
document.cookie = name + "=" + value + expires + "; path=/";
|
4125
|
+
}
|
4126
|
+
|
4127
|
+
function _getCookie(name) {
|
4128
|
+
var nameEQ = name + "=";
|
4129
|
+
var ca = document.cookie.split(';');
|
4130
|
+
for(var i=0;i < ca.length;i++) {
|
4131
|
+
var c = ca[i];
|
4132
|
+
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
4133
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
4134
|
+
}
|
4135
|
+
return null;
|
4136
|
+
}
|
4137
|
+
|
4138
|
+
|
4139
|
+
function _delCookie(name) {
|
4140
|
+
_setCookie(name,"",-1);
|
4141
|
+
}
|
4142
|
+
|
4143
|
+
|
4144
|
+
|
4145
|
+
/** COUNT TO
|
4146
|
+
https://github.com/mhuggins/jquery-countTo
|
4147
|
+
**************************************************************** **/
|
4148
|
+
(function ($) {
|
4149
|
+
$.fn.countTo = function (options) {
|
4150
|
+
options = options || {};
|
4151
|
+
|
4152
|
+
return jQuery(this).each(function () {
|
4153
|
+
// set options for current element
|
4154
|
+
var settings = jQuery.extend({}, $.fn.countTo.defaults, {
|
4155
|
+
from: jQuery(this).data('from'),
|
4156
|
+
to: jQuery(this).data('to'),
|
4157
|
+
speed: jQuery(this).data('speed'),
|
4158
|
+
refreshInterval: jQuery(this).data('refresh-interval'),
|
4159
|
+
decimals: jQuery(this).data('decimals')
|
4160
|
+
}, options);
|
4161
|
+
|
4162
|
+
// how many times to update the value, and how much to increment the value on each update
|
4163
|
+
var loops = Math.ceil(settings.speed / settings.refreshInterval),
|
4164
|
+
increment = (settings.to - settings.from) / loops;
|
4165
|
+
|
4166
|
+
// references & variables that will change with each update
|
4167
|
+
var self = this,
|
4168
|
+
$self = jQuery(this),
|
4169
|
+
loopCount = 0,
|
4170
|
+
value = settings.from,
|
4171
|
+
data = $self.data('countTo') || {};
|
4172
|
+
|
4173
|
+
$self.data('countTo', data);
|
4174
|
+
|
4175
|
+
// if an existing interval can be found, clear it first
|
4176
|
+
if (data.interval) {
|
4177
|
+
clearInterval(data.interval);
|
4178
|
+
}
|
4179
|
+
data.interval = setInterval(updateTimer, settings.refreshInterval);
|
4180
|
+
|
4181
|
+
// __construct the element with the starting value
|
4182
|
+
render(value);
|
4183
|
+
|
4184
|
+
function updateTimer() {
|
4185
|
+
value += increment;
|
4186
|
+
loopCount++;
|
4187
|
+
|
4188
|
+
render(value);
|
4189
|
+
|
4190
|
+
if (typeof(settings.onUpdate) == 'function') {
|
4191
|
+
settings.onUpdate.call(self, value);
|
4192
|
+
}
|
4193
|
+
|
4194
|
+
if (loopCount >= loops) {
|
4195
|
+
// remove the interval
|
4196
|
+
$self.removeData('countTo');
|
4197
|
+
clearInterval(data.interval);
|
4198
|
+
value = settings.to;
|
4199
|
+
|
4200
|
+
if (typeof(settings.onComplete) == 'function') {
|
4201
|
+
settings.onComplete.call(self, value);
|
4202
|
+
}
|
4203
|
+
}
|
4204
|
+
}
|
4205
|
+
|
4206
|
+
function render(value) {
|
4207
|
+
var formattedValue = settings.formatter.call(self, value, settings);
|
4208
|
+
$self.html(formattedValue);
|
4209
|
+
}
|
4210
|
+
});
|
4211
|
+
};
|
4212
|
+
|
4213
|
+
$.fn.countTo.defaults = {
|
4214
|
+
from: 0, // the number the element should start at
|
4215
|
+
to: 0, // the number the element should end at
|
4216
|
+
speed: 1000, // how long it should take to count between the target numbers
|
4217
|
+
refreshInterval: 100, // how often the element should be updated
|
4218
|
+
decimals: 0, // the number of decimal places to show
|
4219
|
+
formatter: formatter, // handler for formatting the value before rendering
|
4220
|
+
onUpdate: null, // callback method for every time the element is updated
|
4221
|
+
onComplete: null // callback method for when the element finishes updating
|
4222
|
+
};
|
4223
|
+
|
4224
|
+
function formatter(value, settings) {
|
4225
|
+
return value.toFixed(settings.decimals);
|
4226
|
+
}
|
4227
|
+
}(jQuery));
|
4228
|
+
|
4229
|
+
|
4230
|
+
|
4231
|
+
|
4232
|
+
/** Appear
|
4233
|
+
https://github.com/bas2k/jquery.appear/
|
4234
|
+
**************************************************************** **/
|
4235
|
+
(function(a){a.fn.appear=function(d,b){var c=a.extend({data:undefined,one:true,accX:0,accY:0},b);return this.each(function(){var g=a(this);g.appeared=false;if(!d){g.trigger("appear",c.data);return}var f=a(window);var e=function(){if(!g.is(":visible")){g.appeared=false;return}var r=f.scrollLeft();var q=f.scrollTop();var l=g.offset();var s=l.left;var p=l.top;var i=c.accX;var t=c.accY;var k=g.height();var j=f.height();var n=g.width();var m=f.width();if(p+k+t>=q&&p<=q+j+t&&s+n+i>=r&&s<=r+m+i){if(!g.appeared){g.trigger("appear",c.data)}}else{g.appeared=false}};var h=function(){g.appeared=true;if(c.one){f.unbind("scroll",e);var j=a.inArray(e,a.fn.appear.checks);if(j>=0){a.fn.appear.checks.splice(j,1)}}d.apply(this,arguments)};if(c.one){g.one("appear",c.data,h)}else{g.bind("appear",c.data,h)}f.scroll(e);a.fn.appear.checks.push(e);(e)()})};a.extend(a.fn.appear,{checks:[],timeout:null,checkAll:function(){var b=a.fn.appear.checks.length;if(b>0){while(b--){(a.fn.appear.checks[b])()}}},run:function(){if(a.fn.appear.timeout){clearTimeout(a.fn.appear.timeout)}a.fn.appear.timeout=setTimeout(a.fn.appear.checkAll,20)}});a.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(c,d){var b=a.fn[d];if(b){a.fn[d]=function(){var e=b.apply(this,arguments);a.fn.appear.run();return e}}})})(jQuery);
|
4236
|
+
|
4237
|
+
|
4238
|
+
/** Parallax
|
4239
|
+
http://www.ianlunn.co.uk/plugins/jquery-parallax/
|
4240
|
+
**************************************************************** **/
|
4241
|
+
!function(n){n.fn.parallax=function(n,t,e){function o(){var o=jQuery(window).scrollTop();r=e?function(n){return n.outerHeight(!0)}:function(n){return n.height()},i.each(function(){var e=jQuery(this),i=e.offset().top,h=r(e);if(!(o>i+h||i>o+window.height)){var l=Math.round((u-o)*t);e.css("backgroundPosition",n+" "+l+"px")}})}var r,u,i=jQuery(this);(arguments.length<1||null===n)&&(n="50%"),(arguments.length<2||null===t)&&(t=.1),(arguments.length<3||null===e)&&(e=!0),i.each(function(){u=i.offset().top,u<window.height&&(u=0)}),jQuery(window).bind("scroll",o).resize(o),o()}}(jQuery);
|
4242
|
+
|
4243
|
+
|
4244
|
+
/** jQuery Easing v1.3
|
4245
|
+
http://gsgd.co.uk/sandbox/jquery/easing/
|
4246
|
+
**************************************************************** **/
|
4247
|
+
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
|
4248
|
+
|
4249
|
+
|
4250
|
+
/** WOW - v1.0.3 - 2015-01-14
|
4251
|
+
http://mynameismatthieu.com/WOW/
|
4252
|
+
**************************************************************** **/
|
4253
|
+
(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass,null!=this.config.callback?this.config.callback(a):void 0},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
|
4254
|
+
|
4255
|
+
|
4256
|
+
/** Modernizr 3.3.1
|
4257
|
+
http://modernizr.com/download/#-csstransforms3d-csstransitions-video-touch-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
|
4258
|
+
**************************************************************** **/
|
4259
|
+
!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in b)if(b.hasOwnProperty(l)){if(e=[],t=b[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=r(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)a=e[i],s=a.split("."),1===s.length?Modernizr[s[0]]=o:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=o),C.push((o?"":"no-")+s.join("-"))}}function i(e){var t=w.className,n=Modernizr._config.classPrefix||"";if(S&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),S?w.className.baseVal=t:w.className=t)}function a(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):S?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function s(e,t){if("object"==typeof e)for(var n in e)N(e,n)&&s(n,e[n]);else{e=e.toLowerCase();var r=e.split("."),o=Modernizr[r[0]];if(2==r.length&&(o=o[r[1]]),"undefined"!=typeof o)return Modernizr;t="function"==typeof t?t():t,1==r.length?Modernizr[r[0]]=t:(!Modernizr[r[0]]||Modernizr[r[0]]instanceof Boolean||(Modernizr[r[0]]=new Boolean(Modernizr[r[0]])),Modernizr[r[0]][r[1]]=t),i([(t&&0!=t?"":"no-")+r.join("-")]),Modernizr._trigger(e,t)}return Modernizr}function l(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function c(e,t){return!!~(""+e).indexOf(t)}function u(){var e=t.body;return e||(e=a(S?"svg":"body"),e.fake=!0),e}function f(e,n,r,o){var i,s,l,c,f="modernizr",d=a("div"),p=u();if(parseInt(r,10))for(;r--;)l=a("div"),l.id=o?o[r]:f+(r+1),d.appendChild(l);return i=a("style"),i.type="text/css",i.id="s"+f,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),d.id=f,p.fake&&(p.style.background="",p.style.overflow="hidden",c=w.style.overflow,w.style.overflow="hidden",w.appendChild(p)),s=n(d,e),p.fake?(p.parentNode.removeChild(p),w.style.overflow=c,w.offsetHeight):d.parentNode.removeChild(d),!!s}function d(e,t){return function(){return e.apply(t,arguments)}}function p(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?d(o,n||t):o);return!1}function m(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function h(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(m(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+m(t[o])+":"+r+")");return i=i.join(" or "),f("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function v(e,t,o,i){function s(){f&&(delete A.style,delete A.modElem)}if(i=r(i,"undefined")?!1:i,!r(o,"undefined")){var u=h(e,o);if(!r(u,"undefined"))return u}for(var f,d,p,m,v,g=["modernizr","tspan","samp"];!A.style&&g.length;)f=!0,A.modElem=a(g.shift()),A.style=A.modElem.style;for(p=e.length,d=0;p>d;d++)if(m=e[d],v=A.style[m],c(m,"-")&&(m=l(m)),A.style[m]!==n){if(i||r(o,"undefined"))return s(),"pfx"==t?m:!0;try{A.style[m]=o}catch(y){}if(A.style[m]!=v)return s(),"pfx"==t?m:!0}return s(),!1}function g(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?v(s,t,o,i):(s=(e+" "+T.join(a+" ")+a).split(" "),p(s,t,n))}function y(e,t,r){return g(e,n,n,t,r)}var C=[],b=[],E={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=E,Modernizr=new Modernizr;var _=E._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];E._prefixes=_;var w=t.documentElement,S="svg"===w.nodeName.toLowerCase();S||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=C.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=C.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),C.elements=n+" "+e,c(t)}function i(e){var t=y[e[v]];return t||(t={},g++,e[v]=g,y[g]=t),t}function a(e,n,r){if(n||(n=t),f)return n.createElement(e);r||(r=i(n));var o;return o=r.cache[e]?r.cache[e].cloneNode():h.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||m.test(e)||o.tagUrn?o:r.frag.appendChild(o)}function s(e,n){if(e||(e=t),f)return e.createDocumentFragment();n=n||i(e);for(var o=n.frag.cloneNode(),a=0,s=r(),l=s.length;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function c(e){e||(e=t);var r=i(e);return!C.shivCSS||u||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),f||l(e,r),e}var u,f,d="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,h=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",g=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",u="hidden"in e,f=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){u=!0,f=!0}}();var C={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:d,shivCSS:p.shivCSS!==!1,supportsUnknownElements:f,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:c,createElement:a,createDocumentFragment:s,addElements:o};e.html5=C,c(t),"object"==typeof module&&module.exports&&(module.exports=C)}("undefined"!=typeof e?e:this,t);var x="Moz O ms Webkit",T=E._config.usePrefixes?x.toLowerCase().split(" "):[];E._domPrefixes=T;var P=function(){function e(e,t){var o;return e?(t&&"string"!=typeof t||(t=a(t||"div")),e="on"+e,o=e in t,!o&&r&&(t.setAttribute||(t=a("div")),t.setAttribute(e,""),o="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),o):!1}var r=!("onblur"in t.documentElement);return e}();E.hasEvent=P,Modernizr.addTest("video",function(){var e=a("video"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(n){}return t});var N;!function(){var e={}.hasOwnProperty;N=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),E._l={},E.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},E._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;e<n.length;e++)(r=n[e])(t)},0),delete this._l[e]}},Modernizr._q.push(function(){E.addTest=s});var j="CSS"in e&&"supports"in e.CSS,k="supportsCSS"in e;Modernizr.addTest("supports",j||k);var z=E._config.usePrefixes?x.split(" "):[];E._cssomPrefixes=z;var F=function(t){var r,o=_.length,i=e.CSSRule;if("undefined"==typeof i)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in i)return"@"+t;for(var a=0;o>a;a++){var s=_[a],l=s.toUpperCase()+"_"+r;if(l in i)return"@-"+s.toLowerCase()+"-"+t}return!1};E.atRule=F;var L=E.testStyles=f,$={elem:a("modernizr")};Modernizr._q.push(function(){delete $.elem});var A={style:$.elem.style};Modernizr._q.unshift(function(){delete A.style});E.testProp=function(e,t,r){return v([e],n,t,r)};E.testAllProps=g;E.prefixed=function(e,t,n){return 0===e.indexOf("@")?F(e):(-1!=e.indexOf("-")&&(e=l(e)),t?g(e,t,n):g(e,"pfx"))};E.testAllProps=y,Modernizr.addTest("csstransitions",y("transition","all",!0)),Modernizr.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in w.style)){var n,r="#modernizr{width:0;height:0}";Modernizr.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",L(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),o(),i(C),delete E.addTest,delete E.addAsyncTest;for(var M=0;M<Modernizr._q.length;M++)Modernizr._q[M]();e.Modernizr=Modernizr}(window,document);
|
4260
|
+
|
4261
|
+
|
4262
|
+
/** POPPER - used by bootstrap
|
4263
|
+
https://popper.js.org/
|
4264
|
+
**************************************************************** **/
|
4265
|
+
function _loadPopperBS4() {
|
4266
|
+
/*
|
4267
|
+
Copyright (C) Federico Zivolo 2017
|
4268
|
+
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
4269
|
+
*/(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:e?e.ownerDocument.documentElement:document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var l=a.commonAncestorContainer;if(e!==l&&t!==l||i.contains(n))return p(l)?l:r(l);var f=s(e);return f.host?d(f.host,t):d(e,s(t).host)}function a(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var n=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||n;return r[o]}return e[o]}function l(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=a(t,'top'),n=a(t,'left'),r=o?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function f(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+i+'Width'],10)}function m(e,t,o,i){return J(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],ie()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function h(){var e=document.body,t=document.documentElement,o=ie()&&getComputedStyle(t);return{height:m('Height',e,t,o),width:m('Width',e,t,o)}}function c(e){return se({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var o={};if(ie())try{o=e.getBoundingClientRect();var i=a(e,'top'),n=a(e,'left');o.top+=i,o.left+=n,o.bottom+=i,o.right+=n}catch(e){}else o=e.getBoundingClientRect();var r={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},p='HTML'===e.nodeName?h():{},s=p.width||e.clientWidth||r.right-r.left,d=p.height||e.clientHeight||r.bottom-r.top,l=e.offsetWidth-s,m=e.offsetHeight-d;if(l||m){var g=t(e);l-=f(g,'x'),m-=f(g,'y'),r.width-=l,r.height-=m}return c(r)}function u(e,o){var i=ie(),r='HTML'===o.nodeName,p=g(e),s=g(o),d=n(e),a=t(o),f=parseFloat(a.borderTopWidth,10),m=parseFloat(a.borderLeftWidth,10),h=c({top:p.top-s.top-f,left:p.left-s.left-m,width:p.width,height:p.height});if(h.marginTop=0,h.marginLeft=0,!i&&r){var u=parseFloat(a.marginTop,10),b=parseFloat(a.marginLeft,10);h.top-=f-u,h.bottom-=f-u,h.left-=m-b,h.right-=m-b,h.marginTop=u,h.marginLeft=b}return(i?o.contains(d):o===d&&'BODY'!==d.nodeName)&&(h=l(h,o)),h}function b(e){var t=e.ownerDocument.documentElement,o=u(e,t),i=J(t.clientWidth,window.innerWidth||0),n=J(t.clientHeight,window.innerHeight||0),r=a(t),p=a(t,'left'),s={top:r-o.top+o.marginTop,left:p-o.left+o.marginLeft,width:i,height:n};return c(s)}function w(e){var i=e.nodeName;return'BODY'===i||'HTML'===i?!1:'fixed'===t(e,'position')||w(o(e))}function y(e,t,i,r){var p={top:0,left:0},s=d(e,t);if('viewport'===r)p=b(s);else{var a;'scrollParent'===r?(a=n(o(t)),'BODY'===a.nodeName&&(a=e.ownerDocument.documentElement)):'window'===r?a=e.ownerDocument.documentElement:a=r;var l=u(a,s);if('HTML'===a.nodeName&&!w(s)){var f=h(),m=f.height,c=f.width;p.top+=l.top-l.marginTop,p.bottom=m+l.top,p.left+=l.left-l.marginLeft,p.right=c+l.left}else p=l}return p.left+=i,p.top+=i,p.right-=i,p.bottom-=i,p}function E(e){var t=e.width,o=e.height;return t*o}function v(e,t,o,i,n){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=y(o,i,r,n),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return se({key:e},s[e],{area:E(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,i=e.height;return t>=o.clientWidth&&i>=o.clientHeight}),l=0<a.length?a[0].key:d[0].key,f=e.split('-')[1];return l+(f?'-'+f:'')}function O(e,t,o){var i=d(t,o);return u(o,i)}function L(e){var t=getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n={width:e.offsetWidth+i,height:e.offsetHeight+o};return n}function x(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function S(e,t,o){o=o.split('-')[0];var i=L(e),n={width:i.width,height:i.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return n[p]=t[p]+t[d]/2-i[d]/2,n[s]=o===s?t[s]-i[a]:t[x(s)],n}function T(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function D(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var i=T(e,function(e){return e[t]===o});return e.indexOf(i)}function C(t,o,i){var n=void 0===i?t:t.slice(0,D(t,'name',i));return n.forEach(function(t){t['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var i=t['function']||t.fn;t.enabled&&e(i)&&(o.offsets.popper=c(o.offsets.popper),o.offsets.reference=c(o.offsets.reference),o=i(o,t))}),o}function N(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=O(this.state,this.popper,this.reference),e.placement=v(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=S(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=C(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function k(e,t){return e.some(function(e){var o=e.name,i=e.enabled;return i&&o===t})}function W(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length-1;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof document.body.style[r])return r}return null}function P(){return this.state.isDestroyed=!0,k(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[W('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function B(e){var t=e.ownerDocument;return t?t.defaultView:window}function H(e,t,o,i){var r='BODY'===e.nodeName,p=r?e.ownerDocument.defaultView:e;p.addEventListener(t,o,{passive:!0}),r||H(n(p.parentNode),t,o,i),i.push(p)}function A(e,t,o,i){o.updateBound=i,B(e).addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return H(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function I(){this.state.eventsEnabled||(this.state=A(this.reference,this.options,this.state,this.scheduleUpdate))}function M(e,t){return B(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function R(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=M(this.reference,this.state))}function U(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Y(e,t){Object.keys(t).forEach(function(o){var i='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&U(t[o])&&(i='px'),e.style[o]=t[o]+i})}function j(e,t){Object.keys(t).forEach(function(o){var i=t[o];!1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function F(e,t,o){var i=T(e,function(e){var o=e.name;return o===t}),n=!!i&&e.some(function(e){return e.name===o&&e.enabled&&e.order<i.order});if(!n){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return n}function K(e){return'end'===e?'start':'start'===e?'end':e}function q(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=ae.indexOf(e),i=ae.slice(o+1).concat(ae.slice(0,o));return t?i.reverse():i}function V(e,t,o,i){var n=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+n[1],p=n[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=i;}var d=c(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?J(document.documentElement.clientHeight,window.innerHeight||0):J(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function z(e,t,o,i){var n=[0,0],r=-1!==['right','left'].indexOf(i),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(T(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,i){var n=(1===i?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return V(e,n,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,i){U(o)&&(n[t]+=o*('-'===e[i-1]?-1:1))})}),n}function G(e,t){var o,i=t.offset,n=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=n.split('-')[0];return o=U(+i)?[+i,0]:z(i,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e}for(var _=Math.min,X=Math.floor,J=Math.max,Q='undefined'!=typeof window&&'undefined'!=typeof document,Z=['Edge','Trident','Firefox'],$=0,ee=0;ee<Z.length;ee+=1)if(Q&&0<=navigator.userAgent.indexOf(Z[ee])){$=1;break}var i,te=Q&&window.Promise,oe=te?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},$))}},ie=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},ne=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},re=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),pe=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},se=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},de=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],ae=de.slice(3),le={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},fe=function(){function t(o,i){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};ne(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=oe(this.update.bind(this)),this.options=se({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o&&o.jquery?o[0]:o,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(se({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=se({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return se({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return re(t,[{key:'update',value:function(){return N.call(this)}},{key:'destroy',value:function(){return P.call(this)}},{key:'enableEventListeners',value:function(){return I.call(this)}},{key:'disableEventListeners',value:function(){return R.call(this)}}]),t}();return fe.Utils=('undefined'==typeof window?global:window).PopperUtils,fe.placements=de,fe.Defaults={placement:'bottom',eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],i=t.split('-')[1];if(i){var n=e.offsets,r=n.reference,p=n.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',l={start:pe({},d,r[d]),end:pe({},d,r[d]+r[a]-p[a])};e.offsets.popper=se({},p,l[i])}return e}},offset:{order:200,enabled:!0,fn:G,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||r(e.instance.popper);e.instance.reference===o&&(o=r(o));var i=y(e.instance.popper,e.instance.reference,t.padding,o);t.boundaries=i;var n=t.priority,p=e.offsets.popper,s={primary:function(e){var o=p[e];return p[e]<i[e]&&!t.escapeWithReference&&(o=J(p[e],i[e])),pe({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=p[o];return p[e]>i[e]&&!t.escapeWithReference&&(n=_(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=X,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(i[d])&&(e.offsets.popper[d]=r(i[d])-o[a]),o[d]>r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var i;if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var n=o.element;if('string'==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e;}else if(!e.instance.popper.contains(n))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',g=a?'bottom':'right',u=L(n)[l];d[g]-u<s[m]&&(e.offsets.popper[m]-=s[m]-(d[g]-u)),d[m]+u>s[g]&&(e.offsets.popper[m]+=d[m]+u-s[g]),e.offsets.popper=c(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=J(_(s[l]-u,v),0),e.arrowElement=n,e.offsets.arrow=(i={},pe(i,m,Math.round(v)),pe(i,h,''),i),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(k(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=y(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=x(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case le.FLIP:p=[i,n];break;case le.CLOCKWISE:p=q(i);break;case le.COUNTERCLOCKWISE:p=q(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=x(i);var a=e.offsets.popper,l=e.offsets.reference,f=X,m='left'===i&&f(a.right)>f(l.left)||'right'===i&&f(a.left)<f(l.right)||'top'===i&&f(a.bottom)>f(l.top)||'bottom'===i&&f(a.top)<f(l.bottom),h=f(a.left)<f(o.left),c=f(a.right)>f(o.right),g=f(a.top)<f(o.top),u=f(a.bottom)>f(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,w=-1!==['top','bottom'].indexOf(i),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u);(m||b||y)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),y&&(r=K(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=C(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[o]-(s?n[p?'width':'height']:0),e.placement=x(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,i=t.y,n=e.offsets.popper,p=T(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==p&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===p?t.gpuAcceleration:p,l=r(e.instance.popper),f=g(l),m={position:n.position},h={left:X(n.left),top:X(n.top),bottom:X(n.bottom),right:X(n.right)},c='bottom'===o?'top':'bottom',u='right'===i?'left':'right',b=W('transform');if(d='bottom'==c?-f.height+h.bottom:h.top,s='right'==u?-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[u]=0,m.willChange='transform';else{var w='bottom'==c?-1:1,y='right'==u?-1:1;m[c]=d*w,m[u]=s*y,m.willChange=c+', '+u}var E={"x-placement":e.placement};return e.attributes=se({},E,e.attributes),e.styles=se({},m,e.styles),e.arrowStyles=se({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return Y(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Y(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,i,n){var r=O(n,t,e),p=v(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),Y(t,{position:'absolute'}),o},gpuAcceleration:void 0}}},fe});
|
4270
|
+
//# sourceMappingURL=popper.min.js.map
|
4271
|
+
}
|