Added window.load and document.ready