PageSourceSearch

https://hareepatti.com/wp-content/themes/hareepatti/assets/js/index.js?ver=1790900196

js hareepatti.com collected 2026-10-02 00:17:34 UTC 62,020 bytes, 3,141 lines download raw bytes

1var $ = jQuery;
2
3
4$(window).on("load", function () {
5  setTimeout(function () {
6    $("body").css("opacity", 1);
7  }, 100);
8});
9
10
11
12//! navBar and footer
13
14let header = document.querySelector(".header");
15let footer = document.querySelector(".footer");
16
17
18let body = document.body;
19
20if (
21  body.classList.contains('contactUs_page') ||
22  body.classList.contains('oneToOneConsultation') ||
23  body.classList.contains('insurance_main') ||
24  body.classList.contains('insurance_health') ||
25  body.classList.contains('insurance_life') ||
26  body.classList.contains('investment_page') ||
27  body.classList.contains('page-id-633')
28) {
29
30
31  header.style.backgroundColor = '#F1F1E9';
32} else if (body.classList.contains('aboutUs')) {
33  header.style.backgroundColor = '#FFFFFF';
34}
35
36
37// !for white footer
38
39if (
40
41  body.classList.contains("insurance_health") ||
42  body.classList.contains("insurance_life") ||
43  body.classList.contains("insurance_motor") ||
44  body.classList.contains("oneToOneConsultation") ||
45
46  body.classList.contains("contactUs_page") ||
47  body.classList.contains("claimAssistance_page")
48) {
49  footer.classList.add("white");
50}
51
52
53// !for white header
54
55if (
56  body.classList.contains("faq_page") ||
57  body.classList.contains("blog_list_page") ||
58  body.classList.contains("careers_page") ||
59  body.classList.contains("blog_single_page")
60) {
61  header.classList.add("white");
62}
63
64
65
66//! menubar 
67
68let menuBtn = document.querySelector('#menuBtn');
69let menuBar = document.querySelector('.header')
70
71let closeBtn = document.querySelector('#closeBtn')
72
73
74
75menuBtn?.addEventListener('click', () => {
76
77  menuBar.classList.add('active')
78
79})
80
81closeBtn?.addEventListener('click', () => {
82
83  menuBar.classList.remove('active')
84
85})
86
87
88
89
90
91
92// !home page ==================================
93
94let homeBannerSlider = document.querySelector(".home-banner");
95
96let buyInsuranceBtn = document.querySelector(".header #buyInsuranceBtn");
97
98let insurancePopUp = document.querySelector(".header .insurance_popUp");
99
100let insurancePopUpCloseBtn = document.querySelector(
101  ".header .insurance_popUp .closeBtn"
102);
103
104
105if (
106  body.classList.contains("home") ){
107
108
109
110setTimeout(function () {
111  const insurancePopup = document.querySelector(".header .insurance_popUp");
112  if (insurancePopup) {
113    insurancePopup.classList.add("active");
114    setTimeout(() => {
115      insurancePopUp.style.opacity = "1";
116    }, 100);
117  }
118}, 2000);
119
120}
121
122buyInsuranceBtn?.addEventListener("click", () => {
123  insurancePopUp.classList.add("active");
124  setTimeout(() => {
125    insurancePopUp.style.opacity = "1";
126  }, 100);
127});
128
129insurancePopUpCloseBtn?.addEventListener("click", () => {
130  insurancePopUp.style.opacity = "0";
131  setTimeout(() => {
132    insurancePopUp.classList.remove("active");
133  }, 300);
134
135  setTimeout(() => {
136    
137
138
139  const landbot = document.querySelector('.LandbotLivechat');
140const customText = document.querySelector('.landbot-custom-text');
141// console.log(landbot ,customText );
142
143
144if (landbot && customText) {
145  const observer = new MutationObserver(() => {
146    if (landbot.classList.contains('is-open')) {
147      customText.style.display = 'none';
148    } 
149  });
150
151  observer.observe(landbot, { attributes: true, attributeFilter: ['class'] });
152}
153  }, 1000);
154});
155
156////////////////////////////////////////////////////////
157// Career Apply now popup HIGHLIGHT
158// Select all "Apply Now" buttons
159let applyNowBtns = document.querySelectorAll(".applyNowBtn");
160
161// Select the popup and close button
162let applyNowPopUp = document.querySelector(".apply_popUp");
163let applyNowPopUpCloseBtn = document.querySelector(".apply_popUp .closeBtn");
164
165// Add click event listener to each button
166applyNowBtns.forEach((button) => {
167  button.addEventListener("click", () => {
168    applyNowPopUp.classList.add("active");
169    setTimeout(() => {
170      applyNowPopUp.style.opacity = "1";
171    }, 100);
172  });
173});
174
175// Add click event listener to close button
176applyNowPopUpCloseBtn?.addEventListener("click", () => {
177  applyNowPopUp.style.opacity = "0";
178  setTimeout(() => {
179    applyNowPopUp.classList.remove("active");
180  }, 300);
181});
182
183if (homeBannerSlider) {
184  let homeBannerSlides = document.querySelectorAll(".home-banner .block");
185  let count = 0;
186
187  setInterval(() => {
188    homeBannerSlides.forEach((el) => {
189      el.classList.remove("highlight");
190    });
191
192    homeBannerSlides[count].classList.add("highlight");
193    count++;
194    if (count >= homeBannerSlides.length) {
195      count = 0;
196    }
197  }, 3000);
198
199  homeBannerSlides[count].classList.add("highlight");
200
201}
202
203let homePartnerSlider = document.querySelector(".home-ourPartners");
204
205if (homePartnerSlider) {
206  // $(".home-ourPartners .slider-wrapper").slick({
207  //   dots: false,
208  //   infinite: true,
209  //   speed: 300,
210  //   slidesToShow: 3,
211  //   centerMode: true,
212  //   arrows: false,
213  //   vertical: true,
214  //   verticalSwiping: true,
215  //   focusOnSelect: true,
216  //   autoplay: true,
217  // });
218}
219
220//! home awards 
221
222if (!$('body').hasClass('page-id-1194')) {
223  $('.home_awards_Slide .list').slick({
224    slidesToShow: 1.5,
225    slidesToScroll: 1,
226    infinite: false,
227    arrows: false, // default arrows are disabled
228    dots: false,
229    responsive: [
230      {
231        breakpoint: 768,
232        settings: {
233          slidesToShow: 1,
234        }
235      }
236    ]
237  });
238
239  // Custom navigation buttons
240  $('.home_awards_Slide .right').on('click', function () {
241    $('.home_awards_Slide .list').slick('slickNext');
242  });
243
244  $('.home_awards_Slide .left').on('click', function () {
245    $('.home_awards_Slide .list').slick('slickPrev');
246  });
247}
248
249
250
251// !home workWithUs
252
253
254function homeWorkWithUsScroll() {
255
256  let homeWorkWithUs = document.querySelector(".home-workWithUs");
257
258  let workWithUsSlides = document.querySelectorAll(
259    ".home-workWithUs .container .block"
260  );
261
262  if (homeWorkWithUs) {
263    let count = 0;
264
265    // Function to activate slides
266    const activateSlide = () => {
267      workWithUsSlides.forEach((el) => {
268        el.classList.remove("active");
269      });
270
271      workWithUsSlides[count].classList.add("active");
272      count++;
273      if (count >= workWithUsSlides.length) {
274        count = 0;
275      }
276    };
277
278    // Immediately activate the first slide
279    activateSlide();
280
281    // Set the interval for subsequent activations
282    setInterval(activateSlide, 3000);
283  }
284
285
286}
287
288// homeWorkWithUsScroll();
289
290// !home - testimony
291
292let homeTestimonyBlock = document.querySelector(".home-testimony");
293
294let homeTestimony = document.querySelectorAll(
295  ".home-testimony .content .block"
296);
297
298// if (homeTestimonyBlock) {
299//   let order = [0, 1, 3, 4, 2];
300//   let index = 0;
301
302//   setInterval(() => {
303//     homeTestimony.forEach((el) => {
304//       el.classList.remove("active");
305//     });
306
307//     homeTestimony[order[index]].classList.add("active");
308//     index++;
309//     if (index >= order.length) {
310//       index = 0;
311//     }
312//   }, 2000);
313
314//   homeTestimony[order[index]].classList.add("active");
315// }
316
317// !insurance page =====================
318
319
320//   function insurancePolicySlideScroll (){
321
322
323
324// let insurancePolicyBlock = document.querySelector(".insurance_policy");
325
326// let insurancePolicySlides = document.querySelectorAll(
327//   ".insurance_policy .container .block"
328// );
329
330// if (insurancePolicyBlock) {
331//   let count = 0;
332
333//   // Function to activate slides
334//   const activateSlide = () => {
335//     insurancePolicySlides.forEach((el) => {
336//       el.classList.remove("active");
337//     });
338
339//     insurancePolicySlides[count].classList.add("active");
340//     count++;
341//     if (count >= insurancePolicySlides.length) {
342//       count = 0;
343//     }
344//   };
345
346//   // Immediately activate the first slide
347//   activateSlide();
348
349//   // Set the interval for subsequent activations
350//   setInterval(activateSlide, 3000);
351// }
352// }
353
354/////////////////////////////////////////////////////////////////////////////
355// Insurance policy steps HIGHLIGHT
356
357// Insurance page tab functionality with Slick sliders
358
359const tabButtons = document.querySelectorAll(".tabButton");
360const contentContainers = document.querySelectorAll(".contactContainer .c1");
361const linksContainers = document.querySelectorAll(".contactContainer .links");
362const insurancePolicies = document.querySelectorAll(".tabContentContainer");
363
364tabButtons.forEach((button) => {
365  button.addEventListener("click", () => {
366    // Remove active class from all buttons
367    tabButtons.forEach((btn) => btn.classList.remove("active"));
368
369    // Add active class to the clicked button
370    button.classList.add("active");
371
372    // Get the tab data
373    const tab = button.getAttribute("data-tab");
374
375    // Update visibility for .c1 elements
376    contentContainers.forEach((container) => {
377      if (container.getAttribute("data-tab") === tab) {
378        container.classList.add("active");
379      } else {
380        container.classList.remove("active");
381      }
382    });
383
384    // Update visibility for .links elements
385    linksContainers.forEach((link) => {
386      if (link.getAttribute("data-tab") === tab) {
387        link.classList.add("active");
388      } else {
389        link.classList.remove("active");
390      }
391    });
392
393    // Update visibility for .insurance_policy elements
394    insurancePolicies.forEach((policy) => {
395      if (policy.getAttribute("data-tab") === tab) {
396        policy.classList.add("active");
397
398        // Initialize the slick slider for this tab if it's not initialized
399        const slider = policy.querySelector(".slides");
400        if (slider && !slider.classList.contains("slick-initialized")) {
401          $(slider).slick({
402            infinite: true, // Enables seamless looping
403            speed: 800,
404            slidesToShow: 4,
405            slidesToScroll: 1,
406            arrows: false,
407            autoplay: true,
408            autoplaySpeed: 3000,
409            responsive: [
410              {
411                breakpoint: 1024,
412                settings: {
413                  slidesToShow: 3,
414                  slidesToScroll: 1,
415                  infinite: true,
416                },
417              },
418              {
419                breakpoint: 600,
420                settings: {
421                  slidesToShow: 2,
422                  slidesToScroll: 1,
423                  infinite: true,
424                },
425              },
426            ],
427          });
428
429          // Reset all animations and styles on slide change
430          $(slider).on("beforeChange", function () {
431            $(".highlight").css("width", "0%");
432            $(".slick-active .svgWrapper").css("background-color", "");
433            $(".slick-active svg circle").css("fill", "");
434            $(".highlight").css("animation", "none");
435          });
436
437          // Apply styles to the first slick-active slide after the change
438          $(slider).on("afterChange", function () {
439            const $firstActive = $(".slick-active").first();
440            $firstActive.find(".svgWrapper").css("background-color", "#dd8433");
441            $firstActive.find("svg circle").css("fill", "#000");
442
443            const $highlight = $firstActive.find(".highlight");
444            $highlight.css("animation", "none");
445            setTimeout(() => {
446              $highlight.css("animation", "loading 3s forwards");
447              $highlight.css("width", "100%");
448            }, 0);
449          });
450
451          // Trigger styles and animation for the initial load
452          const $initialActive = $(".slick-active").first();
453          $initialActive.find(".svgWrapper").css("background-color", "#dd8433");
454          $initialActive.find("svg circle").css("fill", "#000");
455
456          const $initialHighlight = $initialActive.find(".highlight");
457          $initialHighlight.css("animation", "none");
458          setTimeout(() => {
459            $initialHighlight.css("animation", "loading 3s forwards");
460            $initialHighlight.css("width", "100%");
461          }, 0);
462        }
463      } else {
464        policy.classList.remove("active");
465
466        // If this tab is hidden, destroy the slick slider to prevent conflicts
467        const slider = policy.querySelector(".slides");
468        if (slider && slider.classList.contains("slick-initialized")) {
469          $(slider).slick("unslick");
470        }
471      }
472    });
473  });
474});
475
476// Activate the first tab by default
477if (tabButtons.length > 0) {
478  tabButtons[0].click();
479}
480
481
482/*
483let insurancePolicySteps = document.querySelector(".insurance_policy");
484
485if (insurancePolicySteps) {
486  $(".insurance_policy .slides").slick({
487    infinite: true, // Enables seamless looping
488    speed: 800,
489    slidesToShow: 4,
490    slidesToScroll: 1,
491    arrows: false,
492    autoplay: true, // Enables autoplay
493    autoplaySpeed: 3000, // Adjust the autoplay interval (in milliseconds)
494    responsive: [
495      {
496        breakpoint: 1024,
497        settings: {
498          slidesToShow: 3,
499          slidesToScroll: 1,
500          infinite: true, // Keep it true for looping
501        }
502      },
503      {
504        breakpoint: 600,
505        settings: {
506          slidesToShow: 2,
507          slidesToScroll: 1,
508          infinite: true, // Keep it true for looping
509        }
510      },
511    ]
512  });
513
514  // Reset all animations and styles on slide change
515  $(".insurance_policy .slides").on("beforeChange", function () {
516    $(".highlight").css("width", "0%"); // Reset the highlight width
517    $(".slick-active .svgWrapper").css("background-color", ""); // Reset SVG background
518    $(".slick-active svg circle").css("fill", ""); // Reset circle fill
519    $(".highlight").css("animation", "none"); // Reset animation
520  });
521
522  // Apply styles to the first slick-active slide after the change
523  $(".insurance_policy .slides").on("afterChange", function () {
524    const $firstActive = $(".slick-active").first();
525
526    // Apply highlight animation and styles to the first active slide
527    $firstActive.find(".svgWrapper").css("background-color", "#dd8433");
528    $firstActive.find("svg circle").css("fill", "#000");
529
530    const $highlight = $firstActive.find(".highlight");
531
532    // Reset and reapply animation to restart it
533    $highlight.css("animation", "none"); // Reset animation
534    setTimeout(() => {
535      $highlight.css("animation", "loading 3s forwards"); // Restart animation
536      $highlight.css("width", "100%"); // Ensure the highlight grows to full width
537    }, 0); // Immediate reapply after reset
538  });
539
540  // Trigger styles and animation for the initial load
541  const $initialActive = $(".slick-active").first();
542  $initialActive.find(".svgWrapper").css("background-color", "#dd8433");
543  $initialActive.find("svg circle").css("fill", "#000");
544
545  const $initialHighlight = $initialActive.find(".highlight");
546  $initialHighlight.css("animation", "none"); // Reset animation
547  setTimeout(() => {
548    $initialHighlight.css("animation", "loading 3s forwards"); // Restart animation
549    $initialHighlight.css("width", "100%"); // Ensure the highlight grows to full width
550  }, 0); // Immediate reapply after reset
551}
552*/
553
554
555
556///////////////////////////////////////////////////////////////////////////////////////
557
558let insurancePolicySlider = document.querySelector(".insurance_policy_slides");
559
560if (insurancePolicySlider) {
561  $(".insurance_policy_slides .slider-wrapper").slick({
562    dots: false,
563    infinite: true,
564    speed: 300,
565    slidesToShow: 3,
566    centerMode: true,
567    arrows: false,
568    vertical: true,
569    verticalSwiping: true,
570    focusOnSelect: true,
571    autoplay: true,
572  });
573}
574
575let investmentsSlider = document.querySelector(".investments_slides");
576
577if (investmentsSlider) {
578  $(".investments_slides .slider-wrapper").slick({
579    dots: false,
580    infinite: true,
581    speed: 300,
582    slidesToShow: 3,
583    centerMode: true,
584    arrows: false,
585    vertical: true,
586    verticalSwiping: true,
587    focusOnSelect: true,
588    autoplay: true,
589  });
590}
591
592// !investments steps
593
594
595function investmentStepsScroll() {
596
597
598
599  let investmentsSteps = document.querySelector(".investments_steps");
600
601  let investmentsStepsSlides = document.querySelectorAll(
602    ".investments_steps .container .block"
603  );
604
605  if (investmentsSteps) {
606    let count = 0;
607
608    // Function to activate slides
609    const activateSlide = () => {
610      investmentsStepsSlides.forEach((el) => {
611        el.classList.remove("active");
612      });
613
614      investmentsStepsSlides[count].classList.add("active");
615      count++;
616      if (count >= investmentsStepsSlides.length) {
617        count = 0;
618      }
619    };
620
621    // Immediately activate the first slide
622    activateSlide();
623
624    // Set the interval for subsequent activations
625    setInterval(activateSlide, 3000);
626  }
627}
628
629
630let aboutUsPolicySlider = document.querySelector(".aboutUs_policy");
631
632if (aboutUsPolicySlider) {
633  $(".aboutUs_policy .slider-wrapper").slick({
634    dots: false,
635    infinite: true,
636    speed: 300,
637    slidesToShow: 3,
638    centerMode: true,
639    arrows: false,
640    vertical: true,
641    verticalSwiping: true,
642    focusOnSelect: true,
643    autoplay: true,
644  });
645}
646let aboutUsJourneySlider = document.querySelector(".aboutUs_ourJourney");
647
648if (aboutUsJourneySlider) {
649  $(".aboutUs_ourJourney .slides").slick({
650    dots: false,
651    infinite: true,
652    speed: 300,
653    slidesToShow: 1,
654
655    arrows: false,
656
657    focusOnSelect: true,
658    autoplay: true,
659    infinite: true,
660
661    adaptiveHeight: true,
662  });
663}
664
665let aboutUsAwardsSlider = document.querySelector(".about_slider");
666
667if (aboutUsAwardsSlider) {
668  $(".about_slider .container").slick({
669    dots: false,
670    infinite: true,
671    speed: 300,
672    slidesToShow: 4,
673    arrows: false,
674    focusOnSelect: true,
675    autoplay: true,
676    // adaptiveHeight: true,
677    responsive: [
678      {
679        breakpoint: 950,
680        settings: {
681          slidesToShow: 3, // Show 2 slides below 768px
682        },
683      },
684      {
685        breakpoint: 768,
686        settings: {
687          slidesToShow: 2, // Show 2 slides below 768px
688        },
689      },
690      {
691        breakpoint: 480,
692        settings: {
693          slidesToShow: 1, // Show 1 slide below 480px
694        },
695      },
696    ],
697  });
698
699}
700
701
702
703
704//! FAQ
705
706let faqBlock = document.querySelectorAll(".faq .c1 .container div");
707
708faqBlock.forEach((el) => {
709  el.addEventListener("click", (block) => {
710    el.classList.toggle("active");
711  });
712});
713
714// !gsap animation =============================
715
716// !home gsap
717
718let homeBannerTL = gsap.timeline({
719  scrollTrigger: {
720    trigger: ".home-banner",
721    // markers: true,
722    start: "top 60%",
723    toggleActions: "play none none none",
724  },
725});
726
727homeBannerTL
728
729  .from(".home-banner .c1 .google", {
730    opacity: 0,
731    y: 40,
732    duration: 1.2,
733    stagger: 0.2,
734    ease: "power2.out",
735    delay: 0.1,
736  })
737  .from(".home-banner .c1 h1", {
738    opacity: 0,
739    y: 40,
740    duration: 1.2,
741    stagger: 0.2,
742    ease: "power2.out",
743    delay: 0.1,
744  }, "<")
745  .from(
746    ".home-banner .c1 h2",
747    {
748      opacity: 0,
749      y: 40,
750      duration: 1.2,
751      stagger: 0.2,
752      ease: "power2.out",
753      delay: 0.1,
754    },
755    "<"
756  )
757  .from(
758    ".home-banner .c1 .links",
759    {
760      opacity: 0,
761      y: 40,
762      duration: 1.2,
763      stagger: 0.2,
764      ease: "power2.out",
765      delay: 0.1,
766    },
767    "<"
768  )
769
770  .to(
771    ".home-banner .c2",
772    {
773      opacity: 1,
774    },
775    "<"
776  )
777  .from(
778    ".home-banner .c2",
779    {
780      y: 40,
781      duration: 1.2,
782      stagger: 0.2,
783      ease: "power2.out",
784      delay: 0.1,
785    },
786    "<"
787  );
788
789let homeServiceBlock = document.querySelectorAll(".home-services");
790
791homeServiceBlock.forEach((block) => {
792  let tl = gsap.timeline({
793    scrollTrigger: {
794      trigger: block,
795      // markers: true,
796      start: "top 70%",
797      toggleActions: "play none none none",
798    },
799  });
800
801  tl.from(
802    block.querySelectorAll(".head h1"),
803    {
804      opacity: 0,
805      y: 40,
806      duration: 1.2,
807      stagger: 0.2,
808      ease: "power2.out",
809      delay: 0.1,
810    },
811    "<"
812  )
813    .from(
814      block.querySelectorAll(".head h2"),
815      {
816        opacity: 0,
817        y: 40,
818        duration: 1.2,
819        stagger: 0.2,
820        ease: "power2.out",
821        delay: 0.1,
822      },
823      "<"
824    )
825    .fromTo(
826      document.querySelectorAll(".home-services .serviceList > div"),
827      // Starting values
828      {
829        opacity: 0,
830        y: 40,
831      },
832      // Ending values
833      {
834        opacity: 1,
835        y: 0,
836        duration: 1.2,
837        stagger: 0.2,
838        ease: "power2.out",
839        delay: 0.1,
840      }, '<'
841    );
842});
843
844
845let homeWhyHareepattiBlock = document.querySelectorAll(".home_whyHareepatti");
846
847homeWhyHareepattiBlock.forEach((block) => {
848  let tl = gsap.timeline({
849    scrollTrigger: {
850      trigger: block,
851      // markers: true,
852      start: "top 70%",
853      toggleActions: "play none none none",
854    },
855  });
856
857  tl.from(
858    block.querySelectorAll(".head h1"),
859    {
860      opacity: 0,
861      y: 40,
862      duration: 1.2,
863      stagger: 0.2,
864      ease: "power2.out",
865      delay: 0.1,
866    },
867    "<"
868  )
869
870    .from(
871      document.querySelectorAll(" .content .block"),
872
873      {
874        opacity: 0,
875        y: 0,
876        duration: 1,
877        stagger: 0.2,
878        ease: "power2.out",
879        delay: 0.1,
880      }, '<'
881    );
882});
883
884
885
886
887
888
889
890let homeOurPartnerBlock = document.querySelectorAll(".home-ourPartners");
891
892homeOurPartnerBlock.forEach((block) => {
893  let tl = gsap.timeline({
894    scrollTrigger: {
895      trigger: block,
896      // markers: true,
897      start: "top 70%",
898      toggleActions: "play none none none",
899    },
900  });
901
902  tl.from(
903    block.querySelectorAll(".c1 h1"),
904    {
905      opacity: 0,
906      y: 40,
907      duration: 1.2,
908      stagger: 0.2,
909      ease: "power2.out",
910      delay: 0.1,
911    },
912    "<"
913  )
914    .from(
915      block.querySelectorAll(".c1 p"),
916      {
917        opacity: 0,
918        y: 40,
919        duration: 1.2,
920        stagger: 0.2,
921        ease: "power2.out",
922        delay: 0.1,
923      },
924      "<"
925    )
926    .from(
927      block.querySelectorAll(".c2"),
928      {
929        opacity: 0,
930        y: 40,
931        duration: 1.2,
932        stagger: 0.2,
933        ease: "power2.out",
934        delay: 0.1,
935      },
936      "<"
937    )
938
939});
940
941
942let homeCallUsBlock = document.querySelectorAll(".home-callUs");
943
944homeCallUsBlock.forEach((block) => {
945  let tl = gsap.timeline({
946    scrollTrigger: {
947      trigger: block,
948      // markers: true,
949      start: "top 70%",
950      toggleActions: "play none none none",
951    },
952  });
953
954  tl.from(
955    block.querySelectorAll(" .container"),
956    {
957      opacity: 0,
958      y: 40,
959      duration: 1.2,
960      stagger: 0.2,
961      ease: "power2.out",
962      delay: 0.1,
963    },
964    "<"
965  )
966    .from(
967      block.querySelectorAll(" .container .c2"),
968      {
969        opacity: 0,
970        x: 40,
971        duration: .5,
972        stagger: 0.2,
973        ease: "power2.out",
974        delay: 0.1,
975      },
976      "<"
977    )
978
979
980});
981
982
983let homeBlogsBlock = document.querySelectorAll(".home-blogs");
984
985homeBlogsBlock.forEach((block) => {
986  let tl = gsap.timeline({
987    scrollTrigger: {
988      trigger: block,
989      // markers: true,
990      start: "top 70%",
991      toggleActions: "play none none none",
992    },
993  });
994
995  tl.from(
996    block.querySelectorAll(" .c1 .text"),
997    {
998      opacity: 0,
999      y: 40,
1000      duration: 1.2,
1001      stagger: 0.2,
1002      ease: "power2.out",
1003      delay: 0.1,
1004    },
1005    "<"
1006  )
1007    .from(
1008      block.querySelectorAll(" .c1 .video"),
1009      {
1010        opacity: 0,
1011        y: 40,
1012        duration: 1.2,
1013        stagger: 0.2,
1014        ease: "power2.out",
1015        delay: 0.1,
1016      },
1017      "<"
1018    )
1019    .from(
1020      block.querySelectorAll(".c2 > div"),
1021      {
1022        opacity: 0,
1023        y: 40,
1024        duration: 1.2,
1025        stagger: 0.2,
1026        ease: "power2.out",
1027        delay: 0.1,
1028      },
1029      "<"
1030    )
1031
1032});
1033
1034let homeWorkWithUsBlock = document.querySelectorAll(".home-workWithUs");
1035
1036homeWorkWithUsBlock.forEach((block) => {
1037  let tl = gsap.timeline({
1038    scrollTrigger: {
1039      trigger: block,
1040      // markers: true,
1041      start: "top 70%",
1042      toggleActions: "play none none none",
1043      onEnter: () => homeWorkWithUsScroll()
1044    },
1045  });
1046
1047  tl.from(
1048    block.querySelectorAll(".home-workWithUs .head h1"),
1049    {
1050      opacity: 0,
1051      y: 40,
1052      duration: 1.2,
1053      stagger: 0.2,
1054      ease: "power2.out",
1055      delay: 0.1,
1056    },
1057    "<"
1058  )
1059    .from(
1060      block.querySelectorAll(" .container"),
1061      {
1062        opacity: 0,
1063        y: 40,
1064        duration: 1.2,
1065        stagger: 0.2,
1066        ease: "power2.out",
1067        delay: 0.1,
1068      },
1069      "<"
1070    )
1071
1072
1073});
1074
1075
1076
1077let homeWhyHareePattiBlock = document.querySelectorAll(".home-why");
1078
1079
1080homeWhyHareePattiBlock.forEach((block) => {
1081  let tl = gsap.timeline({
1082    scrollTrigger: {
1083      trigger: block,
1084      // markers: true,
1085      start: "top 70%",
1086      toggleActions: "play none none none",
1087    },
1088  });
1089
1090  tl.from(
1091    block.querySelectorAll(" .c1 .head h1"),
1092    {
1093      opacity: 0,
1094      y: 40,
1095      duration: 1.2,
1096      stagger: 0.2,
1097      ease: "power2.out",
1098      delay: 0.1,
1099    },
1100    "<"
1101  )
1102    .from(
1103      block.querySelectorAll(".c1 .content h1"),
1104      {
1105        opacity: 0,
1106        y: 40,
1107        duration: 1.2,
1108        stagger: 0.2,
1109        ease: "power2.out",
1110        delay: 0.1,
1111      },
1112      "<"
1113    )
1114    .from(
1115      block.querySelectorAll(".c2 "),
1116      {
1117        opacity: 0,
1118        y: 40,
1119        duration: 1.2,
1120        stagger: 0.2,
1121        ease: "power2.out",
1122        delay: 0.1,
1123      },
1124      "<"
1125    )
1126    .from(
1127      CSSRulePlugin.getRule(".home-why .c2 .image::before"),
1128      {
1129
1130        delay: .5,
1131        cssRule: {
1132          opacity: 0,
1133
1134        }
1135      },
1136      "<"
1137    )
1138
1139});
1140
1141
1142let homeTestimonyBlockGsap = document.querySelectorAll(".home-testimony");
1143
1144homeTestimonyBlockGsap.forEach((block) => {
1145  let tl = gsap.timeline({
1146    scrollTrigger: {
1147      trigger: block,
1148      // markers: true,
1149      start: "top 70%",
1150      toggleActions: "play none none none",
1151    },
1152  });
1153
1154  tl.from(
1155    block.querySelectorAll(".head > h1"),
1156    {
1157      opacity: 0,
1158      y: 40,
1159      duration: 1.2,
1160      stagger: 0.2,
1161      ease: "power2.out",
1162      delay: 0.1,
1163    },
1164    "<"
1165  )
1166
1167    .from(
1168      block.querySelectorAll(".content"),
1169      {
1170        opacity: 0,
1171        y: 40,
1172        duration: 1.2,
1173        stagger: 0.2,
1174        ease: "power2.out",
1175        delay: 0.1,
1176      },
1177      "<"
1178    )
1179
1180});
1181
1182let homeCallUs2Block = document.querySelectorAll(".home-hiring");
1183
1184homeCallUs2Block.forEach((block) => {
1185  let tl = gsap.timeline({
1186    scrollTrigger: {
1187      trigger: block,
1188      // markers: true,
1189      start: "top 70%",
1190      toggleActions: "play none none none",
1191    },
1192  });
1193
1194  tl.from(
1195    block.querySelectorAll(" .container"),
1196    {
1197      opacity: 0,
1198      y: 40,
1199      duration: 1.2,
1200      stagger: 0.2,
1201      ease: "power2.out",
1202      delay: 0.1,
1203    },
1204    "<"
1205  )
1206    .from(
1207      block.querySelectorAll(" .container .c2"),
1208      {
1209        opacity: 0,
1210        x: 40,
1211        duration: .5,
1212        stagger: 0.2,
1213        ease: "power2.out",
1214        delay: 0.1,
1215      },
1216      "<"
1217    )
1218
1219
1220});
1221
1222
1223
1224//! about page ===========================
1225
1226
1227let aboutUsBannerBlock = document.querySelectorAll(".aboutUs_banner");
1228
1229aboutUsBannerBlock.forEach((block) => {
1230  let tl = gsap.timeline({
1231    scrollTrigger: {
1232      trigger: block,
1233      // markers: true,
1234      start: "top 70%",
1235      toggleActions: "play none none none",
1236    },
1237  });
1238
1239  tl.from(
1240    block.querySelectorAll(" .num h1"),
1241    {
1242      opacity: 0,
1243      y: 40,
1244      duration: 1.2,
1245      stagger: 0.2,
1246      ease: "power2.out",
1247      delay: 0.1,
1248    },
1249    "<"
1250  )
1251    .from(
1252      block.querySelectorAll(" h2"),
1253      {
1254        opacity: 0,
1255        y: 40,
1256        duration: .5,
1257        stagger: 0.2,
1258        ease: "power2.out",
1259        delay: 0.3,
1260      },
1261      "<"
1262    )
1263
1264
1265});
1266
1267
1268
1269let aboutUsPolicyBlock = document.querySelectorAll(".aboutUs_policy");
1270
1271aboutUsPolicyBlock.forEach((block) => {
1272  let tl = gsap.timeline({
1273    scrollTrigger: {
1274      trigger: block,
1275      // markers: true,
1276      start: "top 70%",
1277      toggleActions: "play none none none",
1278    },
1279  });
1280
1281  tl.from(
1282    block.querySelectorAll(" .c1 h1"),
1283    {
1284      opacity: 0,
1285      y: 20,
1286      duration: 1.2,
1287      stagger: 0.2,
1288      ease: "power2.out",
1289      delay: 0.1,
1290    },
1291    "<"
1292  )
1293    .from(
1294      block.querySelectorAll(" .c1 p"),
1295      {
1296        opacity: 0,
1297        y: 15,
1298        duration: .5,
1299        stagger: 0.2,
1300        ease: "power2.out",
1301        delay: 0.3,
1302      },
1303      "<"
1304    )
1305    .from(
1306      block.querySelectorAll(" .c2"),
1307      {
1308        opacity: 0,
1309        y: 20,
1310        duration: .5,
1311        stagger: 0.2,
1312        ease: "power2.out",
1313        delay: 0.3,
1314      },
1315      "<"
1316    )
1317
1318});
1319
1320
1321let aboutUsCallUsBlock = document.querySelectorAll(".aboutUs_callUs");
1322
1323aboutUsCallUsBlock.forEach((block) => {
1324  let tl = gsap.timeline({
1325    scrollTrigger: {
1326      trigger: block,
1327      // markers: true,
1328      start: "top 70%",
1329      toggleActions: "play none none none",
1330    },
1331  });
1332
1333  tl.from(
1334    block.querySelectorAll(" .container"),
1335    {
1336      opacity: 0,
1337      y: 40,
1338      duration: 1.2,
1339      stagger: 0.2,
1340      ease: "power2.out",
1341      delay: 0.1,
1342    },
1343    "<"
1344  )
1345    .from(
1346      block.querySelectorAll(" .container .c2"),
1347      {
1348        opacity: 0,
1349        x: 40,
1350        duration: .5,
1351        stagger: 0.2,
1352        ease: "power2.out",
1353        delay: 0.1,
1354      },
1355      "<"
1356    )
1357
1358
1359});
1360
1361
1362let aboutUsJourneyBlock = document.querySelectorAll(".aboutUs_ourJourney");
1363
1364aboutUsJourneyBlock.forEach((block) => {
1365  let tl = gsap.timeline({
1366    scrollTrigger: {
1367      trigger: block,
1368      // markers: true,
1369      start: "top 70%",
1370      toggleActions: "play none none none",
1371    },
1372  });
1373
1374  tl.from(
1375    block.querySelectorAll(" .head h1"),
1376    {
1377      opacity: 0,
1378      y: 40,
1379      duration: 1.2,
1380      stagger: 0.2,
1381      ease: "power2.out",
1382      delay: 0.1,
1383    },
1384    "<"
1385  )
1386    .from(
1387      block.querySelectorAll(" .slides"),
1388      {
1389        opacity: 0,
1390        y: 40,
1391        duration: .5,
1392        stagger: 0.2,
1393        ease: "power2.out",
1394        delay: 0.1,
1395      },
1396      "<"
1397    )
1398
1399
1400});
1401
1402let aboutUsAdminBlock = document.querySelectorAll(".aboutUs_admin");
1403
1404aboutUsAdminBlock.forEach((block) => {
1405  let tl = gsap.timeline({
1406    scrollTrigger: {
1407      trigger: block,
1408      // markers: true,
1409      start: "top 70%",
1410      toggleActions: "play none none none",
1411    },
1412  });
1413
1414  tl.from(
1415    block.querySelectorAll(" .container"),
1416    {
1417      opacity: 0,
1418      y: 40,
1419      duration: 1.2,
1420      stagger: 0.2,
1421      ease: "power2.out",
1422      delay: 0.1,
1423    },
1424    "<"
1425  )
1426    .from(
1427      block.querySelectorAll(" .container .c2"),
1428      {
1429        opacity: 0,
1430        x: 10,
1431        duration: .5,
1432        stagger: 0.2,
1433        ease: "power2.out",
1434        delay: 0.1,
1435      },
1436      "<"
1437    )
1438
1439
1440});
1441
1442
1443let aboutUsTeamBlock = document.querySelectorAll(".aboutUs_team");
1444
1445aboutUsTeamBlock.forEach((block) => {
1446  let tl = gsap.timeline({
1447    scrollTrigger: {
1448      trigger: block,
1449      // markers: true,
1450      start: "top 70%",
1451      toggleActions: "play none none none",
1452    },
1453  });
1454
1455  tl.from(
1456    block.querySelectorAll(" .head"),
1457    {
1458      opacity: 0,
1459      y: 40,
1460      duration: 1.2,
1461      stagger: 0.2,
1462      ease: "power2.out",
1463      delay: 0.1,
1464    },
1465    "<"
1466  )
1467    .from(
1468      block.querySelectorAll(" .content .block"),
1469      {
1470        opacity: 0,
1471        y: 40,
1472        duration: .5,
1473        stagger: 0.05,
1474        ease: "power2.out",
1475        delay: 0.1,
1476      },
1477      "<"
1478    )
1479
1480
1481});
1482
1483
1484// !insurance page 
1485
1486
1487
1488let insuranceBannerBlock = document.querySelectorAll(".insurance_banner");
1489
1490insuranceBannerBlock.forEach((block) => {
1491  let tl = gsap.timeline({
1492    scrollTrigger: {
1493      trigger: block,
1494      // markers: true,
1495      start: "top 70%",
1496      toggleActions: "play none none none",
1497    },
1498  });
1499
1500  tl.from(
1501    block.querySelectorAll(" .head h1"),
1502    {
1503      opacity: 0,
1504      y: 20,
1505      duration: 1.2,
1506      stagger: 0.2,
1507      ease: "power2.out",
1508      delay: 0.1,
1509    },
1510    "<"
1511  )
1512    .from(
1513      block.querySelectorAll(".head p"),
1514      {
1515        opacity: 0,
1516        y: 40,
1517        duration: .5,
1518        stagger: 0.05,
1519        ease: "power2.out",
1520        delay: 0.1,
1521      },
1522      "<"
1523    )
1524
1525    .from(
1526      block.querySelectorAll(".content div"),
1527      {
1528        opacity: 0,
1529        y: 40,
1530        duration: .5,
1531        stagger: 0.1,
1532        ease: "power2.out",
1533        delay: 0.1,
1534      },
1535      "<"
1536    )
1537});
1538
1539
1540let insurancePolicyBlockGsap = document.querySelectorAll(".insurance_policy");
1541
1542insurancePolicyBlockGsap.forEach((block) => {
1543  let tl = gsap.timeline({
1544    scrollTrigger: {
1545      trigger: block,
1546      // markers: true,
1547      start: "top 70%",
1548      toggleActions: "play none none none",
1549      onEnter: () => { }
1550
1551    },
1552  });
1553
1554  tl.from(
1555    block.querySelectorAll(" .head h2"),
1556    {
1557      opacity: 0,
1558      y: 20,
1559      duration: 1.2,
1560      stagger: 0.2,
1561      ease: "power2.out",
1562      delay: 0.1,
1563    },
1564    "<"
1565  )
1566    .from(
1567      block.querySelectorAll(".head h1"),
1568      {
1569        opacity: 0,
1570        y: 40,
1571        duration: .5,
1572        stagger: 0.05,
1573        ease: "power2.out",
1574        delay: 0.1,
1575      },
1576      "<"
1577    )
1578
1579    .from(
1580      block.querySelectorAll(".container"),
1581      {
1582        opacity: 0,
1583        y: 40,
1584        duration: .5,
1585        stagger: 0.15,
1586        ease: "power2.out",
1587        delay: 0.1,
1588      },
1589      "<"
1590    )
1591});
1592
1593
1594let insurancePolicySlidesBlockGsap = document.querySelectorAll(".insurance_policy_slides");
1595
1596insurancePolicySlidesBlockGsap.forEach((block) => {
1597  let tl = gsap.timeline({
1598    scrollTrigger: {
1599      trigger: block,
1600      // markers: true,
1601      start: "top 70%",
1602      toggleActions: "play none none none",
1603    },
1604  });
1605
1606  tl.from(
1607    block.querySelectorAll(".c1 h1"),
1608    {
1609      opacity: 0,
1610      y: 20,
1611      duration: 1.2,
1612      stagger: 0.2,
1613      ease: "power2.out",
1614      delay: 0.1,
1615    },
1616    "<"
1617  )
1618    .from(
1619      block.querySelectorAll(".c1 p"),
1620      {
1621        opacity: 0,
1622        y: 40,
1623        duration: .5,
1624        stagger: 0.1,
1625        ease: "power2.out",
1626        delay: 0.1,
1627      },
1628      "<"
1629    )
1630
1631    .from(
1632      block.querySelectorAll(".c2"),
1633      {
1634        opacity: 0,
1635        y: 40,
1636        duration: .5,
1637        stagger: 0.1,
1638        ease: "power2.out",
1639        delay: 0.1,
1640      },
1641      "<"
1642    )
1643});
1644
1645let insuranceCallNowBlock = document.querySelectorAll(".insurance_bookNow ");
1646
1647insuranceCallNowBlock.forEach((block) => {
1648  let tl = gsap.timeline({
1649    scrollTrigger: {
1650      trigger: block,
1651      // markers: true,
1652      start: "top 70%",
1653      toggleActions: "play none none none",
1654    },
1655  });
1656
1657  tl.from(
1658    block.querySelectorAll(" .content div"),
1659    {
1660      opacity: 0,
1661      y: 20,
1662      duration: 1.2,
1663      stagger: 0.2,
1664      ease: "power2.out",
1665      delay: 0.1,
1666    },
1667    "<"
1668  )
1669
1670});
1671
1672
1673// !health insurance page 
1674
1675
1676
1677let healthInsuranceBlock = document.querySelectorAll(".health_insurance_banner ");
1678
1679healthInsuranceBlock.forEach((block) => {
1680  let tl = gsap.timeline({
1681    scrollTrigger: {
1682      trigger: block,
1683      // markers: true,
1684      start: "top 70%",
1685      toggleActions: "play none none none",
1686    },
1687  });
1688
1689  tl.from(
1690    block.querySelectorAll("h1"),
1691    {
1692      opacity: 0,
1693      y: 20,
1694      duration: 1.2,
1695      stagger: 0.2,
1696      ease: "power2.out",
1697      delay: 0.1,
1698    },
1699    "<"
1700  )
1701
1702});
1703let healthInsuranceFromBlock = document.querySelectorAll(".health_insurance_banner_form");
1704
1705healthInsuranceFromBlock.forEach((block) => {
1706  let tl = gsap.timeline({
1707    scrollTrigger: {
1708      trigger: block,
1709      // markers: true,
1710      start: "top 70%",
1711      toggleActions: "play none none none",
1712    },
1713  });
1714
1715  tl.from(
1716    block.querySelectorAll(":scope > div"),
1717    {
1718      opacity: 0,
1719      y: 20,
1720      duration: 1.2,
1721      stagger: 0.2,
1722      ease: "power2.out",
1723      delay: 0.1,
1724    },
1725    "<"
1726  )
1727
1728});
1729
1730
1731// !life insurance page 
1732
1733let lifeInsuranceBlock = document.querySelectorAll(".life_insurance_banner ");
1734
1735lifeInsuranceBlock.forEach((block) => {
1736  let tl = gsap.timeline({
1737    scrollTrigger: {
1738      trigger: block,
1739      // markers: true,
1740      start: "top 70%",
1741      toggleActions: "play none none none",
1742    },
1743  });
1744
1745  tl.from(
1746    block.querySelectorAll("h1"),
1747    {
1748      opacity: 0,
1749      y: 20,
1750      duration: 1.2,
1751      stagger: 0.2,
1752      ease: "power2.out",
1753      delay: 0.1,
1754    },
1755    "<"
1756  )
1757
1758});
1759let lifeInsuranceFromBlock = document.querySelectorAll(".life_insurance_banner_form");
1760
1761lifeInsuranceFromBlock.forEach((block) => {
1762  let tl = gsap.timeline({
1763    scrollTrigger: {
1764      trigger: block,
1765      // markers: true,
1766      start: "top 70%",
1767      toggleActions: "play none none none",
1768    },
1769  });
1770
1771  tl.from(
1772    block.querySelectorAll(":scope > div"),
1773    {
1774      opacity: 0,
1775      y: 20,
1776      duration: 1.2,
1777      stagger: 0.2,
1778      ease: "power2.out",
1779      delay: 0.1,
1780    },
1781    "<"
1782  )
1783
1784});
1785
1786
1787// !life insurance page 
1788
1789let motorInsuranceBlock = document.querySelectorAll(".motor_insurance_banner");
1790
1791motorInsuranceBlock.forEach((block) => {
1792  let tl = gsap.timeline({
1793    scrollTrigger: {
1794      trigger: block,
1795      // markers: true,
1796      start: "top 70%",
1797      toggleActions: "play none none none",
1798    },
1799  });
1800
1801  tl.from(
1802    block.querySelectorAll("h1"),
1803    {
1804      opacity: 0,
1805      y: 20,
1806      duration: 1.2,
1807      stagger: 0.2,
1808      ease: "power2.out",
1809      delay: 0.1,
1810    },
1811    "<"
1812  )
1813
1814});
1815
1816let motorInsuranceFromBlock = document.querySelectorAll(".motor_insurance_banner_form");
1817
1818motorInsuranceFromBlock.forEach((block) => {
1819  let tl = gsap.timeline({
1820    scrollTrigger: {
1821      trigger: block,
1822      // markers: true,
1823      start: "top 70%",
1824      toggleActions: "play none none none",
1825    },
1826  });
1827
1828  tl.from(
1829    block.querySelectorAll(":scope > div"),
1830    {
1831      opacity: 0,
1832      y: 20,
1833      duration: 1.2,
1834      stagger: 0.2,
1835      ease: "power2.out",
1836      delay: 0.1,
1837    },
1838    "<"
1839  )
1840
1841});
1842
1843
1844//! investment page 
1845
1846let investmentBannerBlock = document.querySelectorAll(".investment_banner");
1847
1848investmentBannerBlock.forEach((block) => {
1849  let tl = gsap.timeline({
1850    scrollTrigger: {
1851      trigger: block,
1852      // markers: true,
1853      start: "top 70%",
1854      toggleActions: "play none none none",
1855    },
1856  });
1857
1858  tl.from(
1859    block.querySelectorAll("h1"),
1860    {
1861      opacity: 0,
1862      y: 20,
1863      duration: 1.2,
1864      stagger: 0.2,
1865      ease: "power2.out",
1866      delay: 0.1,
1867    },
1868    "<"
1869  )
1870    .from(
1871      block.querySelectorAll("p"),
1872      {
1873        opacity: 0,
1874        y: 20,
1875        duration: 1.2,
1876        stagger: 0.2,
1877        ease: "power2.out",
1878        delay: 0.1,
1879      },
1880      "<"
1881    )
1882    .from(
1883      block.querySelectorAll(".button"),
1884      {
1885        opacity: 0,
1886        y: 20,
1887        duration: 1.2,
1888        stagger: 0.2,
1889        ease: "power2.out",
1890        delay: 0.1,
1891      },
1892      "<"
1893    )
1894
1895
1896});
1897
1898
1899
1900
1901let investmentMutualFundBlock = document.querySelectorAll(".investments_slides");
1902
1903investmentMutualFundBlock.forEach((block) => {
1904  let tl = gsap.timeline({
1905    scrollTrigger: {
1906      trigger: block,
1907      // markers: true,
1908      start: "top 70%",
1909      toggleActions: "play none none none",
1910    },
1911  });
1912
1913  tl.from(
1914    block.querySelectorAll(".c1 h1"),
1915    {
1916      opacity: 0,
1917      y: 20,
1918      duration: 1.2,
1919      stagger: 0.2,
1920      ease: "power2.out",
1921
1922    },
1923    "<"
1924  )
1925    .from(
1926      block.querySelectorAll(".c1 p"),
1927      {
1928        opacity: 0,
1929        y: 20,
1930        duration: 1.2,
1931        stagger: 0.2,
1932        ease: "power2.out",
1933        delay: 0.2,
1934      },
1935      "<"
1936    )
1937    .from(
1938      block.querySelectorAll(".c2"),
1939      {
1940        opacity: 0,
1941        y: 20,
1942        duration: 1.2,
1943        stagger: 0.2,
1944        ease: "power2.out",
1945        delay: 0.2,
1946      },
1947      "<"
1948    )
1949
1950
1951});
1952
1953
1954let investmentPolicyBlock = document.querySelectorAll(".investments_steps");
1955
1956investmentPolicyBlock.forEach((block) => {
1957  let tl = gsap.timeline({
1958    scrollTrigger: {
1959      trigger: block,
1960      // markers: true,
1961      start: "top 70%",
1962      toggleActions: "play none none none",
1963
1964      onEnter: () => investmentStepsScroll()
1965    },
1966  });
1967
1968  tl.from(
1969    block.querySelectorAll(" .head h2"),
1970    {
1971      opacity: 0,
1972      y: 20,
1973      duration: 1.2,
1974      stagger: 0.2,
1975      ease: "power2.out",
1976
1977    },
1978    "<"
1979  )
1980    .from(
1981      block.querySelectorAll(" .head h1"),
1982      {
1983        opacity: 0,
1984        y: 20,
1985        duration: 1.2,
1986        stagger: 0.2,
1987        ease: "power2.out",
1988        delay: 0.2,
1989      },
1990      "<"
1991    )
1992    .from(
1993      block.querySelectorAll(".head .link"),
1994      {
1995        opacity: 0,
1996        y: 20,
1997        duration: 1.2,
1998        stagger: 0.2,
1999        ease: "power2.out",
2000        delay: 0.2,
2001      },
2002      "<"
2003    ).from(
2004      block.querySelectorAll(".container"),
2005      {
2006        opacity: 0,
2007        y: 20,
2008        duration: 1.2,
2009        stagger: 0.2,
2010        ease: "power2.out",
2011        delay: 0.1,
2012      },
2013      "<"
2014    )
2015
2016
2017});
2018
2019
2020let investmentFormHeadBlock = document.querySelectorAll(".investments_from_head");
2021
2022investmentFormHeadBlock.forEach((block) => {
2023  let tl = gsap.timeline({
2024    scrollTrigger: {
2025      trigger: block,
2026      // markers: true,
2027      start: "top 70%",
2028      toggleActions: "play none none none",
2029    },
2030  });
2031
2032  tl.from(
2033    block.querySelectorAll("h1"),
2034    {
2035      opacity: 0,
2036      y: 20,
2037      duration: 1.2,
2038      stagger: 0.2,
2039      ease: "power2.out",
2040      delay: 0.1,
2041    },
2042    "<"
2043  )
2044
2045});
2046
2047let investmentFromBlock = document.querySelectorAll(".investments_form");
2048
2049investmentFromBlock.forEach((block) => {
2050  let tl = gsap.timeline({
2051    scrollTrigger: {
2052      trigger: block,
2053      // markers: true,
2054      start: "top 70%",
2055      toggleActions: "play none none none",
2056    },
2057  });
2058
2059  tl.from(
2060    block.querySelectorAll(":scope > div"),
2061    {
2062      opacity: 0,
2063      y: 20,
2064      duration: 1.2,
2065      stagger: 0.2,
2066      ease: "power2.out",
2067      delay: 0.2,
2068    },
2069    "<"
2070  )
2071
2072});
2073
2074let investmentQuestionsBlock = document.querySelectorAll(".investments_question");
2075
2076investmentQuestionsBlock.forEach((block) => {
2077  let tl = gsap.timeline({
2078    scrollTrigger: {
2079      trigger: block,
2080      // markers: true,
2081      start: "top 70%",
2082      toggleActions: "play none none none",
2083    },
2084  });
2085
2086  tl
2087    .from(
2088      block.querySelectorAll(".c1 h1"),
2089      {
2090        opacity: 0,
2091        y: 20,
2092        duration: 1.2,
2093        stagger: 0.2,
2094        ease: "power2.out",
2095        delay: 0.2,
2096      },
2097      "<"
2098    )
2099    .from(
2100      block.querySelectorAll(".c1 .link"),
2101      {
2102        opacity: 0,
2103        y: 20,
2104        duration: 1.2,
2105        stagger: 0.2,
2106        ease: "power2.out",
2107        delay: 0.2,
2108      },
2109      "<"
2110    )
2111    .from(
2112      block.querySelectorAll(".c2"),
2113      {
2114        opacity: 0,
2115        y: 20,
2116        duration: 1.2,
2117        stagger: 0.2,
2118        ease: "power2.out",
2119        delay: 0.1,
2120      },
2121      "<"
2122    )
2123    .from(
2124      CSSRulePlugin.getRule(".investments_question .c2 .image::before"),
2125      {
2126
2127        delay: .5,
2128        cssRule: {
2129          opacity: 0,
2130
2131        }
2132      },
2133      "<"
2134    )
2135});
2136
2137// !one-to-one-consultation page 
2138
2139
2140let oneToOneBannerBlock = document.querySelectorAll(".oneToOneConsult_banner");
2141
2142oneToOneBannerBlock.forEach((block) => {
2143  let tl = gsap.timeline({
2144    scrollTrigger: {
2145      trigger: block,
2146      // markers: true,
2147      start: "top 70%",
2148      toggleActions: "play none none none",
2149    },
2150  });
2151
2152  tl
2153    .from(
2154      block.querySelectorAll(".c1 h1"),
2155      {
2156        opacity: 0,
2157        y: 20,
2158        duration: 1.2,
2159        stagger: 0.2,
2160        ease: "power2.out",
2161        delay: 0.2,
2162      },
2163      "<"
2164    )
2165    .from(
2166      block.querySelectorAll(".c1 p"),
2167      {
2168        opacity: 0,
2169        y: 20,
2170        duration: 1.2,
2171        stagger: 0.2,
2172        ease: "power2.out",
2173        delay: 0.2,
2174      },
2175      "<"
2176    )
2177    .from(
2178      block.querySelectorAll(".c2"),
2179      {
2180        opacity: 0,
2181        y: 20,
2182        duration: 1.2,
2183        stagger: 0.2,
2184        ease: "power2.out",
2185        delay: 0.1,
2186      },
2187      "<"
2188    ).from(
2189      CSSRulePlugin.getRule(".oneToOneConsult_banner .c2 .image::before"),
2190      {
2191
2192        delay: .5,
2193        cssRule: {
2194          opacity: 0,
2195
2196        }
2197      },
2198      "<"
2199    )
2200});
2201
2202
2203let oneToOneFormBlock = document.querySelectorAll(".oneToOneConsult_form");
2204
2205oneToOneFormBlock.forEach((block) => {
2206  let tl = gsap.timeline({
2207    scrollTrigger: {
2208      trigger: block,
2209      // markers: true,
2210      start: "top 70%",
2211      toggleActions: "play none none none",
2212    },
2213  });
2214
2215  tl
2216    .from(
2217      block.querySelector(".head"),
2218      {
2219        opacity: 0,
2220        y: 20,
2221        duration: 1.2,
2222        stagger: 0.2,
2223        ease: "power2.out",
2224        delay: 0.2,
2225      },
2226      "<"
2227    )
2228    .from(
2229      block.querySelectorAll(".block > div"),
2230      {
2231        opacity: 0,
2232        y: 20,
2233        duration: 1.2,
2234        stagger: 0.2,
2235        ease: "power2.out",
2236        delay: 0.2,
2237      },
2238      "<"
2239    )
2240
2241});
2242
2243
2244let oneToOneCallUsBlock = document.querySelectorAll(".oneToOneConsult_bookNow");
2245
2246oneToOneCallUsBlock.forEach((block) => {
2247  let tl = gsap.timeline({
2248    scrollTrigger: {
2249      trigger: block,
2250      // markers: true,
2251      start: "top 70%",
2252      toggleActions: "play none none none",
2253    },
2254  });
2255
2256  tl
2257    .from(
2258      block.querySelectorAll(".content  > div"),
2259      {
2260        opacity: 0,
2261        y: 20,
2262        duration: 1.2,
2263        stagger: 0.1,
2264        ease: "power2.out",
2265        delay: 0.2,
2266      },
2267      "<"
2268    )
2269
2270
2271});
2272
2273// !faq page 
2274
2275let faqBannerAndListBlock = document.querySelectorAll(".faq");
2276
2277faqBannerAndListBlock.forEach((block) => {
2278  let tl = gsap.timeline({
2279    scrollTrigger: {
2280      trigger: block,
2281      // markers: true,
2282      start: "top 70%",
2283      toggleActions: "play none none none",
2284    },
2285  });
2286
2287  tl
2288    .from(
2289      block.querySelector(".head > h1"),
2290      {
2291        opacity: 0,
2292        y: 20,
2293        duration: 1.2,
2294        stagger: 0.1,
2295        ease: "power2.out",
2296        delay: 0.2,
2297      },
2298      "<"
2299    )
2300    .from(
2301      block.querySelectorAll(".block > div"),
2302      {
2303        opacity: 0,
2304        y: 20,
2305        duration: 1.2,
2306        stagger: 0.2,
2307        ease: "power2.out",
2308        delay: 0.2,
2309      },
2310      "<"
2311    )
2312
2313
2314});
2315
2316
2317// !blog list page 
2318
2319
2320let blogListBannerBlock = document.querySelectorAll(".blogs_banner");
2321
2322blogListBannerBlock.forEach((block) => {
2323  let tl = gsap.timeline({
2324    scrollTrigger: {
2325      trigger: block,
2326      // markers: true,
2327      start: "top 70%",
2328      toggleActions: "play none none none",
2329    },
2330  });
2331
2332  tl
2333    .from(
2334      block.querySelectorAll(":scope > div"),
2335      {
2336        opacity: 0,
2337        y: 20,
2338        duration: 1.2,
2339        stagger: 0.1,
2340        ease: "power2.out",
2341        delay: 0.2,
2342      },
2343      "<"
2344    )
2345
2346
2347});
2348
2349let blogListSlideBlock = document.querySelectorAll(".blogs_list");
2350
2351blogListSlideBlock.forEach((block) => {
2352  let tl = gsap.timeline({
2353    scrollTrigger: {
2354      trigger: block,
2355      // markers: true,
2356      start: "top 70%",
2357      toggleActions: "play none none none",
2358    },
2359  });
2360
2361  tl
2362    .from(
2363      block.querySelectorAll(".head h1"),
2364      {
2365        opacity: 0,
2366        y: 20,
2367        duration: 1.2,
2368        stagger: 0.1,
2369        ease: "power2.out",
2370        delay: 0.2,
2371      },
2372      "<"
2373    )
2374    .from(
2375      block.querySelectorAll(".list"),
2376      {
2377        opacity: 0,
2378        y: 20,
2379        duration: 1.2,
2380        stagger: 0.1,
2381        ease: "power2.out",
2382        delay: 0.2,
2383      },
2384      "<"
2385    )
2386
2387
2388});
2389
2390
2391// !blog single page 
2392
2393
2394
2395let blogSingleBannerBlock = document.querySelectorAll(".blog_head");
2396
2397blogSingleBannerBlock.forEach((block) => {
2398  let tl = gsap.timeline({
2399    scrollTrigger: {
2400      trigger: block,
2401      // markers: true,
2402      start: "top 70%",
2403      toggleActions: "play none none none",
2404    },
2405  });
2406
2407  tl
2408    .from(
2409      block.querySelectorAll(" h1"),
2410      {
2411        opacity: 0,
2412        y: 20,
2413        duration: 1.2,
2414        stagger: 0.1,
2415        ease: "power2.out",
2416        delay: 0.2,
2417      },
2418      "<"
2419    )
2420    .from(
2421      block.querySelectorAll("p"),
2422      {
2423        opacity: 0,
2424        y: 20,
2425        duration: 1.2,
2426        stagger: 0.1,
2427        ease: "power2.out",
2428        delay: 0.2,
2429      },
2430      "<"
2431    )
2432    .from(
2433      block.querySelectorAll("img"),
2434      {
2435        opacity: 0,
2436        y: 20,
2437        duration: 1.2,
2438        stagger: 0.1,
2439        ease: "power2.out",
2440        delay: 0.2,
2441      },
2442      "<"
2443    )
2444
2445});
2446
2447
2448
2449
2450
2451let blogSingleParaBlock = document.querySelectorAll(".blog_para");
2452
2453blogSingleParaBlock.forEach((block) => {
2454  let tl = gsap.timeline({
2455    scrollTrigger: {
2456      trigger: block,
2457      // markers: true,
2458      start: "top 70%",
2459      toggleActions: "play none none none",
2460    },
2461  });
2462
2463  tl
2464    .from(
2465      block.querySelectorAll(" p"),
2466      {
2467        opacity: 0,
2468        y: 20,
2469        duration: 1.2,
2470        stagger: 0.1,
2471        ease: "power2.o
2471ut",
2472        delay: 0.2,
2473      },
2474      "<"
2475    )
2476
2477
2478});
2479
2480
2481
2482let blogSingleBuyInsuranceBlock = document.querySelectorAll(".blog_insurance");
2483
2484blogSingleBuyInsuranceBlock.forEach((block) => {
2485  let tl = gsap.timeline({
2486    scrollTrigger: {
2487      trigger: block,
2488      // markers: true,
2489      start: "top 70%",
2490      toggleActions: "play none none none",
2491    },
2492  });
2493
2494  tl
2495    .from(
2496      block.querySelectorAll(".c1 h1"),
2497      {
2498        opacity: 0,
2499        y: 20,
2500        duration: 1.2,
2501        stagger: 0.1,
2502        ease: "power2.out",
2503        delay: 0.2,
2504      },
2505      "<"
2506    )
2507    .from(
2508      block.querySelectorAll(".c1 .button"),
2509      {
2510        opacity: 0,
2511        y: 20,
2512        duration: 1.2,
2513        stagger: 0.1,
2514        ease: "power2.out",
2515        delay: 0.2,
2516      },
2517      "<"
2518    )
2519    .from(
2520      block.querySelectorAll(".c2"),
2521      {
2522        opacity: 0,
2523        y: 20,
2524        duration: 1.2,
2525        stagger: 0.1,
2526        ease: "power2.out",
2527        delay: 0.2,
2528      },
2529      "<"
2530    )
2531
2532    .from(
2533      CSSRulePlugin.getRule(".blog_insurance .c2 .image::before"),
2534      {
2535
2536        delay: .5,
2537        cssRule: {
2538          opacity: 0,
2539
2540        }
2541      },
2542      "<"
2543    )
2544
2545});
2546
2547
2548
2549let blogSingleSlideBlock = document.querySelectorAll(".blogs_moreBlogs");
2550
2551blogSingleSlideBlock.forEach((block) => {
2552  let tl = gsap.timeline({
2553    scrollTrigger: {
2554      trigger: block,
2555      // markers: true,
2556      start: "top 70%",
2557      toggleActions: "play none none none",
2558    },
2559  });
2560
2561  tl
2562    .from(
2563      block.querySelectorAll(".head h1"),
2564      {
2565        opacity: 0,
2566        y: 20,
2567        duration: 1.2,
2568        stagger: 0.1,
2569        ease: "power2.out",
2570        delay: 0.2,
2571      },
2572      "<"
2573    )
2574    .from(
2575      block.querySelectorAll(".list"),
2576      {
2577        opacity: 0,
2578        y: 20,
2579        duration: 1.2,
2580        stagger: 0.1,
2581        ease: "power2.out",
2582        delay: 0.2,
2583      },
2584      "<"
2585    )
2586
2587
2588});
2589
2590
2591
2592
2593//! claim assistance form 
2594
2595
2596
2597
2598let claimAssistanceBannerBlock = document.querySelectorAll(".claimAssistance_form ");
2599
2600claimAssistanceBannerBlock.forEach((block) => {
2601  let tl = gsap.timeline({
2602    scrollTrigger: {
2603      trigger: block,
2604      // markers: true,
2605      start: "top 70%",
2606      toggleActions: "play none none none",
2607    },
2608  });
2609
2610  tl.from(
2611    block.querySelector(".head > h1"),
2612    {
2613      opacity: 0,
2614      y: 20,
2615      duration: 1.2,
2616      stagger: 0.2,
2617      ease: "power2.out",
2618      delay: 0.1,
2619    },
2620    "<"
2621  )
2622    .from(
2623      block.querySelector(".head > p"),
2624      {
2625        opacity: 0,
2626        y: 20,
2627        duration: 1.2,
2628        stagger: 0.2,
2629        ease: "power2.out",
2630        delay: 0.1,
2631      },
2632      "<"
2633    )
2634    .from(
2635      block.querySelectorAll(".block > div"),
2636      {
2637        opacity: 0,
2638        y: 20,
2639        duration: 1.2,
2640        stagger: 0.2,
2641        ease: "power2.out",
2642        delay: 0.1,
2643      },
2644      "<"
2645    )
2646
2647});
2648
2649
2650
2651// !contact us page 
2652
2653
2654let contactUsBannerBlock = document.querySelectorAll(".contactUs");
2655
2656contactUsBannerBlock.forEach((block) => {
2657  let tl = gsap.timeline({
2658    scrollTrigger: {
2659      trigger: block,
2660      // markers: true,
2661      start: "top 70%",
2662      toggleActions: "play none none none",
2663    },
2664  });
2665
2666  tl.from(
2667    block.querySelector(".head "),
2668    {
2669      opacity: 0,
2670      y: 20,
2671      duration: 1.2,
2672      stagger: 0.2,
2673      ease: "power2.out",
2674      delay: 0.1,
2675    },
2676    "<"
2677  )
2678
2679    .from(
2680      block.querySelectorAll(".block > div"),
2681      {
2682        opacity: 0,
2683        y: 20,
2684        duration: .5,
2685        stagger: 0.05,
2686        ease: "power2.out",
2687        delay: 0.1,
2688      },
2689      "<"
2690    )
2691
2692});
2693
2694
2695//! careers page 
2696
2697
2698
2699let careersBannerBlock = document.querySelectorAll(".careers_banner");
2700
2701careersBannerBlock.forEach((block) => {
2702  let tl = gsap.timeline({
2703    scrollTrigger: {
2704      trigger: block,
2705      // markers: true,
2706      start: "top 70%",
2707      toggleActions: "play none none none",
2708    },
2709  });
2710
2711  tl.from(
2712    block.querySelector(".c1 h1 "),
2713    {
2714      opacity: 0,
2715      y: 20,
2716      duration: 1.2,
2717      stagger: 0.2,
2718      ease: "power2.out",
2719      delay: 0.1,
2720    },
2721    "<"
2722  )
2723    .from(
2724      block.querySelectorAll(".c1 h2"),
2725      {
2726        opacity: 0,
2727        y: 20,
2728        duration: .5,
2729        stagger: 0.05,
2730        ease: "power2.out",
2731        delay: 0.1,
2732      },
2733      "<"
2734    )
2735    .from(
2736      block.querySelectorAll(".c1 p"),
2737      {
2738        opacity: 0,
2739        y: 20,
2740        duration: .5,
2741        stagger: 0.05,
2742        ease: "power2.out",
2743        delay: 0.1,
2744      },
2745      "<"
2746    )
2747    .from(
2748      block.querySelectorAll(".c2"),
2749      {
2750        opacity: 0,
2751        y: 20,
2752        duration: .5,
2753        stagger: 0.1,
2754        ease: "power2.out",
2755        delay: 0.1,
2756      },
2757      "<"
2758    )
2759    .from(
2760      CSSRulePlugin.getRule(".careers_banner .c2 .image::before"),
2761      {
2762
2763        delay: .5,
2764        cssRule: {
2765          opacity: 0,
2766
2767        }
2768      },
2769      "<"
2770    )
2771});
2772
2773
2774let careersLifeBlock = document.querySelectorAll(".careers_life");
2775
2776careersLifeBlock.forEach((block) => {
2777  let tl = gsap.timeline({
2778    scrollTrigger: {
2779      trigger: block,
2780      // markers: true,
2781      start: "top 70%",
2782      toggleActions: "play none none none",
2783    },
2784  });
2785
2786  tl.from(
2787    block.querySelector(".c1 .head h1 "),
2788    {
2789      opacity: 0,
2790      y: 20,
2791      duration: 1.2,
2792      stagger: 0.2,
2793      ease: "power2.out",
2794      delay: 0.1,
2795    },
2796    "<"
2797  )
2798    .from(
2799      block.querySelectorAll(".c1 .block"),
2800      {
2801        opacity: 0,
2802        y: 20,
2803        duration: .5,
2804        stagger: 0.1,
2805        ease: "power2.out",
2806        delay: 0.1,
2807      },
2808      "<"
2809    )
2810    .from(
2811      block.querySelectorAll(".c2"),
2812      {
2813        opacity: 0,
2814        y: 20,
2815        duration: .5,
2816        stagger: 0.05,
2817        ease: "power2.out",
2818        delay: 0.1,
2819      },
2820      "<"
2821    )
2822
2823
2824});
2825
2826
2827let careersFormBlock = document.querySelectorAll(".careers_form");
2828
2829careersFormBlock.forEach((block) => {
2830  let tl = gsap.timeline({
2831    scrollTrigger: {
2832      trigger: block,
2833      // markers: true,
2834      start: "top 70%",
2835      toggleActions: "play none none none",
2836    },
2837  });
2838
2839  tl.from(
2840    block.querySelector(".block "),
2841    {
2842      opacity: 0,
2843      y: 20,
2844      duration: 1.2,
2845      stagger: 0.2,
2846      ease: "power2.out",
2847      delay: 0.1,
2848    },
2849    "<"
2850  )
2851
2852
2853});
2854
2855
2856// !number flip 
2857
2858let aboutBannerNum = document.querySelector('.aboutUs_banner')
2859
2860if (
2861  aboutBannerNum
2862) {
2863
2864
2865
2866  var counterNum = '20';
2867
2868  $(document).ready(function () {
2869    counterControl($('.aboutUs_banner .num h1'), counterNum);
2870
2871    // counterControl( $('.userImgNumBar') , counterNum , {
2872    // 	isDigitBg : true,
2873    // 	comma: true
2874    // });
2875  });
2876
2877  function counterControl(target, number, config) {
2878    var _target = target;
2879    var number = number.toString();
2880    var numArray = number.split("");
2881    var isBg = false;
2882    var defaults = {
2883      speed: 3000,
2884      isDigitBg: false,
2885      comma: true
2886    }
2887    $.extend(defaults, config);
2888
2889    _target.empty();
2890    _target.html('<span class="pplNum"></span>');
2891
2892    for (var i = 0; i < numArray.length; i++) {
2893      var html = '';
2894      numArray[i] = parseInt(numArray[i], 10);
2895      if (defaults.isDigitBg) {
2896        html = '<span class="digit-con"><span class="digit' + i + '"></span></span>';
2897      } else {
2898        html = '<span class="digit-con"><span class="digit' + i + '">0<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>0<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br></span></span>';
2899      }
2900      _target.find('.pplNum').append(html);
2901    }
2902
2903    if (defaults.comma) {
2904      _target.find(".digit-con:nth-last-child(3n+4)").after("<span class='comma'>,</a>");
2905    }
2906
2907    checkScroll();
2908
2909    $(window).bind('scroll', function () {
2910      checkScroll();
2911    });
2912
2913    function checkScroll() {
2914      if (_target.offset().top < $(window).scrollTop() + $(window).height()) {
2915        for (var i = 0; i < numArray.length; i++) {
2916          var increment = _target.find('.digit-con').outerHeight();
2917          _target.find('.digit' + i).delay(i * 300).animate({ top: -((increment * numArray[i]) + (increment * 10)) }, defaults.speed, 'linear');
2918        }
2919      }
2920    }
2921
2922  }
2923}
2924
2925
2926
2927//! BLogs listing page ajax =======================
2928
2929
2930
2931
2932// let insightSearchBtn = document.querySelector('#insightSearch');
2933
2934// let blogViewMore = document.querySelector('#jobsShowMore');
2935
2936let blogCategorySelect = document.querySelectorAll('.home-blogs .c1 .catFilter h1'); 
2937
2938
2939let blogPostPerPage = 4; // Set the initial number of posts per page
2940
2941let blogCategory = '';
2942
2943let serviceLinks = document.querySelectorAll('.serviceCategory');
2944
2945// Set up the event listener on service links to store selected category in sessionStorage
2946serviceLinks.forEach(item => {
2947  item.addEventListener('click', function () {
2948    let category = this.dataset.category;
2949
2950    // Replace or set new session value
2951    sessionStorage.setItem('selectedCategory', category);
2952
2953    console.log('Updated selectedCategory in sessionStorage:', category);
2954
2955    // Automatically trigger the category selection in the blog filter
2956    blogCategory = category;
2957    fetchBlogPost(blogCategory, blogPostPerPage);
2958
2959
2960    
2961  });
2962});
2963
2964setTimeout(() => {
2965  sessionStorage.removeItem('selectedCategory');
2966
2967}, 2000);
2968
2969// Automatically highlight the correct category from sessionStorage if it exists
2970const savedCategory = sessionStorage.getItem('selectedCategory');
2971if (savedCategory) {
2972  blogCategory = savedCategory;
2973
2974  blogCategorySelect.forEach(function (item) {
2975    item.classList.remove('active');
2976    if (item.dataset.id === savedCategory) {
2977      item.classList.add('active');
2978    }
2979  });
2980} else {
2981  if (blogCategorySelect.length > 0) {
2982    // Set the first category as active if no saved category
2983    blogCategorySelect[0].classList.add('active');
2984    blogCategory = blogCategorySelect[0].dataset.id;
2985  }
2986}
2987
2988// Fetch the blog posts based on the selected category
2989fetchBlogPost(blogCategory, blogPostPerPage);
2990
2991
2992function fetchBlogPost(categoryId = '', postsPerPage = 4, ) {
2993  const resultsContainer = document.querySelector('.home-blogs .c2');
2994
2995  // console.log(resultsContainer);
2996  
2997  jQuery.ajax({
2998    type: 'post',
2999    url: `${window.location.origin}/wp-admin/admin-ajax.php`,
3000    data: {
3001      action: 'blogFilter',
3002      ajax_data: {
3003        categoryId: categoryId,
3004        postCount: postsPerPage,
3005       
3006      }
3007    },
3008    beforeSend: function () {
3009      if (resultsContainer) {
3010        resultsContainer.innerHTML += `
3011      <div class="insight-loader" style="
3012  position: absolute;
3013  top: 50%;
3014  left: 50%;
3015  transform: translate(-50%, -50%);
3016  display: flex;
3017  justify-content: center;
3018  align-items: center;
3019  padding: 2rem;
3020  z-index: 9999;
3021">
3022  <div class="spinner" style="
3023    width: 40px;
3024    height: 40px;
3025    border: 4px solid rgba(0, 0, 0, 0.1);
3026    border-left-color: #000;
3027    border-radius: 50%;
3028    animation: spin 1s linear infinite;
3029  "></div>
3030</div>
3031
3032<style>
3033  @keyframes spin {
3034    0%   { transform: rotate(0deg); }
3035    100% { transform: rotate(360deg); }
3036  }
3037</style>
3038      `;
3039      }
3040    },
3041    complete: function (response) {
3042
3043        // console.log(response);
3044        
3045
3046      if (resultsContainer) {
3047
3048
3049        resultsContainer.innerHTML = ''; // Clear the loader
3050      }
3051
3052      if (response.responseJSON && Array.isArray(response.responseJSON.posts) && response.responseJSON.posts.length > 0) {
3053        response.responseJSON.posts.forEach(post => {
3054          const cardTemplate = `
3055             <div>
3056          <a href="${post.url}" class="block">
3057            <div class="image">
3058
3059          
3060             <img src="${post.imageUrl}" onerror="this.onerror=null;this.src='https://hareepatti.com/wp-content/themes/hareepatti/assets/images/default-fallback-image.png';" alt="" />
3061            </div>
3062             <div class="text">
3063                <p>${post.title}</p>
3064                     <h1>${post.excerpt}</h1>
3065              </div>
3066          </a>
3067        </div>
3068                    `;
3069
3070          if (resultsContainer) {
3071            resultsContainer.innerHTML += cardTemplate;
3072          }
3073        });
3074
3075        // if (!response.responseJSON.more_posts) {
3076        //   if(blogViewMore){
3077
3078        //     blogViewMore.style.display = 'none'; // Hide the "View More" button
3079        //   }
3080        // } else{
3081        //   if(blogViewMore){
3082
3083        //     blogViewMore.style.display = 'block'; 
3084        //   }
3085        // }
3086
3087
3088      } else {
3089        if (resultsContainer) {
3090          resultsContainer.innerHTML = '<p>No posts found.</p>';
3091        }
3092      }
3093    }
3094  });
3095}
3096
3097
3098
3099
3100
3101blogCategorySelect.forEach( function(cat) {
3102
3103    cat.addEventListener('click', function(){
3104
3105      
3106      
3107        blogCategory = this.dataset.id;
3108
3109        blogPostPerPage=   4 ;
3110
3111        blogCategorySelect.forEach(function (item) {
3112            item.classList.remove('active');
3113          });
3114      
3115    
3116          
3117          // Add 'active' to the clicked one
3118          this.classList.add('active');
3119     
3120          fetchBlogPost(blogCategory, blogPostPerPage);
3121       
3122    })
3123});
3124
3125
3126document.addEventListener('wpcf7mailsent', function(event) {
3127    alert("Thank you! Your form was submitted successfully.");
3128  }, false);
3129
3130
3131// blogViewMore?.addEventListener('click', function (e) {
3132//   e.preventDefault();
3133
3134//   let blogCat = blogCategory ;
3135 
3136//   blogPostPerPage += 2;
3137
3138//   console.log(blogCat, blogPostPerPage);
3139
3140//   fetchBlogPost(blogCat, blogPostPerPage);
3141// });

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.