tweeking jquery to function smoother(not working)