Update modalEffects.js

Needs a document ready so that overlay isn't null