2014-12-30 13.07.36

It looks like the circuit has a transistor that interrupts the circuit to the motor when there is power coming in from the wall.  When the switch is on, power comes from the batteries and the circuit is broken from the adaptor.