function subHoverOver() {
	$(this).find('.sub').stop().fadeTo(70, 1).show();
}

function subHoverOut() {
	$(this).find('.sub').stop().fadeTo(70, 0, function() {
		$(this).hide();
	});
}

function moreHoverOver() {
	$(this).find('.more').stop().fadeTo(70, 1).show();
}

function moreHoverOut() {
	$(this).find('.more').stop().fadeTo(70, 0, function() {
		$(this).hide();
	});
}

var subConfig = {
	sensitivity: 2,
	interval: 40,
	over: subHoverOver,
	timeout: 100,
	out: subHoverOut
};

var moreConfig = {
	sensitivity: 2,
	interval: 40,
	over: moreHoverOver,
	timeout: 100,
	out: moreHoverOut
};

$(document).ready(function() {
	$('#nav').prependTo($('#centered'));
	$('#nav').show();
	$('#nav a[href="#"]').click(function (){
		return false;
	});
	$('#nav li .sub').css({'opacity': '0'});
	$('#nav li').hoverIntent(subConfig);
	$('#nav li.has-more').hoverIntent(moreConfig);
});
