<!-- start Simple Custom CSS and JS -->
<script type="text/javascript">
window.addEventListener("scroll", function () {
  const header = document.querySelector(".header-section");
 
  if (!header) return;
 
  if (window.scrollY > 50) {
    header.classList.add("sticky-header");
  } else {
    header.classList.remove("sticky-header");
  }
});


jQuery(document).on('click', '.apply-btn .elementor-button', function(e)		 {
	  e.preventDefault();
         var postTitle = jQuery(this).parents('.career-card').find('.career-title h3').text();
	 	localStorage.setItem('globalPostTitle', postTitle);
	   window.location.href = "/job-apply/";
 });


jQuery(window).on('load', function() {
    setTimeout(function() {
        var globalPostTitle = localStorage.getItem('globalPostTitle');
        console.log(globalPostTitle);
        if (globalPostTitle) {
            var jobInput = document.querySelector(".selectedJob");
            var jobTitle = document.querySelector(".selectedJobTitle");
            if (jobInput) {
                jobInput.value = globalPostTitle;
                jobTitle.innerText = globalPostTitle;
            }
        }
    }, 100);
});


jQuery(window).on('load', function () {
    setTimeout(function () {

        jQuery('service-slider .elementskit-testimonial-slider .ekit-main-swiper').each(function () {
            var swiper = this.swiper;

            if (swiper) {
                // Fix 1024px - show 3 slides
                swiper.params.breakpoints[1024] = {
                    slidesPerView: 3,
                    slidesPerGroup: 2,
                    spaceBetween: 15
                };

                // Fix 1280px - show 4 slides
                swiper.params.breakpoints[1280] = {
                    slidesPerView: 4,
                    slidesPerGroup: 2,
                    spaceBetween: 15
                };
				
				   swiper.params.breakpoints[1366] = {
                    slidesPerView:5,
                    slidesPerGroup: 2,
                    spaceBetween: 15
                };

                // Apply changes
                swiper.update();
            }
        });

    }, 500); // wait for ElementsKit to initialize swiper first
});</script>
<!-- end Simple Custom CSS and JS -->
