How to hide a popup by clicking outside
<p>I am trying to come up with a way so that once #email-popup or #phone-popup is visible, if the user clicks anywhere EXCEPT the visible popup, then it is going to hide the popup.</p>

<p>My method for hiding the popups in the code below does not work well...</p>

<p>My JQuery so far</p>

<pre><code>$(".email").click(function(){
    $("#email-popup").show("fast");
});
$(".phone").click(function(){
   $("#phone-popup").show();
});

$(document).click(function() {
     $("#email-popup").hide("fast");                        
     $("#phone-popup").hide("fast");
});
</code></pre>
