jQuery custom toggle function?
<p>I'm trying to make a custom jQuery toggle function. Right now, I have 2 separate functions, <code>lightsOn</code> and <code>lightsOff</code>. How can I combine these functions to make them toggle (so I can just link to one function)?</p>

<pre><code>function lightsOn(){
 $('#dim').fadeOut(500,function() {
   $("#dim").remove();
 });
};

function lightsOff(){
 $('body').append('&lt;div id="dim"&gt;&lt;/div&gt;');
 $('#dim').fadeIn(250);
};
</code></pre>
