1(function ($) { 2 "use strict"; 3 4 $(window).on('load', function () { 5 preloader(); 6 wowAnimation(); 7 }); 8 9 /*------------------------------------------ 10 = preloader 11 -------------------------------------------*/ 12 function preloader() { 13 $('#xb-loadding').fadeOut('slow', function () { 14 $(this).remove(); 15 }); 16 }; 17 18 /*------------------------------------------ 19 = back to top 20 -------------------------------------------*/ 21 $(window).scroll(function () { 22 if ($(this).scrollTop() > 500) { 23 $('.xb-backtotop').addClass('active'); 24 } else { 25 $('.xb-backtotop').removeClass('active'); 26 } 27 }); 28 $(function () { 29 $(".scroll").on('click', function () { 30 $("html,body").animate({scrollTop: 0}, "slow"); 31 return false 32 }); 33 }); 34 35 /*------------------------------------------ 36 = sticky header 37 -------------------------------------------*/ 38 function stickyHeader() { 39 var scrollDirection = ""; 40 var lastScrollPosition = 0; 41 42 // Clone and make header sticky if the element with class 'xb-header' exists 43 if ($('.xb-header').length) { 44 $('.xb-header').addClass('original').clone(true).insertAfter('.xb-header').addClass('xb-header-area-sticky xb-sticky-stt').removeClass('original'); 45 } 46 47 // Handle scroll events 48 $(window).on("scroll", function () { 49 var currentScrollPosition = $(window).scrollTop(); 50 51 // Determine scroll direction 52 scrollDirection = currentScrollPosition < lastScrollPosition ? "up" : "down"; 53 lastScrollPosition = currentScrollPosition; 54 55 // Check if element with ID 'xb-header-area' has class 'is-sticky' 56 if ($("#xb-header-area").hasClass("is-sticky")) { 57 // Add or remove classes based on scroll position for sticky header and mobile header 58 if (lastScrollPosition > 100) { 59 $(".xb-header-area-sticky.xb-sticky-stb").addClass("xb-header-fixed"); 60 } else { 61 $(".xb-header-area-sticky.xb-sticky-stb").removeClass("xb-header-fixed"); 62 } 63 64 // Add or remove classes for sticky header based on scroll direction 65 if (scrollDirection === "up" && lastScrollPosition > 100) { 66 $(".xb-header-area-sticky.xb-sticky-stt").addClass("xb-header-fixed"); 67 } else { 68 $(".xb-header-area-sticky.xb-sticky-stt").removeClass("xb-header-fixed"); 69 } 70 } 71 }); 72 } 73 74 stickyHeader(); 75 76 /*------------------------------------------ 77 = header search 78 -------------------------------------------*/ 79 $(".header-search-btn").on("click", function (e) { 80 e.preventDefault(); 81 $(".header-search-form-wrapper").addClass("open"); 82 $('.header-search-form-wrapper input[type="search"]').focus(); 83 $('.body-overlay').addClass('active'); 84 }); 85 $(".xb-search-close").on("click", function (e) { 86 e.preventDefault(); 87 $(".header-search-form-wrapper").removeClass("open"); 88 $("body").removeClass("active"); 89 $('.body-overlay').removeClass('active'); 90 }); 91 92 /*------------------------------------------ 93 = sidebar 94 -------------------------------------------*/ 95 $('.sidebar-menu-close, .body-overlay').on('click', function () { 96 $('.offcanvas-sidebar').removeClass('active'); 97 $('.body-overlay').removeClass('active'); 98 }); 99 100 $('.offcanvas-sidebar-btn').on('click', function () { 101 $('.offcanvas-sidebar').addClass('active'); 102 $('.body-overlay').addClass('active'); 103 }); 104 $('.body-overlay').on('click', function () { 105 $(this).removeClass('active'); 106 $(".header-search-form-wrapper").removeClass("open"); 107 }); 108 109 /*------------------------------------------ 110 = mobile menu 111 -------------------------------------------*/ 112 $('.xb-nav-hidden li.menu-item-has-children > a').append('<span class="xb-menu-toggle"></span>'); 113 $('.xb-header-menu li.menu-item-has-children, .xb-menu-primary li.menu-item-has-children').append('<span class="xb-menu-toggle"></span>'); 114 $('.xb-menu-toggle').on('click', function () { 115 if (!$(this).hasClass('active')) { 116 $(this).closest('ul').find('.xb-menu-toggle.active').toggleClass('active'); 117 $(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle(); 118 } 119 $(this).toggleClass('active'); 120 $(this).closest('.menu-item').find('> .sub-menu').toggleClass('active'); 121 $(this).closest('.menu-item').find('> .sub-menu').slideToggle(); 122 });
123 124 $('.xb-nav-hidden li.menu-item-has-children > a').click(function (e) { 125 var target = $(e.target); 126 if ($(this).attr('href') === '#' && !(target.is('.xb-menu-toggle'))) { 127 e.stopPropagation(); 128 if (!$(this).find('.xb-menu-toggle').hasClass('active')) { 129 $(this).closest('ul').find('.xb-menu-toggle.active').toggleClass('active'); 130 $(this).closest('ul').find('.sub-menu.active').toggleClass('active').slideToggle(); 131 } 132 $(this).find('.xb-menu-toggle').toggleClass('active'); 133 $(this).closest('.menu-item').find('> .sub-menu').toggleClass('active'); 134 $(this).closest('.menu-item').find('> .sub-menu').slideToggle(); 135 } 136 }); 137 $(".xb-nav-mobile").on('click', function () { 138 $(this).toggleClass('active'); 139 $('.xb-header-menu').toggleClass('active'); 140 }); 141 142 $(".xb-menu-close, .xb-header-menu-backdrop").on('click', function () { 143 $(this).removeClass('active'); 144 $('.xb-header-menu').removeClass('active'); 145 }); 146 147 /*------------------------------------------ 148 = data background and bg color 149 -------------------------------------------*/ 150 $("[data-background]").each(function () { 151 $(this).css("background-image", "url(" + $(this).attr("data-background") + ") ") 152 }) 153 $("[data-bg-color]").each(function () { 154 $(this).css("background-color", $(this).attr("data-bg-color")); 155 156 }); 157 158 /*------------------------------------------ 159 = WOW animation 160 -------------------------------------------*/ 161 function wowAnimation() { 162 var wow = new WOW({ 163 boxClass: 'wow', 164 animateClass: 'animated', 165 mobile: false, 166 live: true 167 }); 168 wow.init(); 169 } 170 171 /*------------------------------------------ 172 = counter 173 -------------------------------------------*/ 174 function xboActive($scope, $) { 175 if ($(".xbo").length) { 176 $('.xbo').appear(); 177 $(document.body).on('appear', '.xbo', function (e) { 178 var odo = $(".xbo"); 179 odo.each(function () { 180 var countNumber = $(this).attr("data-count"); 181 $(this).html(countNumber); 182 }); 183 window.xboOptions = { 184 format: 'd', 185 }; 186 }); 187 } 188 } 189 190 /*------------------------------------------ 191 = isotop 192 -------------------------------------------*/ 193 $('.grid').imagesLoaded(function () { 194 var $grid = $('.grid').isotope({ 195 itemSelector: '.grid-item', 196 percentPosition: true, 197 masonry: { 198 // use outer width of grid-sizer for columnWidth 199 columnWidth: '.grid-item', 200 } 201 }); 202 203 // filter items on button click 204 $('.portfolio-menu').on('click', 'button', function () { 205 var filterValue = $(this).attr('data-filter'); 206 $grid.isotope({filter: filterValue}); 207 }); 208 }); 209 210 //for menu active class 211 $('.portfolio-menu button').on('click', function (event) { 212 $(this).siblings('.active').removeClass('active'); 213 $(this).addClass('active'); 214 event.preventDefault(); 215 }); 216 217 /*------------------------------------------ 218 = post gallery slider 219 -------------------------------------------*/ 220 var slider = new Swiper('.post-gallery-slider', { 221 spaceBetween: 0, 222 slidesPerView: 1, 223 centeredSlides: true, 224 roundLengths: true, 225 loop: true, 226 loopAdditionalSlides: 30, 227 autoplay: { 228 enabled: true, 229 delay: 6000 230 }, 231 navigation: { 232 nextEl: ".post-gallery-button-next", 233 prevEl: ".post-gallery-button-prev", 234 }, 235 speed: 400, 236 }); 237 238 /*------------------------------------------ 239 = testimonial slider 240 -------------------------------------------*/ 241 function insTestimonialActive($scope, $) { 242 var insTestimonialSlider = new Swiper(".ins-testimonial-nav-slider", { 243 loop: true, 244 spaceBetween: 20, 245 speed: 500, 246 slidesPerView: 3, 247 centeredSlides: true, 248 autoplay: { 249 enabled: true, 250 delay: 6000 251 }, 252 breakpoints: { 253 '1600': { 254 slidesPerView: 3, 255 }, 256 '768': { 257 slidesPerView: 3, 258 }, 259 '576': { 260 slidesPerView: 2, 261 centeredSlides: false, 262 }, 263 '0': { 264 slidesPerView: 2, 265 centeredSlides: false, 266 }, 267 }, 268 }); 269 var swiper2 = new Swiper(".ins-testimonial-slider-for", { 270 loop: true, 271 spaceBetween: 0, 272 effect: 'fade', 273 autoplay: { 274 enabled: true, 275 delay: 6000 276 }, 277 slidesPerView: 1, 278 thumbs: { 279 swiper: insTestimonialSlider, 280 }, 281 }); 282 } 283 284 /*------------------------------------------ 285 = brand slider 286 -------------------------------------------*/ 287 function insBrandActive($scope, $) { 288 var slider = new Swiper('.ins-brand-slider', { 289 slidesPerView: 6, 290 roundLengths: true, 291 loop: true, 292 loopAdditionalSlides: 30, 293 autoplay: { 294 enabled: true, 295 delay: 6000 296 }, 297 speed: 400, 298 breakpoints: { 299 '1600': { 300 slidesPerView: 6, 301 }, 302 '1200': { 303 slidesPerView: 6, 304 }, 305 '992': { 306 slidesPerView: 5, 307 }, 308 '768': { 309 slidesPerView: 4, 310 }, 311 '576': { 312 slidesPerView: 3, 313 }, 314 '0': { 315 slidesPerView: 2, 316 }, 317 }, 318 }); 319 } 320 321 /*------------------------------------------ 322 = law project slider 323 -------------------------------------------*/ 324 function projectActive($scope, $) { 325 var lwProjectSlider = new Swiper(".lw-project-slider", { 326 loop: true, 327 spaceBetween: 20, 328 speed: 500, 329 slidesPerView: 1, 330 effect: 'fade', 331 centeredSlides: true, 332 navigation: { 333 nextEl: '.xb-swiper-arrow-next', 334 prevEl: '.xb-swiper-arrow-prev', 335 }, 336 autoplay: { 337 enabled: true, 338 delay: 6000 339 }, 340 }); 341 var swiper2 = new Swiper(".lw-project-slider-for", { 342 loop: true, 343 spaceBetween: 0, 344 speed: 700, 345 autoplay: { 346 enabled: true, 347 delay: 6000 348 }, 349 slidesPerView: 1, 350 navigation: { 351 nextEl: '.xb-swiper-arrow-next', 352 prevEl: '.xb-swiper-arrow-prev', 353 }, 354 thumbs: { 355 swiper: lwProjectSlider, 356 }, 357 }); 358 } 359 360 /*------------------------------------------ 361 = law testimonial slider 362 -------------------------------------------*/ 363 function lwTestimonialActive($scope, $) { 364 var slider = new Swiper('.lw-testimonial-slider', { 365 spaceBetween: 30, 366 slidesPerView: 3, 367 roundLengths: true, 368 loop: true, 369 loopAdditionalSlides: 30, 370 watchSlidesVisibility: true, 371 slideVisibleClass: 'swiper-slide-visible', 372 autoplay: { 373 enabled: true, 374 delay: 6000 375 }, 376 speed: 400, 377 breakpoints: { 378 '1600': { 379 slidesPerView: 3, 380 }, 381 '1200': { 382 slidesPerView: 3, 383 }, 384 '992': { 385 slidesPerView: 3, 386 }, 387 '768': { 388 slidesPerView: 2, 389 }, 390 '576': { 391 slidesPerView: 2, 392 }, 393 '0': { 394 slidesPerView: 1, 395 }, 396 }, 397 }); 398 } 399 400 /*------------------------------------------ 401 = team slider 402 -------------------------------------------*/ 403 function teamActive($scope, $) { 404 var slider = new Swiper('.xb-team-sldier', { 405 spaceBetween: 12, 406 slidesPerView: 3, 407 roundLengths: true, 408 loop: true, 409 loopAdditionalSlides: 30, 410 watchSlidesVisibility: true, 411 slideVisibleClass: 'swiper-slide-visible', 412 autoplay: { 413 enabled: true, 414 delay: 8000 415 }, 416 pagination: { 417 el: ".swiper-pagination", 418 clickable: true, 419 dynamicBullets: true, 420 }, 421 speed: 400, 422 breakpoints: { 423 '1600': { 424 slidesPerView: 3, 425 }, 426 '1200': { 427 slidesPerView: 3, 428 }, 429 '992': { 430 slidesPerView: 3, 431 }, 432 '768': { 433 slidesPerView: 2, 434 }, 435 '576': { 436 slidesPerView: 2, 437 }, 438 '0': { 439 slidesPerView: 1, 440 }, 441 }, 442 }); 443 } 444 445 /*------------------------------------------ 446 = testimonial slider 447 -------------------------------------------*/ 448 function testimonialActive($scope, $) { 449 var slider = new Swiper('.xb-testimonial-sldier', { 450 spaceBetween: 12, 451 slidesPerView: 2, 452 roundLengths: true, 453 loop: true, 454 loopAdditionalSlides: 30, 455 watchSlidesVisibility: true, 456 slideVisibleClass: 'swiper-slide-visible', 457 autoplay: { 458 enabled: true, 459 delay: 6000 460 }, 461 pagination: { 462 el: ".swiper-pagination", 463 clickable: true, 464 dynamicBullets: true, 465 }, 466 speed: 400, 467 breakpoints: { 468 '1600': { 469 slidesPerView: 2, 470 }, 471 '1200': { 472 slidesPerView: 2, 473 }, 474 '992': { 475 slidesPerView: 2, 476 }, 477 '768': { 478 slidesPerView: 2, 479 }, 480 '576': { 481 slidesPerView: 2, 482 }, 483 '0': { 484 slidesPerView: 1, 485 }, 486 }, 487 }); 488 } 489 490 /*------------------------------------------ 491 = testimonial slider 492 -------------------------------------------*/ 493 function mrTestimonialActive($scope, $) { 494 var slider = new Swiper('.mr-testimonial-slider', { 495 spaceBetween: 100, 496 slidesPerView: 3, 497 roundLengths: true, 498 loop: true, 499 loopAdditionalSlides: 30, 500 centeredSlides: true, 501 autoplay: { 502 enabled: true, 503 delay: 6000 504 }, 505 speed: 400, 506 breakpoints: { 507 '1600': { 508 slidesPerView: 3, 509 }, 510 '1200': { 511 slidesPerView: 3, 512 }, 513 '992': { 514 slidesPerView: 2, 515 }, 516 '768': { 517 slidesPerView: 2, 518 }, 519 '576': { 520 slidesPerView: 2, 521 }, 522 '0': { 523 slidesPerView: 1, 524 }, 525 }, 526 }); 527 } 528 529 /*------------------------------------------ 530 = blog slider 531 -------------------------------------------*/ 532 function lwBlogActive($scope, $) { 533 var slider = new Swiper('.lw-blog-slider', { 534 spaceBetween: 30, 535 slidesPerView: 2, 536 roundLengths: true, 537 loop: true, 538 loopAdditionalSlides: 30, 539 autoplay: { 540 enabled: true, 541 delay: 6000 542 }, 543 speed: 400, 544 breakpoints: { 545 '1600': { 546 slidesPerView: 2, 547 }, 548 '1200': { 549 slidesPerView: 2, 550 }, 551 '992': { 552 slidesPerView: 2, 553 }, 554 '768': { 555 slidesPerView: 2, 556 }, 557 '576': { 558 slidesPerView: 1, 559 }, 560 '0': { 561 slidesPerView: 1, 562 }, 563 }, 564 }); 565 } 566 567 /*------------------------------------------ 568 = service slider 569 -------------------------------------------*/ 570 function serviceActive($scope, $) { 571 var slider = new Swiper('.bc-service-slider', { 572 spaceBetween: 10, 573 slidesPerView: 4, 574 roundLengths: true, 575 loop: true, 576 autoplay: { 577 enabled: true, 578 delay: 6000 579 }, 580 navigation: { 581 nextEl: ".xb-swiper-arrow-next", 582 prevEl: ".xb-swiper-arrow-prev", 583 }, 584 speed: 400, 585 breakpoints: { 586 '1600': { 587 slidesPerView: 4, 588 }, 589 '1200': { 590 slidesPerView: 4, 591 }, 592 '992': { 593 slidesPerView: 3, 594 }, 595 '768': { 596 slidesPerView: 3, 597 }, 598 '576': { 599 slidesPerView: 2, 600 }, 601 '0': { 602 slidesPerView: 1, 603 }, 604 }, 605 }); 606 } 607 608 /*------------------------------------------ 609 = testimonial slider 610 -------------------------------------------*/ 611 function adTestimonialActive($scope, $) { 612 var slider = new Swiper('.ad-testimonial-slider', { 613 spaceBetween: 0, 614 slidesPerView: 1, 615 roundLengths: true, 616 loop: true, 617 centeredSlides: true, 618 effect: 'fade', 619 loopAdditionalSlides: 30, 620 autoplay: { 621 enabled: true, 622 delay: 6000 623 }, 624 pagination: { 625 el: ".swiper-pagination", 626 clickable: true, 627 }, 628 speed: 400, 629 }); 630 } 631 632 /*------------------------------------------ 633 = inhover active 634 -------------------------------------------*/ 635 $(".xb-mouseenter").on('mouseenter', function () { 636 $(".xb-mouseenter").removeClass("active"); 637 $(this).addClass("active"); 638 });
639 $(".xb-mouseenter2").on('mouseenter', function () { 640 $(".xb-mouseenter2").removeClass("active"); 641 $(this).addClass("active"); 642 }); 643 644 /*------------------------------------------ 645 = nice slect 646 -------------------------------------------*/ 647 $('.nice-select').niceSelect(); 648 649 /*------------------------------------------ 650 = magnificPopup 651 -------------------------------------------*/ 652 $('.popup-image').magnificPopup({ 653 type: 'image', 654 gallery: { 655 enabled: true 656 } 657 }); 658 $('.popup-video').magnificPopup({ 659 type: 'iframe', 660 mainClass: 'mfp-zoom-in', 661 }); 662 663 /*------------------------------------------ 664 = Accordion Box 665 -------------------------------------------*/ 666 if ($(".accordion_box").length) { 667 $(".accordion_box").on("click", ".acc-btn", function () { 668 var outerBox = $(this).parents(".accordion_box"); 669 var target = $(this).parents(".accordion"); 670 671 if ($(this).next(".acc_body").is(":visible")) { 672 $(this).removeClass("active"); 673 $(this).next(".acc_body").slideUp(300); 674 $(outerBox).children(".accordion").removeClass("active-block"); 675 } else { 676 $(outerBox).find(".accordion .acc-btn").removeClass("active"); 677 $(this).addClass("active"); 678 $(outerBox).children(".accordion").removeClass("active-block"); 679 $(outerBox).find(".accordion").children(".acc_body").slideUp(300); 680 target.addClass("active-block"); 681 $(this).next(".acc_body").slideDown(300); 682 } 683 }); 684 } 685 686 /*------------------------------------------ 687 = banner paralax 688 -------------------------------------------*/ 689 jQuery('.jarallax').jarallax({ 690 speed: 0.5, 691 }); 692 693 694 /*------------------------------------------ 695 = scroll rotate 696 -------------------------------------------*/ 697 let reloadClassName = document.getElementById("reload"); 698 if (reloadClassName !== null) { 699 window.onscroll = function () { 700 scrollRotate(); 701 }; 702 703 function scrollRotate() { 704 reloadClassName.style.transform = "rotate(" + window.pageYOffset / 2 + "deg)"; 705 } 706 } 707 708 /*------------------------------------------ 709 = marquee 710 -------------------------------------------*/ 711 function marqueeActive($scope, $) { 712 $('.marquee-left').marquee({ 713 speed: 50, 714 gap: 0, 715 delayBeforeStart: 0, 716 direction: 'left', 717 duplicated: true, 718 pauseOnHover: false, 719 startVisible: true, 720 }); 721 722 $('.marquee-right').marquee({ 723 speed: 50, 724 gap: 0, 725 delayBeforeStart: 0, 726 direction: 'right', 727 duplicated: true, 728 pauseOnHover: false, 729 startVisible: true, 730 }); 731 } 732 733 /*------------------------------------------ 734 = theiaStickySidebar 735 -------------------------------------------*/ 736 if (typeof $.fn.theiaStickySidebar !== "undefined") { 737 $(".sticky-coloum-wrap .sticky-coloum-item").theiaStickySidebar({ 738 additionalMarginTop: 130, 739 }); 740 } 741 742 /*------------------------------------------ 743 = TOUCHSPIN FOR PRODUCT SINGLE PAGE 744 -------------------------------------------*/ 745 if ($("input.product-count").length) { 746 $("input.product-count").TouchSpin({ 747 min: 1, 748 max: 1000, 749 step: 1, 750 buttondown_class: "btn btn-link", 751 buttonup_class: "btn btn-link", 752 }); 753 } 754 755 /*------------------------------------------ 756 = parallax 757 -------------------------------------------*/ 758 if ($('.scene,.scene_1,.scene_2,.scene_3,.scene_4,.scene_5').length > 0) { 759 $('.scene,.scene_1,.scene_2,.scene_3,.scene_4,.scene_5').parallax({ 760 scalarX: 10.0, 761 scalarY: 10.0, 762 }); 763 } 764 765 $(window).on('elementor/frontend/init', function () { 766 elementorFrontend.hooks.addAction('frontend/element_ready/int-team.default', teamActive); 767 elementorFrontend.hooks.addAction('frontend/element_ready/int-count-number.default', xboActive); 768 elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial.default', testimonialActive); 769 elementorFrontend.hooks.addAction('frontend/element_ready/int-service-v2.default', serviceActive); 770 elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial-v2.default', serviceActive); 771 elementorFrontend.hooks.addAction('frontend/element_ready/int-marquee.default', marqueeActive); 772 elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial-v3.default', mrTestimonialActive); 773 elementorFrontend.hooks.addAction('frontend/element_ready/int-feature-v3.default', xboActive); 774 elementorFrontend.hooks.addAction('frontend/element_ready/int-project-v2.default', projectActive); 775 elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial-v4.default', lwTestimonialActive); 776 elementorFrontend.hooks.addAction('frontend/element_ready/int-blog-v4.default', lwBlogActive); 777 elementorFrontend.hooks.addAction('frontend/element_ready/int-about-count.default', xboActive); 778 elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial-v5.default', insTestimonialActive); 779 elementorFrontend.hooks.addAction('frontend/element_ready/int-brand.default', insBrandActive); 780 elementorFrontend.hooks.addAction('frontend/element_ready/int-funfact.default', xboActive); 781 elementorFrontend.hooks.addAction('frontend/element_ready/int-testimonial-v6.default', adTestimonialActive); 782 elementorFrontend.hooks.addAction('frontend/element_ready/int-funfact-v2.default', xboActive); 783 elementorFrontend.hooks.addAction('frontend/element_ready/int-marquee-v2.default', marqueeActive) 784 elementorFrontend.hooks.addAction('frontend/element_ready/int-skills.default', xboActive) 785 });
786 787 788})(jQuery); 789 790 791
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.