/*Custom JS up*/
function openToggle() {
	document.getElementById("header_wrap").classList.add("active");
	document.getElementById("main").classList.add("active");
}

function closeToggle() {
	document.getElementById("header_wrap").classList.remove("active");
	document.getElementById("main").classList.remove("active");
}

$(document).ready(function() {

	$("header .header_wrap .menu_wrap nav ul >li.menu-item-has-children").append("<span class='toggle_dropdown'><i class='fa-sharp fa-solid fa-angle-down'></i></span>");
		$("header .header_wrap .menu_wrap nav ul >li.menu-item-has-children .toggle_dropdown").click(function() {
		$(this).parent(".menu-item-has-children").find(">.sub-menu").slideToggle();
		$(this).parent(".menu-item-has-children").toggleClass("show");
		$(this).parent(".menu-item-has-children").siblings('.menu-item-has-children').find('>.sub-menu').slideUp();
		$(this).parent(".menu-item-has-children").siblings('.menu-item-has-children').removeClass("show");
	});

	$("header .header_wrap .menu_wrap nav ul li a").click(function(){
		$(".header_wrap").removeClass("active");
		$("body").removeClass("active");
	});


	jQuery('.svg_img').each(function() {
		var $img = jQuery(this);
		var imgID = $img.attr('id');
		var imgClass = $img.attr('class');
		var imgURL = $img.attr('src');
		jQuery.get(imgURL, function(data) {
			// Get the SVG tag, ignore the rest
			var $svg = jQuery(data).find('svg');
			// Add replaced image's ID to the new SVG
			if (typeof imgID !== 'undefined') {
			$svg = $svg.attr('id', imgID);
			}
			// Add replaced image's classes to the new SVG
			if (typeof imgClass !== 'undefined') {
			$svg = $svg.attr('class', imgClass + ' replaced-svg');
			}
			// Remove any invalid XML tags as per http://validator.w3.org
			$svg = $svg.removeAttr('xmlns:a');
			// Check if the viewport is set, if the viewport is not set the SVG wont't scale.
			if (!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) {
			$svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width'))
			}
			// Replace image with new SVG
			$img.replaceWith($svg);
		}, 'xml');
		});

	// var headerHeigh = $('header').innerHeight();
	// $('.main_wrap').css('padding-top' , headerHeigh); 

	$(window).on('load resize' , function() {
		// var headerHeigh = $('header').innerHeight();
		// $('.main_wrap').css('padding-top' , headerHeigh); 
	});

	// $('.testimonial').slick({
	// 	infinite: true,
	// 	slidesToShow: 1,
	// 	slidesToScroll: 1,
	// 	adaptiveHeight: true,
	// 	arrows: true,
	// 	dots: true
	// });

	$(window).scroll(function() {
		if ($(this).scrollTop() > 80){  
			$('header').addClass("sticky");
		}
		else{
			$('header').removeClass("sticky");
		}
	});
	
	/************************************************************** */

});
/*Custom JS END*/
//# sourceMappingURL=custom.js.map
