// var menuhover = 0;

function over_andclass() {
    jQuery(this).addClass("hover");
    if (jQuery('ul:first',this).length) {
        jQuery('ul:first',this).fadeIn(250);
    }
}
function away_andclass() {
    jQuery(this).removeClass("hover");
    jQuery('ul:first',this).hide();
}

function hover_over() {
    if (jQuery('ul:first',this).length) {
        jQuery('ul:first',this).fadeIn(250);
    }
}
function hover_away() {
    jQuery('ul:first',this).hide();
}

jQuery(function(){
    jQuery("#menu-main-menu > li").hoverIntent({over:over_andclass,out:away_andclass,timeout:100});
    jQuery("#menu-main-menu ul li").hover(hover_over,hover_away);
});
