added collapsible menus for viewGallery, but can't automate collapsing