added window and document to jquery ectension