$(document).ready(function() {
    var hide = false;
    $(".levelOne").hover(function() {
        if (hide) clearTimeout(hide);
        $("#megamenu").fadeIn();
    }, function() {
    hide = setTimeout(function() { $("#megamenu").fadeOut("slow"); }, 250);
    });
    $("#megamenu").hover(function() {
        if (hide) clearTimeout(hide);
    }, function() {
    hide = setTimeout(function() { $("#megamenu").fadeOut("slow"); }, 250);
    });
});