moved app code to its own file

also moved around events to clean up code
** need to try invisible div to hold image in statue details for
colorbox gallery