includes document.ready in js, moves script tag to <head>