Fixed Javascript and display issues with GalleryView