I am thinking you can use a DPDT (double pole double throw) relay to do what you need.

Think of it like a rocker switch for power windows. There are only two wires going to the window motor, so when going up polarity is one way, when going down polarity switches due to how the relay is wired.

If wired right this same type of relay can switch the leds off when the headlights come on.

A snippet from a website describing a DPDT relay

The DPDT relay is the fourth kind of simple switch. The "DP" means that it is double pole, so it switches both sides of the circuit, and the "DT" means that rather than just turning on and off, it switches from one set of wires to another.




Read more: How Does a DPDT Relay Work? | eHow.com http://www.ehow.com/how-does_5233616...#ixzz1H6jzgArd