$(document).ready(function() {
	
	var hover_interval = 150;
	var hover_timeout = 300;
	
	$("li#nav-news").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
        $("#newsdropdown").fadeIn('fast');
		$(this).css("height","28px");
		$(this).css("line-height","28px");
		$(this).css("border-bottom","#000 solid 4px");
		return false;
    }, out:function() {
        $("#newsdropdown").fadeOut('fast');
		$(this).css("height","31px");
		$(this).css("line-height","31px");
		$(this).css("border-bottom","#cfcfcf solid 1px");
		return false;
    } } );
	
	$("li#nav-biketests").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
        $("#biketestsdropdown").fadeIn('fast');
		$(this).css("height","28px");
		$(this).css("line-height","28px");
		$(this).css("border-bottom","#000 solid 4px");
		return false;
    }, out:function() {
        $("#biketestsdropdown").fadeOut('fast');
		$(this).css("height","31px");
		$(this).css("line-height","31px");
		$(this).css("border-bottom","#cfcfcf solid 1px");
		return false;
    } } );
	
//	$("li#nav-standings").hover( function() {
//        $("#standingsdropdown").fadeIn('fast');
//		$(this).css("height","28px");
//		$(this).css("line-height","28px");
//		$(this).css("border-bottom","#000 solid 4px");
//		return false;
//    }, function() {
//        $("#standingsdropdown").fadeOut('fast');
//		$(this).css("height","31px");
//		$(this).css("line-height","31px");
//		$(this).css("border-bottom","#cfcfcf solid 1px");
//		return false;
//    });

	$("li#nav-more").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
        $("#moredropdown").fadeIn('fast');
		$(this).css("height","28px");
		$(this).css("line-height","28px");
		$(this).css("border-bottom","#000 solid 4px");
		return false;
    }, out:function() {
        $("#moredropdown").fadeOut('fast');
		$(this).css("height","31px");
		$(this).css("line-height","31px");
		$(this).css("border-bottom","#cfcfcf solid 1px");
		return false;
    } } );

	$("li#nav-sport").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
        $("#sportdropdown").fadeIn('fast');
		$(this).css("height","28px");
		$(this).css("line-height","28px");
		$(this).css("border-bottom","#000 solid 4px");
		return false;
    }, out:function() {
        $("#sportdropdown").fadeOut('fast');
		$(this).css("height","31px");
		$(this).css("line-height","31px");
		$(this).css("border-bottom","#cfcfcf solid 1px");
		return false;
    } } );

	$("li#nav-shop").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
        $("#shopdropdown").fadeIn('fast');
		$(this).css("height","28px");
		$(this).css("line-height","28px");
		$(this).css("border-bottom","#000 solid 4px");
		return false;
    }, out:function() {
        $("#shopdropdown").fadeOut('fast');
		$(this).css("height","31px");
		$(this).css("line-height","31px");
		$(this).css("border-bottom","#cfcfcf solid 1px");
		return false;
    } } );

	$("li#nav-profile").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
        $("#profiledropdown").fadeIn('fast');
		$(this).children("a").css("background-color","#000");
		return false;
    }, out:function() {
        $("#profiledropdown").fadeOut('fast');
		$(this).children("a").css("background-color","transparent");
		return false;
    } } );
	
	$("li#nav-addcontent").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
        $("#addcontentdropdown").fadeIn('fast');
		$(this).children("a").css("background-color","#000");
		return false;
    }, out:function() {
        $("#addcontentdropdown").fadeOut('fast');
		$(this).children("a").css("background-color","transparent");
		return false;
    } } );
	
	$("li#nav-account").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
        $("#accountdropdown").fadeIn('fast');
		$(this).children("a").css("background-color","#000");
		return false;
    }, out:function() {
        $("#accountdropdown").fadeOut('fast');
		$(this).children("a").css("background-color","transparent");
		return false;
    } } );
	
	$("li.nav-sidesubmenu").hoverIntent( { interval:hover_interval, timeout:hover_timeout, over:function() {
		var id = $(this).attr('id').substring(4);
		$("div.sidesubmenu."+id).fadeIn('fast');
		$(this).children("a").css("background-color","#d7d7d7");
		$(this).children("a").css("margin-right","0");
		return false;
	}, out:function() {
		var id = $(this).attr('id').substring(4);
		$("div.sidesubmenu."+id).fadeOut('fast');
		$(this).children("a").css("background-color","transparent");
		$(this).children("a").css("margin-right","5px");
		return false
	} } );
});
