#2014 - Clean up gallery.ajax.js.

- prepend "data-" in front of non-standard attr to be more standards compliant.
- fix formatting.