I might try using jQuery's hover()
function. This would help make your code easier to read, and it might help you organize what happens when the bulb turns on/off. For example:
var bulbOn = function() { ... }
var bulbOff = function() { ... }
$('#lamp').hover(bulbOn, bulbOff);
Here's a jsfiddle to illustrate.