Audio Jack with auto Toggle On/Off Primary Speaker circuit diagram NEEDED

In every mobile when we connect headphone through audio jack while playing music , it automatically turns off the primary speaker , I need a circuit diagram which will serve this purpose .

Pls help me .

May be you mean a socket like this :


Connection are show in the first picture :

1 - GND 2 - Right amp out 3 - Right speaker 4 - Left speaker 5 - Left amp out

Cheers, Ale.