(() => {
	// Get the modal
	const modal = document.getElementById("helpDeskModal");

	// Get the image and insert it inside the modal - use its "alt" text as a caption
	const img = document.getElementById("imgHelpDesk");
	const modalImg = document.getElementById("imgHelpDeskModal");
	const captionText = document.getElementById("modal-help-desk-caption");
	console.log(img);
	if(img) {
		img.onclick = function(){
		  modal.style.display = "block";
		  modalImg.src = this.src;
		  captionText.innerHTML = this.alt;
		}

		// Get the <span> element that closes the modal
		const span = document.getElementsByClassName("modal-help-desk-close")[0];

		// When the user clicks on <span> (x), close the modal
		span.onclick = function() { 
		  modal.style.display = "none";
		}	
	}
})();