Don't load image everytime, option for preload, option for callbacks

This patch supports a way not to reload the large image everytime the user zooms in (that means, it doesn't use a cache buster on the image url). To do that I had to add a dependency to a image loader detection script.

There's also an option to preload/load images on demand. Default is preload, not to change the current behaviour.

Last there are three new options onInit, onShow and onHide that are callbacks.

I actually don't expect you to merge this right away because the code is quite basic and a bit messy, and has an external dependency. But if we can discuss about a way to make it better, I can refine it until it's good to be merged.