Give the gift of Drupal. All merchandise is 50% off through 2016.
Galleria currently looks at the html inside of an html selector to extract the data it needs to create a slideshow. A far better way is to feed the gallery via a JSON array.
I'll post a patch shortly.