[jQuery] not this parent

[jQuery] not this parent


I have a code like this:
$("div#submenu a").click(function(){
    if($(this).attr("href") == "#"){
        if($(this).next("div").is(":hidden")){
            $("div#submenu div:not(div.cornerlt, div.cornerrt, div.cornerlb,
div.cornerrb)").slideUp();
            $(this).next("div").slideDown();
        }else{
            $(this).next("div").slideUp();
        }
        return false;
    }
});
Here $("div#submenu div").slideUp(); I have added several divs like
with class cornerlt don't get selected. But how can I add in this same
place that if this div is parent of clicked "div#submenu a" then it
doesn't get selected. Tried several ways adding something like div:not
(this:parent, ...) but couldn't get it to work.