  jQuery(document).ready(function () {
    
  // call init function
  initSwipers();

  function initSwipers(selector = "[data-swiper]") {
    let swipers = document.querySelectorAll(selector);
    swipers.forEach((swiper) => {
      // get options
      let optionsData = swiper.dataset.swiper
        ? JSON.parse(swiper.dataset.swiper)
        : {};
      // init
      new Swiper(swiper, optionsData);
    });
  }

  const tabs = document.querySelectorAll('[data-bs-toggle="tab"]')
  tabs.forEach(tab => {
    tab.addEventListener('click', (ev) => {
      setTimeout(() => {
        initSwipers();
      }, 10);
    })
  })

/*!
  * add to cart js
  */
    jQuery( "#tab-more_seller_product .col-sm-6.col-lg-4:nth-child(1),#tab-more_seller_product .col-sm-6.col-lg-4:nth-child(2),#tab-more_seller_product .col-sm-6.col-lg-4:nth-child(3),#tab-more_seller_product .col-sm-6.col-lg-4:nth-child(4),#tab-more_seller_product .col-sm-6.col-lg-4:nth-child(5),#tab-more_seller_product .col-sm-6.col-lg-4:nth-child(6)" ).wrapAll('<div class="row mt-4"></div>');
    jQuery("#tab-more_seller_product .col-sm-6.col-lg-4").removeClass( "col-lg-4" ).addClass( "col-lg-3" );
  
  jQuery('#theOutput').keypress(function (e) {
    if (e.which == 13) return false;
  });
  
  jQuery('#maninpu').keypress(function (e) {
    if (e.which == 13) return false;
  });
  
  jQuery('#butno').click(function () {
    // custom handling here
    return false;
  });


if(document.querySelector('.vsup')){
    jQuery('.wpcvs-term span').click(function() {
      var ariaLabel = jQuery(this).closest('.wpcvs-term').attr('aria-label');
      var amir2 = jQuery('.wpcvs-term[aria-label="' + ariaLabel + '"]')[1];
      amir2.click();

      // Get the first div
      var firstDiv = jQuery(".woocommerce-variation-price");

      // Get all the children of the first div and clone them
      var children = firstDiv.children().clone();
  
      // Get the second div
      var secondDiv = jQuery(".price.d-flex.align-items-center.mt-3.mt-sm-0");
  
      if (jQuery('.woocommerce-variation-price').find('.woocommerce-Price-amount.amount').length > 0){
      // Append the cloned children of the first div to the second div
      jQuery(secondDiv).html(children);
      }
    });
  }

  if(document.querySelector('.detail-product-three')){
  	jQuery('.variations').on('change', function() {
  // Run your code here to handle the changes
  // Get the first div
      var firstDiv = jQuery(".woocommerce-variation-price");

      // Get all the children of the first div and clone them
      var children = firstDiv.children().clone();
  
      // Get the second div
      var secondDiv = jQuery(".price.d-flex.align-items-center.mt-3.mt-sm-0");
  
      if (jQuery('.woocommerce-variation-price').find('.woocommerce-Price-amount.amount').length > 0){
      // Append the cloned children of the first div to the second div
      jQuery(secondDiv).html(children);
      }
		
});
  }
  
    
    jQuery('.amazing-offer-seven-item .btns .btn-add-favorite').on('click', function() {
      var nearestWooswBtn = jQuery(this).closest('.amazing-offer-seven-item').find('.woosw-btn')['0'];
      nearestWooswBtn.click();
    });
    jQuery('.swiper-slide-active .amazing-offer-seven-item .btns .btn').on('click', function() {
      var nearestWooswBtn = jQuery(this).closest('.amazing-offer-seven-item').find('.woosw-btn')['0'];
      nearestWooswBtn.click();
    });


    

    // Open Cart Sliding
    const btnCartSliding = document.querySelectorAll('[data-open-cart="true"]'),
      cartSliding = document.querySelector("body .cart-sliding"),
      closeCartSliding = document.querySelector(
        "body .cart-sliding-backdrop"
      )

    if (btnCartSliding.length > 0) {
      btnCartSliding.forEach((btn) => {
        btn.addEventListener("click", (ev) => {
          ev.preventDefault();

          cartSliding.classList.add("opened");
        });
      });
    }
 
    if (closeCartSliding) {
      closeCartSliding.addEventListener("click", () => {
        cartSliding.classList.remove("opened");
      });
    }

    document.addEventListener('click', event => {
      const clickedElement = event.target;
    
      if (clickedElement.matches('body .cart-sliding .btn .icon-close')) {
        // Code to execute when the close button is clicked
        cartSliding.classList.remove('opened');
      }
    });
    
  
  /*!
    * Main JS
    */
  
    const htmlTag = document.documentElement;

    
// Nav Responsive
const btnNavRes = document.querySelector('.btn-nav-kheader'),
navRes = document.querySelector('.nav-mobile-six-menu'),
navResitemsHasChild = document.querySelectorAll('.nav-mobile-six-menu-content .menu li.has-child > a'),
navResbackBtn = document.querySelectorAll('.nav-mobile-six-menu-content .menu li ul li.back'),
navResSocials = document.querySelector('.nav-mobile-six-menu-socials'),
navResBottom = document.querySelector('.nav-mobile-six-bottom');
navkBottom = document.querySelector('.nav-bottom');
senav = document.querySelector('.nav-mobile-eight-down');
senavcontainer = document.querySelector('.mykheader');


if (btnNavRes) {
btnNavRes.addEventListener('click', () => {
  navRes.classList.toggle('opened');
  navResBottom.classList.toggle('opened');
  navkBottom.classList.toggle('d-none');
  senav.classList.toggle('d-none');
  senavcontainer.style.padding = '18px 10px';
})
}

if (navResitemsHasChild.length > 0) {
navResitemsHasChild.forEach(item => {
  item.addEventListener('click', (ev) => {
    ev.preventDefault();

    const el = ev.currentTarget,
      content = el.nextElementSibling;

    if (content) {
      content.classList.add('opened');
      navResSocials.classList.add('opened');
    }
  })
})
}

if (navResbackBtn.length > 0) {
navResbackBtn.forEach(btnBack => {
  btnBack.addEventListener('click', (ev) => {
    const el = ev.currentTarget,
      parent = el.parentElement;

    if (parent) {
      parent.classList.remove('opened')
      navResSocials.classList.remove('opened')
    }
  })
})
}






  // Nav Responsive
  const btnavcustom = document.querySelectorAll(".boostify-menu-toggle")
  const btnNavResponsive = document.querySelector(".btn-nav-kkheader")
  navResponsive = document.querySelector(".nav-responsive")
  contentNavResponsive = document.querySelector(".nav-responsive-content")
  closeNavResponsive = document.querySelector(".nav-responsive-close")
  backNavResponsive = document.querySelectorAll(".nav-responsive-back");
  
  childrenNavResponsive = document.querySelectorAll(
    ".nav-responsive-content-menu > li.has-child > a > .icon-angle-left"
  ),
  
  childrenTwoNavResponsive = document.querySelectorAll(
    ".nav-responsive-content-menu > li.has-child > .children > ul > li.has-child > a > .icon-angle-left"
  );
  childrenThreeNavResponsive = document.querySelectorAll(
    ".nav-responsive-content-menu > li.has-child > .children > ul > li.has-child  > .children > ul > li.has-child > a > .icon-angle-left"
  );
  childrenFourNavResponsive = document.querySelectorAll(
    ".nav-responsive-content-menu > li.has-child > .children > ul > li.has-child  > .children > ul > li.has-child > .children > ul > li.has-child > a > .icon-angle-left"
  );

if (btnNavResponsive) {
  btnNavResponsive.addEventListener("click", () => {
    htmlTag.style.overflow = "hidden";

    navResponsive.classList.add("opened");
  });
}
for (i = 0; i < btnavcustom.length; ++i) {
   
  if (btnavcustom[i]) {
      btnavcustom[i].addEventListener("click", () => {
        htmlTag.style.overflow = "hidden";
        navResponsive.classList.add("opened");
      });
    }
}	


if (closeNavResponsive) {
  closeNavResponsive.addEventListener("click", () => {
    navResponsive.classList.remove("opened");
      htmlTag.style.overflow = null;
      
  });
}

if (childrenNavResponsive.length > 0) { 
  childrenNavResponsive.forEach((item) => { 
    item.addEventListener("click", (ev) => { 
      ev.preventDefault(); 

      const el = ev.currentTarget, 
        children = el.parentNode.nextElementSibling; 

      children.classList.add("opened"); 

      contentNavResponsive.scrollTo({ top: 0, behavior: "smooth" }); 
      contentNavResponsive.classList.add("opened-children"); 
    }); 
  }); 
}



if (childrenTwoNavResponsive.length > 0) {
  childrenTwoNavResponsive.forEach((item) => {
    item.addEventListener("click", (ev) => {
   
        ev.preventDefault();

        const el = ev.currentTarget,
        children = el.parentNode.nextElementSibling; 

        children.classList.add("opened");

        contentNavResponsive.scrollTo({ top: 0, behavior: "smooth" });
        contentNavResponsive.classList.add("opened-children");
     
      
    });
  });
}

if (childrenThreeNavResponsive.length > 0) {
  childrenThreeNavResponsive.forEach((item) => {
    item.addEventListener("click", (ev) => {
      
        ev.preventDefault();

        const el = ev.currentTarget,
        children = el.parentNode.nextElementSibling; 

        children.classList.add("opened");

        contentNavResponsive.scrollTo({ top: 0, behavior: "smooth" });
        contentNavResponsive.classList.add("opened-children");
     
      
    });
  });
}

if (childrenFourNavResponsive.length > 0) {
  childrenFourNavResponsive.forEach((item) => {
    item.addEventListener("click", (ev) => {
      
        ev.preventDefault();

        const el = ev.currentTarget,
        children = el.parentNode.nextElementSibling; 

        children.classList.add("opened");

        contentNavResponsive.scrollTo({ top: 0, behavior: "smooth" });
        contentNavResponsive.classList.add("opened-children");
     
      
    });
  });
}

if (backNavResponsive.length > 0) {
  backNavResponsive.forEach((btnBack) => {
    btnBack.addEventListener("click", (ev) => {
      const el = ev.currentTarget,
        parent = el.closest(".children");

      parent.classList.remove("opened");

      contentNavResponsive.classList.remove("opened-children");
    });
  });
}

const scrollTo = document.querySelectorAll("[data-scroll-to]");

if (scrollTo.length > 0) {
  scrollTo.forEach((item) => {
    item.addEventListener("click", (ev) => {
      const el = ev.currentTarget,
        { scrollTo } = el.dataset,
        content = document.querySelector(scrollTo);

      if (content) {
        content.scrollIntoView({ block: "start", behavior: "smooth" });
      }
    });
  });
}




    // Tooltip
    const tooltipTriggerList = document.querySelectorAll(
      '[data-bs-toggle="tooltip"]'
    );
  
    const tooltipList = [...tooltipTriggerList].map(
      (tooltipTriggerEl) => new bootstrap.Tooltip(tooltipTriggerEl)
    );


    
    jQuery(document).on('click', '.modal-body .gallery-item img', function (e) {
    // Attach click event handler to images in .swiper-product-2
      e.preventDefault();
      // Get the src attribute of the clicked image
      var clickedSrc = jQuery(this).attr('src');
      // Update the src attribute of the corresponding image in .swiper-product-1
      jQuery('.modal-body .gallery-origin img').attr('src', clickedSrc);
    });


  
    // Review Product
    const btnReviewProduct = document.querySelector(
      ".detail-product-review .btn"
    ),
    contentReview = document.querySelector(".detail-product-review-content");
  
  if (btnReviewProduct) {
    const heightContentReview = contentReview.clientHeight;
  
    btnReviewProduct.addEventListener("click", (ev) => {
      const el = ev.currentTarget;
  
      if (!el.classList.contains("opened")) {
        el.classList.add("opened");
        el.innerHTML = "نمایش کمتر <i class='icon-angle-up'></i>";
  
        contentReview.style.height = contentReview.scrollHeight + "px";
  
        setTimeout(() => {
          contentReview.style.height = "auto";
        }, 300);
      } else {
        el.classList.remove("opened");
        el.innerHTML = "نمایش بیشتر <i class='icon-angle-down'></i>";
  
        contentReview.style.height = contentReview.scrollHeight + "px";
  
        setTimeout(() => {
          contentReview.style.height = heightContentReview + "px";
        }, 10);
      }
    });
  }

  
  
    // Search Boxes
      const btnSearchList = document.querySelectorAll(".top-header-four-btn-search"),
      searchBoxList = document.querySelectorAll(".top-header-four-search");

      btnSearchList.forEach((btnSearch, index) => {
      const searchBox = searchBoxList[index];
      const backdropSearchBox = searchBox.querySelector(".backdrop");

      btnSearch.addEventListener("click", () => {
        searchBox.classList.add("opened");
      });

      backdropSearchBox.addEventListener("click", () => {
        searchBox.classList.remove("opened");
      });
      });


      if(document.querySelector(".detail-blog .like-share")){
        // Fixed Like Detail Blog
        const likeDetailBlog = document.querySelector(".detail-blog .like-share");
      
        if (likeDetailBlog) {
          const offsetLikeDetailBlog =
              likeDetailBlog.offsetTop + likeDetailBlog.scrollHeight,
            contentDetailBlog = document.querySelector(".detail-blog-wrapper"),
            heightContentDetailBlog =
              contentDetailBlog.offsetTop + contentDetailBlog.scrollHeight;
      
          window.addEventListener("scroll", () => {
            if (
              window.scrollY > offsetLikeDetailBlog + 35 &&
              window.scrollY < heightContentDetailBlog &&
              window.outerWidth > 991
            ) {
              likeDetailBlog.classList.add("fix");
            } else {
              likeDetailBlog.classList.remove("fix");
            }
          });
        }
      }
  



    // Swiper Top Selling Products
    new Swiper(".swiper-detail-product-four-related", {
      watchSlidesProgress: true,
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
      pagination: {
        el: ".swiper-pagination",
        type: "bullets",
        clickable: true,
      },
      breakpoints: {
        320: {
          slidesPerView: 2,
          spaceBetween: 8,
        },
        500: {
          slidesPerView: 2,
          spaceBetween: 12,
        },
        768: {
          slidesPerView: 3,
          spaceBetween: 12,
        },
        992: {
          slidesPerView: 4,
          spaceBetween: 20,
        },
        1200: {
          slidesPerView: 4,
          spaceBetween: 30,
        },
      },
    });



  // Swiper Discount Products
  const move = () => {
    const elem = document.querySelectorAll(".swiper__progress");

    elem.forEach((item) => {
      let width = 1;
      const autoplayTime = 5000 / 100;
      const id = setInterval(() => {
        if (width >= 100) {
          clearInterval(id);
        } else {
          width++;
          item.style.width = width + "%";
        }
      }, autoplayTime);
    });
  };

  new Swiper(".swiper-discount-products", {
    slidesPerView: 1,
    spaceBetween: 0,
    loop: true,
    autoplay: {
      delay: 5000,
      disableOnInteraction: false,
    },
    effect: "fade",
    fadeEffect: {
      crossFade: true,
    },
    on: {
      progress: () => {
        move();
      },
    },
  });

  
    // Open Description Product Two
    const btnDescriptionProduct = document.querySelector(
      ".detail-product-two-review .btn"
    );
  
    if (btnDescriptionProduct) {
      btnDescriptionProduct.addEventListener("click", (ev) => {
        const el = ev.currentTarget,
          content = el.previousElementSibling;
  
        content.classList.toggle("open");
  
        if (content.classList.contains("open")) {
          content.style.height = content.scrollHeight + "px";
          el.innerHTML = 'نمایش کمتر<i class="icon-angle-up"></i>';
  
          setTimeout(() => {
            content.style.height = "auto";
          }, 300);
        } else {
          content.style.height = content.scrollHeight + "px";
          el.innerHTML = 'نمایش بیشتر<i class="icon-angle-down"></i>';
  
          setTimeout(() => {
            content.removeAttribute("style");
          }, 10);
        }
      });
    }
  
  
    // Scroll To Header
    const btnScrollToHeader = document.querySelector('[data-to-header="true"]');
  
    if (btnScrollToHeader) {
      btnScrollToHeader.addEventListener("click", () => {
        window.scrollTo({ top: 0, behavior: "smooth" });
      });
    }
  
    // Swiper Products Panel
    new Swiper(".swiper-products-panel", {
      breakpoints: {
        320: {
          slidesPerView: "auto",
          spaceBetween: 8,
          pagination: {
            el: ".swiper-pagination",
            type: "bullets",
            clickable: true,
          },
        },
        370: {
          slidesPerView: "auto",
          spaceBetween: 12,
          pagination: {
            el: ".swiper-pagination",
            type: "bullets",
            clickable: true,
          },
        },
        768: {
          slidesPerView: "auto",
          spaceBetween: 20,
          grid: {
            fill: "row",
            rows: 2,
          },
        },
        992: {
          slidesPerView: "auto",
          spaceBetween: 32,
          grid: {
            fill: "row",
            rows: 2,
          },
        },
      },
    });
  
    const swiperDynamic = (className, navigation = false, pagination = false) => {
      const swiperEl = document.querySelectorAll(className);
  
      let options = {};
  
      if (navigation) {
        options.navigation = {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        };
      }
  
      if (pagination) {
        options.pagination = {
          el: ".swiper-pagination",
          type: "bullets",
          clickable: true,
        };
      }
  
      if (swiperEl.length > 0) {
        swiperEl.forEach((swiper) => {
          options.breakpoints = JSON.parse(swiper.dataset.breakpoints);
  
          new Swiper(swiper, options);
  
          swiper.removeAttribute("data-breakpoints");
        });
      }
    };
  
    // Swiper Products
    swiperDynamic(".swiper-products-test", true);
  
    // Timer
    const timer = document.querySelectorAll("[data-time]");
  
    const formatTime = (time) => {
      if (Number(time) < 10) {
        time = "0" + time;
      }
  
      return time;
    };
  
    if (timer.length > 0) {
      timer.forEach((time) => {
        const timeElement = time.dataset.time,
          secondElement = time.querySelector(".second"),
          minuteElement = time.querySelector(".minute"),
          hourElement = time.querySelector(".hour"),
          dayElement = time.querySelector(".day");
  
        const timear = setInterval(() => {
          const d = new Date(timeElement).getTime() - new Date().getTime();
  
          const second = Math.floor((d % (1000 * 60)) / 1000),
            minute = Math.floor((d % (1000 * 60 * 60)) / (1000 * 60)),
            hour = Math.floor((d % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)),
            day = Math.floor(d / (1000 * 60 * 60 * 24));
  
          if (d <= 0) {
            clearInterval(timear);
          } else {
            secondElement.textContent = formatTime(second);
            minuteElement.textContent = formatTime(minute);
            hourElement.textContent = formatTime(hour);
            dayElement.textContent = formatTime(day);
          }
        }, 500);
      });
    }
  
    // Sidebar Panel
    const btnOpenSidebarPanel = document.querySelectorAll(".panel-open-nav"),
      closeSidebarPanel = document.querySelector(".panel-sidebar-backdrop"),
      sidebarPanel = document.querySelector(".panel-sidebar");
  
    if (btnOpenSidebarPanel.length > 0) {
      btnOpenSidebarPanel.forEach((btn) => {
        btn.addEventListener("click", () => {
          sidebarPanel.classList.add("opened");
          htmlTag.style.overflow = "hidden";
        });
      });
  
      closeSidebarPanel.addEventListener("click", () => {
        sidebarPanel.classList.remove("opened");
        htmlTag.removeAttribute("style");
      });
    }
  
      
  
  
   
        
  
    // Megamenu
    const tabsMegamenu = document.querySelectorAll(
      ".megamenu-tabs span, .megamenu-two-tabs-item"
    );
  
    if (tabsMegamenu.length > 0) {
      tabsMegamenu.forEach((tab) => {
        tab.addEventListener("mouseover", (ev) => {
          const el = ev.currentTarget,
            id = el.dataset.target,
            content = document.getElementById(id);
  
          if (content) {
            [...el.parentElement.children].map((tabItems) => {
              const id = tabItems.dataset.target;
  
              tabItems.classList.remove("active");
              document.getElementById(id).classList.remove("active");
            });
  
            el.classList.add("active");
            content.classList.add("active");
  
            content.style.opacity = 0;
  
            setTimeout(() => {
              content.style.opacity = 1;
              content.removeAttribute("style");
            }, 50);
          }
        });
      });
    }
    if(document.querySelector(".about-us-statistics")){
    // Counter
    const contentCounters = document.querySelector(".about-us-statistics"),
      counters = document.querySelectorAll(".about-us-statistics-item .count");
  
    let isCountred = false;
  
    if (counters.length > 0) {
      const animateCounter = () => {
        if (counters.length > 0 && !isCountred) {
          isCountred = true;
  
          counters.forEach((item) => {
            const number = Number(item.textContent);
  
            let initalNumber = 0;
  
            const interval = setInterval(() => {
              initalNumber += 20;
  
              item.textContent = initalNumber;
  
              if (initalNumber >= number) {
                clearInterval(interval);
                item.textContent = number;
              }
            }, 1);
          });
        }
      };
  
      window.addEventListener("scroll", () => {
        if (
          window.scrollY >=
          contentCounters.offsetTop - contentCounters.scrollHeight - 242
        ) {
          animateCounter();
        }
      });
  
      if (
        window.scrollY >=
        contentCounters.offsetTop - contentCounters.scrollHeight - 242
      ) {
        animateCounter();
      }
    }
  }
  
      
      if (document.querySelector('.manblog')) {
        // Sidebar Category
        const btnOpenSidebarCategory = document.querySelector(".manblog.category-btn-filter"),
          sidebarCategory = document.querySelector(".category-sidebar"),
          backdropSidebarCategory = document.querySelector(
            ".category-sidebar-backdrop"
          );
  
        if (btnOpenSidebarCategory) {
          btnOpenSidebarCategory.addEventListener("click", () => {
            sidebarCategory.classList.add("open");
          });
  
          backdropSidebarCategory.addEventListener("click", () => {
            sidebarCategory.classList.remove("open");
          });
        }
      }
     
       const heartbut = document.querySelectorAll('.woosw-btn-icon.woosw-icon-5');
       heartbut.forEach(function(element) {
         element.classList.add('iconly', 'iconly-Heart');
       });
     
       const heartbutt = document.querySelectorAll('.woosc-btn-icon.woosc-icon-1');
       heartbutt.forEach(function(element) {
         element.classList.add('isax', 'isax-chart-2');
       });
   
     
     
     //login ajax sms
       const KEYBOARDS = {
         backspace: 8,
         arrowLeft: 37,
         arrowRight: 39,
       };
       
       function handleInput(e) {
         const input = e.target;
         const nextInput = input.nextElementSibling;
         if (nextInput && input.value) {
           nextInput.focus();
           if (nextInput.value) {
             nextInput.select();
           }
         }
       }
       
       function handlePaste(e) {
         e.preventDefault();
         const paste = e.clipboardData.getData('text');
         Array.from(document.querySelectorAll('input.verifyinput')).forEach((input, i) => {
           input.value = paste[i] || '';
         });
       }
       
       function handleBackspace(e) {
         const input = e.target;
         if (input.value) {
           input.value = '';
           return;
         }
         if (input.previousElementSibling) {
           input.previousElementSibling.focus();
         }
       }
       
       function handleArrowLeft(e) {
         const previousInput = e.target.previousElementSibling;
         if (!previousInput) return;
         previousInput.focus();
       }
       
       function handleArrowRight(e) {
         const nextInput = e.target.nextElementSibling;
         if (!nextInput) return;
         nextInput.focus();
       }
       
       document.body.addEventListener('input', e => {
         if (e.target.matches('input.verifyinput')) {
           handleInput(e);
         }
       });
       
       document.body.addEventListener('paste', e => {
         if (e.target.matches('input.verifyinput')) {
           handlePaste(e);
         }
       });
       
       document.body.addEventListener('focus', e => {
         if (e.target.matches('input.verifyinput')) {
           setTimeout(() => {
             e.target.select();
           }, 0);
         }
       });
       
       document.body.addEventListener('keydown', e => {
         if (e.target.matches('input.verifyinput')) {
           switch (e.keyCode) {
             case KEYBOARDS.backspace:
               handleBackspace(e);
               break;
             case KEYBOARDS.arrowLeft:
               handleArrowLeft(e);
               break;
             case KEYBOARDS.arrowRight:
               handleArrowRight(e);
               break;
             default:
           }
         }
       });

// New Code

// Swiper Landing Seventeen
const landingSevenTeen = document.querySelector(".landing-seventeen");

if (landingSevenTeen) {
  let timeSwiper = 0,
    timearSwiper;

  const swiperLandingSevenTeen = new Swiper(".swiper-landing-seventeen", {
    slidesPerView: 1,
    spaceBetween: 0,
    effect: "fade",
    fadeEffect: {
      crossFade: true,
    },
    loop: true,
    pagination: {
      el: ".swiper-pagination",
      type: "bullets",
      clickable: true,
      disableOnInteraction: false,
      pauseOnMouseEnter: true,
    },
    on: {
      init: () => {
        document.documentElement.style.setProperty(
          "--time-landing-seventeen",
          "5000ms"
        );
      },

      slideChange: () => {
        timeSwiper = 0;
      },
    },
  });

  const itemsPaginations = landingSevenTeen.querySelectorAll(
    ".swiper-pagination-bullet"
  );

  const startLandingSevenTeen = () => {
    timearSwiper = setInterval(() => {
      timeSwiper += 1000;

      if (timeSwiper >= 5000) {
        timeSwiper = 0;
        swiperLandingSevenTeen.slideNext(300);
      }
    }, 1 * 1000);
  };

  startLandingSevenTeen();
}

// Swiper Category Specials
new Swiper(".swiper-category-specials", {
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
  watchSlidesProgress: true,
  breakpoints: {
    320: {
      slidesPerView: 1,
      spaceBetween: 100,
    },
    576: {
      slidesPerView: 2,
      spaceBetween: 100,
    },
    768: {
      slidesPerView: 3,
      spaceBetween: 100,
    },
  },
});

// Swiper Carousel Home
const carouselHome = document.querySelector(".swiper-carousel-home");

if (carouselHome) {
  let timeSwiper = 0,
    timearSwiper;

  const iconPlayPause = carouselHome.querySelector(".swiper-bottom i");

  const swiperCarouselHome = new Swiper(".swiper-carousel-home", {
    slidesPerView: 1,
    spaceBetween: 0,
    effect: "fade",
    fadeEffect: {
      crossFade: true,
    },
    loop: true,
    pagination: {
      el: ".swiper-pagination",
      type: "bullets",
      clickable: true,
    },
    on: {
      init: () => {
        document.documentElement.style.setProperty(
          "--time-carousel-home",
          "5000ms"
        );
      },

      slideChange: () => {
        timeSwiper = 0;
      },
    },
  });

  const itemsPaginations = carouselHome.querySelectorAll(
    ".swiper-pagination-bullet"
  );

  const startCarouselHome = () => {
    timearSwiper = setInterval(() => {
      timeSwiper += 500;

      if (timeSwiper >= 5000) {
        timeSwiper = 0;
        swiperCarouselHome.slideNext(300);
      }
    }, 1 * 500);
  };

  startCarouselHome();

  carouselHome.addEventListener("mouseover", () => {
    [...itemsPaginations].map((item) => {
      item.classList.add("stoped");
    });

    clearInterval(timearSwiper);

    iconPlayPause.classList.remove("icon-play");
    iconPlayPause.classList.add("icon-pause");
  });

  carouselHome.addEventListener("mouseleave", () => {
    [...itemsPaginations].map((item) => {
      item.classList.remove("stoped");
    });

    startCarouselHome();

    iconPlayPause.classList.remove("icon-pause");
    iconPlayPause.classList.add("icon-play");
  });
}


// Swiper Discount Product Special
new Swiper(".swiper-discount-product-special", {
watchSlidesProgress: true,
pagination: {
  el: ".swiper-pagination",
  type: "bullets",
  clickable: true,
},
autoplay: {
  delay: 3000,
},
loop: true,
breakpoints: {
  320: {
    slidesPerView: 2,
    spaceBetween: 12,
  },
  768: {
    slidesPerView: 1,
    spaceBetween: 20,
    effect: "fade",
    fadeEffect: {
      crossFade: true,
    },
  },
}
});



new Swiper(".swiper-best-category-four", {
  grid: {
    fill: "row",
    rows: 2,
  },
  breakpoints: {
    320: {
      slidesPerView: 1.2,
      spaceBetween: 12,
    },
    460: {
      slidesPerView: 1.7,
      spaceBetween: 12,
    },
    576: {
      slidesPerView: 2,
      spaceBetween: 12,
    },
    768: {
      slidesPerView: 3,
      spaceBetween: 12,
    },
    992: {
      slidesPerView: 4,
      spaceBetween: 12,
    },
    1200: {
      slidesPerView: 4,
      spaceBetween: 22,
    },
  },
  on: {
    init: (swiper) => {
      swiper.slides.forEach((item, index) => {
        const thisIndex = index + 1,
          allSlides = swiper.slides.length / 2;

        if (thisIndex > allSlides) {
          item.firstElementChild.classList.add("two");
        }
      });
    },
  },
});

// Carousel Home Two
new Swiper(".swiper-carousel-home-two", {
  slidesPerView: 1,
  spaceBetween: 0,
  pagination: {
    el: ".swiper-pagination",
    type: "bullets",
    clickable: true,
  },
  autoplay: {
    delay: 3000,
  },
  effect: "fade",
  fadeEffect: {
    crossFade: true,
  },
  loop: true,
});



// Swiper Specials Sale
new Swiper(".swiper-options-boxes", {
  breakpoints: {
    320: {
      slidesPerView: 3,
      spaceBetween: 4,
    },
    768: {
      slidesPerView: 3,
      spaceBetween: 6,
    },
    992: {
      slidesPerView: 4,
      spaceBetween: 8,
    },
    1200: {
      slidesPerView: 5,
      spaceBetween: 10,
    },
  },
  autoplay:true,
});


// Swiper Specials Sale
new Swiper(".swiper-specials-sale", {
  watchSlidesProgress: true,
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
  breakpoints: {
    320: {
      slidesPerView: 1,
      spaceBetween: 4,
    },
    576: {
      slidesPerView: 2,
      spaceBetween: 12,
    },
    768: {
      slidesPerView: 3,
      spaceBetween: 20,
    },
    992: {
      slidesPerView: 4,
      spaceBetween: 20,
    },
    1200: {
      slidesPerView: 4,
      spaceBetween: 31,
    },
  },
});


// Swiper New Products
new Swiper(".swiper-new-products", {
  watchSlidesProgress: true,
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
  breakpoints: {
    320: {
      slidesPerView: 1.3,
      spaceBetween: 12,
    },
    370: {
      slidesPerView: 1.5,
      spaceBetween: 12,
    },
    470: {
      slidesPerView: 2,
      spaceBetween: 12,
    },
    576: {
      slidesPerView: 1,
      spaceBetween: 12,
    },
    768: {
      slidesPerView: 2,
      spaceBetween: 12,
    },
    992: {
      slidesPerView: 3,
      spaceBetween: 23,
    },
  },
});


// Swiper Amazing Offer Fiveteen
const amazingOfferFiveteen = new Swiper(".swiper-amazing-offer-fiveteen", {
  slidesPerView: 1,
  spaceBetween: 0,
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
  pagination: {
    el: ".swiper-pagination",
    type: "bullets",
    clickable: true,
    renderBullet: (index, className) => {
      const slidesImg = document.querySelectorAll(
          ".amazing-offer-fiveteen-item .image img"
        ),
        slidesName = document.querySelectorAll(
          ".amazing-offer-fiveteen-item h2"
        );

      return `<div class="swiper-pagination-bullet d-flex align-items-center">
        <img src="${slidesImg[index].src}" alt="${slidesName[index].textContent}" />
        <span>${slidesName[index].textContent}</span>
      </div>`;
    },
  },
  autoplay: {
    delay: 5000,
    disableOnInteraction: false,
    pauseOnMouseEnter: true,
  },
  effect: "fade",
  fadeEffect: {
    crossFade: true,
  },
  on: {
    paginationUpdate: (swiper, paginationEl) => {
      const active = paginationEl.querySelector(
          ".swiper-pagination-bullet-active"
        ),
        prev = active.previousElementSibling,
        oldPrev = paginationEl.querySelector(
          ".swiper-pagination-bullet-prev"
        );

      if (prev !== null) {
        if (oldPrev) {
          oldPrev.classList.remove("swiper-pagination-bullet-prev");
        }

        prev.classList.add("swiper-pagination-bullet-prev");
      }
    },
  },
});


// Swiper Amazing Offer Products
const swiperAmazingOfferProduct = new Swiper(
  ".swiper-amazing-offer-products-pagination",
  {

    watchSlidesProgress: true,
    breakpoints: {
      320: {
        slidesPerView: 1.5,
        spaceBetween: 0,
      },
      400: {
        slidesPerView: 2,
        spaceBetween: 0,
      },
      768: {
        slidesPerView: 3,
        spaceBetween: 0,
      },
      992: {
        slidesPerView: 3,
        spaceBetween: 0,
      },
    },
    on: {
      init: (swiper) => {
        if (window.outerWidth > 991) {
          const height =
            (swiper.slides[0].firstElementChild.scrollHeight + 32) * 3;

          swiper.el.style.height = height + "px";
        }
      },
    },
  }
);



// Carousel Gifts
new Swiper(".swiper-carousel-gifts", {
  slidesPerView: 1,
  spaceBetween: 0,
  pagination: {
    el: ".swiper-pagination",
    type: "bullets",
    clickable: true,
  },
  autoplay: {
    delay: 3000,
  },
  effect: "fade",
  fadeEffect: {
    crossFade: true,
  },
  loop: true,
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
});


// Mega Menu Three
const megamenuThreeTabs = document.querySelectorAll(
  ".megamenu-three-tabs ul li"
);

if (megamenuThreeTabs.length > 0) {
  megamenuThreeTabs.forEach((tab) => {
    tab.addEventListener("mouseover", (ev) => {
      const el = ev.currentTarget,
        id = el.dataset.tab,
        content = document.querySelector(id);

      if (content) {
        [...el.parentElement.children].map((tabItem) => {
          const contentItem = document.querySelector(tabItem.dataset.tab);

          if (contentItem) {
            contentItem.classList.remove("active");
            tabItem.classList.remove("active");
          }
        });

        el.classList.add("active");

        content.classList.add("active");
        content.style.opacity = "0.5";

        setTimeout(() => {
          content.style.opacity = 1;
        }, 5);
      }
    });
  });
}

  // Swiper To Selling Products Kala
  new Swiper(".swiper-proposal-kala", {
    spaceBetween: 0,
    breakpoints: {
      320: {
        slidesPerView: 2,
        grid: {
          fill: "row",
          rows: 2,
        },
      },
      400: {
        slidesPerView: 3,
        grid: {
          fill: "row",
          rows: 2,
        },
      },
      500: {
        slidesPerView: 4,
        grid: {
          fill: "row",
          rows: 2,
        },
      },
      576: {
        slidesPerView: 4,
        grid: {
          fill: "row",
          rows: 2,
        },
      },
      768: {
        slidesPerView: 5,
        grid: {
          fill: "row",
          rows: 2,
        },
      },
      992: {
        slidesPerView: 7,
        grid: {
          fill: "row",
          rows: 2,
        },
      },
    },
    on: {
      init: (swiper) => {
        swiper.slides.forEach((item, index) => {
          const thisIndex = index + 1,
            allSlides = swiper.slides.length / 2;

          if (thisIndex === allSlides + 1) {
            item.classList.add("two-one");
          }

          if (thisIndex > allSlides) {
            item.firstElementChild.classList.add("two");
          }
        });
      },
    },
  });


  // Toggle Icons Detail Products
  const btnIconsDetailProducts = document.querySelectorAll(
    ".icons-detail-product > button"
  );

  if (btnIconsDetailProducts.length > 0) {
    btnIconsDetailProducts.forEach((btnIcons) => {
      btnIcons.addEventListener("click", (ev) => {
        const el = ev.currentTarget,
          icons = el.nextElementSibling;

        icons.classList.toggle("hidden");
      });
    });
  }

  // Swiper Volume Detail Product
  new Swiper(".swiper-volume-detail-product", {
    slidesPerView: "auto",
    spaceBetween: 7,
    autoplay:true,
    on: {
      init: (swiper) => {
        swiper.el.classList.add("not-last");
      },
      slideChange: (swiper) => {
        swiper.el.classList.remove("not-last");
      },
    },
  });

  var elementgal = jQuery('.woocommerce-product-gallery__image a'); 
  
  // Add the attributes
  elementgal.attr('data-bs-toggle', 'modal');
  elementgal.attr('data-bs-target', '#modal-gallery');

  jQuery(".woocommerce-product-gallery__image a").click(function(e) {
    e.preventDefault();
    e.stopPropagation();
  })

  // Gallery Images Modal Origin
  const galleryImages = document.querySelectorAll(
    ".detail-product-four-modal-gallery-images img"
  );

  if (galleryImages.length > 0) {
    // Swiper Gallery Detail Product
    const swiperGalleryDetailProduct = new Swiper(
      ".swiper-detail-product-four-modal-galler-origin",
      {
        slidesPerView: 1,
        spaceBetween: 0,
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        },
      }
    );

    galleryImages.forEach((image, index) => {
      image.addEventListener("click", () => {
        swiperGalleryDetailProduct.slideTo(index, 300);
      });
    });
  }

  // Gallery Images Modal Users
  const galleryImagesUsers = document.querySelectorAll(
    ".detail-product-four-modal-gallery-images-users img"
  );

  if (galleryImagesUsers.length > 0) {
    // Swiper Gallery Detail Product
    const swiperGalleryDetailProductUsers = new Swiper(
      ".swiper-detail-product-four-modal-galler-users",
      {
        slidesPerView: 1,
        spaceBetween: 0,
        navigation: {
          nextEl: ".swiper-button-next",
          prevEl: ".swiper-button-prev",
        },
      }
    );

    galleryImagesUsers.forEach((image, index) => {
      image.addEventListener("click", () => {
        swiperGalleryDetailProductUsers.slideTo(index, 300);
      });
    });
  }

  // Buy Images
  const buyImages = document.querySelectorAll(
    ".images-users-items .item, .images-users-link"
  );

  if (buyImages.length > 0) {
    buyImages.forEach((image) => {
      image.addEventListener("click", () => {
        const item = document.querySelector(
          ".detail-product-four-modal-gallery .nav li:last-child"
        );

        const tab = new bootstrap.Tab(item);

        tab.show();
      });
    });
  }





  // Swiper Gallery Detail Product Four Origin
  let enabled = false;

  if (window.outerWidth < 992) {
    enabled = true;
  }

  new Swiper(".swiper-detail-product-four-gallery", {
    slidesPerView: 1,
    spaceBetween: 0,
    navigation: {
      nextEl: ".swiper-button-next",
      prevEl: ".swiper-button-prev",
    },
    pagination: {
      el: ".swiper-pagination",
      type: "bullets",
      clickable: true,
    },
    enabled: enabled,
  });

  new Swiper(".swiper-mobile", {
    slidesPerView: 2,
    spaceBetween: 8,
  });


    // Counter Cart
    const counterCart = document.querySelectorAll("[data-counter]");

    if (counterCart.length > 0) {
      counterCart.forEach((item) => {
        item.addEventListener("click", (ev) => {
          const el = ev.target,
            type = el.dataset.counter,
            parent = el.parentElement,
            input = parent.children[1];
            const kquan = document.querySelector('.kquan');
  
          if (type === "add") {
              if (Number(input.value) < Number(input.getAttribute("max"))) {
              input.setAttribute("value", Number(input.value) + 1);
              kquan.setAttribute("value", Number(input.value) + 1 - 1 );
              }
          } else {
            if (Number(input.value) > Number(input.getAttribute("min"))) {
                input.setAttribute("value", Number(input.value) - 1);
                kquan.setAttribute("value", Number(input.value) - 1 + 1);
            }
          }
        });
      });
    }


    // Select all elements with the class 'fas fa-shopping-cart'
var elements = document.querySelectorAll('.fas.fa-shopping-cart');

// Loop through all selected elements
for (var i = 0; i < elements.length; i++) {
    // Remove old classes
    elements[i].classList.remove('fas');
    elements[i].classList.remove('fa-shopping-cart');

    // Add new classes
    elements[i].classList.add('icon');
    elements[i].classList.add('icon-cart-3');
}

// Select all elements with the class 'far fa-eye'
var elements = document.querySelectorAll('.far.fa-eye');

// Loop through all selected elements
for (var i = 0; i < elements.length; i++) {
    // Remove old classes
    elements[i].classList.remove('far');
    elements[i].classList.remove('fa-eye');

    // Add new classes
    elements[i].classList.add('isax');
    elements[i].classList.add('isax-eye');
}


// Select all elements with the class 'fas fa-external-link-alt'
var elements = document.querySelectorAll('.fas.fa-external-link-alt');

// Loop through all selected elements
for (var i = 0; i < elements.length; i++) {
    // Remove old classes
    elements[i].classList.remove('fas');
    elements[i].classList.remove('fa-external-link-alt');

    // Add new classes
    elements[i].classList.add('isax');
    elements[i].classList.add('isax-activity');
}
// Select the first element with the class "dokan-other-vendor-camparison"
var element = document.querySelector('.dokan-other-vendor-camparison');

// Check if the element exists
if (element) {
    // Set the ID of the element to "other_sellers"
    element.id = 'other_sellers';
}

  var theDiv = jQuery('#seeebox');
  var theInput = jQuery('.maninpu');
  var theOutput = jQuery('#keyword');

  function updateElements() {
      theDiv.removeClass('d-none');
      theOutput.val(theInput.val());
      theOutput.focus();
  }

  // Listen for both 'input' and 'paste' events
  theInput.on('input paste', function() {
      updateElements();
  });

  theOutput.on('input', function() {
      theInput.val(theOutput.val());
  });

  jQuery('.closesee').on('click', function() {
      theDiv.addClass('d-none');
  });

  document.body.classList.add('loaded');



// Tabs
const tabss = document.querySelectorAll('[data-auth-toggle="tab"]');

if (tabss.length > 0) {
  tabss.forEach((tab) => {
    tab.addEventListener("click", (ev) => {
      const el = ev.currentTarget,
        content = document.getElementById(el.dataset.authTarget);

      if (content) {
        [...el.parentElement.children].map((tabItem) => {
          const contentTab = document.getElementById(
            tabItem.dataset.authTarget
          );

          tabItem.classList.remove("active");

          if (contentTab) {
            contentTab.classList.remove("active");
          }
        });

        el.classList.add("active");

        content.classList.add("active");
        content.style.opacity = "0";

        setTimeout(() => {
          content.removeAttribute("style");
        }, 5);
      }
    });
  });
}



// Modal
const btnsModal = document.querySelectorAll('[data-auth-toggle="modal"]');

if (btnsModal.length > 0) {
  btnsModal.forEach((btnModal) => {
    btnModal.addEventListener("click", (ev) => {
      ev.preventDefault();

      const el = ev.currentTarget,
        id = el.dataset.authTarget,
        modal = document.getElementById(id);

      if (modal) {
        const modalOpened = document.querySelector(".auth__modal.opened"),
          backdropModalOpened = document.querySelector(
            ".auth__modal__backdrop"
          ),
          backdrop = document.createElement("div");
        backdrop.classList.add("auth__modal__backdrop");
        backdrop.style.opacity = 0;

        if (modalOpened && backdropModalOpened) {
          modalOpened.classList.remove("opened");
          backdropModalOpened.style.opacity = 0;

          setTimeout(() => {
            backdropModalOpened.remove();
          }, 300);
        }

        document.body.appendChild(backdrop);

        setTimeout(() => {
          backdrop.style.opacity = 1;
        }, 5);

        modal.classList.add("opened");
      }
    });
  });

  window.addEventListener("click", (ev) => {
    const el = ev.target,
      modalOpened = document.querySelector(".auth__modal.opened"),
      backdropModalOpened = document.querySelector(".auth__modal__backdrop");

    if (
      el.classList.contains("auth__modal__dialog") ||
      el.classList.contains("auth__modal__content") ||
      el.classList.contains("auth__modal__body") ||
      el.classList.contains("auth__modal__close")
    ) {
      modalOpened.classList.remove("opened");
      backdropModalOpened.style.opacity = 0;

      setTimeout(() => {
        backdropModalOpened.remove();
      }, 300);
    }
  });
}

// Show Password
const showPassword = document.querySelectorAll("[data-show-password]");

if (showPassword.length > 0) {
  showPassword.forEach((btnPassword) => {
    btnPassword.addEventListener("click", (ev) => {
      const el = ev.currentTarget,
        input = document.querySelector(el.dataset.showPassword),
        {iconShow, iconHide} = el.dataset;

      if (input) {
        input.type = input.type === "password" ? "text" : "password";
        el.classList.toggle("showing");
        iconShow && el.classList.toggle(iconShow);
        iconHide && el.classList.toggle(iconHide);
      }
    });
  });
}


   // Find the input element
   var inputElement = document.querySelector(".insingle_pr .quantity input[type=\"number\"]");
   if(inputElement){
     // Create plus button
     var plusButton = document.createElement("button");
     plusButton.innerHTML = "+";
     plusButton.setAttribute("type", "button");
     plusButton.classList.add("kplus-button"); // Add custom CSS class

     // Create minus button
     var minusButton = document.createElement("button");
     minusButton.innerHTML = "-";
     minusButton.setAttribute("type", "button");
     minusButton.classList.add("kminus-button"); // Add custom CSS class

     // Insert minus button before the input element
     inputElement.parentNode.insertBefore(minusButton, inputElement);

     // Append plus button after the input element
     inputElement.parentNode.insertBefore(plusButton, inputElement.nextSibling);

     // Add event listener for plus button
     plusButton.addEventListener("click", function() {
         var currentValue = parseInt(inputElement.value);
         inputElement.value = currentValue + 1;
     });

     // Add event listener for minus button
     minusButton.addEventListener("click", function() {
         var currentValue = parseInt(inputElement.value);
         if (currentValue > 1) {
             inputElement.value = currentValue - 1;
         }
     });
   }


    var navBottom = document.querySelector('.nav-bottom');
    var detailProductFourBottom = document.querySelector('.detail-product-four-bottom');
    var switchButton = document.querySelector('.switch_footer_kaveh');
    var det4simple = document.querySelector('.det4simple form.cart');
    var detailfourprice = document.querySelector('.detailfourprice .price');
    var detailfourvaradd = document.querySelector('.detail-product-four .woocommerce-variation-add-to-cart');
    
    if(navBottom){
        // Function to toggle footer elements
        function toggleFooter() {
          if (detailProductFourBottom.style.display === 'none') {
            detailProductFourBottom.classList.toggle('d4prshow');
            navBottom.classList.toggle('d4prnone');
          } else {
            if(det4simple){
              det4simple.classList.toggle('d4prnone');
            }
            if(detailfourprice){
              detailfourprice.classList.toggle('d4prnone');
            }
            if(detailfourvaradd){
              detailfourvaradd.classList.toggle('d4prnone');
            }
            detailProductFourBottom.classList.toggle('d4prnone');
            navBottom.classList.toggle('d4prshow');
          }
        }

        // Check if .detail-product-four-bottom exists on page load
        if (detailProductFourBottom) {
          // Hide nav-bottom initially
          navBottom.classList.toggle('d4prnone');
          // Add click event listener to switch_button
          switchButton.addEventListener('click', toggleFooter);
        }
      }


      jQuery("#kcopysource").click(function() {
          var copyTargetInput = jQuery("#kcopytarget");
          copyTargetInput.select();
          document.execCommand("copy");
  
          // Change icon class
          jQuery("#kcopysource i").removeClass("isax-document-copy").addClass("isax-document-copy5");
  
          // Revert back to original class after 2 seconds
          setTimeout(function() {
              jQuery("#kcopysource i").removeClass("isax-document-copy5").addClass("isax-document-copy");
          }, 2000);
      });


      // Form Focused
      const formControl = document.querySelectorAll(".form-control-js");

      if (formControl.length > 0) {
        formControl.forEach((input) => {
          input.addEventListener("focus", () => {
            input.classList.add("focused");
          });

          input.addEventListener("blur", (ev) => {
            const el = ev.target,
              { value } = el;

            if (value === "") {
              el.classList.remove("focused");
            }
          });
        });
      }

      // Select Two
      const selectTwo = document.querySelector(".select-two");

      if (selectTwo) {
        $(".select-two").select2({
          dropdownParent: $(".modal")[0] ? $(".modal") : "",
        });
      }

      if (jQuery('.insingle_pr').length > 0) {
        
      }else{
        jQuery('select').select2();
      }
      


      // Swiper search box
      new Swiper(".swiper-seabox", {
          navigation: {
              nextEl: ".swiper-sea-next",
              prevEl: ".swiper-sea-prev",
          },
          breakpoints: {
              320: {
                  slidesPerView: 1,
                  spaceBetween: 3,
              },
              576: {
                  slidesPerView: 1,
                  spaceBetween: 8,
              },
              768: {
                  slidesPerView: 3,
                  spaceBetween: 8,
              },
              992: {
                  slidesPerView: 2.5,
                  spaceBetween: 15,
              },
          },
      });
      // Swiper search box
      new Swiper(".swiper-geabox", {
          slidesPerView: 1,
          spaceBetween: 0,
          pagination: {
              el: '.swiper-pagination',
              type: 'bullets',
              clickable: true,
          },
          autoplay: {
              delay: 2000,
          },
          effect: "fade",
          fadeEffect: {
              crossFade: true,
          },
          loop: true,

      });
});