move some jquery out of load function

makes a smoother load