Dynamics of Airy beams in nonlinear media