Take control of your music with Breakaway. Hit the mute button, and iTunes pauses. Hit it again, and the music resumes. Pull out your headphones, and iTunes pauses. Plug it back in, and it starts again.
Feeling clever? Bind custom actions to mute/headphone events. Have your computer lock itself when the headphones are removed from the jack and more.