function initNav(noClick, menuActive) {
	var menu;
	var menuNum;
	var loadNextMenu = false;
	var loadSelf = false;
	var menuItem;
	var prev_menuItem;
	var mainNav_level1 = false;
	var mainNav_level2 = false;
	var reposUp = false;
	var menu_pos0 = 105;
	var menu_pos1 = 196;
	var menu_pos2 = 90;
	var menu_pos3 = 20;
	var menu_pos4 = 71;
	var closePos1 = 205;
	var closePos2 = 100;
	var closePos3 = 30;
	var contact_closePos = -119;
	var capabilities_menu_pos = 89;
	var clients_menu_pos = 89;
	var caseStudies_menu_pos = 89;
	var theCompany_menu_pos = -18;
	var theStaff_menu_pos = -18;
	var contact_menu_pos = -126;
	var jobs_menu_pos = -126;
	//if ie
	if($.browser.msie){
		contact_menu_pos = -135;
		jobs_menu_pos = -135;
		contact_closePos = -127;
	}
	var mainarrow;
	var subarrow;
	var capabilities;
	var num;
	var distance;
	var animating = false;
	var subNav_url;
	var subNav_link = false;
	var mainurl;
	//vars for each specific menu
	var mainNav_link;
	var mainNav_menu;
	var menu_pos;
	var closeLink = false;
	var theStaff_link;
	var theStaff_profileNum;
	var noMenuLink;
	var footerLink_rollover;
		
		//fade close button
		$(".mainNav_close").fadeTo("fast", 0.0);
		
		//set active page to selected state and if has initial active state
		if(menuActive == "capabilities"){
			$("#mainNav_workMenu .mainNav_link1").css("background-color", "#fa5d43");
			//set vars for current menu
			mainNav_link = "#mainNav_link1";
			mainNav_menu = "#mainNav_workMenu";
			menu_pos = menu_pos1;
			//set menu to 1(work menu)
			menu = 1;
			loadMenu();	
		}else if(menuActive == "clients"){
			$("#mainNav_workMenu .mainNav_link2").css("background-color", "#fa5d43");
			//set vars for current menu
			mainNav_link = "#mainNav_link1";
			mainNav_menu = "#mainNav_workMenu";
			menu_pos = menu_pos1;
			//set menu to 1(work menu)
			menu = 1;
			loadMenu();	
		}else if(menuActive == "caseStudies"){
			$("#mainNav_workMenu .mainNav_link3").css("background-color", "#fa5d43");
			//set vars for current menu
			mainNav_link = "#mainNav_link1";
			mainNav_menu = "#mainNav_workMenu";
			menu_pos = menu_pos1;
			//set menu to 1(work menu)
			menu = 1;
			loadMenu();	
		}else if(menuActive == "theCompany"){
			$("#mainNav_aboutMenu .mainNav_link1").css("background-color", "#fa5d43");
			$("#mainNav_aboutMenu .mainNav_link1 img.mainNav_asteric").attr("src", "images/main/mainNav_sub_asteric_active.png");
		}else if(menuActive == "theStaff"){
			$("#mainNav_aboutMenu .mainNav_link2").css("background-color", "#fa5d43");	
		}
		
		//hover states
		//capabilities
		$("#mainNav_workMenu .mainNav_link1").hover(function(){
			//if menu is selected
			if(menuActive == "capabilities"){
				$(this).css("background-color", "#fa5d43");
			}else{
				$(this).css("background-color", "#88bcbe");
			}
			$("#mainNav_capabilities").css("color", "#000");
		},function(){
			//if menu is selected
			if(menuActive == "capabilities"){
				$(this).css("background-color", "#fa5d43");
				$("#mainNav_capabilities").css("color", "#000");
			}else{
				$(this).css("background-color", "#9bd6d9");
				$("#mainNav_capabilities").css("color", "#595c5c");
			}
		});
		//clients
		 $("#mainNav_workMenu .mainNav_link2").hover(function(){
			//if menu is selected
			if(menuActive == "clients"){
				$(this).css("background-color", "#fa5d43");
			}else{
				$(this).css("background-color", "#88bcbe");
			}
			$("#mainNav_clients").css("color", "#000");
		},function(){
			//if menu is selected
			if(menuActive == "clients"){
				$(this).css("background-color", "#fa5d43");
				$("#mainNav_clients").css("color", "#000");
			}else{
				$(this).css("background-color", "#9bd6d9");
				$("#mainNav_clients").css("color", "#595c5c");
			}
		});
		//case studies
		$("#mainNav_workMenu .mainNav_link3").hover(function(){
			//if menu is selected
			if(menuActive == "caseStudies"){
				$(this).css("background-color", "#fa5d43");
			}else{
				$(this).css("background-color", "#88bcbe");
			}
			$("#mainNav_caseStudies").css("color", "#000");
		},function(){
			//if menu is selected
			if(menuActive == "caseStudies"){
				$(this).css("background-color", "#fa5d43");
				$("#mainNav_caseStudies").css("color", "#000");
			}else{
				$(this).css("background-color", "#9bd6d9");
				$("#mainNav_caseStudies").css("color", "#595c5c");
			}
		});
		
		//the company
		$("#mainNav_aboutMenu .mainNav_link1").hover(function(){
			//if menu is selected
			if(menuActive == "theCompany"){
				$(this).css("background-color", "#fa5d43");
				$("img.mainNav_asteric", this).attr("src", "images/main/mainNav_sub_asteric_active.png");
			}else{
				$(this).css("background-color", "#88bcbe");
				$("img.mainNav_asteric", this).attr("src", "images/main/mainNav_sub_asteric_active.png");
			}
			$("#mainNav_theCompany").css("color", "#000");
		},function(){
			//if menu is selected
			if(menuActive == "theCompany"){
				$(this).css("background-color", "#fa5d43");
				$("#mainNav_theCompany").css("color", "#000");
				$("img.mainNav_asteric", this).attr("src", "images/main/mainNav_sub_asteric_active.png");
			}else{
				$(this).css("background-color", "#9bd6d9");
				$("#mainNav_theCompany").css("color", "#595c5c");
				$("img.mainNav_asteric", this).attr("src", "images/main/mainNav_sub_asteric.png");
			}
		});
		
		//the staff
		$("#mainNav_aboutMenu .mainNav_link2").hover(function(){
			//if menu is selected
			if(menuActive == "theStaff"){
				$(this).css("background-color", "#fa5d43");
			}else{
				$(this).css("background-color", "#88bcbe");
			}
			$("#mainNav_theStaff").css("color", "#000");
		},function(){
			//if menu is selected
			if(menuActive == "theStaff"){
				$(this).css("background-color", "#fa5d43");
				$("#mainNav_theStaff").css("color", "#000");
			}else{
				$(this).css("background-color", "#9bd6d9");
				$("#mainNav_theStaff").css("color", "#595c5c");
			}
		});
		
		//the game
		$("#mainNav_aboutMenu .mainNav_link3").hover(function(){
			//if menu is selected
			if(menuActive == "theGame"){
				$(this).css("background-color", "#fa5d43");
				$("img.mainNav_asteric", this).attr("src", "images/main/mainNav_sub_asteric_active.png");
			}else{
				$(this).css("background-color", "#88bcbe");
				$("img.mainNav_asteric", this).attr("src", "images/main/mainNav_sub_asteric_active.png");
			}
			$("#mainNav_theGame").css("color", "#000");
		},function(){
			//if menu is selected
			if(menuActive == "theGame"){
				$(this).css("background-color", "#fa5d43");
				$("img.mainNav_arrow", this).attr("src", "images/main/mainNav_sub_asteric_active.png");
				$("#mainNav_asteric").css("color", "#000");
			}else{
				$(this).css("background-color", "#9bd6d9");
				$("img.mainNav_asteric", this).attr("src", "images/main/mainNav_sub_asteric.png");
				$("#mainNav_theGame").css("color", "#595c5c");
			}
		});
		
		//contact
		$("#mainNav_contactMenu .mainNav_link1").hover(function(){
			//if menu is selected
			if(menuActive == "contact"){
				$(this).css("background-color", "#fa5d43");
			}else{
				$(this).css("background-color", "#88bcbe");
			}
			$("#mainNav_contact").css("color", "#000");
		},function(){
			//if menu is selected
			if(menuActive == "contact"){
				$(this).css("background-color", "#fa5d43");
				$("#mainNav_contact").css("color", "#000");
			}else{
				$(this).css("background-color", "#9bd6d9");
				$("#mainNav_contact").css("color", "#595c5c");
			}
		});
		
		//jobs
		$("#mainNav_contactMenu .mainNav_link2").hover(function(){
			//if menu is selected
			if(menuActive == "jobs"){
				$(this).css("background-color", "#fa5d43");
			}else{
				$(this).css("background-color", "#88bcbe");
			}
			$("#mainNav_jobs").css("color", "#000");
		},function(){
			//if menu is selected
			if(menuActive == "jobs"){
				$(this).css("background-color", "#fa5d43");
				$("#mainNav_jobs").css("color", "#000");
			}else{
				$(this).css("background-color", "#9bd6d9");
				$("#mainNav_jobs").css("color", "#595c5c");
			}
		});
											 
						   
	    // hover color change effect
	    $(".slider li").hover(function() {
	        $(this).animate({opacity: 0.90}, 100, function(){
	            $(this).animate({opacity: 1}, 0);
	        } );
	    });
	    // Trigger mouse move event over the 'menu_holder'.
		//holder 1
	    $("#menu_holder1").mousemove(function(e) {
			// Enable scroll function only when the height of the 'slider' or menu is greater than the 'menu_holder'.
	        if($(this).height() < $("#menu_holder1 .slider").height()) {
	            // Calculate the distance value from the 'menu_holder' y pos and page Y pos.
	            var distance = e.pageY - $(this).offset().top;
	            // Get the percentage value with respect to the Mouse Y on the 'menu_holder'.
	            var percentage = distance / $(this).height();
	            // Calculate the new Y position of the 'slider'.
	            var targetY = -Math.round(($("#menu_holder1 .slider").height() - $(this).height()) * percentage);
	            // With jQuery easing funtion from easing plugin.
	            $('#menu_holder1 .slider').animate({top: [targetY+"px", "easeOutCirc"]}, { queue:false, duration:200 });
			}
		});
		//holder 2
	    $("#menu_holder2").mousemove(function(e) {
			// Enable scroll function only when the height of the 'slider' or menu is greater than the 'menu_holder'.
	        if($(this).height() < $("#menu_holder2 .slider").height()) {
	            // Calculate the distance value from the 'menu_holder' y pos and page Y pos.
	            var distance = e.pageY - $(this).offset().top;
	            // Get the percentage value with respect to the Mouse Y on the 'menu_holder'.
	            var percentage = distance / $(this).height();
	            // Calculate the new Y position of the 'slider'.
	            var targetY = -Math.round(($("#menu_holder2 .slider").height() - $(this).height()) * percentage);
	            // With jQuery easing funtion from easing plugin.
	            $('#menu_holder2 .slider').animate({top: [targetY+"px", "easeOutCirc"]}, { queue:false, duration:200 });
			}
		});
		//holder 3
	    $("#menu_holder3").mousemove(function(e) {
			// Enable scroll function only when the height of the 'slider' or menu is greater than the 'menu_holder'.
	        if($(this).height() < $("#menu_holder3 .slider").height()) {
	            // Calculate the distance value from the 'menu_holder' y pos and page Y pos.
	            var distance = e.pageY - $(this).offset().top;
	            // Get the percentage value with respect to the Mouse Y on the 'menu_holder'.
	            var percentage = distance / $(this).height();
	            // Calculate the new Y position of the 'slider'.
	            var targetY = -Math.round(($("#menu_holder3 .slider").height() - $(this).height()) * percentage);
	            // With jQuery easing funtion from easing plugin.
	            $('#menu_holder3 .slider').animate({top: [targetY+"px", "easeOutCirc"]}, { queue:false, duration:200 });
			}
		});
		//holder 4
	    $("#menu_holder4").mousemove(function(e) {
			// Enable scroll function only when the height of the 'slider' or menu is greater than the 'menu_holder'.
	        if($(this).height() < $("#menu_holder4 .slider").height()) {
	            // Calculate the distance value from the 'menu_holder' y pos and page Y pos.
	            var distance = e.pageY - $(this).offset().top;
	            // Get the percentage value with respect to the Mouse Y on the 'menu_holder'.
	            var percentage = distance / $(this).height();
	            // Calculate the new Y position of the 'slider'.
	            var targetY = -Math.round(($("#menu_holder4 .slider").height() - $(this).height()) * percentage);
	            // With jQuery easing funtion from easing plugin.
	            $('#menu_holder4 .slider').animate({top: [targetY+"px", "easeOutCirc"]}, { queue:false, duration:200 });
			}
		});
	
	//click states
	//****************link1************************
	$("#mainNav_link1").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				$(".mainNav_close").css("visibility", "hidden");
				//$("#mainNav_workMenu .mainNav_close").fadeTo("fast", 0.0);
				//if any other menu is expanded
				if(menu == 2 || menu == 3){
					loadNextMenu = true;
					collapseMenu(1);
				}else{
					//set vars for current menu
					mainNav_link = "#mainNav_link1";
					mainNav_menu = "#mainNav_workMenu";
					menu_pos = menu_pos1;
					//set menu to 1(work menu)
					menu = 1;
					loadMenu();	
				}
			}
		}
	});	
	//****************end link1************************
	
	//****************link2************************
	$("#mainNav_link2").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				$(".mainNav_close").css("visibility", "hidden");
				//$("#mainNav_aboutMenu .mainNav_close").fadeTo("fast", 0.0);
				//if any other menu is expanded
				if(menu == 1 || menu == 3){
					loadNextMenu = true;
					collapseMenu(2);
				}else{
					//set vars for current menu
					mainNav_link = "#mainNav_link2";
					mainNav_menu = "#mainNav_aboutMenu";
					menu_pos = menu_pos2;
					//set menu to 2(about menu)
					menu = 2;
					loadMenu();	
				}
			}
		}
	});	   						
	//****************end link2************************
	
	//****************link3************************
	$("#mainNav_link3").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				$(".mainNav_close").css("visibility", "hidden");
				//$("#mainNav_contactMenu .mainNav_close").fadeTo("fast", 0.0);
				//if any other menu is expanded
				if(menu == 1 || menu == 2){
					loadNextMenu = true;
					collapseMenu(3);
				}else{
					//set vars for current menu
					mainNav_link = "#mainNav_link3";
					mainNav_menu = "#mainNav_contactMenu";
					menu_pos = menu_pos3;
					//set menu to 2(about menu)
					menu = 3;
					loadMenu();	
				}
			}
		}
	});	   						
	//****************end link3************************
	
	//****************link4************************
	$("#mainNav_link4").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				$(".mainNav_close").css("visibility", "hidden");
				//$("#mainNav_contactMenu .mainNav_close").fadeTo("fast", 0.0);
				//if any other menu is expanded
				if(menu == 1 || menu == 2 || menu == 3){
					noMenuLink = true;
					mainurl = "news.shtml"
					collapseMenu();
				}else{
					mainurl = "news.shtml"
					gotoURL();
				}
			}
		}
	});	   						
	//****************end link4************************
	
	//****************link5************************
	$("#mainNav_link5").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				$(".mainNav_close").css("visibility", "hidden");
				//$("#mainNav_contactMenu .mainNav_close").fadeTo("fast", 0.0);
				//if any other menu is expanded
				if(menu == 1 || menu == 2 || menu == 3){
					noMenuLink = true;
					mainurl = "testimonials.shtml"
					collapseMenu();
				}else{
					mainurl = "testimonials.shtml"
					gotoURL();
				}
			}
		}
	});	   						
	//****************end link5************************
	
	//****************logo************************
	$("#logo").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				$(".mainNav_close").css("visibility", "hidden");
				//$("#mainNav_contactMenu .mainNav_close").fadeTo("fast", 0.0);
				//if any other menu is expanded
				if(menu == 1 || menu == 2 || menu == 3){
					noMenuLink = true;
					mainurl = "index.shtml"
					collapseMenu();
				}else{
					mainurl = "index.shtml"
					gotoURL();
				}
			}
		}
	});	   						
	//****************end logo************************
	
	//****************sitemap************************
	$(".link_siteMap_link").click(function(e){
		e.preventDefault();
		$(".mainNav_close").css("visibility", "hidden");
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//$("#mainNav_contactMenu .mainNav_close").fadeTo("fast", 0.0);
				//if any other menu is expanded
				if(menu == 1 || menu == 2 || menu == 3){
					noMenuLink = true;
					mainurl = "site-map.shtml"
					collapseMenu();
				}else{
					mainurl = "site-map.shtml"
					gotoURL();
				}
			}
		}
	}); 						
	//****************sitemap************************
	
	function loadMenu(num){
		//if close x not clicked
		if(closeLink == false){
			//if menu is animating, do not enable actions
			//if menu is not animating...
			if(animating == false){
				//if subnav link is not clicked - enable menu
				if(subNav_link == false){
					//set main arrow to this.arrow
					mainarrow = $(mainNav_link+" img");
					//if menu is not expanded to 1st or 2nd level
					if(mainNav_level1 == false && mainNav_level2 == false){
						//alert("the menu is going to the 1st level");
						//set menu level 1 to true
						mainNav_level1 = true;
						//animate to 1st level
						//cannot click link button while animating
						animating = true;
						$(mainNav_menu).animate({top: [menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:reposContainer });
							//swap the main arrows
							swapMainArrow(false);
						//else if menu is already expanded to 1st or 2nd level
					}else{
						loadSelf = true;
						collapseMenu();
					}
				}
			}
		}
	}
	
	function collapseMenu(num){
		//set num = menuNum for reposContainer
		menuNum = num;
		//if it's @ level2
		if(mainNav_level2 == true){
			//alert("the menu is going to the 1st pos from level 2");
			//animate to 0 from level 2
			//check to see which menu is active
			if(menuItem == "capabilities"){
				//then animate to 1st level
				//cannot click link button while animating
				animating = true;
				$("#mainNav_workMenu .mainNav_link1").animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:animFirst });
				swapSubArrow(true);
			}else if(menuItem == "clients"){
				//then animate to 1st level
				//cannot click link button while animating
				animating = true;
				$("#mainNav_workMenu .mainNav_link1").animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
				$("#mainNav_workMenu .mainNav_link2").animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:animFirst });
				swapSubArrow(true);
			}else if(menuItem == "caseStudies"){
				//then animate to 1st level
				//cannot click link button while animating
				animating = true;
				$("#mainNav_workMenu .mainNav_link1").animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
				$("#mainNav_workMenu .mainNav_link2").animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
				$("#mainNav_workMenu .mainNav_link3").animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:animFirst });
				swapSubArrow(true);
			}else if(menuItem == "theStaff"){
				//then animate to 1st level
				//cannot click link button while animating
				animating = true;
				$("#mainNav_aboutMenu .mainNav_link1").animate({top: [menu_pos2+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
				$("#mainNav_aboutMenu .mainNav_link2").animate({top: [menu_pos2+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:animFirst });
				swapSubArrow(true);
			}else if(menuItem == "contact"){
				//then animate to 1st level
				//cannot click link button while animating
				animating = true;
				$("#mainNav_contactMenu .mainNav_link1").animate({top: [menu_pos3+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:animFirst });
				swapSubArrow(true);
			}else if(menuItem == "jobs"){
				//then animate to 1st level
				//cannot click link button while animating
				animating = true;
				$("#mainNav_contactMenu .mainNav_link1").animate({top: [menu_pos3+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
				$("#mainNav_contactMenu .mainNav_link2").animate({top: [menu_pos3+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:animFirst });
				swapSubArrow(true);
			}
			//swap the main arrow
			swapMainArrow(true);
			//set level1 to false
			mainNav_level1 = false;
			//set level2 to false
			mainNav_level2 = false;
		//if it's @ level1
		}else{
			//alert("the menu is going to the 0 pos from level 1");
			//animate to 0 - shorter animation
			//cannot click link button while animating
			animating = true;
			//if menu is not contact menu(which is smaller)
			if(menu != 3){
				$(mainNav_menu).animate({top: [menu_pos0+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:reposContainer });
			}else{
				$(mainNav_menu).animate({top: [menu_pos4+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:reposContainer });
			}
			//swap the main arrow
			swapMainArrow(true);
			//set level1 to false
			mainNav_level1 = false;
			//set level2 to false
			mainNav_level2 = false;
		}
	}
	
//****************subNav links************************
	$(".slider li").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				$(".mainNav_close").css("visibility", "hidden");
				animating = true;
				//alert($(this).attr("id"));
				//check to see if staff link
				if($(this).hasClass("thestaff")){
					theStaff_link = true;
					theStaff_profileNum = $(this).attr("id");
				}
				//subNav_link = true to let jq know that it's going to go to the specified url
				subNav_link = true;
				//get the url
				subNav_url = $(this).attr("alt");
				collapseMenu();
			}
		}
	});
	//****************end subNav links************************
	
	//click for capabilities
	$("#mainNav_workMenu .mainNav_link1 div.mainNav_level1_linkClick").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//fade close button
				$("#mainNav_workMenu .mainNav_close").css("visibility", "hidden");
				//set the prev menu item to menuItem and menu item to capabilities
				prev_menuItem = menuItem;
				menuItem = "capabilities";
				//alert("mainNav_capabilities_container");
				//set subarrow to this.arrow
				subarrow = $("#mainNav_workMenu #mainNav_capabilities img");
				//if not already @2nd level animate up
				if(mainNav_level2 == false){
					//alert("the menu is going to the 2nd level");
					//set mainNav_level2 to true
					mainNav_level2 = true;
					//set menu var for 1st level to false
					mainNav_level1 = false;
					//animate to 2nd level
					//cannot click link button while animating
					animating = true;
					//expand menu then subNav
					$('#mainNav_workMenu .mainNav_link1').animate({top: [capabilities_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//swap the subarrow
					swapSubArrow(false);
				//if not in 1st pos(ie one of the menus are active)
				}else{
					animating = true;
					//alert("the menu is going back to the 1st level");
					//set menu var for 1st level to true
					mainNav_level1 = true;
					swapSubArrow(true);
					//bring all menu items back to the 1st pos to init subsequent menu animation
					initMenu_firstPos();
					//subNav();
				}
			}
		}
	});
	//click for clients
	$("#mainNav_workMenu .mainNav_link2 div.mainNav_level1_linkClick").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//fade close button
				$("#mainNav_workMenu .mainNav_close").css("visibility", "hidden");
				//set the prev menu item to menuItem and menu item to clients
				prev_menuItem = menuItem;
				menuItem = "clients";
				//set subarrow to this.arrow
				subarrow = $("#mainNav_workMenu #mainNav_clients img");
				//if not already @2nd level animate up
				if(mainNav_level2 == false){
					//alert("the menu is going to the 2nd level");
					//set mainNav_level2 to true
					mainNav_level2 = true;
					//set menu var for 1st level to false
					mainNav_level1 = false;
					//cannot click link button while animating
					animating = true;
					//animate capabilities
					$('#mainNav_workMenu .mainNav_link1').animate({top: [capabilities_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					//animate to 2nd level
					$('#mainNav_workMenu .mainNav_link2').animate({top: [clients_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//swap the subarrow
					swapSubArrow(false);
				//if already @ 2nd level animate back down
				}else{
					animating = true;
					//alert("the menu is going back to the 1st level");
					//bring all menu items back to the 1st pos to init subsequent menu animation
					initMenu_firstPos();
					//set menu var for 1st level to true
					mainNav_level1 = true;
					swapSubArrow(true);
					//subNav();
				}
			}
		}
	});
	//click for caseStudies
	$("#mainNav_workMenu .mainNav_link3 div.mainNav_level1_linkClick").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//fade close button
				$("#mainNav_workMenu .mainNav_close").css("visibility", "hidden");
				//set the prev menu item to menuItem and menu item to caseStudies
				prev_menuItem = menuItem;
				menuItem = "caseStudies";
				//set subarrow to this.arrow
				subarrow = $("#mainNav_workMenu #mainNav_caseStudies img");
				//if not already @2nd level animate up
				if(mainNav_level2 == false){
					//alert("the menu is going to the 2nd level");
					//set menu var for 1st level to false
					//set mainNav_level2 to true
					mainNav_level2 = true;
					//set menu var for 1st level to false
					mainNav_level1 = false;
					//cannot click link button while animating
					animating = true;
					//animate capabilities
					$('#mainNav_workMenu .mainNav_link1').animate({top: [capabilities_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					//animate clients
					$('#mainNav_workMenu .mainNav_link2').animate({top: [clients_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					//animate to 2nd level
					$('#mainNav_workMenu .mainNav_link3').animate({top: [clients_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//swap the subarrow
					swapSubArrow(false);
				//if already @ 2nd level animate back down
				}else{
					animating = true;
					//alert("the menu is going back to the 1st level");
					//bring all menu items back to the 1st pos to init subsequent menu animation
					initMenu_firstPos();
					//set menu var for 1st level to true
					mainNav_level1 = true;
					swapSubArrow(true);
					//subNav();
				}
			}
		}
	});
	
	//click for theCompany
	$("#mainNav_aboutMenu .mainNav_link1 div.mainNav_level1_linkClick").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//fade close button
				$("#mainNav_aboutMenu .mainNav_close").css("visibility", "hidden");
				subNav_link = true;
				subNav_url = "thecompany.shtml";
				collapseMenu();
			}
		}
	});
	
	//click for theStaff
	$("#mainNav_aboutMenu .mainNav_link2 div.mainNav_level1_linkClick").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//fade close button
				$("#mainNav_aboutMenu .mainNav_close").css("visibility", "hidden");
				//set the prev menu item to menuItem and menu item to theStaff
				prev_menuItem = menuItem;
				menuItem = "theStaff";
				//set subarrow to this.arrow
				subarrow = $("#mainNav_aboutMenu .mainNav_link2 img");
				//if not already @2nd level animate up
				if(mainNav_level2 == false){
					//alert("the menu is going to the 2nd level");
					//set menu var for 1st level to false
					//set mainNav_level2 to true
					mainNav_level2 = true;
					//set menu var for 1st level to false
					mainNav_level1 = false;
					//cannot click link button while animating
					animating = true;
					//animate capabilities
					$("#mainNav_aboutMenu .mainNav_link1").animate({top: [theCompany_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000});
					//animate clients
					$('#mainNav_aboutMenu .mainNav_link2').animate({top: [theStaff_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//animate to 2nd level
					//$('#mainNav_aboutMenu .mainNav_link3').animate({top: [clients_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//swap the subarrow
					swapSubArrow(false);
				//if already @ 2nd level animate back down
				}else{
					animating = true;
					//alert("the menu is going back to the 1st level");
					//bring all menu items back to the 1st pos to init subsequent menu animation
					initMenu_firstPos();
					//set menu var for 1st level to true
					mainNav_level1 = true;
					swapSubArrow(true);
					//subNav();
				}
			}
		}
	});
	
	//click for theGame
	$("#mainNav_aboutMenu .mainNav_link3 div.mainNav_level1_linkClick").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//fade close button
				$("#mainNav_aboutMenu .mainNav_close").css("visibility", "hidden");
				subNav_link = true;
				subNav_url = "http://www.sjiassociates.com/games/wallop-a-worker/theGame.html";
				collapseMenu();
			}
		}
	});
	
	//click for contact
	$("#mainNav_contactMenu .mainNav_link1 div.mainNav_level1_linkClick").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//fade close button
				$("#mainNav_contactMenu .mainNav_close").css("visibility", "hidden");
				//set the prev menu item to menuItem and menu item to theStaff
				prev_menuItem = menuItem;
				menuItem = "contact";
				//set subarrow to this.arrow
				subarrow = $("#mainNav_contactMenu .mainNav_link1 img");
				//if not already @2nd level animate up
				if(mainNav_level2 == false){
					//alert("the menu is going to the 2nd level");
					//set mainNav_level2 to true
					mainNav_level2 = true;
					//set menu var for 1st level to false
					mainNav_level1 = false;
					//cannot click link button while animating
					animating = true;
					//animate capabilities
					$('#mainNav_contactMenu .mainNav_link1').animate({top: [contact_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:function(){
						animating = false;
						$("#mainNav_contactMenu .mainNav_close").css("top", contact_closePos);
						$("#mainNav_contactMenu .mainNav_close").css("visibility", "visible");
						$("#mainNav_contactMenu .mainNav_close").fadeTo("medium", 1.0);
					}});
					swapSubArrow(false);
				//if already @ 2nd level animate back down
				}else{
					animating = true;
					//alert("the menu is going back to the 1st level");
					//bring all menu items back to the 1st pos to init subsequent menu animation
					initMenu_firstPos();
					//set menu var for 1st level to true
					mainNav_level1 = true;
					swapSubArrow(true);
				}
			}
		}
	});
	
	//click for jobs
	$("#mainNav_contactMenu .mainNav_link2 div.mainNav_level1_linkClick").click(function(e){
		e.preventDefault();
		//if menu is not animating...
		if(animating == false){
			//if subnav link is not clicked - enable menu
			if(subNav_link == false){
				//fade close button
				$("#mainNav_contactMenu .mainNav_close").css("visibility", "hidden");
				//set the prev menu item to menuItem and menu item to theStaff
				prev_menuItem = menuItem;
				menuItem = "jobs";
				//set subarrow to this.arrow
				subarrow = $("#mainNav_contactMenu .mainNav_link2 img");
				//if not already @2nd level animate up
				if(mainNav_level2 == false){
					//$("#mainNav_contact_content").css("visibility", "hidden");
					//alert("the menu is going to the 2nd level");
					//set mainNav_level2 to true
					mainNav_level2 = true;
					//set menu var for 1st level to false
					mainNav_level1 = false;
					//cannot click link button while animating
					animating = true;
					//animate capabilities
					$('#mainNav_contactMenu .mainNav_link1').animate({top: [contact_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					//animate clients
					$('#mainNav_contactMenu .mainNav_link2').animate({top: [jobs_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 , complete:function(){
						animating = false;
						$("#mainNav_contactMenu .mainNav_close").css("top", contact_closePos);
						$("#mainNav_contactMenu .mainNav_close").css("visibility", "visible");
						$("#mainNav_contactMenu .mainNav_close").fadeTo("medium", 1.0);
					}});
					//animate to 2nd level
					//$('#mainNav_aboutMenu .mainNav_link3').animate({top: [clients_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//swap the subarrow
					swapSubArrow(false);
				//if already @ 2nd level animate back down
				}else{
					animating = true;
					//alert("the menu is going back to the 1st level");
					//bring all menu items back to the 1st pos to init subsequent menu animation
					initMenu_firstPos();
						//set menu var for 1st level to true
					mainNav_level1 = true;
					swapSubArrow(true);
					//subNav();
				}
			}
		}
	});
	
	function gotoURL(){
		if(footerLink_rollover == true){
			$(".f4 img").animate({"width": "-=6px", "height": "-=6px", "top":"+=3px", "left":"+=3px"}, {duration:200, easing:"easeOutCirc"});
			$("#footerLinks_caption4").fadeTo("medium", 0.0);
		}
		menu = 0;
		window.location = mainurl;
	}
	
	function initMenu_firstPos(){
		//swap all the sub arrows
		$(".mainNav_arrow").attr("src", "images/main/mainNav_sub_arrow.png");
		$(".mainNav_arrow").attr("width", "8");
		$(".mainNav_arrow").attr("height", "10");
		//animate all back to init pos
		if(menu == 1){
			$('#mainNav_workMenu .mainNav_link1').animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
			$('#mainNav_workMenu .mainNav_link2').animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
			$('#mainNav_workMenu .mainNav_link3').animate({top: [menu_pos1+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:loadMenuItem });
		}else if(menu == 2){
			$('#mainNav_aboutMenu .mainNav_link1').animate({top: [menu_pos2+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
			$('#mainNav_aboutMenu .mainNav_link2').animate({top: [menu_pos2+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
			$('#mainNav_aboutMenu .mainNav_link3').animate({top: [menu_pos2+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:loadMenuItem });
		}else if(menu == 3){
			$('#mainNav_contactMenu .mainNav_link1').animate({top: [menu_pos3+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
			$('#mainNav_contactMenu .mainNav_link2').animate({top: [menu_pos3+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:loadMenuItem });
		}
		
		function loadMenuItem(){
			if(prev_menuItem == menuItem){
				animating = false;
				if(menuItem == "capabilities" || menuItem == "clients" || menuItem == "caseStudies"){
					$("#mainNav_workMenu .mainNav_close").css("top", "205px");
					$("#mainNav_workMenu .mainNav_close").css("visibility", "visible");
					$("#mainNav_workMenu .mainNav_close").fadeTo("medium", 1.0);
					mainNav_level2 = false;
				}else if(menuItem == "theStaff"){
					$("#mainNav_aboutMenu .mainNav_close").css("top", "100px");
					$("#mainNav_aboutMenu .mainNav_close").css("visibility", "visible");
					$("#mainNav_aboutMenu .mainNav_close").fadeTo("medium", 1.0);
					mainNav_level2 = false;
				}else if(menuItem == "contact" || menuItem == "jobs"){
					$("#mainNav_contactMenu .mainNav_close").css("top", "30px");
					$("#mainNav_contactMenu .mainNav_close").css("visibility", "visible");
					$("#mainNav_contactMenu .mainNav_close").fadeTo("medium", 1.0);
					mainNav_level2 = false;
				}
			}else{
				if(menuItem == "capabilities"){
					$('#mainNav_workMenu .mainNav_link1').animate({top: [capabilities_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//subarrow = $("#mainNav_caseStudies img");
					swapSubArrow(false);
				}else if(menuItem == "clients"){
					//animate capabilities
					$('#mainNav_workMenu .mainNav_link1').animate({top: [capabilities_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					$('#mainNav_workMenu .mainNav_link2').animate({top: [clients_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//subarrow = $("#mainNav_caseStudies img");
					swapSubArrow(false);
				}else if(menuItem == "caseStudies"){
					//animate capabilities
					$('#mainNav_workMenu .mainNav_link1').animate({top: [capabilities_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					//animate clients
					$('#mainNav_workMenu .mainNav_link2').animate({top: [clients_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					$('#mainNav_workMenu .mainNav_link3').animate({top: [caseStudies_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//subarrow = $("#mainNav_caseStudies img");
					swapSubArrow(false);
				}else if(menuItem == "theStaff"){
					//animate capabilities
					$('#mainNav_aboutMenu .mainNav_link1').animate({top: [capabilities_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					$('#mainNav_aboutMenu .mainNav_link2').animate({top: [clients_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:subNav });
					//subarrow = $("#mainNav_caseStudies img");
					swapSubArrow(false);
				}else if(menuItem == "contact"){
					//animate capabilities
					$('#mainNav_contactMenu .mainNav_link1').animate({top: [contact_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:function(){
						animating = false;
						$("#mainNav_contactMenu .mainNav_close").css("top", contact_closePos);
						$("#mainNav_contactMenu .mainNav_close").css("visibility", "visible");
						$("#mainNav_contactMenu .mainNav_close").fadeTo("medium", 1.0);																																				
					}});
					//subarrow = $("#mainNav_caseStudies img");
					swapSubArrow(false);
				}else if(menuItem == "jobs"){
					//animate capabilities
					$('#mainNav_contactMenu .mainNav_link1').animate({top: [contact_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 });
					$('#mainNav_contactMenu .mainNav_link2').animate({top: [jobs_menu_pos+"px", "easeOutCirc"]}, { queue:false, duration:1000 , complete:function(){
						animating = false;
						$("#mainNav_contactMenu .mainNav_close").css("top", contact_closePos);
						$("#mainNav_contactMenu .mainNav_close").css("visibility", "visible");
						$("#mainNav_contactMenu .mainNav_close").fadeTo("medium", 1.0);																																				
					}});
					//subarrow = $("#mainNav_caseStudies img");
					swapSubArrow(false);
				}
			}
		}
	}
	
	//animate workMenu to 0
	function animFirst(){
		//alert("the menu is going from the 1st pos to 0");
		animating = true;
		if(menu == 1){
			$("#mainNav_workMenu").animate({top: [menu_pos0+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:reposContainer });	
		}else if(menu == 2){
			$("#mainNav_aboutMenu").animate({top: [menu_pos0+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:reposContainer });
		}else if(menu == 3){
			$("#mainNav_contactMenu").animate({top: [menu_pos4+"px", "easeOutCirc"]}, { queue:false, duration:1000, complete:reposContainer });
		}
	}
	
	//set css for container when either active(up) or inactive(down)
	function reposContainer(){
		animating = false;
		
		//if called when container is down - set pos for up
		if(reposUp == false){
			if(menu == 1){
				//set height of menu to allow for expanding
				$("#mainNav_workMenu").css("height", "215px");
				//position the top
				$("#mainNav_workMenu").css("top", "0");
				//position the top of three divs
				$('#mainNav_workMenu .mainNav_link1').css("top", "196px");
				$('#mainNav_workMenu .mainNav_link2').css("top", "196px");
				$('#mainNav_workMenu .mainNav_link3').css("top", "196px");
				$("#mainNav_workMenu .mainNav_close").css("top", "205px");
				$("#mainNav_workMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_workMenu .mainNav_close").fadeTo("medium", 1.0);
			}else if(menu == 2){
				//set height of menu to allow for expanding
				$("#mainNav_aboutMenu").css("height", "215px");
				//position the top
				//if ie 7 change to 90px
				$("#mainNav_aboutMenu").css("top", "0px");
				//position the top of three divs
				$('#mainNav_aboutMenu .mainNav_link1').css("top", "90px");
				$('#mainNav_aboutMenu .mainNav_link2').css("top", "90px");
				$('#mainNav_aboutMenu .mainNav_link3').css("top", "90px");
				
				$("#mainNav_aboutMenu .mainNav_close").css("top", "100px");
				$("#mainNav_aboutMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_aboutMenu .mainNav_close").fadeTo("medium", 1.0);
			}else if(menu == 3){
				//set height of menu to allow for expanding
				$("#mainNav_contactMenu").css("height", "215px");
				//position the top
				//if ie 7 change to 20px
				$("#mainNav_contactMenu").css("top", "0px");
				//position the top of three divs
				$('#mainNav_contactMenu .mainNav_link1').css("top", "20px");
				$('#mainNav_contactMenu .mainNav_link2').css("top", "20px");
				
				$("#mainNav_contactMenu .mainNav_close").css("top", "30px");
				$("#mainNav_contactMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_contactMenu .mainNav_close").fadeTo("medium", 1.0);
			}
			//set up to true
			reposUp = true;
		//if called when container is up - set pos for down
		}else{
			if(menu == 1){
				//set height back to orig height
				$("#mainNav_workMenu").css("height", "105px");
				//position top to orig pos
				$("#mainNav_workMenu").css("top", "301px");
				//position the top of three divs
				$('#mainNav_workMenu .mainNav_link1').css("top", "0px");
				$('#mainNav_workMenu .mainNav_link2').css("top", "0px");
				$('#mainNav_workMenu .mainNav_link3').css("top", "0px");
			}else if(menu == 2){
				//set height back to orig height
				$("#mainNav_aboutMenu").css("height", "105px");
				//position top to orig pos
				$("#mainNav_aboutMenu").css("top", "196px");
				//position the top of three divs
				$('#mainNav_aboutMenu .mainNav_link1').css("top", "0px");
				$('#mainNav_aboutMenu .mainNav_link2').css("top", "0px");
				$('#mainNav_aboutMenu .mainNav_link3').css("top", "0px");
				//$("#mainNav_aboutMenu .mainNav_close").fadeTo("medium", 0.0);
			}else if(menu == 3){
				//set height back to orig height
				//change to 126 for safari and opera
				$("#mainNav_contactMenu").css("height", "130px");
				//position top to orig pos
				$("#mainNav_contactMenu").css("top", "90px");
				//position the top of three divs
				$('#mainNav_contactMenu .mainNav_link1').css("top", "0px");
				$('#mainNav_contactMenu .mainNav_link2').css("top", "0px");
				//$("#mainNav_contactMenu .mainNav_close").fadeTo("medium", 0.0);
			}
			//set up to false
			reposUp = false;
		}
		
		//goto url if clicked from subnav
		if(subNav_link == true){
			//if sublink is from the staff menu
			if(theStaff_link == true){
				//subNav_link = false;
				//theStaff_link = false;
				//alert(theStaff_profileNum);
				if(menuActive == "theStaff"){
					window.location = "thestaff.shtml#?"+theStaff_profileNum;
					profileNum = theStaff_profileNum;
					fadeOut();
					fromPageLoad = true;
					resetVars();
				}else{
					window.location = "thestaff.shtml#?"+theStaff_profileNum;
					fromPageLoad = true;
					resetVars();
				}
				
			}else{
				//staffpage = false;
				//subNav_link = false;
				window.location = subNav_url;
				resetVars();
			}
		}
		
		//goto url if clicked from link4, link5, game icon or logo
		if(noMenuLink == true){
			noMenuLink = false;
			gotoURL();
		}
		
		//if menu is collapsed by clicking same link
		if(loadSelf == true){
			menu = 0;
			loadSelf = false;
		}
		
		//if menu is collapsed by clicking x
		if(closeLink == true){
			closeLink = false;
		}
		
		//if called from different link - load that menu
		if(loadNextMenu == true){
			if(menuNum == 1){
				menu = 1;
				mainNav_link = "#mainNav_link1";
				mainNav_menu = "#mainNav_workMenu";
				menu_pos = menu_pos1;
				loadMenu();
			}else if(menuNum == 2){
				menu = 2;
				mainNav_link = "#mainNav_link2";
				mainNav_menu = "#mainNav_aboutMenu";
				menu_pos = menu_pos2;
				loadMenu();
			}else if(menuNum == 3){
				menu = 3;
				mainNav_link = "#mainNav_link3";
				mainNav_menu = "#mainNav_contactMenu";
				menu_pos = menu_pos3;
				loadMenu();
			}
			loadNextMenu = false;
		}
	}
	
	function resetVars(){
		subNav_link = false;
		animating = false;
		menu = 0;
	}
	
	//animate menu for the subnav
	function subNav(){
		//if called when subnav inactive(down)
		if(mainNav_level2 == false){
			if(menuItem == "capabilities"){
				$("#mainNav_capabilities").css("color", "#000");
				$("#mainNav_workMenu .mainNav_close").css("top", "100px");
				$("#mainNav_workMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_workMenu .mainNav_close").fadeTo("medium", 1.0);
			}else if(menuItem == "clients"){
				$("#mainNav_clients").css("color", "#000");
				$("#mainNav_workMenu .mainNav_close").css("top", "100px");
				$("#mainNav_workMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_workMenu .mainNav_close").fadeTo("medium", 1.0);
			}else if(menuItem == "caseStudies"){
				$("#mainNav_caseStudies").css("color", "#000");
				$("#mainNav_workMenu .mainNav_close").css("top", "100px");
				$("#mainNav_workMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_workMenu .mainNav_close").fadeTo("medium", 1.0);
			}else if(menuItem == "theStaff"){
				$("#mainNav_theStaff").css("color", "#000");
				$("#mainNav_aboutMenu .mainNav_close").css("top", "-7px");
				$("#mainNav_aboutMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_aboutMenu .mainNav_close").fadeTo("medium", 1.0);
			}
			//set menu var to 2nd level to true
			mainNav_level2 = true;
			animating = false;
		//if called when subnav active(one of the menus is up)
		}else{
			//done animating
			animating = false;
			//highlight mainNav item
			if(menuItem == "capabilities"){
				$("#mainNav_capabilities").css("color", "#595c5c");
			}else if(menuItem == "clients"){
				$("#mainNav_clients").css("color", "#595c5c");
			}else if(menuItem == "caseStudies"){
				$("#mainNav_caseStudies").css("color", "#595c5c");
			}else if(menuItem == "theStaff"){
				$("#mainNav_theStaff").css("color", "#595c5c");
				//add close button
				$("#mainNav_capabilities").css("color", "#000");
				$("#mainNav_aboutMenu .mainNav_close").css("top", "-8px");
				$("#mainNav_aboutMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_aboutMenu .mainNav_close").fadeTo("medium", 1.0);
			}
			//add close button
			if(menuItem == "capabilities" || menuItem == "clients" || menuItem == "caseStudies"){
				$("#mainNav_capabilities").css("color", "#000");
				$("#mainNav_workMenu .mainNav_close").css("top", "100px");
				$("#mainNav_workMenu .mainNav_close").css("visibility", "visible");
				$("#mainNav_workMenu .mainNav_close").fadeTo("medium", 1.0);
			}
		}
	}
	
	function swapMainArrow(expand){
		if(expand == false){
			$(mainarrow).attr("src", "images/main/mainNav_main_arrow_active.png");
			$(mainarrow).attr("width", "10");
			$(mainarrow).attr("height", "8");
		}else{
			$(mainarrow).attr("src", "images/main/mainNav_main_arrow.png");
			$(mainarrow).attr("width", "8");
			$(mainarrow).attr("height", "10");
		}
	}
	
	function swapSubArrow(expand){
		if(expand == false){
			$(subarrow).attr("src", "images/main/mainNav_sub_arrow_active.png");
			$(subarrow).attr("width", "10");
			$(subarrow).attr("height", "8");
		}else{
			$(subarrow).attr("src", "images/main/mainNav_sub_arrow.png");
			$(subarrow).attr("width", "8");
			$(subarrow).attr("height", "10");
		}
	}
	
	//don't follow level 1 link
	$(".mainNav_level1_link").click(function(e){
		e.preventDefault();					 
	});
	
	//close link
	$(".mainNav_close").click(function(e){
		$(this).css("visibility", "hidden");
		closeLink = true;
		//don't follow
		e.preventDefault();
		loadSelf = true;
		collapseMenu();
	});	
	
	//footer links
	$(".footerLinks_caption").fadeTo("fast", 0.0);
	
	$(".footerLink img").hover(function(){
		$(this).animate({"width": "+=6px", "height": "+=6px", "top":"-=3px", "left":"-=3px"}, {duration:200, easing:"easeOutCirc"});
		footerLink_rollover = true;
	}, function(){
		$(this).animate({"width": "-=6px", "height": "-=6px", "top":"+=3px", "left":"+=3px"}, {duration:200, easing:"easeOutCirc"});
		footerLink_rollover = false;
	});
	
	$(".f1").hover(function(){
		$("#footerLinks_caption1").css("visibility", "visible");
		$("#footerLinks_caption1").fadeTo("medium", 1.0);
	}, function(){
		$("#footerLinks_caption1").fadeTo("medium", 0.0);
	});
	$(".f2").hover(function(){
		$("#footerLinks_caption2").css("visibility", "visible");
		$("#footerLinks_caption2").fadeTo("medium", 1.0);
	}, function(){
		$("#footerLinks_caption2").fadeTo("medium", 0.0);
	});
	$(".f3").hover(function(){
		$("#footerLinks_caption3").css("visibility", "visible");
		$("#footerLinks_caption3").fadeTo("medium", 1.0);
	}, function(){
		$("#footerLinks_caption3").fadeTo("medium", 0.0);
	});
	$(".f4").hover(function(){
		$("#footerLinks_caption4").css("visibility", "visible");
		$("#footerLinks_caption4").fadeTo("medium", 1.0);
	}, function(){
		$("#footerLinks_caption4").fadeTo("medium", 0.0);
	});
	
	//click functions
	$(".f1").click(function(){
		window.open("http://www.linkedin.com/companies/128805");
		//$("img", this).animate({"width": "-=6px", "height": "-=6px", "top":"+=3px", "left":"+=3px"}, {duration:500, easing:"easeOutCirc"});
		//$("#footerLinks_caption1").fadeTo("medium", 0.0);
	});
	
	$(".f2").click(function(){
		window.open("http://twitter.com/sjiassociates");
		//$("img", this).animate({"width": "-=6px", "height": "-=6px", "top":"+=3px", "left":"+=3px"}, {duration:500, easing:"easeOutCirc"});
		//$("#footerLinks_caption2").fadeTo("medium", 0.0);
	});
	
	$(".f3").click(function(){
		window.open("http://www.facebook.com/pages/New-York-NY/sji-associates-design-advertising/116358345044195");
		//$("img", this).animate({"width": "-=6px", "height": "-=6px", "top":"+=3px", "left":"+=3px"}, {duration:500, easing:"easeOutCirc"});
		//$("#footerLinks_caption3").fadeTo("medium", 0.0);
	});
	
	$(".f4").click(function(){
		mainurl = "http://www.sjiassociates.com/games/wallop-a-worker/theGame.html"
		if(menu == 1 || menu == 2 || menu == 3){
			//fade close button
			$("#mainNav_aboutMenu .mainNav_close").css("visibility", "hidden");
			noMenuLink = true;
			collapseMenu();
		}else{
			gotoURL();
			//$("img", this).animate({"width": "-=6px", "height": "-=6px", "top":"+=3px", "left":"+=3px"}, {duration:500, easing:"easeOutCirc"});
			//$("#footerLinks_caption4").fadeTo("medium", 0.0);
		}
	});
};
