Superoutbursts and grazing eclipses in the dwarf nova V1227 Herculis