// sticky navbar
window.addEventListener('scroll', function(){
    var header = document.querySelector('#navbar');

    if(!header.classList.contains('show')) {
        header.classList.toggle("sticky", window.scrollY > 200);
    }
  })


//   mobile menu
const navbar = document.querySelector('.navbar');

const mobileToogleBtn = document.querySelector('.mobile-toggle-btn')

if(navbar && mobileToogleBtn) {
    mobileToogleBtn.addEventListener('click', () => {
        navbar.classList.toggle('show')
    })
}

// mobile menu open



// carousel
          // job preparation carousel
          var jobPreparationSlider = new Swiper('.jobPreparationSlider', {
            loop: true,
            slidesPerView: 3,
            spaceBetween: 24,
            loopedSlides: 1,
            breakpoints: { 
              0: { 
                slidesPerView: 1,
    
              },
              576: { 
                slidesPerView: 2,
              },
              993: { 
                slidesPerView: 3,
    
              }
            },
            navigation: {
              nextEl: ".jobPreparationSlider-next",
              prevEl: ".jobPreparationSlider-prev",
            },
          });

          // our blog carousel
          var ourBlogSlider = new Swiper('.ourBlogSlider', {
            loop: true,
            slidesPerView: 3,
            spaceBetween: 24,
            loopedSlides: 1,
            breakpoints: { 
              0: { 
                slidesPerView: 1,
    
              },
              576: { 
                slidesPerView: 2,
              },
              993: { 
                slidesPerView: 4,
    
              }
            },
            navigation: {
              nextEl: ".ourBlogSlider-next",
              prevEl: ".ourBlogSlider-prev",
            },
          });

          // on this day carousel
          var onThisDay = new Swiper('.onThisDay', {
            loop: true,
            slidesPerView: 1,
            spaceBetween: 40,
            loopedSlides: 1,
            navigation: {
              nextEl: ".onThisDay-next",
              prevEl: ".onThisDay-prev",
            },
          });
// carousel end