updates gallery widget to allow for multiple galleries on a page

Currently the gallery widget does not work with multiple galleries on the same page. This PR changes the widget to loop through all galleries on a page and initializes each one with its own settings