capture a click event for an href within an element that also captures a click event

capture a click event for an href within an element that also captures a click event

I'm trying to capture the click event of an href that appears within another element. In the code (below) I'm using I can see where the click event is being captured for the #dialog-box, which works fine.  The problem I have is, within the #dialog-box I display the following code: <a href=tsnooze.php?ID=" + ID + " id='snooze'><img src='snooze.gif' border=0></a>.  When I run the code, I can see the link when I move the mouse over the link, pointing to the correct place, but when I click the link it executes the click function for the #dialog-box and not the link.  I gave the href an ID and tried to capture the click event there, but it doesn't work, again executing the click function from the #dialog-box first. 
So the question is, is there a way to get the click event from the href to execute before the #dialog-box?  I looked around, but couldn't find a reference as to how to identify the element that was click and wasn't sure if there was such a thing as a switch statement for the code below, that is to say capturing the click event for multiple elements including the href and then doing a switch statement to identify which element was clicked.
Any help would be appreciated.

Thanks,
Tom

     // if user clicked on button, the overlay layer or the dialogbox, close the dialog   
    $('a.btn-ok, #dialog-overlay, #dialog-box').click(function () {   
        $('#dialog-overlay, #dialog-box').hide();       
        return false;
    });