gallery legend toggle system