Flip image-transition

I need a script, which flip an image when I click on it, and then on the backside of it a new image is. If you then click on the image, it turns and on that backside there is a new image again… etc…