Click on an image to bring to front


I’m trying to replicate something similar to this.

By this I mean when I click on an image that’s amongst a stack of images it brings it to the front.

Here’s what I have at the minute: JSFiddle

Never mind. Fixed it.