Move scripts to head tag
Remove hideElement function & replace it with jQuery built-in