Study of lattice dynamics via extended x-ray absorption fine structure