Fixing some problem with jQuery, move from the footer to the header