Made changes to use unobstrusive javascript