The Hamilton-Jacobi theory in the calculus of variations: It