Change image in lightbox when user clicks email form field

I have a lightbox that has a picture.
I would like the picture to change when the user clicks the email field (It would be a really cool effect)

I currently have a hoverbox in place with the two pictures, but these pictures change when there is a mouse hover over the pictures.

How to I get the picture to change when the use clicks the email field?

This is the code that I currently have, which simply closes out the lightbox when the user hits the submit button.

I’m new to javascript and WIX, so any help is appreciated!

let imagesUrls = ["https://www.....", "https://www.....", "https://www....."]//fill in the links.

let i = 0;
$w.onReady(() => {
    $w("#emailInput").onClick(event => {
        i = (i + 1) % imagesUrls.length;
        $w("#image1").src = imagesUrls[i];
    })
})

OMG Thank you so much! you are a Corvid master indeed