

    // Tabs
  $('.tab ul.tabs').addClass('active').find('> li:eq(0)').addClass('current');
    $('.tab ul.tabs li a').on('click', function (g) {
        var tab = $(this).closest('.tab'), 
        index = $(this).closest('li').index();
        tab.find('ul.tabs > li').removeClass('current');
        $(this).closest('li').addClass('current');
        tab.find('.tab_content').find('div.tabs_item').not('div.tabs_item:eq(' + index + ')').slideUp();
        tab.find('.tab_content').find('div.tabs_item:eq(' + index + ')').slideDown();
        g.preventDefault();
  });

/*********************Accordion*****************/
$(function() {
  $(".accordion-header").click(function(event) {
    event.preventDefault();
    var dis = $(this);
    var acr_box = dis.closest(".accordion");
    if(!dis.hasClass("active-accordion")){
      acr_box.find(".accordion-header").removeClass("active-accordion");
      dis.addClass("active-accordion");
      acr_box.find(".accordion-content").slideUp();
      dis.next().stop(true,true).slideToggle();
    }
  });
});
/*********************Accordion*****************/





// Hover dropdown for Bootstrap 5
$('ul.navbar-nav li.dropdown').hover(
  function() {
    $(this).addClass('show');
    $(this).find('.dropdown-menu').addClass('show');
  },
  function() {
    $(this).removeClass('show');
    $(this).find('.dropdown-menu').removeClass('show');
  }
);



$(document).ready(function(){

$(".owl-carousel1").owlCarousel({
    loop: true,
    // margin: 10,
    center: true,
    items: 6,
    autoplay: true,
    autoplayTimeout: 3000,   // old autoPlay removed
    autoplayHoverPause: true,

    // smartSpeed: 1000,        // old martSpeed corrected

    navigation : false,
    pagination : false,

    responsive: {
        0: {
            items: 1
        },
        600: {
            items: 1
        },
        900: {
            items: 1
        },
        1000: {
            items: 2
        }
    }
});

// Update navigation buttons icons
$(".owl-prev").html('<i class="fa fa-chevron-left"></i>');
$(".owl-next").html('<i class="fa fa-chevron-right"></i>');

});

$(document).ready(function(){

$(".owl-carousel2").owlCarousel({
    loop: true,
    margin: 10,
    center: true,
    items: 2,
    autoplay: true,
    autoplayTimeout: 5000,   // old autoPlay removed
    autoplayHoverPause: true,

    smartSpeed: 1200,        // old martSpeed corrected

    navigation : true,
    pagination : false,

    responsive: {
        0: {
            items: 1
        },
        600: {
            items: 1
        },
        900: {
            items: 1
        },
        1000: {
            items: 2
        }
    }
});

// Update navigation buttons icons
$(".owl-prev").html('<i class="fa-solid fa-chevron-left"></i>');
$(".owl-next").html('<i class="fa-solid fa-chevron-right"></i>');

});

$(document).ready(function(){

$(".owl-carousel3").owlCarousel({
    loop: true,
    margin: 10,
    center: true,
    items: 1,
    autoplay: true,
    autoplayTimeout: 5000,   // old autoPlay removed
    autoplayHoverPause: true,

    smartSpeed: 1200,        // old martSpeed corrected

    navigation : true,
    pagination : false,

    responsive: {
        0: {
            items: 1
        },
        600: {
            items: 1
        },
        900: {
            items: 1
        },
        1000: {
            items: 2
        }
    }
});

// Update navigation buttons icons
$(".owl-prev").html('<i class="fa-solid fa-chevron-right"></i>');
$(".owl-next").html('<i class="fa-solid fa-chevron-left"></i>');

});

$(document).ready(function(){

$(".owl-carousel4").owlCarousel({
    loop: true,
    margin: 10,
    center: true,
    items: 1,
    autoplay: true,
    autoplayTimeout: 5000,   // old autoPlay removed
    autoplayHoverPause: true,

    smartSpeed: 1200,        // old martSpeed corrected

    navigation : true,
    pagination : false,

    responsive: {
        0: {
            items: 1
        },
        600: {
            items: 1
        },
        900: {
            items: 1
        },
        1000: {
            items: 2
        }
    }
});

// Update navigation buttons icons
$(".owl-prev").html('<i class="fa-solid fa-chevron-right"></i>');
$(".owl-next").html('<i class="fa-solid fa-chevron-left"></i>');

});


// counter
$('.counter').each(function () {
    var size = $(this).text().split(".")[1] ? $(this).text().split(".")[1].length : 0;
      $(this).prop('Counter', 0).animate({
        Counter: $(this).text()
      }, {
        duration: 5000,
        step: function (func) {
           $(this).text(parseFloat(func).toFixed(size));
        }
      });
});