document.addEventListener("DOMContentLoaded", function() {
    document.body.addEventListener('click', function(event) {
        var isZoomable = event.target.classList.contains('img-zoomable');
        if (isZoomable) {
            var overlay = document.createElement('div');
            overlay.classList.add('overlay');
            var img = document.createElement('img');
            img.src = event.target.src;
            overlay.appendChild(img);
            document.body.appendChild(overlay);
            overlay.style.display = "block";

            overlay.addEventListener('click', function() {
                overlay.remove();
            });
        }
    });
});

