changes document.ready to window.load