Move javascript to the end of the document