1 2var $, jQuery; 3 4(function ($) { 5 'use strict'; 6 7 var window_width = $(window).width(); 8 9 10 function sliders() { 11 if($.fn.owlCarousel){ 12 13 // brand slider 14 15 var brand_slider = $('.brand_slider'); 16 brand_slider.owlCarousel({ 17 margin: 30, 18 responsive: { 19 0: { 20 items: 1 21 }, 22 768: { 23 items: 2 24 }, 25 992: { 26 items: 3 27 } 28 } 29 }); 30 31 32 // featured slider 33 34 var featured_slider = $('.featured_slider'); 35 featured_slider.owlCarousel({ 36 margin: 30, 37 items: 6, 38 dots: false, 39 nav: false, 40 loop: true, 41 autoplay:true, 42 autoplayTimeout: 2000, 43 autoplayHoverPause:true, 44 responsive: { 45 0: { 46 items: 2, 47 margin: 15 48 }, 49 768: { 50 items: 4 51 }, 52 992: { 53 items: 6 54 } 55 } 56 }); 57 58 } 59 60 } 61 62 function plugins() { 63 // prettyphoto 64 // if(window_width > 767 && $.fn.prettyPhoto){ 65 // $("a[data-rel^='prettyPhoto']").prettyPhoto(); 66 // }else{ 67 // $("a[data-rel^='prettyPhoto']").attr('target', '_blank'); 68 // } 69 70 $('.venobox').venobox(); 71 72 73 // slickNav 74 if($.fn.slicknav){ 75 $('.menu.hidden-xs').slicknav({ 76 label: '', 77 prependTo:'nav' 78 }); 79 } 80 81 // parallax 82 83 if($.fn.parallax){ 84 $('.scene').parallax({ 85 limitX: 90, 86 limitY: 90, 87 }); 88 } 89 90 // counterup 91 if($.fn.counterUp){ 92 $('.count').counterUp({ 93 delay: 10, 94 time: 2000 95 }); 96 } 97 98 // onepagenav 99 if($.fn.onePageNav){ 100 $('ul.menu, .slicknav_nav').onePageNav({ 101 currentClass: 'current-menu-item', 102 scrollSpeed: 750, 103 easing: 'swing' 104 }); 105 } 106 107 } 108 109 function custom() { 110 $('.loader_wrep').css('opacity', '.7'); 111 112 $('.sub-menu').siblings('a').addClass('sub-siblings'); 113 114 $('.top_scrl').on('click', function (event) { 115 event.preventDefault(); 116 $("html, body").animate({scrollTop: 0}, "slow"); 117 }); 118 119 $("a[href^='#']").on('click', function ($) { 120 $.preventDefault(); 121 }); 122 123 $(window).on('scroll',function(){ 124 if($(window).scrollTop()>100){ 125 $('header').addClass('sticky'); 126 } 127 else{ 128 $('header').removeClass('sticky'); 129 } 130 }); 131 132 var header_hei = $('header').height(); 133 $('.sticky-anchor').height(header_hei); 134 } 135 136 function animation_time() { 137 $(".animated").each(function () { 138 var dur = $(this).attr("data-duration"); 139 var dly = $(this).attr("data-delay"); 140 141 if(dur != ""){ 142 $(this).css('animation-duration', dur); 143 } 144 if(dly != ""){ 145 $(this).css('animation-delay', dly); 146 } 147 }); 148 } 149 150 function animation() { 151 if($.fn.waypoint){ 152 $('.a_fu').css('opacity','0'); 153 $('.a_fu').waypoint(function () { 154 $(this).addClass('fadeInUp'); 155 $('.a_fu.fadeInUp').css({ 156 opacity: 1 157 }); 158 }, { 159 offset: '90%' 160 }); 161 162 $('.a_fl').css('opacity','0'); 163 $('.a_fl').waypoint(function () { 164 $(this).addClass('fadeInLeft'); 165 $('.a_fl.fadeInLeft').css({ 166 opacity: 1 167 }); 168 }, { 169 offset: '90%' 170 }); 171 172 $('.a_fr').css('opacity','0'); 173 $('.a_fr').waypoint(function () { 174 $(this).addClass('fadeInRight'); 175 $('.a_fr.fadeInRight').css({ 176 opacity: 1 177 }); 178 }, { 179 offset: '90%' 180 }); 181 182 $('.a_sl').css('opacity','0'); 183 $('.a_sl').waypoint(function () { 184 $(this).addClass('slideInLeft'); 185 $('.a_sl.slideInLeft').css({ 186 opacity: 1 187 }); 188 }, { 189 offset: '90%' 190 }); 191 192 $('.a_sr').css('opacity','0'); 193 $('.a_sr').waypoint(function () { 194 $(this).addClass('slideInRight'); 195 $('.a_sr.slideInRight').css({ 196 opacity: 1 197 }); 198 }, { 199 offset: '90%' 200 }); 201 } 202 } 203 204 function configure_height() { 205 206 if(window_width < 992){ 207 var home_img = $('.home_img'); 208 var home_img_wrap_width = home_img.width(); 209 var home_img_width = $('.home_img img:first-child').width(); 210 var home_img_pad = (home_img_wrap_width - home_img_width) / 2; 211 home_img.find('img').css('padding', '0 ' + home_img_pad + 'px'); 212 } 213 214 if(window_width > 991){ 215 var home_col = -1; 216 $('.home_col').each(function () { 217 if ($(this).height() > home_col) { 218 home_col = $(this).height(); 219 } 220 }); 221 $('.home_col').height(home_col); 222 223 224 var feature_col = -1; 225 $('.features > div').each(function () { 226 if ($(this).height() > feature_col) { 227 feature_col = $(this).height(); 228 } 229 }); 230 $('.features > div').height(feature_col); 231 232 var counter_col = -1; 233 $('.counter_col').each(function () { 234 if ($(this).height() > counter_col) { 235 counter_col = $(this).height(); 236 } 237 }); 238 $('.counter_col > div').height(counter_col); 239 240 $('.product_area .row').each(function () { 241 var product_col = -1; 242 $(this).children('.product_col').each(function () { 243 if ($(this).height() > product_col) { 244 product_col = $(this).height(); 245 } 246 }); 247 $(this).children('.product_col').height(product_col); 248 }); 249 } 250 } 251 252 function preloader() { 253 $('.loader_wrep').fadeOut(2000); 254 } 255 256 $(document).ready(function () { 257 258 sliders(); 259 plugins(); 260 custom(); 261 animation_time(); 262 263 264 // Get the value of mailchimp form input field 265 var formBtnValue = $('.header-mailchimp-form input.mcf_btn_txt').val(); 266 267 // Set the text and classes 268 $('.header-mailchimp-form button') 269 .addClass('home_btn default-btn hvr-shutter-out-horizontal') 270 .html( formBtnValue + '<i class="fa fa-long-arrow-right"></i>' ); 271 272 273 $('.contact-modal-btn').on('click', function(e) { 274 e.preventDefault(); 275 $('#contact-modal').modal({ 276 keyboard: false 277 }); 278 }); 279 280 });
281 282 $(window).load(function () { 283 animation(); 284 configure_height(); 285 preloader(); 286 }); 287 288})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.