change to delay ajax till animation is complete