moved inline js to head