Changed document.ready to window.load