Switches that auto-detect if there's something attached to one side

I'm looking for a double-throw "switch" (or a switching circuit) that determines which side gets power based on if something is connected. A common example of this in consumer electronics is stereo systems (and iphones, etc) where by default they play over exterior speakers unless something is plugged into the headphone jack.

I expect there's some existing chip or device I can just buy that does this, but I have no idea what to search for. Alternately if it can reasonably easily be built (I imagine there's some way to do this with some transistors, diodes, and a double throw relay) that would also work.

I'd be using this to switch a 12V DC system that has reasonably high maximum amperage (somewhere around 30A).

In the case of an audio input it is a switch in the jack socket that does the detecting. There is no chip.

random_vamp:
I'm looking for a double-throw "switch" (or a switching circuit) that determines which side gets power based on if something is connected.
I'd be using this to switch a 12V DC system that has reasonably high maximum amperage (somewhere around 30A).

Use a 4 pin plug and socket rated at 30A. Connect the plug to your equipment (two pins, one each for +ve and -ve @ 30A). Link the other 2 pins together. Wire the socket so that a relay coil is powered through the link on the plug. If the plug isn't in, the relay can't operate. The relay coil can be any low voltage (you've got 12V there already, so a 12V relay would be easiest), as long as the contacts are capable of switching 12V @ 30A.