Fixed jquery ready from window.ready to document.ready