refine layouts: move js from _gallery.html.erb to demo.gallery.js