tested gallery.withpanel
convert to requireJs