move document.ready to bottom of file