loading

Will this 'switching' circuit work for cabinet lights? Any comments?

Im making cabinet lights using LEDs. I use a transformer to power it off AC mains, but I want it to run on batteries too... So Im making a circuit that would automatically change the source of the power from the mains to battery when the power goes out, and back again when it comes on.

Im using an NPN and a PNP transistor to do the switching. When mains (S1) is on, the NPN is on and current flows from the transformer, when S1 is off, NPN is off and PNP is on and current flows from the batteries.

What I am worried about is that (I think) the transistors need a Gnd on the emitter. Is that right? If I connect the +ve of LEDs to [OUT] and -ve to GND will it work as expected? Can someone try please?

Picture of Will this 'switching' circuit work for cabinet lights? Any comments?