jQuery(document).ready(function(){
	var isHovering;
	var isHoveringTab = false;

	/* Set the tabs to the same height */
	var h = 0;
	$('.BusinessTab').each(
		function(){
			var newH = $(this).height();
			if(newH > h){h = newH;}
		}
	);
	$('.BusinessTab').height(h);

	$('#NB_Menu li').hover(
		function(){
			
			/* Get My Id (numeric) */
			var myId = $(this).attr('id').split("_Tab")[1];

			/* Turn on associated shadow */
			$('#NB_Shadows li').not('#NB_Shad' + myId).hide();
			$('#NB_Shad' + myId).show();
			
			/* Highlight me */
			$('#NB_Menu li a').not($(this).find('a').first()).removeClass('Active');
			$(this).find('a').first().addClass('Active');
			

			/* Show the appropiate content tab */
			$('#BusinessTabsOuter').show();
			$('.BusinessTab').not('#BT_Tab'+myId).hide();
			$('#BT_Tab'+myId).show();
		},
		function(){
		}
	);

	$('.BusinessTab').hover(
		function(){
			/* Get My Id (numeric) */
			var myId = $(this).attr('id').split("_Tab")[1];
			$('#NB_Tab' + myId).mouseenter();
		},
		function(){
			var myId = $(this).attr('id').split("_Tab")[1];
			$('#NB_Tab' + myId).mouseleave();
		}						
							
	);

	/* Onload set the first item */
	$('#NB_Menu li:first').mouseenter();

});
