jQuery(document).ready(function() {
  jQuery('.services-section .owl-carousel').owlCarousel({
    loop: true,
    margin: 20,
    nav: false,
    navText: ["<span class='left-btn p-3'></span>", "<span class='right-btn p-3'></span>"], 
    dots: false,
    rtl: false,
    responsive: {
    300: { 
      items: 1 
    },
    768: { 
      items: 2
    },
    992: { 
      items: 4.5 
    },
    1200: { 
      items: 5.5 
    }
  },
  autoplay: true,
  });
});

jQuery(document).ready(function() {
  jQuery('.testimonial-section .owl-carousel').owlCarousel({
    loop: true,
    margin: 15,
    nav: true,
    navText: ["<span class='left-btn p-3'></span>", "<span class='right-btn p-3'></span>"], 
    dots: false,
    rtl: false,
    responsive: {
    0: { 
      items: 1 
    },
    768: { 
      items: 2 
    },
    992: { 
      items: 2 
    },
    1200: { 
      items: 3 
    }
  },
  autoplay: true,
  });
});

var owl = jQuery('.our-slider .owl-carousel');
  if (owl.length > 0) {
  owl.owlCarousel({
    margin: 25,
    nav:false,
    dots:true,
    center:true,
    autoplay: true,
    lazyLoad: true,
    autoplayTimeout: 4000,
    center: true,
    loop: true,
    navText: ["<span class='left-btn p-3'></span>", "<span class='right-btn p-3'></span>"], 
    responsive: {
      0: {
        items: 1,
            autoplay: false,
      },
      768: {
        items: 1,
        stagePadding: 100
      },
      1400: {
        items: 1,
        stagePadding: 200,
      },
      1600: {
        items: 1,
        stagePadding: 300,
      },
      1800: {
        items: 1,
        stagePadding: 250,
      },
    },
    autoplayHoverPause: true,
    mouseDrag: true
  });
}

// Scroll to Top
window.onscroll = function() {
  const translation_service_button = document.querySelector('.scroll-top-box');
  if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
    translation_service_button.style.display = "block";
  } else {
    translation_service_button.style.display = "none";
  }
};

document.querySelector('.scroll-top-box a').onclick = function(event) {
  event.preventDefault();
  window.scrollTo({top: 0, behavior: 'smooth'});
};