var original; // LEAVE THIS! USED IN INC/HEAD
var old_t = '';
var new_t = '';

$(document).ready(function() {
	if (old_t == '') old_t = original;

	// Top level mouseovers
	$("#top-nav > li").hover(function() {
		$('#tab-'+original).removeClass('active');
		$(this).addClass('hover');
	}, function() {
		sweepNav();
		$(this).removeClass('hover');
	});
	
	// Second level hover behavior for piece of #&@% IE6
	if ($.browser.msie) {
		$("#top-nav li ul li").hover(function() {
			$(this).children("div.level").show();
		}, function() {
			$(this).children("div.level").hide();
		});
	}
	
	// Second level tab behavior
	$('div.level').hover(function() {
		$(this).siblings("a").addClass('current');
	}, function() {
		$(this).siblings("a").removeClass('current');
	});
});

function sweepNav() {
	$('#top-nav li').each(function(i,n) {
		if ( $(this).hasClass('active') ) $(this).removeClass('active');
	});
	
	$('#tab-'+original).addClass('active');
}