


jQuery(document).ready(function($){
	
	
	
	
	
	
	$('.card-wrap .card-item').prepend('<div class="front-card"></div>');
	
	$('.card-wrap .card-item:nth-child(1) .uagb-ifb-title').clone().prependTo('.card-wrap .card-item:nth-child(1) .front-card');
	$('.card-wrap .card-item:nth-child(2) .uagb-ifb-title').clone().prependTo('.card-wrap .card-item:nth-child(2) .front-card');
	$('.card-wrap .card-item:nth-child(3) .uagb-ifb-title').clone().prependTo('.card-wrap .card-item:nth-child(3) .front-card');
	$('.card-wrap .card-item:nth-child(4) .uagb-ifb-title').clone().prependTo('.card-wrap .card-item:nth-child(4) .front-card');
	$('.card-wrap .card-item:nth-child(5) .uagb-ifb-title').clone().prependTo('.card-wrap .card-item:nth-child(5) .front-card');
	
	
	
	
	
	$(".site-header #ast-mobile-header .menu-toggle").click(function() {
		var myDiv = $("#ast-mobile-header .ast-mobile-header-content");
	
		myDiv.addClass("close-menu");
	
		setTimeout(function() {
		  myDiv.removeClass("close-menu");
		}, 300);
	  });
	  
	
	setTimeout(function() {
		$(".form-page-specific .hbspt-form .hs_submit").click(function () {
			let formHead = $(".form-page-specific");
			
			formHead.addClass("form-ty-message");
			
		});
	}, 500);
	
	
	
	
	
	$('.slider-case-study').slick({
		slidesToShow: 1,
		slidesToScroll: 1,
		arrows: false,
		useTransform: true,
		infinite: true,
		cssEase: 'cubic-bezier(0.77, 0, 0.18, 1)',
	});	
	
	/* Start - Header Button */
	// $('.phone-button .site-header .site-header-primary-section-right .ast-header-button-1').prepend($('.phone-button #ast-desktop-header .astra-advanced-hook-996'));
	/* End - Header Button */


	$(window).scroll(function() {    
		var scroll = $(window).scrollTop();
	
		if (scroll >= 10) {
			$("body").addClass("sticky-header");
		} else {
			$("body").removeClass("sticky-header");
		}
	});
	
	
	if ($('.home, .page-id-5327, .page-id-867')[0]) {
	  var iframe = $('.home .uagb-modal-popup iframe, .page-id-5327 .uagb-modal-popup iframe, .page-id-867 .uagb-modal-popup iframe');
	  var player = new Vimeo.Player(iframe);
	  $('.home .uagb-modal-popup-close, .page-id-5327 .uagb-modal-popup-close, .page-id-867 .uagb-modal-popup-close').click(function() {
		  player.pause();
	  });
	}
	
	
	
	
	var progressBar = $('#progress-bar');
	  var ticking = false;
	
	  $(window).on('scroll', function() {
		if (!ticking) {
		  window.requestAnimationFrame(function() {
			var windowHeight = $(window).height();
			var documentHeight = $(document).height();
			var scrollTop = $(document).scrollTop();
			var scrollPercent = (scrollTop / (documentHeight - windowHeight)) * 100;
	
			progressBar.css('width', scrollPercent + '%');
			ticking = false;
		  });
	
		  ticking = true;
		}
	  });
	  
	  
	$(document).on('facetwp-refresh', function() {
		if (FWP.soft_refresh == true) {
		  FWP.enable_scroll = true;
		} else {
		  FWP.enable_scroll = false;
		}
	  });
	  $(document).on('facetwp-loaded', function() {
		if (FWP.enable_scroll == true) {
		  $('html, body').animate({
			scrollTop: $('#blogPage').offset().top - 50
		  }, 500);
		}
	  });
	
});






