Goodbye Sheriff Taylor - S5-E10
Continuity mistake: While Barney's trying to instruct the new deputy candidates, when he throws a tomato to Otis it splatters on his shirt, and a few things keep changing depending on the angle of the shot - the amount of tomato goo increases/changes position; the suspender's sliding adjuster changes height; the deputy badge changes position.
Answer: Those "boxes" are valences that used to be very common, before air conditioning. They allow for windows to be open during rain storms. They permit air circulation, without letting the rain in.