fixes some issues with gallery / embedded browse and javascript plugins
Merge pull request #471 from sul-dlss/js-fixes

fixes some issues with gallery / embedded browse and javascript plugins