Use classes instead of IDs

Should have noticed earlier that looks nicer
using classes instead of ID for groups of thumbnails of the
same variant