Epidemics with two levels of mixing