The various imageViews are all stored in the $layout.imageViews variable. If you look at how we build the sizes dropdown list you can see how to create urls to each of the different sizes. You can wrap the image in an <a> and set the href to be one of the different imageViews to be able to link back and forth. You'll have to play with that a bit.
Unfortunately there's no documentation on our smarty tags at the moment. You can look in modules/core/classes/GalleryTemplateAdapter.class to see what we provide as {g->xxx} tags, but you'll have to read the code a bit to see what they all do :-/