var tabVisit = 0; var tabLive = 0; var tabLearn = 0;
function make_tab(whichTab) { $("#h-tab-"+whichTab+"-new a").addClass('selected'); $("#tab-mm-"+whichTab).show(); }
function wipe_tab(whichTab) { $("#tab-mm-"+whichTab).hide(); $("#h-tab-"+whichTab+"-new a").removeClass('selected'); }
function wipe_tabs() { $("#h-tab-visit-new a").removeClass('selected'); $("#h-tab-live-new a").removeClass('selected'); $("#h-tab-learn-new a").removeClass('selected'); }
function wipe_megas() { $("#tab-mm-visit").hide(); $("#tab-mm-live").hide(); $("#tab-mm-learn").hide(); }
function check_visit() { if (tabVisit == 0) { wipe_tab('visit'); } }
function check_live() { if (tabLive == 0) {	wipe_tab('live'); } }
function check_learn() { if (tabLearn == 0) { wipe_tab('learn'); } }
$(document).ready(function(){
	$("#h-tab-visit-new").hoverIntent(function(){make_tab('visit'); }, function(){subNavTimer = setTimeout('check_visit();', 1);});	$("#tab-mm-visit").hover(function(){tabVisit = 1;$("#h-tab-visit-new a").addClass('selected');$("#h-tab-live-new a").removeClass('selected');$("#h-tab-learn-new a").removeClass('selected');},function(){tabVisit = 0;$("#tab-mm-visit").hide();wipe_tabs();});
	$("#h-tab-live-new").hoverIntent(function(){make_tab('live'); }, function(){subNavTimer = setTimeout('check_live();', 1);});$("#tab-mm-live").hover(function(){tabLive = 1;$("#h-tab-live-new a").addClass('selected');$("#h-tab-visit-new a").removeClass('selected');$("#h-tab-learn-new a").removeClass('selected');},function(){tabLive = 0;$("#tab-mm-live").hide();wipe_tabs();});
	$("#h-tab-learn-new").hoverIntent(function(){make_tab('learn'); }, function(){subNavTimer = setTimeout('check_learn();', 1);});$("#tab-mm-learn").hover(function(){tabLearn = 1;$("#h-tab-learn-new a").addClass('selected');$("#h-tab-visit-new a").removeClass('selected');$("#h-tab-live-new a").removeClass('selected');},function(){tabLearn = 0;$("#tab-mm-learn").hide();wipe_tabs();});
});