$(document).ready(function(){
	var x = 0; // is the menu open? needed to prevent bouncing
	var y = 0; // is the right menu open?
		
	$("#menuItem1").mouseenter(function(){
		$("#menuItem1").stop();
//		if( x != 1 ) { // menu is not open
			$("#leftMenuContainer").css({"top":"265px","height":"433px"});
			$("#menuItem1").css("background-position","0 0");
			$("#menuItem1").css("z-index","10");
			x = 1;
			$("#menuItem1").css("bottom","0px");
			$("#menuItem1").css("background-position","0 0");
			trackRollOver1();
//		}
	});
	$("#menuItem1").mouseleave(function(){
		$("#menuItem1").stop();
//		if( x != 0) {
			$("#menuItem1").css("z-index","1");
			$("#menuItem1").css("bottom","-358px");														
			$("#leftMenuContainer").css({"top":"597px","height":"76px"});																															
			$("#menuItem1").css("background-position","-1000px");
			x = 0;
//		}
	});
	$("#menuItem2").mouseenter(function(){
		$("#menuItem2").stop();
//		if( y != 1 ){
			$("#rightMenuContainer").css({"top":"510px","height":"163px"});
			$("#menuItem2").css("background-position","0 0");
			$("#menuItem2").css("z-index","10");
			$("#menuItem2").css("bottom","0px");															
			y = 1;
			$("#menuItem2").css("background-position","0 0");
			trackRollOver2();
//		}
	});
	$("#menuItem2").mouseleave(function(){
		$("#menuItem2").stop();
//		if( y != 0 ){
		$("#menuItem2").css("bottom","-88px");	
 		$("#rightMenuContainer").css({"top":"597px","height":"76px"});																									
		$("#menuItem2").css("background-position","-1000px");
		$("#menuItem2").css("z-index","1");
		y = 0;
//		}
	});

	if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
		// no rollover effects
	} else {
		$(".menuChoice").mouseenter(function(){
			$(".menuRollover", this).css("visibility","visible");
			$(this).css("text-shadow","0px 0px 5px #00CCFF");
		});
		$(".menuChoice").mouseleave(function(){
			$(".menuRollover", this).css("visibility","hidden");
			$(this).css("text-shadow","none");
		});
	}
});
