Moved the JS into the header element