Changed doc.ready to window.load