Working on getting the javascript functionality of the gallery back to working order