js: for adding class names to photos in other grid pages.