I replied to you in the other thread, but I already wrote a simple jQuery function that does this, you can test it out here:
http://jsfiddle.net/ubAAt/
It needs a bit tweaking for working with xF, but everything is controlled by id's:
Code:
$("#toggleLights").click(function () {
//#toggleLights is the id of the button you click
event.preventDefault();
$("#changeClass").toggleClass("lightsOff");
// #changeClass is the id of the div container you want to change class of
$(this).text($(this).text() == 'Lights on' ? 'Lights off' : 'Lights on');
// A simple text replacement, if it is Lights on change to Lights off, else change to Lights on
});
This will add the class of the div you select to lightsOff (or remove lightsOff class), which means you can add some extra css for .whatever.lightsOff to change colors.