reference window and document off the global object
Merge pull request #261 from andrewscode/master

deferUntilReady:  reference the window and document objects from global