let $ = jQuery
$(document).ready(function () {
	$("a[href='#']").click(function (e) {
		e.preventDefault()
	})

	const logoFix = () => {
		if ($(window).width() < 992) {
			$('.fixed-header-logo, .normal-logo').addClass('d-none')
			$('#logo img.mobile-logo').addClass('d-block').removeClass('d-none')
		} else {
			$('#logo img.mobile-logo').addClass('d-none').removeClass('d-block')
			$('.fixed-header-logo, .normal-logo').addClass('d-block')
		}

		if ($(window).width() > 991) {
			$(window).scroll(function () {
				if ($('header#header').hasClass('sticky-header')) {
					$('.fixed-header-logo').removeClass('d-none')
					$('.normal-logo').addClass('d-none')
				} else {
					$('.fixed-header-logo').addClass('d-none')
					$('.normal-logo').removeClass('d-none')
				}
			})
		}
	}
	logoFix()

	$(window).on('resize', function () {
		logoFix()
	})

	logoFix()
})

$(window).on('load', function () {
	// Preloader
	$('.loader').fadeOut()
})
