Adds classes for gallery.