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

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

/*------------------------------------------------
              Homepage slider
------------------------------------------------*/
jQuery(document).ready(function() {
  jQuery('.main-banner-section .owl-carousel').owlCarousel({
    loop: true,
    margin: 20,
    nav: true,
    dots: true,
    rtl: false,
    items: 1,
    autoplay: false,
  });
});