Update gallery.js