You can't do this natively, as this will require some legwork.
Something like this would work, but there must be a better solution:
var state = {a:false,b:false};
$('.a').mouseenter(enterA);
$('.a').mouseout(exitA);
$('.b').mouseenter(enterB);
$('.b').mouseout(exitB);
function enterA(){ state.a = true }
function exitA(){ state.a = false }
function enterB(){ state.b = true }
function exitB(){ state.b = false }
And then if you have jQuery 1.4.2, you can bind multiple events, so add these after the first events.
$('.a,.b').mouseout(function(){
//we're outside of both blocks
if( !state.a && !state.b )
{
//do something
}
});
This will then fire when you've left A or B, and you're also outside of the other one. I think this is what you meant.