
// $('#owl-carousel').owlCarousel({
//     loop: true,
//     margin: 30,
//     dots: false,
//     nav: true,
//     items: 3,
//     navText: ["<i class='fa fa-long-arrow-left'></i>","<i class='fa fa-long-arrow-right'></i>"],
    
// })

$('#owl-carousel').owlCarousel({
    loop: true,
    margin: 30,
    dots: true,
    nav: false,
    items: 4,
})

$('#owl-carousel_certified').owlCarousel({
    loop: true,
    margin: 30,
    dots: true,
    nav: false,
    items: 5,
    autoplay: true,
})

const navbar = document.querySelector('#stikyNav');
//let top = navbar.offsetTop;
function stickynavbar() {
  if (window.scrollY >= 200) {    
    navbar.classList.add('sticky');
  } else {
    navbar.classList.remove('sticky');    
  }
}
  window.addEventListener('scroll', stickynavbar);


  $('.counter-count').each(function () {
    $(this).prop('Counter',0).animate({
        Counter: $(this).text()
    }, {
        duration: 5000,
        easing: 'swing',
        step: function (now) {
            $(this).text(Math.ceil(now));
        }
    });
});


// --------------click to top---------------------



$(document).ready(function(){
    
  $('#clickTop').hide();
  
  //Check to see if the window is top if not then display button
  
  $(window).scroll(function(){
      if ($(this).scrollTop() > 300) {
          $('#clickTop').fadeIn();
      } else {
          $('#clickTop').fadeOut();
      }
  });
  
  //Click event to scroll to top
  
  $('#clickTop').click(function(){
      $('html, body').animate({scrollTop : 0},500);
      return false;
  });
  
});

