1(function($) { 2 3 "use strict"; 4 5 6 //Hide Loading Box (Preloader) 7 function handlePreloader() { 8 if($('.preloader').length){ 9 $('.preloader').delay(200).fadeOut(500); 10 } 11 } 12 13 14 15 //Update Header Style and Scroll to Top 16 function headerStyle() { 17 if($('.main-header').length){ 18 var windowpos = $(window).scrollTop(); 19 var siteHeader = $('.main-header'); 20 var scrollLink = $('.scroll-to-top'); 21 22 var HeaderHight = $('.main-header').height(); 23 if (windowpos >= HeaderHight) { 24 siteHeader.addClass('fixed-header'); 25 scrollLink.fadeIn(300); 26 } else { 27 siteHeader.removeClass('fixed-header'); 28 scrollLink.fadeOut(300); 29 } 30 31 } 32 } 33 34 headerStyle(); 35 36 37 //Submenu Dropdown Toggle 38 if($('.main-header li.dropdown ul').length){ 39 $('.main-header li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>'); 40 41 //Dropdown Button 42 $('.main-header li.dropdown .dropdown-btn').on('click', function() { 43 $(this).prev('ul').slideToggle(500); 44 }); 45 46 //Dropdown Menu / Fullscreen Nav 47 $('.fullscreen-menu .navigation li.dropdown > a').on('click', function() { 48 $(this).next('ul').slideToggle(500); 49 }); 50 51 //Disable dropdown parent link 52 $('.navigation li.dropdown > a').on('click', function(e) { 53 e.preventDefault(); 54 }); 55 56 //Disable dropdown parent link 57 $('.main-header .navigation li.dropdown > a,.hidden-bar .side-menu li.dropdown > a').on('click', function(e) { 58 e.preventDefault(); 59 }); 60 61 $('.cart-box .dropdown-menu').click(function(e) { 62 e.stopPropagation(); 63 }); 64 65 } 66 67 68 //Jquery Spinner / Quantity Spinner 69 if($('.quantity-spinner').length){ 70 $("input.quantity-spinner").TouchSpin({ 71 verticalbuttons: true 72 }); 73 } 74 75 76 77 //Mobile Nav Hide Show 78 if($('.mobile-menu').length){ 79 80 $('.mobile-menu .menu-box').mCustomScrollbar(); 81 82 var mobileMenuContent = $('.main-header .nav-outer .main-menu').html(); 83 $('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent); 84 $('.sticky-header .main-menu').append(mobileMenuContent); 85 86 //Dropdown Button 87 $('.mobile-menu li.dropdown .dropdown-btn').on('click', function() { 88 $(this).toggleClass('open'); 89 $(this).prev('ul').slideToggle(500); 90 }); 91 //Menu Toggle Btn 92 $('.mobile-nav-toggler').on('click', function() { 93 $('body').addClass('mobile-menu-visible'); 94 }); 95 96 //Menu Toggle Btn 97 $('.mobile-menu .menu-backdrop,.mobile-menu .close-btn').on('click', function() { 98 $('body').removeClass('mobile-menu-visible'); 99 }); 100 101 } 102 103 104 //Header Search 105 if($('.search-box-outer').length) { 106 $('.search-box-outer').on('click', function() { 107 $('body').addClass('search-active'); 108 }); 109 $('.close-search').on('click', function() { 110 $('body').removeClass('search-active'); 111 }); 112 113 $('.search-popup .color-layer').on('click', function() { 114 $('body').removeClass('search-active'); 115 }); 116 } 117 118 119 120 //Hidden Sidebar 121 if ($('.hidden-bar,.fullscreen-menu').length) { 122 var hiddenBar = $('.hidden-bar'); 123 var hiddenBarOpener = $('.nav-toggler'); 124 var hiddenBarCloser = $('.hidden-bar-closer,.close-menu'); 125 $('.hidden-bar-wrapper').mCustomScrollbar(); 126 127 //Show Sidebar 128 hiddenBarOpener.on('click', function () { 129 $('body').addClass('visible-menu-bar'); 130 hiddenBar.addClass('visible-sidebar'); 131 }); 132 133 //Hide Sidebar 134 hiddenBarCloser.on('click', function () { 135 $('body').removeClass('visible-menu-bar'); 136 hiddenBar.removeClass('visible-sidebar'); 137 }); 138 } 139 140 141 142 //Custom Seclect Box 143 if($('.custom-select-box').length){ 144 $('.custom-select-box').selectmenu().selectmenu('menuWidget').addClass('overflow'); 145 } 146 147 148 149 //Fact Counter + Text Count 150 if($('.count-box').length){ 151 $('.count-box').appear(function(){ 152 153 var $t = $(this), 154 n = $t.find(".count-text").attr("data-stop"), 155 r = parseInt($t.find(".count-text").attr("data-speed"), 10); 156 157 if (!$t.hasClass("counted")) { 158 $t.addClass("counted"); 159 $({ 160 countNum: $t.find(".count-text").text() 161 }).animate({ 162 countNum: n 163 }, { 164 duration: r, 165 easing: "linear", 166 step: function() { 167 $t.find(".count-text").text(Math.floor(this.countNum)); 168 }, 169 complete: function() { 170 $t.find(".count-text").text(this.countNum); 171 } 172 }); 173 } 174 175 },{accY: 0}); 176 } 177 178 179 //Gallery Filters 180 if($('.filter-list').length){ 181 $('.filter-list').mixItUp({}); 182 } 183 184 185 //Parallax Scene for Icons 186 if($('.parallax-scene-1').length){ 187 var scene = $('.parallax-scene-1').get(0); 188 var parallaxInstance = new Parallax(scene); 189 } 190 if($('.parallax-scene-2').length){ 191 var scene = $('.parallax-scene-2').get(0); 192 var parallaxInstance = new Parallax(scene); 193 } 194 if($('.parallax-scene-3').length){ 195 var scene = $('.parallax-scene-3').get(0); 196 var parallaxInstance = new Parallax(scene); 197 } 198 if($('.parallax-scene-4').length){ 199 var scene = $('.parallax-scene-4').get(0); 200 var parallaxInstance = new Parallax(scene); 201 } 202 203 204 205 if($('.paroller').length){ 206 $('.paroller').paroller({ 207 factor: 0.2, // multiplier for scrolling speed and offset, +- values for direction control 208 factorLg: 0.4, // multiplier for scrolling speed and offset if window width is less than 1200px, +- values for direction control 209 type: 'foreground', // background, foreground 210 direction: 'horizontal' // vertical, horizontal 211 }); 212 } 213 214 215 216 //Tabs Box 217 if($('.tabs-box').length){ 218 $('.tabs-box .tab-buttons .tab-btn').on('click', function(e) { 219 e.preventDefault(); 220 var target = $($(this).attr('data-tab')); 221 222 if ($(target).is(':visible')){ 223 return false; 224 }else{ 225 target.parents('.tabs-box').find('.tab-buttons').find('.tab-btn').removeClass('active-btn'); 226 $(this).addClass('active-btn'); 227 target.parents('.tabs-box').find('.tabs-content').find('.tab').fadeOut(0); 228 target.parents('.tabs-box').find('.tabs-content').find('.tab').removeClass('active-tab'); 229 $(target).fadeIn(300); 230 $(target).addClass('active-tab'); 231 } 232 }); 233 } 234 235 236 237 //Gallery Filters 238 if($('.filter-list').length){ 239 $('.filter-list').mixItUp({}); 240 } 241 242 243 244 245 //Client Testimonial Carousel 246 if ($('.client-testimonial-carousel').length && $('.client-thumbs-carousel').length) { 247 248 var $sync3 = $(".client-testimonial-carousel"), 249 $sync4 = $(".client-thumbs-carousel"), 250 flag = false, 251 duration = 500; 252 253 $sync3 254 .owlCarousel({ 255 loop:true, 256 items: 1, 257 margin: 0, 258 nav: true, 259 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 260 dots: true, 261 autoplay: true, 262 autoplayTimeout: 5000 263 }) 264 .on('changed.owl.carousel', function (e) { 265 if (!flag) { 266 flag = false; 267 $sync4.trigger('to.owl.carousel', [e.item.index, duration, true]); 268 flag = false; 269 } 270 }); 271 272 $sync4 273 .owlCarousel({ 274 loop:true, 275 margin:20, 276 items: 1, 277 nav: false, 278 navText: [ '<span class="icon flaticon-left-arrow-2"></span>', '<span class="icon flaticon-right-arrow-1"></span>' ], 279 dots: false, 280 center: true, 281 autoplay: true, 282 autoplayTimeout: 5000, 283 responsive: { 284 0:{ 285 items:1, 286 autoWidth: false 287 }, 288 400:{ 289 items:1, 290 autoWidth: false 291 }, 292 600:{ 293 items:1, 294 autoWidth: false 295 }, 296 1000:{ 297 items:1, 298 autoWidth: false 299 }, 300 1200:{ 301 items:1, 302 autoWidth: false 303 } 304 }, 305 }) 306 307 .on('click', '.owl-item', function () { 308 $sync3.trigger('to.owl.carousel', [$(this).index(), duration, true]); 309 }) 310 .on('changed.owl.carousel', function (e) { 311 if (!flag) { 312 flag = true; 313 $sync3.trigger('to.owl.carousel', [e.item.index, duration, true]); 314 flag = false; 315 } 316 }); 317 } 318 319 320 321 322 //Main Slider Carousel 323 if ($('.main-slider-carousel').length) { 324 $('.main-slider-carousel').owlCarousel({ 325 animateOut: 'fadeOut', 326 animateIn: 'fadeIn', 327 loop:true, 328 margin:0, 329 nav:true, 330 //autoHeight: true, 331 smartSpeed: 500, 332 autoplay: 6000, 333 navText: [ '<span class="flaticon-left"></span>', '<span class="flaticon-right"></span>' ], 334 responsive:{ 335 0:{ 336 items:1 337 }, 338 600:{ 339 items:1 340 }, 341 800:{ 342 items:1 343 }, 344 1024:{ 345 items:1 346 }, 347 1200:{ 348 items:1 349 } 350 } 351 }); 352 } 353 354 355 356 // SIngle Item Carousel 357 if ($('.single-item-carousel').length) { 358 $('.single-item-carousel').owlCarousel({ 359 //animateOut: 'fadeOut', 360 //animateIn: 'fadeIn', 361 loop:true, 362 margin:0, 363 nav:true, 364 //autoHeight: true, 365 smartSpeed: 500, 366 autoplay: 6000, 367 navText: [ '<span class="flaticon-left"></span>', '<span class="flaticon-right"></span>' ], 368 responsive:{ 369 0:{ 370 items:1 371 }, 372 600:{ 373 items:1 374 }, 375 800:{ 376 items:1 377 }, 378 1024:{ 379 items:1 380 }, 381 1200:{ 382 items:1 383 } 384 } 385 }); 386 } 387 388 389 390 391 // Testimonial Carousel 392 if ($('.testimonial-carousel').length) { 393 $('.testimonial-carousel').owlCarousel({ 394 //animateOut: 'slideInDown', 395 //animateIn: 'fadeInUp', 396 loop:true, 397 margin:0, 398 nav:true, 399 center:true, 400 smartSpeed: 500, 401 autoplay: 4000, 402 navText: [ '<span class="fa fa-angle-up"></span>', '<span class="fa fa-angle-down"></span>' ], 403 responsive:{ 404 0:{ 405 items:1 406 }, 407 480:{ 408 items:1 409 }, 410 600:{ 411 items:1 412 }, 413 800:{ 414 items:2 415 }, 416 1024:{ 417 items:3 418 }, 419 1340:{ 420 items:3 421 }, 422 1640:{ 423 items:3 424 } 425 } 426 }); 427 } 428 429 430 431 // Four Item Carousel 432 if ($('.four-item-carousel').length) { 433 $('.four-item-carousel').owlCarousel({ 434 loop:true, 435 margin:30, 436 nav:true, 437 smartSpeed: 500, 438 autoplay: 4000, 439 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 440 responsive:{ 441 0:{ 442 items:1 443 }, 444 480:{ 445 items:1 446 }, 447 600:{ 448 items:2 449 }, 450 800:{ 451 items:4 452 }, 453 1024:{ 454 items:4 455 } 456 } 457 }); 458 } 459 460 461 // Four Item Carousel Two 462 if ($('.four-item-carousel-two').length) { 463 $('.four-item-carousel-two').owlCarousel({ 464 loop:true, 465 margin:0, 466 nav:true, 467 smartSpeed: 500, 468 autoplay: 4000, 469 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 470 responsive:{ 471 0:{ 472 items:1 473 }, 474 480:{ 475 items:1 476 }, 477 600:{ 478 items:2 479 }, 480 800:{ 481 items:4 482 }, 483 1024:{ 484 items:4 485 } 486 } 487 }); 488 } 489 490 491 492 // Three Item Carousel 493 if ($('.three-item-carousel').length) { 494 $('.three-item-carousel').owlCarousel({ 495 loop:true, 496 margin:30, 497 nav:true, 498 smartSpeed: 500, 499 autoplay: 4000, 500 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 501 responsive:{ 502 0:{ 503 items:1 504 }, 505 480:{ 506 items:1 507 }, 508 600:{ 509 items:2 510 }, 511 800:{ 512 items:3 513 }, 514 1024:{ 515 items:3 516 } 517 } 518 }); 519 } 520 521 522 523 524 // Sponsors Item Carousel 525 if ($('.sponsors-carousel').length) { 526 $('.sponsors-carousel').owlCarousel({ 527 loop:true, 528 margin:0, 529 nav:true, 530 smartSpeed: 500, 531 autoplay: 4000, 532 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 533 responsive:{ 534 0:{ 535 items:1 536 }, 537 480:{ 538 items:2 539 }, 540 600:{ 541 items:3 542 }, 543 800:{ 544 items:4 545 }, 546 1024:{ 547 items:5 548 } 549 } 550 }); 551 } 552 553 554 // Sponsors Carousel Two 555 if ($('.sponsors-carousel-two').length) { 556 $('.sponsors-carousel-two').owlCarousel({ 557 loop:true, 558 margin:30, 559 nav:true, 560 smartSpeed: 500, 561 autoplay: 4000, 562 navText: [ '<span class="flaticon-left"></span>', '<span class="flaticon-right"></span>' ], 563 responsive:{ 564 0:{ 565 items:1 566 }, 567 480:{ 568 items:2 569 }, 570 600:{ 571 items:3 572 }, 573 800:{ 574 items:4 575 }, 576 1024:{ 577 items:5 578 } 579 } 580 }); 581 } 582 583 584 585 //Product Tabs 586 if($('.spotlight-tab').length){ 587 $('.spotlight-tab .product-tab-btns .p-tab-btn').on('click', function(e) { 588 e.preventDefault(); 589 var target = $($(this).attr('data-tab')); 590 591 if ($(target).hasClass('actve-tab')){ 592 return false; 593 }else{ 594 $('.spotlight-tab .product-tab-btns .p-tab-btn').removeClass('active-btn'); 595 $(this).addClass('active-btn'); 596 $('.spotlight-tab .p-tabs-content .p-tab').removeClass('active-tab'); 597 $(target).addClass('active-tab'); 598 } 599 }); 600 } 601 602 603 //Hide Loading Box (Preloader) 604 if($('.trailer-section .default-tab-box .tab-btns').length){ 605 $('.trailer-section .default-tab-box .tab-btns').mCustomScrollbar(); 606 } 607 608 //Typeit Text On Main Page 609 if ($('.variable-text').length) { 610 611 $('.variable-text').typeIt({ 612 strings: ["The Jungle Book"], 613 speed: 250, 614 breakLines: true, 615 loop:false, 616 autoStart: true 617 }); 618 } 619 620 621 // Spotlight Carousel 622 if ($('.spotlight-carousel').length) { 623 $('.spotlight-carousel').owlCarousel({ 624 loop:true, 625 margin:30, 626 nav:true, 627 smartSpeed: 700, 628 autoplay: 5000, 629 navText: [ '<span class="fa fa-angle-left"></span>', '<span class="fa fa-angle-right"></span>' ], 630 responsive:{ 631 0:{ 632 items:1 633 }, 634 600:{ 635 items:2 636 }, 637 800:{ 638 items:2 639 }, 640 1024:{ 641 items:3 642 }, 643 1200:{ 644 items:4 645 }, 646 1400:{
647 items:4 648 }, 649 1600:{ 650 items:4 651 } 652 } 653 }); 654 } 655 656 657 658 659 //Accordion Box 660 if($('.accordion-box').length){ 661 $(".accordion-box").on('click', '.acc-btn', function() { 662 663 var outerBox = $(this).parents('.accordion-box'); 664 var target = $(this).parents('.accordion'); 665 666 if($(this).hasClass('active')!==true){ 667 $(outerBox).find('.accordion .acc-btn').removeClass('active'); 668 } 669 670 if ($(this).next('.acc-content').is(':visible')){ 671 return false; 672 }else{ 673 $(this).addClass('active'); 674 $(outerBox).children('.accordion').removeClass('active-block'); 675 $(outerBox).find('.accordion').children('.acc-content').slideUp(300); 676 target.addClass('active-block'); 677 $(this).next('.acc-content').slideDown(300); 678 } 679 }); 680 } 681 682 683 684 685 if ($('.appScreenshotCarousel-container').length) { 686 if ($('.appScreenshotCarousel-container').length) { 687 688 var swiper = new Swiper('.appScreenshotCarousel-container', { 689 effect: 'coverflow', 690 loop: true, 691 auto: true, 692 centeredSlides: true, 693 slidesPerView: 2, 694 initialSlide: 2, 695 keyboardControl: true, 696 mousewheelControl: false, 697 grabCursor: true, 698 lazyLoading: true, 699 autoplay: 5000, 700 speed: 600, 701 paginationClickable: true, 702 coverflowEffect: { 703 rotate: 50, 704 stretch: 0, 705 depth: 100, 706 modifier: 1, 707 slideShadows : true, 708 }, 709 //preventClicks: false, 710 //preventClicksPropagation: false, 711 //lazyLoadingInPrevNext: true, 712 nextButton: '.swiper-button-next', 713 prevButton: '.swiper-button-prev', 714 coverflow: { 715 rotate: 0, 716 stretch: 0, 717 depth: 250, 718 modifier: .5, 719 slideShadows: false, 720 }, 721 breakpoints: { 722 1699: { 723 slidesPerView: 2, 724 spaceBetween: 0, 725 }, 726 1100: { 727 slidesPerView: 2, 728 spaceBetween: 0, 729 }, 730 991: { 731 slidesPerView: 2, 732 spaceBetween: 0, 733 }, 734 767: { 735 slidesPerView: 2, 736 spaceBetween: 10, 737 }, 738 575: { 739 slidesPerView: 2, 740 spaceBetween: 5, 741 }, 742 330: { 743 slidesPerView: 1, 744 spaceBetween: 10, 745 } 746 }, 747 }); 748 749 } 750 } 751 752 753 754 755 756 //LightBox / Fancybox 757 if($('.lightbox-image').length) { 758 $('.lightbox-image').fancybox({ 759 openEffect : 'fade', 760 closeEffect : 'fade', 761 helpers : { 762 media : {} 763 } 764 }); 765 } 766 767 768 //Contact Form Validation 769 if($('#contact-form').length){ 770 $('#contact-form').validate({ 771 rules: { 772 username: { 773 required: true 774 }, 775 email: { 776 required: true, 777 email: true 778 }, 779 phone: { 780 required: true 781 }, 782 subject: { 783 required: true 784 }, 785 message: { 786 required: true 787 } 788 } 789 }); 790 } 791 792 793 794 // Scroll to a Specific Div 795 if($('.scroll-to-target').length){ 796 $(".scroll-to-target").on('click', function() { 797 var target = $(this).attr('data-target'); 798 // animate 799 $('html, body').animate({ 800 scrollTop: $(target).offset().top 801 }, 1500); 802 803 }); 804 } 805 806 807 808 // Elements Animation 809 if($('.wow').length){ 810 var wow = new WOW( 811 { 812 boxClass: 'wow', // animated element css class (default is wow) 813 animateClass: 'animated', // animation css class (default is animated) 814 offset: 0, // distance to the element when triggering the animation (default is 0) 815 mobile: true, // trigger animations on mobile devices (default is true) 816 live: true // act on asynchronously loaded content (default is true) 817 } 818 ); 819 wow.init(); 820 } 821 822 823 824/* ========================================================================== 825 When document is Scrollig, do 826 ========================================================================== */ 827 828 $(window).on('scroll', function() { 829 headerStyle(); 830 }); 831 832/* ========================================================================== 833 When document is loading, do 834 ========================================================================== */ 835 836 $(window).on('load', function() { 837 handlePreloader(); 838 }); 839 840})(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.