
// JavaScript Document




    jQuery(window).on('scroll', function (e) {

      var distanceY = window.pageYOffset || document.documentElement.scrollTop, shrinkOn = 60, header = document.querySelector("header");

      if (distanceY > shrinkOn) {

        classie.add(header, "smaller");

      } else {

        if (classie.has(header, "smaller")) {

          classie.remove(header, "smaller");

        }

      }

    });





    $(document).ready(function(){

      "use strict";



      var currentPos = 0;

      var winHeight = 0;

      var offSet = 0;

      var offSetPerc = 0;

      $(window).scroll(function(){

        winHeight = $(window).height();

        currentPos = $(window).scrollTop() + (winHeight * 0.80);

      //console.log('currentPos', currentPos);

      //console.log('winHeight', winHeight);



        $(".animatedCirle").each(function(index){

          if($(this).offset() && !$(this).find(".animate").hasClass("fl-bar")){

            if($(this).offset().top < currentPos){

              $(this).find(".animate").addClass("fl-bar");

              offSetPerc = $(this).find(".fl-number-int").html();

              offSetPerc = (1 - (offSetPerc / 100));

              offSet = ($(this).find(".animate").attr("stroke-dasharray") * offSetPerc);

              $(this).find(".animate").css("stroke-dashoffset", offSet);



              console.log('offSetPerc', offSetPerc);

              console.log('offSet', offSet);

      //console.log('posFromTop', $(this).offset().top);

            }

          }

        });

        return false;

      });

    });


  $(document).ready(function(){

 $('#carouselTesti').owlCarousel({
            items: 2,
            nav: false,
            
            dots: true,
            autoplay: true,
            smartSpeed: 1000,
            loop: true,
             margin:15,
            responsive:{
                300:{
                    items: 1,
                },
                767:{
                    items: 2,
                },
                1199:{
                    items: 2,
                },
            }
        });

 });


$(document).ready(function () {
 
        $('#testimonial-slider').owlCarousel({
            items: 2,
            nav: false,
            
            dots: true,
            autoplay: true,
            smartSpeed: 1000,
            loop: true,
             margin:30,
            responsive:{
                300:{
                    items: 1,
                },
                767:{
                    items: 2,
                },
                1199:{
                    items: 2, 
                },
            }
        });
       });
