1(function($) { 2 3 "use strict"; 4 5 6 // home-14 js 7 8 //Tabs Box 9 if($('.tabs-box').length){ 10 $('.tabs-box .tab-buttons .tab-btn').on('click', function(e) { 11 e.preventDefault(); 12 var target = $($(this).attr('data-tab')); 13 14 if ($(target).is(':visible')){ 15 return false; 16 }else{ 17 target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn'); 18 $(this).addClass('active-btn'); 19 target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0); 20 target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab'); 21 $(target).fadeIn(300); 22 $(target).addClass('active-tab'); 23 } 24 }); 25 } 26 27 28 29 30 31 32 33 34 35 if($('.curved-circle').length) { 36 $('.curved-circle').circleType({position: 'absolute', dir: 1, radius: 83, forceHeight: true, forceWidth: true}); 37 } 38 39 //Hide Loading Box (Preloader) 40 function handlePreloader() { 41 if($('.loader-wrap').length){ 42 $('.loader-wrap').delay(1000).fadeOut(500); 43 } 44 TweenMax.to($(".loader-wrap .overlay"), 1.2, { 45 force3D: true, 46 left: "100%", 47 ease: Expo.easeInOut, 48 }); 49 } 50 51 if ($(".preloader-close").length) { 52 $(".preloader-close").on("click", function(){ 53 $('.loader-wrap').delay(200).fadeOut(500); 54 }) 55 } 56 57 function dynamicCurrentMenuClass(selector) { 58 let FileName = window.location.href.split('/').reverse()[0]; 59 60 selector.find('li').each(function () { 61 let anchor = $(this).find('a'); 62 if ($(anchor).attr('href') == FileName) { 63 $(this).addClass('current'); 64 } 65 }); 66 // if any li has .current elmnt add class 67 selector.children('li').each(function () { 68 if ($(this).find('.current').length) { 69 $(this).addClass('current'); 70 } 71 }); 72 // if no file name return 73 if ('' == FileName) { 74 selector.find('li').eq(0).addClass('current'); 75 } 76 } 77 78 // dynamic current class 79 let mainNavUL = $('.main-menu').find('.navigation'); 80 dynamicCurrentMenuClass(mainNavUL); 81 82 //Update Header Style and Scroll to Top 83 function headerStyle() { 84 if($('.main-header').length){ 85 var windowpos = $(window).scrollTop(); 86 var siteHeader = $('.main-header'); 87 var scrollLink = $('.scroll-to-top'); 88 var sticky_header = $('.main-header .sticky-header'); 89 if (windowpos > 100) { 90 siteHeader.addClass('fixed-header'); 91 sticky_header.addClass("animated slideInDown"); 92 scrollLink.fadeIn(300); 93 } else { 94 siteHeader.removeClass('fixed-header'); 95 sticky_header.removeClass("animated slideInDown"); 96 scrollLink.fadeOut(300); 97 } 98 } 99 } 100 101 headerStyle(); 102 103 //Submenu Dropdown Toggle 104 if($('.main-header li.dropdown ul').length){ 105 $('.main-header .navigation li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-right"></span></div>'); 106 } 107 108 //Hidden Sidebar 109 if($('.hidden-sidebar').length){ 110 111 var animButton = $(".sidemenu-nav-toggler"), 112 hiddenBar = $(".hidden-sidebar"), 113 navOverlay = $(".nav-overlay"), 114 hiddenBarClose = $(".hidden-sidebar-close"); 115 116 function showMenu() { 117 TweenMax.to(hiddenBar, 0.6, { 118 force3D: false, 119 right: "0", 120 ease: Expo.easeInOut 121 }); 122 hiddenBar.removeClass("close-sidebar"); 123 navOverlay.fadeIn(500); 124 } 125 126 function hideMenu() { 127 TweenMax.to(hiddenBar, 0.6, { 128 force3D: false, 129 right: "-480px", 130 ease: Expo.easeInOut 131 }); 132 hiddenBar.addClass("close-sidebar"); 133 navOverlay.fadeOut(500); 134 } 135 animButton.on("click", function() { 136 if (hiddenBar.hasClass("close-sidebar")) showMenu(); 137 else hideMenu(); 138 }); 139 navOverlay.on("click", function() { 140 hideMenu(); 141 }); 142 hiddenBarClose.on("click", function() { 143 hideMenu(); 144 }); 145 } 146 147 if ($('.nav-overlay').length) { 148 // / cursor / 149 var cursor = $(".nav-overlay .cursor"),
150 follower = $(".nav-overlay .cursor-follower"); 151 152 var posX = 0, 153 posY = 0; 154 155 var mouseX = 0, 156 mouseY = 0; 157 158 TweenMax.to({}, 0.016, { 159 repeat: -1, 160 onRepeat: function() { 161 posX += (mouseX - posX) / 9; 162 posY += (mouseY - posY) / 9; 163 164 TweenMax.set(follower, { 165 css: { 166 left: posX - 22, 167 top: posY - 22 168 } 169 }); 170 171 TweenMax.set(cursor, { 172 css: { 173 left: mouseX, 174 top: mouseY 175 } 176 }); 177 178 } 179 }); 180 181 $(document).on("mousemove", function(e) { 182 var scrollTop = window.pageYOffset || document.documentElement.scrollTop; 183 mouseX = e.pageX; 184 mouseY = e.pageY - scrollTop; 185 }); 186 $("button, a").on("mouseenter", function() { 187 cursor.addClass("active"); 188 follower.addClass("active"); 189 }); 190 $("button, a").on("mouseleave", function() { 191 cursor.removeClass("active"); 192 follower.removeClass("active"); 193 }); 194 $(".nav-overlay").on("mouseenter", function() { 195 cursor.addClass("close-cursor"); 196 follower.addClass("close-cursor"); 197 }); 198 $(".nav-overlay").on("mouseleave", function() { 199 cursor.removeClass("close-cursor"); 200 follower.removeClass("close-cursor"); 201 }); 202 } 203 204 //Mobile Nav Hide Show 205 if($('.mobile-menu').length){ 206 207 $('.mobile-menu .menu-box').mCustomScrollbar(); 208 209 var mobileMenuContent = $('.main-header .nav-outer .main-menu').html(); 210 $('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent); 211 $('.sticky-header .main-menu').append(mobileMenuContent); 212 213 //Dropdown Button 214 $('.mobile-menu li.dropdown .dropdown-btn').on('click', function() { 215 $(this).toggleClass('open'); 216 $(this).prev('ul').slideToggle(500); 217 }); 218 //Menu Toggle Btn 219 $('.mobile-nav-toggler').on('click', function() { 220 $('body').addClass('mobile-menu-visible'); 221 }); 222 223 //Menu Toggle Btn 224 $('.mobile-menu .menu-backdrop,.mobile-menu .close-btn,.scroll-nav li a').on('click', function() { 225 $('body').removeClass('mobile-menu-visible'); 226 }); 227 } 228 229 //Sidemenu Nav Hide Show 230 if($('.side-menu').length){ 231 232 $('.side-menu .menu-box').mCustomScrollbar(); 233 234 //Dropdown Button 235 $('.side-menu li.dropdown .dropdown-btn').on('click', function() { 236 $(this).toggleClass('open'); 237 $(this).prev('ul').slideToggle(500); 238 }); 239 240 $('body').addClass('side-menu-visible'); 241 //Menu Toggle Btn 242 $('.side-nav-toggler').on('click', function() { 243 $('body').addClass('side-menu-visible'); 244 }); 245 246 //Menu Toggle Btn 247 $('.side-menu .side-menu-resize').on('click', function() { 248 $('body').toggleClass('side-menu-visible'); 249 }); 250 251 //Menu Toggle Btn 252 $('.main-header .mobile-nav-toggler-two').on('click', function() { 253 $('body').addClass('side-menu-visible-s2'); 254 }); 255 256 //Menu Overlay 257 $('.main-header .side-menu-overlay').on('click', function() { 258 $('body').removeClass('side-menu-visible-s2'); 259 }); 260 } 261 262 //Search Popup 263 if($('#search-popup').length){ 264 265 //Show Popup 266 $('.search-toggler').on('click', function() { 267 $('#search-popup').addClass('popup-visible'); 268 }); 269 $(document).keydown(function(e){ 270 if(e.keyCode === 27) { 271 $('#search-popup').removeClass('popup-visible'); 272 } 273 }); 274 //Hide Popup 275 $('.close-search,.search-popup .overlay-layer').on('click', function() { 276 $('#search-popup').removeClass('popup-visible'); 277 }); 278 } 279 280 //Case Tabs 281 if($('.case-tabs').length){ 282 $('.case-tabs .case-tab-btns .case-tab-btn').on('click', function(e) { 283 e.preventDefault(); 284 var target = $($(this).attr('data-tab')); 285 286 if ($(target).hasClass('actve-tab')){ 287 return false; 288 }else{ 289 $('.case-tabs .case-tab-btns .case-tab-btn').removeClass('active-btn'); 290 $(this).addClass('active-btn'); 291 $('.case-tabs .case-tabs-content .case-tab').removeClass('active-tab'); 292 $(target).addClass('active-tab'); 293 } 294 }); 295 } 296 297 // Lazyload Images 298 if($('.lazy-image').length){ 299 new LazyLoad({ 300 elements_selector: ".lazy-image", 301 load_delay: 0, 302 threshold: 300 303 }); 304 } 305 306 ///////////////////////////// 307 //Universal Code for All Owl Carousel Sliders 308 ///////////////////////////// 309 310 if ($('.theme_carousel').length) { 311 $(".theme_carousel").each(function (index) { 312 var $owlAttr = {}, 313 $extraAttr = $(this).data("options"); 314 $.extend($owlAttr, $extraAttr); 315 $(this).owlCarousel($owlAttr); 316 }); 317 } 318 319 // Donation Progress Bar 320 if ($('.count-bar').length) { 321 $('.count-bar').appear(function(){ 322 var el = $(this); 323 var percent = el.data('percent'); 324 $(el).css('width',percent).addClass('counted'); 325 },{accY: -50}); 326 327 } 328 329 //Fact Counter + Text Count 330 if($('.count-box').length){ 331 $('.count-box').appear(function(){ 332 333 var $t = $(this), 334 n = $t.find(".count-text").attr("data-stop"), 335 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 336 337 if (!$t.hasClass("counted")) { 338 $t.addClass("counted"); 339 $({ 340 countNum: $t.find(".count-text").text() 341 }).animate({ 342 countNum: n 343 }, { 344 duration: r, 345 easing: "linear", 346 step: function() { 347 $t.find(".count-text").text(Math.floor(this.countNum)); 348 }, 349 complete: function() { 350 $t.find(".count-text").text(this.countNum); 351 } 352 }); 353 } 354 355 },{accY: 0}); 356 } 357 358 //Tabs Box 359 if($('.tabs-box').length){ 360 $('.tabs-box .tab-buttons .tab-btn').on('click', function(e) { 361 e.preventDefault(); 362 var target = $($(this).attr('data-tab')); 363 364 if ($(target).is(':visible')){ 365 return false;
366 }else{ 367 target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn'); 368 $(this).addClass('active-btn'); 369 target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0); 370 target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab'); 371 $(target).fadeIn(300); 372 $(target).addClass('active-tab'); 373 } 374 }); 375 } 376 377 //Accordion Box 378 if($('.accordion-box').length){ 379 $(".accordion-box").on('click', '.acc-btn', function() { 380 381 var outerBox = $(this).parents('.accordion-box'); 382 var target = $(this).parents('.accordion'); 383 384 if($(this).hasClass('active')!==true){ 385 $(outerBox).find('.accordion .acc-btn').removeClass('active'); 386 } 387 388 if ($(this).next('.acc-content').is(':visible')){ 389 return false; 390 }else{ 391 $(this).addClass('active'); 392 $(outerBox).children('.accordion').removeClass('active-block'); 393 $(outerBox).find('.accordion').children('.acc-content').slideUp(300); 394 target.addClass('active-block'); 395 $(this).next('.acc-content').slideDown(300); 396 } 397 }); 398 } 399 400 401 402 //Price Range Slider 403 if($('.price-range-slider').length){ 404 $( ".price-range-slider" ).slider({ 405 range: true, 406 min: 10, 407 max: 200, 408 values: [ 10, 99 ], 409 slide: function( event, ui ) { 410 $( "input.property-amount" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] ); 411 } 412 }); 413 414 $( "input.property-amount" ).val( $( ".price-range-slider" ).slider( "values", 0 ) + " - $" + $( ".price-range-slider" ).slider( "values", 1 ) ); 415 } 416 417 418 //Jquery Spinner / Quantity Spinner 419 if($('.quantity-spinner').length){ 420 $("input.quantity-spinner").TouchSpin({ 421 verticalbuttons: true 422 }); 423 } 424 425 //LightBox / Fancybox 426 if($('.lightbox-image').length) { 427 $('.lightbox-image').fancybox({ 428 openEffect : 'fade', 429 closeEffect : 'fade', 430 helpers : { 431 media : {} 432 } 433 }); 434 } 435 436 //Sortable Masonary with Filters 437 function sortableMasonry() { 438 if ($('.sortable-masonry').length) { 439 var winDow = $(window); 440 // Needed variables 441 var $container = $('.sortable-masonry .items-container'); 442 var $filter = $('.filter-btns'); 443 $container.isotope({ 444 filter: '.all', 445 animationOptions: { 446 duration: 500, 447 easing: 'linear' 448 } 449 }); 450 // Isotope Filter 451 $filter.find('li').on('click', function() { 452 var selector = $(this).attr('data-filter'); 453 try { 454 $container.isotope({ 455 filter: selector, 456 animationOptions: { 457 duration: 500, 458 easing: 'linear', 459 queue: false 460 } 461 }); 462 } catch (err) {} 463 return false; 464 }); 465 winDow.on('resize', function() { 466 var selector = $filter.find('li.active').attr('data-filter'); 467 $container.isotope({ 468 filter: selector, 469 animationOptions: { 470 duration: 500, 471 easing: 'linear', 472 queue: false 473 } 474 }); 475 $container.isotope() 476 }); 477 var filterItemA = $('.filter-btns li'); 478 filterItemA.on('click', function() { 479 var $this = $(this); 480 if (!$this.hasClass('active')) { 481 filterItemA.removeClass('active'); 482 $this.addClass('active'); 483 } 484 }); 485 $container.isotope("on", "layoutComplete", function(a, b) { 486 var a = b.length, 487 pcn = $(".filters .count"); 488 pcn.html(a); 489 }); 490 } 491 } 492 sortableMasonry(); 493 494 //Jquery Knob animation 495 if ($('.dial').length) { 496 $('.dial').appear(function() { 497 var elm = $(this); 498 var color = elm.attr('data-fgColor'); 499 var perc = elm.attr('value'); 500 elm.knob({ 501 'value': 0, 502 'min': 0, 503 'max': 100, 504 'skin': 'tron', 505 'readOnly': true, 506 'thickness': 0.10, 507 'dynamicDraw': true, 508 'displayInput': false 509 }); 510 $({ 511 value: 0 512 }).animate({ 513 value: perc 514 }, { 515 duration: 2000, 516 easing: 'swing', 517 progress: function() { 518 elm.val(Math.ceil(this.value)).trigger('change'); 519 } 520 }); 521 //circular progress bar color 522 $(this).append(function() { 523 // elm.parent().parent().find('.circular-bar-content').css('color',color); 524 //elm.parent().parent().find('.circular-bar-content .txt').text(perc); 525 }); 526 }, { 527 accY: 20 528 }); 529 } 530 531 // Testimonial 532 if ($('.testimonial-carousel').length) { 533 var testimonialThumb = new Swiper('.testimonial-thumbs', { 534 preloadImages: false, 535 loop: true, 536 speed: 2400, 537 spaceBetween: 0, 538 effect: "slide", 539 }); 540 var totalSlides = $(".swiper-container").length; 541 var testimonialContent = new Swiper('.testimonial-content', { 542 preloadImages: false, 543 loop: true, 544 speed: 2400, 545 spaceBetween: 0, 546 effect: "slide", 547 autoplay: { 548 delay: 2500, 549 disableOnInteraction: false 550 }, 551 navigation: { 552 nextEl: '.swiper-button-next', 553 prevEl: '.swiper-button-prev', 554 }, 555 556 }); 557 testimonialContent.controller.control = testimonialThumb; 558 testimonialThumb.controller.control = testimonialContent; 559 } 560 561 // Products Carousel 562 if ($('.products-carousel').length) { 563 var productThumbs = new Swiper('.product-thumbs', { 564 preloadImages: false, 565 loop: true, 566 slidesPerView: 3, 567 speed: 1400, 568 spaceBetween: 0, 569 direction: "vertical", 570 breakpoints: { 571 300: { 572 slidesPerView: 3, 573 }, 574 } 575 });
576 var productContent = new Swiper('.product-content', { 577 preloadImages: false, 578 loop: true, 579 speed: 1400, 580 spaceBetween: 0, 581 effect: "fade", 582 }); 583 productContent.controller.control = productThumbs; 584 productThumbs.controller.control = productContent; 585 } 586 587 588 589 // Scroll to a Specific Div 590 if($('.scroll-to-target').length){ 591 $(".scroll-to-target").on('click', function() { 592 var target = $(this).attr('data-target'); 593 // animate 594 $('html, body').animate({ 595 scrollTop: $(target).offset().top 596 }, 1500); 597 598 }); 599 } 600 601 // Isotop Layout 602 function isotopeBlock() { 603 if($(".isotope-block").length){ 604 var $grid = $('.isotope-block').isotope(); 605 606 } 607 } 608 609 isotopeBlock(); 610 611 //Progress Bar / Levels 612 if ($('.progress-levels .progress-box .bar-fill').length) { 613 $(".progress-box .bar-fill").each(function() { 614 var progressWidth = $(this).attr('data-percent'); 615 $(this).css('width', progressWidth + '%'); 616 $(this).children('.percent').html(progressWidth + '%'); 617 }); 618 } 619 620 621 // Elements Animation 622 if($('.wow').length){ 623 var wow = new WOW( 624 { 625 boxClass: 'wow', // animated element css class (default is wow) 626 animateClass: 'animated', // animation css class (default is animated) 627 offset: 0, // distance to the element when triggering the animation (default is 0) 628 mobile: true, // trigger animations on mobile devices (default is true) 629 live: true // act on asynchronously loaded content (default is true) 630 } 631 ); 632 wow.init(); 633 } 634 635 //Add One Page nav 636 if($('.scroll-nav').length) { 637 $('.scroll-nav ul').onePageNav(); 638 } 639 640 // Testimonial 641 if ($('.news-carousel').length) { 642 var newsCarousel = new Swiper('.news-carousel', { 643 loop: false, 644 spaceBetween: 0, 645 slidesPerView: 3, 646 initialSlide: 1, 647 freeMode: true, 648 speed: 1400, 649 watchSlidesVisibility: true, 650 watchSlidesProgress: true, 651 observer: true, 652 slideActiveClass: 'swiper-slide-active', 653 autoplay: { 654 delay: 5000, 655 }, 656 navigation: { 657 nextEl: '.swiper-button-next', 658 prevEl: '.swiper-button-prev', 659 }, 660 breakpoints: { 661 991: { 662 slidesPerView: 2, 663 }, 664 640: { 665 slidesPerView: 1, 666 }, 667 }, 668 scrollbar: { 669 el: '.swiper-scrollbar', 670 draggable: true, 671 }, 672 }); 673 } 674 675 676/* ========================================================================== 677 When document is Scrollig, do 678 ========================================================================== */ 679 680 $(window).on('scroll', function() { 681 headerStyle(); 682 }); 683 684/* ========================================================================== 685 When document is loading, do 686 ========================================================================== */ 687 688 $(window).on('load', function() { 689 handlePreloader(); 690 sortableMasonry(); 691 isotopeBlock(); 692 693 }); 694 695})(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.