A small pure JavaScript solution to switch images insie a photoset. Stores the old source of the first, large image and replaces the selected image with the last one that was displayed large.
Images via LoremPixel.com