Form disappears before mouse can get to it

Form disappears before mouse can get to it

I have an item at the end of a menu that when it is moused over, it makes a form visible underneath it. On some machines running Safari the form flashes on and of on hover, and disappears when the mouse leaves the trigger.

I can get it to happen in Firefox if I move the mouse super slow from the trigger word to the box. I've tried moving the log in box closer with css, and it still happens.

here is the javascript:
    $(document).ready(function(){       
        var both = $(".both");
        var apMysfm = $("#mysfm_login");
               
        $(function(){
            apMysfm.hide(0,"#apMysfm");         
            both.hover(
                function () {
                    apMysfm.show(0,"hover");
                },
                function () {
                    apMysfm.hide(0,"hover");
                }
            );
        });       
    });    

here is where it lives: https://www.soundfamilymedicine.com/joomla15/