added on document ready

and moved the script links together