A Model of Social Norm Dynamics