function popup(imgData,id) {
	var img = id;
	var modal = document.getElementById(img);
	var modalImg = $(modal).find("img#" + id);
	//var captionText = $(modal).find("div#caption")[0];
	
	modal.style.display = "flex";
	$(modalImg).attr("src", imgData.getAttribute("src"));
	
	var span = $(modal).find("span.close")[0];

	span.onclick = function() { 
		modal.style.display = "none";
	}
}