in modal.js, feeding global $ and window in as locals