javascript fix(?)

placed all script in the header