gallery row view HTML markup fix for first image on js load