Question: Form focus to prevent fadeOut?

Question: Form focus to prevent fadeOut?


I'm having a little trouble coming up with a concise way to do this.
I've created a div containing a registration form that fades in when
the user hovers over a triggering link, and the code I'm currently
using is as follows:
$(document).ready(function() {
    var hide = false;
    $(".reg1, .register").hover(function(){
        if (hide) clearTimeout(hide);
        $(".login, .about").fadeOut(40);
        $(".register").fadeIn();
    }, function() {
        hide = setTimeout(function() {$(".register").fadeOut();}, 400);
    });
});
At the moment I've been able to prevent the ".register" class from
fading while the mouse is over it by adding as the trigger for the
initial fade, but what I'd like is for the class to remain visible if
a form input has focus for obvious accessibility reasons.
Any ideas?