Rearrange scripts in index.html so they are all in "contentfor" block

refs #3149