function mainmenu(){
$(" #mainNav #nav ol ").css({display: "none"}); // Opera Fix
$(" #mainNav #nav li ").hover(function(){
		$(this).find('ol:first').css({visibility: "visible",display: "none"}).show(400);
		},function(){
		$(this).find('ol:first').css({visibility: "hidden"});
		});
}

$(document).ready(function() {
	mainmenu();
	$("a#tab01").hover(function() {
		$("a#tab01 span").addClass("current");
		$("a#tab02 span").removeClass("current");
		$("a#tab03 span").removeClass("current");
		$("a#tab04 span").removeClass("current");
		$("div#content01").css("display", "block");
		$("div#content01").animate({opacity: 1}, "slow");
		$("div#content02").animate({opacity: 0}, "slow");
		$("div#content03").animate({opacity: 0}, "slow");
		$("div#content04").animate({opacity: 0}, "slow");
		$("div#content01").css("z-index", "2");
		$("div#content02").css("z-index", "1");
		$("div#content03").css("z-index", "1");
		$("div#content04").css("z-index", "1");
	});
	$("a#tab02").hover(function() {
		$("a#tab01 span").removeClass("current");
		$("a#tab02 span").addClass("current");
		$("a#tab03 span").removeClass("current");
		$("a#tab04 span").removeClass("current");
		$("div#content02").css("display", "block");
		$("div#content01").animate({opacity: 0}, "slow");
		$("div#content02").animate({opacity: 1}, "slow");
		$("div#content03").animate({opacity: 0}, "slow");
		$("div#content04").animate({opacity: 0}, "slow");
		$("div#content01").css("z-index", "1");
		$("div#content02").css("z-index", "2");
		$("div#content03").css("z-index", "1");
		$("div#content04").css("z-index", "1");
	});
	$("a#tab03").hover(function() {
		$("a#tab01 span").removeClass("current");
		$("a#tab02 span").removeClass("current");
		$("a#tab03 span").addClass("current");
		$("a#tab04 span").removeClass("current");
		$("div#content03").css("display", "block");
		$("div#content02").animate({opacity: 0}, "slow");
		$("div#content01").animate({opacity: 0}, "slow");
		$("div#content03").animate({opacity: 1}, "slow");
		$("div#content04").animate({opacity: 0}, "slow");
		$("div#content01").css("z-index", "1");
		$("div#content02").css("z-index", "1");
		$("div#content03").css("z-index", "3");
		$("div#content04").css("z-index", "1");
	});
	$("a#tab04").hover(function() {
		$("a#tab01 span").removeClass("current");
		$("a#tab02 span").removeClass("current");
		$("a#tab03 span").removeClass("current");
		$("a#tab04 span").addClass("current");
		$("div#content04").css("display", "block");
		$("div#content01").animate({opacity: 0}, "slow");
		$("div#content02").animate({opacity: 0}, "slow");
		$("div#content03").animate({opacity: 0}, "slow");
		$("div#content04").animate({opacity: 1}, "slow");
		$("div#content01").css("z-index", "1");
		$("div#content02").css("z-index", "1");
		$("div#content03").css("z-index", "1");
		$("div#content04").css("z-index", "2");
	});

});