Link style with javascript
===

I have this code for hiding\showing link depends on state of cBoxoverlay. But when i click to close this item(`display:none`), and then click again to show it(`display:block`) my link(`#close-news`) still not showing.

        jQuery(document).click(function(){if (jQuery("#cBoxOverlay").css("display","none")) 
           {jQuery("#close-news").css("display", "none");}
    else if (jQuery("#cBoxOverlay").css("display","block")){
    jQuery("#close-news").css("display", "block");

    

Where did i make mistake?