function changeMasthead(){
	var mh = $('#masthead li').length;
	if ((mh-1) == current) {
		$('#masthead li').eq(current).fadeOut(1000);
		$('#masthead li').eq(0).fadeIn(1000);
		current = 0;
	} else {
		$('#masthead li').eq(current).fadeOut(1000);
		$('#masthead li').eq(current+1).fadeIn(2000);
		current++;
	}

}



$(function(){
	// $('#masthead-wrap').css({
	// 	'height': $('#masthead li img').height() + 'px'
	// });
	current = 0;
	if ($('#masthead li').length > 1){
		setInterval("changeMasthead()", 5000);
	}

	$('#tab-nav a').hover(function(){
		otext = $('#footer-masthead p').html();
		ntext = $(this).attr('title');
		$('#footer-masthead p').html(ntext);
	}, function(){
		$('#footer-masthead p').html(otext);
	});

	
	$("a[rel]").overlay({
		mask: '#789'
	});

});

