// Scroll to Top
document.addEventListener('DOMContentLoaded', () => {
  const green_market_btn = document.body.appendChild(document.createElement('button'));
  green_market_btn.className = 'return-to-top-btn';
  green_market_btn.innerHTML = '<span class="dashicons dashicons-arrow-up-alt"></span>';

  window.addEventListener('scroll', () =>
    green_market_btn.classList.toggle('show', window.scrollY > 300)
  );

  green_market_btn.onclick = () => window.scrollTo({ top: 0, behavior: 'smooth' });
});

// Main Slider Js
jQuery(document).ready(function(){
  var owl = jQuery('.owl-carousel');
    owl.owlCarousel({
    margin: 20,
    nav: true,
    navText: ["<span class='dashicons dashicons-arrow-left-alt'></span>", "<span class='dashicons dashicons-arrow-right-alt'></span>"],
    autoplay: true,
    autoplayTimeout: 3000,
    lazyLoad: true,
    loop: true,
    dots: false,
    responsive: {
      0: {
        items: 1
      },
      600: {
        items: 1
      },
      1000: {
        items: 1
      }
    },
    mouseDrag: true
  });
});