I've tried the answers to the similair questions of this without success.
In this jsfiddle: http://jsfiddle.net/h2HzN/6/
I have it set up that when you press escape it goes away using this:
$(document).keyup(function(e) {
if (e.keyCode == 27) {
$("#signup").fadeOut(250);
$("#window").slideUp(450);
}
});
but I also want it go away when you click anywhere but the black box. Thanks in advance.