All-optical switching and routing based on an electromagnetically induced absorption grating.