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 does the animation again right now for the modal, since it basically loads 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.