Hamilton-Jacobi approach to cosmology with nonlinear sigma model