<script>
	window.addEventListener('DOMContentLoaded', function() {
		let elements = document.querySelectorAll('.cs_top_nav li.showpopup');
		let popupposts = ['8022'];
		elements.forEach(function(e, i) {
			e.addEventListener('mouseenter', function() {
				elementorProFrontend.modules.popup.showPopup({ id: popupposts[i] });

				let elementsBackdrop = document.querySelectorAll('.container-menu-managed-services');
				if (elementsBackdrop.length > 0) {
					elementsBackdrop.forEach(function(e, i) {
						e.addEventListener('mouseleave', function() {
							jQuery('body').click();
						});
					});
				}
			});
		});
	});

	window.addEventListener('scroll', function() {
		if (window.scrollY > 140) {
			var event = new MouseEvent('click', {
				'view': window,
				'bubbles': true,
				'cancelable': true
			});
			document.body.dispatchEvent(event);
		}
	});
</script>