As described in Q172 hovercards are not optimal from an UX standpoint.
First problem: They open instantly, sometimes blocking the initial target of the mouse movement of the user. Fixable by replacing "mousemove" with "mouseenter"/"mouseleave" and a timeout here.
Second problem: The hovercard has a transparent magical margin which disables closing it even if you leave the card. This can be fixed here by changing the margin and/or changing the condtions later in the function here.