Remove the delay when clicking an image

This gets most of the way there to removing the delay when clicking an image and seeing the modal. It loads an empty modal first, then replaces it with a modal with the data.

The problem is that it performs the fade in animation again, since it basically loads the modal twice. It would be better to just update the contents of the modal only, but this would require some greater refactoring of the templates.

Putting this out there to see if anyone else is interested in helping out.