A method for detection of muon induced electromagnetic showers with the ANTARES detector