It looks like many pieces of code are now repeating the same generic setup for $('overlay').  It seems we should move that to a common location and not duplicate it.