move js out to a custom js

no inline, it's not nice