1(function($) { 2 "use strict"; 3 4$(document).ready( function() { 5 6// background image 7 8 $("[data-background]").each(function () { 9 var backgroundImages = $(this).attr("data-background").split(","); 10 var cssValue = backgroundImages 11 .map(function (image) { 12 return 'url("' + image.trim() + '")'; 13 }) 14 .join(","); 15 16 $(this).css("background-image", cssValue); 17 }); 18 19// POINTER CHANGE 20 21 if ($(".mouseCursor").length > 0) { 22 function itCursor() { 23 var myCursor = jQuery(".mouseCursor"); 24 if (myCursor.length) { 25 if ($("body")) { 26 const e = document.querySelector(".cursor-inner"), 27 t = document.querySelector(".cursor-outer"); 28 let n, 29 i = 0, 30 o = !1; 31 (window.onmousemove = function (s) { 32 o || 33 (t.style.transform = 34 "translate(" + s.clientX + "px, " + s.clientY + "px)"), 35 (e.style.transform = 36 "translate(" + s.clientX + "px, " + s.clientY + "px)"), 37 (n = s.clientY), 38 (i = s.clientX); 39 }), 40 $("body").on( 41 "mouseenter", 42 "button, a, .cursor-pointer", 43 function () { 44 e.classList.add("cursor-hover"), 45 t.classList.add("cursor-hover"); 46 } 47 ), 48 $("body").on( 49 "mouseleave", 50 "button, a, .cursor-pointer", 51 function () { 52 ($(this).is("a", "button") && 53 $(this).closest(".cursor-pointer").length) || 54 (e.classList.remove("cursor-hover"), 55 t.classList.remove("cursor-hover")); 56 } 57 ), 58 (e.style.visibility = "visible"), 59 (t.style.visibility = "visible"); 60 } 61 } 62 } 63 itCursor(); 64 } 65 66// END POINTER CHANGE 67 68// Offcanvs Custom 69$('#offcanvas-toggler-custom').on('click', function (event) { 70 event.preventDefault(); 71 openOffcanvas2(); 72}); 73 // Open function 74 function openOffcanvas2() { 75 $('.offcanvas-init').addClass('offcanvas-active full-offcanvas'); 76 77 // Make offcanvas interactive 78 $('.offcanvas-menu') 79 .removeAttr('inert') 80 .attr('tabindex', '0'); 81 } 82 83 84// Wrap Carousel Image inside a div 85 86const images = document.querySelectorAll('.item-slide .sppb-carousel-extended-item > img, .item-slide .sppb-carousel-extended-item > a > img'); 87 88images.forEach((image) => { 89const wrapper = document.createElement('div'); 90wrapper.classList.add('carousel-image'); 91 92image.parentNode.insertBefore(wrapper, image); 93 94wrapper.appendChild(image); 95}); 96 97 98// Duplicating blog image 99 100 $('.blog-two-image .sppb-dynamic-content-collection__item').each(function() { 101 var img = $(this).find('.news-image img'); 102 var duplicatImg = img.clone(); 103 img.after(duplicatImg); 104 }); 105 106 107 108// title animation - doar pe scroll down 109if ($(".title-animation .sppb-addon-title").length > 0) { 110 let titles = gsap.utils.toArray(".title-animation .sppb-addon-title"); 111
112 titles.forEach((title) => { 113 let originalHTML = title.innerHTML; 114 115 let runAnimation = () => { 116 title.innerHTML = originalHTML; 117 118 let split = new SplitText(title, { 119 type: "chars, words", 120 lineThreshold: 0.5, 121 }); 122 123 gsap.from(split.chars, { 124 duration: 0.8, 125 x: 40, 126 autoAlpha: 0, 127 stagger: 0.05, 128 ease: "back.out", 129 }); 130 }; 131 132 ScrollTrigger.create({ 133 trigger: title, 134 start: "top 90%", 135 end: "bottom 60%", 136 onEnter: runAnimation, 137 markers: false, 138 139 onEnterBack: () => {}, 140 }); 141 }); 142} 143 144// banner 145if ($(".banner").length > 0) { 146 147 let device_width = window.innerWidth; 148 149 if (device_width >= 768) { 150 var tl = gsap.timeline({ 151 scrollTrigger: { 152 trigger: ".banner", 153 start: "center center", 154 end: "+=40%", 155 scrub: 0.5, 156 pin: false, 157 }, 158 }); 159 160 tl.to(".circle-shape", { 161 duration: 3, 162 scale: 1.7, 163 }); 164 } 165} 166 167 168 169// progress bar 170 171 if ($(".progress-bar-single").length > 0) { 172 $("[data-percent]").each(function () { 173 $(this) 174 .find(".progress-bar-percent") 175 .css("width", $(this).attr("data-percent")); 176 $(this).find(".percent-value").text($(this).attr("data-percent")); 177 }); 178 179 const ax_progress_bar = document.querySelectorAll(".progress-bar-single"); 180 ax_progress_bar.forEach((element) => { 181 const w = element.querySelector(".progress-bar-percent"); 182 const p = element.querySelector(".percent-value"); 183 184 const target = p.textContent; 185 186 const ax_bartl = gsap.timeline({ 187 defaults: { 188 duration: 2, 189 }, 190 scrollTrigger: { 191 trigger: element, 192 }, 193 }); 194 195 ax_bartl.fromTo( 196 w, 197 { 198 width: 0, 199 }, 200 { 201 width: target, 202 } 203 ); 204 ax_bartl.from( 205 p, 206 { 207 textContent: 0 + "%", 208 snap: { 209 textContent: 5, 210 }, 211 }, 212 "<" 213 ); 214 }); 215 } 216 217 // cause slider 218 var causeSlider = new Swiper(".cause__slider", { 219 loop: true, 220 speed: 1000, 221 slidesPerView: 1, 222 slidesPerGroup: 1, 223 spaceBetween: 24, 224 225 autoplay: { 226 delay: 2000, 227 disableOnInteraction: false, 228 pauseOnMouseEnter: true, 229 }, 230 navigation: { 231 nextEl: ".next-cause", 232 prevEl: ".prev-cause", 233 }, 234 pagination: { 235 el: ".cause-pagination", 236 clickable: true, 237 }, 238 breakpoints: { 239 768: { 240 slidesPerView: 2, 241 }, 242 992: { 243 slidesPerView: 3, 244 }, 245 1400: { 246 slidesPerView: 4, 247 }, 248 }, 249 }); 250 251// difference slider 252 var differenceSlider = new Swiper(".difference__slider", { 253 loop: true, 254 speed: 1000, 255 slidesPerView: 1, 256 slidesPerGroup: 1, 257 spaceBetween: 24, 258 autoplay: { 259 delay: 3000, 260 disableOnInteraction: false, 261 pauseOnMouseEnter: true, 262 }, 263 navigation: { 264 nextEl: ".next-difference", 265 prevEl: ".prev-difference", 266 }, 267 breakpoints: { 268 768: { 269 slidesPerView: 2, 270 }, 271 1200: { 272 slidesPerView: 3, 273 }, 274 }, 275 }); 276 277// 21. cause two slider content 278 var causeTwoSliderThumb = new Swiper(".cause-two__content-slider", { 279 loop: true, 280 speed: 1000, 281 slidesPerView: 1, 282 slidesPerGroup: 1, 283 spaceBetween: 24, 284 centeredSlides: true, 285 watchSlidesProgress: true, 286 effect: "fade", 287 288 fadeEffect: { 289 crossFade: true, 290 }, 291 autoplay: { 292 delay: 3000, 293 disableOnInteraction: false, 294 pauseOnMouseEnter: true, 295 }, 296 navigation: { 297 nextEl: ".next-cause-two", 298 prevEl: ".prev-cause-two", 299 }, 300 }); 301 302 var causeTwoSlider = new Swiper(".cause-two__slider", { 303 loop: true, 304 speed: 1000, 305 slidesPerView: 1, 306 slidesPerGroup: 1, 307 spaceBetween: 24, 308 effect: "coverflow", 309 grabCursor: true, 310 centeredSlides: true, 311 loopAddBlankSlides: true, 312 loopAdditionalSlides: 1, 313 slideToClickedSlide: true, 314 roundLengths: true, 315 coverflowEffect: { 316 rotate: 40, 317 stretch: 0, 318 depth: 100, 319 modifier: 1, 320 slideShadows: false, 321 }, 322 autoplay: { 323 delay: 3000, 324 disableOnInteraction: false, 325 pauseOnMouseEnter: true, 326 }, 327 thumbs: { 328 swiper: causeTwoSliderThumb, 329 }, 330 navigation: { 331 nextEl: ".next-cause-two", 332 prevEl: ".prev-cause-two", 333 }, 334 breakpoints: { 335 768: { 336 slidesPerView: 2, 337 }, 338 1400: { 339 slidesPerView: 3, 340 }, 341 }, 342 }); 343 344// testimonial 345 var testimonialTwo = new Swiper(".testimonial-two__slider", { 346 loop: true, 347 speed: 2000,
348 slidesPerView: 1, 349 slidesPerGroup: 1, 350 spaceBetween: 0, 351 effect: "fade", 352 fadeEffect: { 353 crossFade: true, 354 }, 355 autoplay: { 356 delay: 6000, 357 disableOnInteraction: false, 358 pauseOnMouseEnter: true, 359 }, 360 navigation: { 361 nextEl: ".next-testimonial-two", 362 prevEl: ".prev-testimonial-two", 363 }, 364 }); 365 366 var testimonialThree = new Swiper(".testimonial-three__slider", { 367 loop: true, 368 speed: 1000, 369 slidesPerView: 1, 370 slidesPerGroup: 1, 371 spaceBetween: 24, 372 373 autoplay: { 374 delay: 2000, 375 disableOnInteraction: false, 376 pauseOnMouseEnter: true, 377 }, 378 navigation: { 379 nextEl: ".next-testimonial-three", 380 prevEl: ".prev-testimonial-three", 381 }, 382 383 breakpoints: { 384 1400: { 385 slidesPerView: 2, 386 }, 387 }, 388 }); 389 390 var testimonialFc = new Swiper(".fc-slider", { 391 loop: true, 392 speed: 1000, 393 slidesPerView: 1, 394 slidesPerGroup: 1, 395 spaceBetween: 24, 396 effect: "coverflow", 397 coverflowEffect: { 398 rotate: 40, 399 stretch: 0, 400 depth: 100, 401 modifier: 1, 402 slideShadows: false, 403 }, 404 autoplay: { 405 delay: 2000, 406 disableOnInteraction: false, 407 pauseOnMouseEnter: true, 408 }, 409 navigation: { 410 nextEl: ".next-test", 411 prevEl: ".prev-test", 412 }, 413 }); 414 415 var causeSliderFive = new Swiper(".ff-cause-slider", { 416 loop: true, 417 speed: 1000, 418 slidesPerView: 1.1, 419 slidesPerGroup: 1, 420 spaceBetween: 24, 421 centeredSlides: true, 422 423 autoplay: { 424 delay: 2000, 425 disableOnInteraction: false, 426 pauseOnMouseEnter: true, 427 }, 428 pagination: { 429 el: ".ff-pagination", 430 clickable: true, 431 }, 432 breakpoints: { 433 576: { 434 slidesPerView: 1.8, 435 }, 436 992: { 437 slidesPerView: 2.5, 438 }, 439 1200: { 440 slidesPerView: 3.4, 441 }, 442 1600: { 443 slidesPerView: 4.5, 444 }, 445 }, 446 }); 447 448 var testimonialFive = new Swiper(".ff-testimonial-slider", { 449 loop: true, 450 speed: 1000, 451 slidesPerView: 1.1, 452 slidesPerGroup: 1, 453 spaceBetween: 24, 454 centeredSlides: true, 455 456 autoplay: { 457 delay: 2000, 458 disableOnInteraction: false, 459 pauseOnMouseEnter: true, 460 }, 461 pagination: { 462 el: ".ff-test-pagination", 463 clickable: true, 464 }, 465 466 breakpoints: { 467 576: { 468 slidesPerView: 1.3, 469 }, 470 992: { 471 slidesPerView: 2, 472 }, 473 1200: { 474 slidesPerView: 2.5, 475 }, 476 }, 477 }); 478 479 480 481 // Home 6 testimonial 482 var slider = new Swiper('.testimonial-six-active', { 483 slidesPerView: 1, 484 loop: true, 485 effect: "cards", 486 grabCursor: true, 487 speed: 2500, 488 autoplay: true, 489 // pagination 490 pagination: { 491 el: ".testimonial-six-dot", 492 clickable: true, 493 }, 494 }); 495 496 497 // Home 7 testimonial 498 var slider = new Swiper('.banner-seven-active', { 499 loop: true, 500 freemode: true, 501 slidesPerView: 1.4, 502 spaceBetween: 30, 503 centeredSlides: false, 504 allowTouchMove: false, 505 speed: 8000, 506 autoplay: { 507 delay: 1, 508 disableOnInteraction: true, 509 }, 510 }); 511 512 // Home 7 testimonial 513 var causeSlider = new Swiper(".cause-seven-active", { 514 loop: true, 515 speed: 1000, 516 slidesPerView: 1, 517 centeredSlides: true, 518 spaceBetween: 24, 519 520 autoplay: { 521 delay: 2000, 522 disableOnInteraction: false, 523 pauseOnMouseEnter: true, 524 }, 525 navigation: { 526 nextEl: ".next-cause", 527 prevEl: ".prev-cause", 528 }, 529 breakpoints: { 530 768: { 531 slidesPerView: 2, 532 }, 533 992: { 534 slidesPerView: 2, 535 }, 536 1400: { 537 slidesPerView: 3, 538 }, 539 }, 540 }); 541 542 543 // Home 6 Banner 544 var slider = new Swiper('.banner-six-slide-active', { 545 slidesPerView: 1, 546 spaceBetween: 30, 547 loop: true, 548 speed: 2500, 549 autoplay: true, 550 // pagination 551 pagination: { 552 el: ".banner-six-slide-dot", 553 clickable: true, 554 }, 555 }); 556 557 // Home 8 Maquee 558 var slider = new Swiper('.maquee-eight-active', { 559 slidesPerView: "auto", 560 spaceBetween: 65, 561 loop: true, 562 speed: 7000, 563 allowTouchMove: false, 564 autoplay: { 565 delay: 1, 566 disableOnInteraction: true, 567 }, 568 breakpoints: { 569 320: { 570 spaceBetween: 40, 571 }, 572 768: { 573 spaceBetween: 40, 574 }, 575 992: { 576 spaceBetween: 40, 577 }, 578 1200: { 579 spaceBetween: 65, 580 }, 581 }, 582 }); 583 584 // Home 8 team js 585 var slider = new Swiper('.ministrie-eight-active', { 586 slidesPerView: "auto", 587 spaceBetween: 30, 588 loop: true, 589 speed: 2500, 590 autoplay: true, 591 centeredSlides: true, 592 breakpoints: { 593 '1600': { 594 slidesPerView: 2.9, 595 }, 596 '1400': { 597 slidesPerView: 2.3, 598 }, 599 '1200': { 600 slidesPerView: 2.1, 601 }, 602 '992': { 603 slidesPerView: 1.8, 604 }, 605 '768': { 606 slidesPerView: 1.6, 607 }, 608 '576': { 609 slidesPerView: 1.2, 610 }, 611 '0': { 612 slidesPerView: 1, 613 }, 614 }, 615 // pagination 616 pagination: { 617 el: ".ministrie-eight-dot", 618 clickable: true, 619 }, 620 scrollbar: { 621 el: ".swiper-scrollbar.two", 622 }, 623 }); 624 625 // Blog 8 active Js 626 $(".blog-eight-wrapper .sppb-dynamic-content-collection__item") 627 .first() 628 .addClass("active"); 629 630 $(".blog-eight-wrapper .sppb-dynamic-content-collection__item").on("mouseenter", function () { 631 $(this).addClass("active").siblings().removeClass("active"); 632 }); 633 634 635 636 // Project scroll gsap js 637 let pr = gsap.matchMedia(); 638 pr.add("(min-width: 992px)", () => { 639 640 let tl = gsap.timeline(); 641 let projectpanels = document.querySelectorAll('.project-panel')
642 projectpanels.forEach((section, index) => { 643 tl.to(section, { 644 scrollTrigger: { 645 trigger: section, 646 pin: section, 647 scrub: 1, 648 start: 'center center', 649 end: "bottom 100%", 650 endTrigger: '.project-panel-area', 651 pinSpacing: false, 652 markers: false, 653 }, 654 }) 655 }) 656 }); 657 658 659 if ($(".move-image").length > 0) { 660 let mouse = { x: 0, y: 0, moved: false }; 661 662 $(document).mousemove(function (e) { 663 mouse.moved = true; 664 mouse.x = e.clientX; 665 mouse.y = e.clientY; 666 }); 667 668 gsap.ticker.add(() => { 669 if (mouse.moved) { 670 parallaxImages(".move-image", -30); 671 mouse.moved = false; 672 } 673 }); 674 675 function parallaxImages(selector, movement) { 676 $(selector).each(function () { 677 const rect = this.getBoundingClientRect(); 678 const offsetX = 679 ((mouse.x - (rect.left + rect.width / 2)) / rect.width) * movement; 680 const offsetY = 681 ((mouse.y - (rect.top + rect.height / 2)) / rect.height) * movement; 682 683 gsap.to(this, { 684 x: offsetX, 685 y: offsetY, 686 duration: 0.5, 687 }); 688 }); 689 } 690 } 691 692 693 694 $('.hover-btn').on('mouseenter', function (e) { 695 var x = e.pageX - $(this).offset().left; 696 var y = e.pageY - $(this).offset().top; 697 698 $(this).find('.hover-btn-circle-dot').css({ 699 top: y, 700 left: x 701 }); 702 }); 703 704 $('.hover-btn').on('mouseout', function (e) { 705 var x = e.pageX - $(this).offset().left; 706 var y = e.pageY - $(this).offset().top; 707 708 $(this).find('.hover-btn-circle-dot').css({ 709 top: y, 710 left: x 711 }); 712 }); 713 714// coming soon 715 716 if ($(".clock").length > 0) { 717 const hourMarkersContainer = document.querySelector(".hour-markers"); 718 for (let i = 0; i < 12; i++) { 719 const marker = document.createElement("div"); 720 marker.classList.add("hour-marker"); 721 const rotation = i * 30; 722 marker.style.transform = `rotate(${rotation}deg) translateY(-216.25px)`; 723 724 const hourText = document.createElement("span"); 725 hourText.textContent = i === 0 ? "12" : i; 726 hourText.style.transform = `rotate(-${rotation}deg)`; 727 marker.appendChild(hourText); 728 729 hourMarkersContainer.appendChild(marker); 730 } 731 732 const hourHand = document.querySelector(".hour-hand"); 733 const minuteHand = document.querySelector(".minute-hand"); 734 const secondHand = document.querySelector(".second-hand"); 735 736 function setClock() { 737 const now = new Date(); 738 const seconds = now.getSeconds() + now.getMilliseconds() / 1000; 739 const minutes = now.getMinutes() + seconds / 60; 740 const hours = (now.getHours() % 12) + minutes / 60; 741 742 const secondsDeg = (seconds / 60) * 360; 743 const minutesDeg = (minutes / 60) * 360; 744 const hoursDeg = (hours / 12) * 360; 745 746 hourHand.style.transform = `rotate(${hoursDeg}deg)`; 747 minuteHand.style.transform = `rotate(${minutesDeg}deg)`; 748 secondHand.style.transform = `rotate(${secondsDeg}deg)`; 749 } 750 751 setInterval(setClock, 50); 752 setClock(); 753 754 const countdownElement = document.querySelector(".time-countdown"); 755 const dayElement = countdownElement.querySelector(".day"); 756 const hourElement = countdownElement.querySelector(".hour"); 757 const minuteElement = countdownElement.querySelector(".minute"); 758 const secondElement = countdownElement.querySelector(".second"); 759 760 const endDate = new Date(); 761 endDate.setDate(endDate.getDate() + 100); 762 763 function updateCountdown() { 764 const now = new Date(); 765 const timeRemaining = endDate - now; 766 767 if (timeRemaining <= 0) { 768 endDate.setDate(endDate.getDate() + 100); 769 } 770 771 const days = Math.floor(timeRemaining / (1000 * 60 * 60 * 24)); 772 const hours = Math.floor( 773 (timeRemaining % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) 774 ); 775 const minutes = Math.floor( 776 (timeRemaining % (1000 * 60 * 60)) / (1000 * 60) 777 ); 778 const seconds = Math.floor((timeRemaining % (1000 * 60)) / 1000); 779 780 dayElement.textContent = days; 781 hourElement.textContent = hours < 10 ? `0${hours}` : hours; 782 minuteElement.textContent = minutes < 10 ? `0${minutes}` : minutes; 783 secondElement.textContent = seconds < 10 ? `0${seconds}` : seconds; 784 } 785 786 setInterval(updateCountdown, 1000); 787 updateCountdown(); 788 } 789 790}); // End Document Ready Function 791 792})(jQuery); // End 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.