Panic contagion and the evacuation dynamics