1(function($) { 2 3 "use strict"; 4 5 //Hide Loading Box (Preloader) 6 function handlePreloader() { 7 if($('.preloader').length){ 8 $('.preloader').delay(200).fadeOut(500); 9 } 10 } 11 12 //Update Header Style and Scroll to Top 13 function headerStyle() { 14 if($('.main-header').length){ 15 var windowpos = $(window).scrollTop(); 16 var siteHeader = $('.main-header'); 17 var scrollLink = $('.scroll-to-top'); 18 if (windowpos >= 200) { 19 siteHeader.addClass('fixed-header'); 20 scrollLink.fadeIn(300); 21 } else { 22 siteHeader.removeClass('fixed-header'); 23 scrollLink.fadeOut(300); 24 } 25 } 26 } 27 28 headerStyle(); 29 30 //Submenu Dropdown Toggle 31 if($('.main-header .navigation li.dropdown ul').length){ 32 $('.main-header .navigation li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>'); 33 34 //Dropdown Button 35 $('.main-header .navigation li.dropdown .dropdown-btn').on('click', function() { 36 $(this).prev('ul').slideToggle(500); 37 }); 38 39 //Disable dropdown parent link 40 $('.main-header .navigation li.dropdown > a,.hidden-bar .side-menu li.dropdown > a').on('click', function(e) { 41 e.preventDefault(); 42 }); 43 } 44 45 //Revolution Slider 46 if($('.main-slider .tp-banner').length){ 47 48 var MainSlider = $('.main-slider'); 49 var strtHeight = MainSlider.attr('data-start-height'); 50 var slideOverlay = "'"+ MainSlider.attr('data-slide-overlay') +"'"; 51 52 $('.main-slider .tp-banner').show().revolution({ 53 dottedOverlay: slideOverlay, 54 delay:10000, 55 startwidth:1200, 56 startheight:strtHeight, 57 hideThumbs:600, 58 59 thumbWidth:80, 60 thumbHeight:50, 61 thumbAmount:5, 62 63 navigationType:"bullet", 64 navigationArrows:"0", 65 navigationStyle:"preview3", 66 67 touchenabled:"on", 68 onHoverStop:"off", 69 70 swipe_velocity: 0.7, 71 swipe_min_touches: 1, 72 swipe_max_touches: 1, 73 drag_block_vertical: false, 74 75 parallax:"mouse", 76 parallaxBgFreeze:"on", 77 parallaxLevels:[7,4,3,2,5,4,3,2,1,0], 78 79 keyboardNavigation:"off", 80 81 navigationHAlign:"center", 82 navigationVAlign:"bottom", 83 navigationHOffset:0, 84 navigationVOffset:40, 85 86 soloArrowLeftHalign:"left", 87 soloArrowLeftValign:"center", 88 soloArrowLeftHOffset:20, 89 soloArrowLeftVOffset:20, 90 91 soloArrowRightHalign:"right", 92 soloArrowRightValign:"center", 93 soloArrowRightHOffset:20, 94 soloArrowRightVOffset:20, 95 96 shadow:0, 97 fullWidth:"on", 98 fullScreen:"off", 99 100 spinner:"spinner4", 101 102 stopLoop:"off", 103 stopAfterLoops:-1, 104 stopAtSlide:-1, 105 106 shuffle:"off", 107 108 autoHeight:"off", 109 forceFullWidth:"on", 110 111 hideThumbsOnMobile:"on", 112 hideNavDelayOnMobile:1500, 113 hideBulletsOnMobile:"on", 114 hideArrowsOnMobile:"on", 115 hideThumbsUnderResolution:0, 116 117 hideSliderAtLimit:0, 118 hideCaptionAtLimit:0, 119 hideAllCaptionAtLilmit:0, 120 startWithSlide:0, 121 videoJsPath:"", 122 fullScreenOffsetContainer: "" 123 }); 124 125 } 126 127 //Fact Counter + Text Count 128 if($('.count-box').length){ 129 $('.count-box').appear(function(){ 130 131 var $t = $(this), 132 n = $t.find(".count-text").attr("data-stop"), 133 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 134 135 if (!$t.hasClass("counted")) { 136 $t.addClass("counted"); 137 $({ 138 countNum: $t.find(".count-text").text() 139 }).animate({ 140 countNum: n 141 }, { 142 duration: r, 143 easing: "linear", 144 step: function() { 145 $t.find(".count-text").text(Math.floor(this.countNum)); 146 }, 147 complete: function() { 148 $t.find(".count-text").text(this.countNum); 149 } 150 }); 151 } 152 153 },{accY: 0}); 154 } 155 156 //Custom Seclect Box 157 if($('.custom-select-box').length){ 158 $('.custom-select-box').selectmenu().selectmenu('menuWidget').addClass('overflow'); 159 } 160 161 162 //Single Item Slider 163 if ($('.single-item-carousel').length) { 164 $('.single-item-carousel').owlCarousel({ 165 loop:true, 166 mouseDrag:true, 167 margin:10, 168 nav:true, 169 smartSpeed: 700, 170 autoplay: 5000, 171 navText: [ '<span class="flaticon-arrows-3"></span>', '<span class="flaticon-right-arrow"></span>' ], 172 responsive:{ 173 0:{ 174 items:1 175 }, 176 600:{ 177 items:1 178 }, 179 1200:{ 180 items:1 181 } 182 } 183 }); 184 } 185 186 //Sponsors Slider 187 if ($('.sponsors-slider').length) { 188 $('.sponsors-slider').owlCarousel({ 189 loop:true, 190 margin:30, 191 nav:true, 192 smartSpeed: 500, 193 autoplay: 4000, 194 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 195 responsive:{ 196 0:{ 197 items:1 198 }, 199 600:{ 200 items:3 201 }, 202 800:{ 203 items:4 204 }, 205 1024:{ 206 items:5 207 }, 208 1200:{ 209 items:5 210 } 211 } 212 }); 213 } 214 215 //Footer Sponsors Slider 216 if ($('.footer-sponsors-slider').length) { 217 $('.footer-sponsors-slider').owlCarousel({ 218 loop:true, 219 margin:30, 220 nav:true, 221 smartSpeed: 500, 222 autoplay: 4000, 223 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 224 responsive:{ 225 0:{ 226 items:1 227 }, 228 600:{ 229 items:3 230 }, 231 800:{ 232 items:3 233 }, 234 1024:{ 235 items:4 236 }, 237 1200:{ 238 items:4 239 } 240 } 241 }); 242 } 243 244 //Event Countdown Timer 245 if($('.time-countdown').length){ 246 $('.time-countdown').each(function() { 247 var $this = $(this), finalDate = $(this).data('countdown'); 248 $this.countdown(finalDate, function(event) { 249 var $this = $(this).html(event.strftime('' + '<div class="counter-column"><div class="inner"><span class="count">%D</span>Days</div></div> ' + '<div class="counter-column"><div class="inner"><span class="count">%H</span>Hours</div></div> ' + '<div class="counter-column"><div class="inner"><span class="count">%M</span>Mins</div></div> ' + '<div class="counter-column"><div class="inner"><span class="count">%S</span>Secs</div></div>')); 250 }); 251 }); 252 } 253 254 //Tabs Box 255 if($('.tabs-box').length){ 256 $('.tabs-box .tab-buttons .tab-btn').on('click', function(e) { 257 e.preventDefault(); 258 var target = $($(this).attr('data-tab')); 259 260 if ($(target).is(':visible')){ 261 return false;
262 }else{ 263 target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn'); 264 $(this).addClass('active-btn'); 265 target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0); 266 target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab'); 267 $(target).fadeIn(300); 268 $(target).addClass('active-tab'); 269 } 270 }); 271 } 272 273 //Price Range Slider 274 if($('.range-slider-price').length){ 275 276 var priceRange = document.getElementById('range-slider-price'); 277 278 noUiSlider.create(priceRange, { 279 start: [ 10, 80 ], 280 limit: 200, 281 behaviour: 'drag', 282 connect: true, 283 range: { 284 'min': 10, 285 'max': 200 286 } 287 }); 288 289 var limitFieldMin = document.getElementById('min-value-rangeslider'); 290 var limitFieldMax = document.getElementById('max-value-rangeslider'); 291 292 priceRange.noUiSlider.on('update', function( values, handle ){ 293 (handle ? limitFieldMax : limitFieldMin).value = values[handle]; 294 }); 295 } 296 297 //LightBox / Fancybox 298 if($('.lightbox-image').length) { 299 $('.lightbox-image').fancybox({ 300 openEffect : 'fade', 301 closeEffect : 'fade', 302 helpers : { 303 media : {} 304 } 305 }); 306 } 307 308 //Contact Form Validation 309 if($('#contact-form').length){ 310 $('#contact-form').validate({ 311 rules: { 312 username: { 313 required: true 314 }, 315 email: { 316 required: true, 317 email: true 318 }, 319 subject: { 320 required: true 321 }, 322 phone: { 323 required: true 324 }, 325 message: { 326 required: true 327 } 328 } 329 }); 330 } 331 332 // Scroll to a Specific Div 333 if($('.scroll-to-target').length){ 334 $(".scroll-to-target").on('click', function() { 335 var target = $(this).attr('data-target'); 336 // animate 337 $('html, body').animate({ 338 scrollTop: $(target).offset().top 339 }, 1500); 340 341 }); 342 } 343 344 // Elements Animation 345 if($('.wow').length){ 346 var wow = new WOW( 347 { 348 boxClass: 'wow', // animated element css class (default is wow) 349 animateClass: 'animated', // animation css class (default is animated) 350 offset: 0, // distance to the element when triggering the animation (default is 0) 351 mobile: true, // trigger animations on mobile devices (default is true) 352 live: true // act on asynchronously loaded content (default is true) 353 } 354 ); 355 wow.init(); 356 } 357 358/* ========================================================================== 359 When document is Scrollig, do 360 ========================================================================== */ 361 362 $(window).on('scroll', function() { 363 headerStyle(); 364 }); 365 366/* ========================================================================== 367 When document is loading, do 368 ========================================================================== */ 369 370 $(window).on('load', function() { 371 handlePreloader(); 372 }); 373 374})(window.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.