/* - - - - - - - - - - - - - - - - - - - - -
Nav hover

 ULs: ".mainNav_" + navName + " ul"
 LIs: "#mN_" + navName + " a" (changed to id to avoid conflict with ddown menus)
 

*/
var navHeight = 30;
var navName = ["Illu", "Abou", "Join", "Memb"];
var navUL;
var navLI;
var oldNav;

$(document).ready(function() {
	var oldNav = $("#navigation ul").attr("class");

	for (var i = 0; i<navName.length; i++){
		navLI = "#mN_" + navName[i] + " a";
		//console.log(navLI);
		var navCounter = i * navHeight;
		if (navCounter > 0) { navCounter = "-" + navCounter}
			var navPosition = "left " + navCounter + "px";
			$(navLI).hover(function() {
				var currHovered = $(this).parent().attr("id");
				//console.log($(this).parent().attr("id"));
				//console.log(currHovered);
				var switchTo = (currHovered.substr(3, 4));
		
				$("#navigation ul").removeClass(oldNav).addClass('mainNav_'+switchTo);
			}, function() {
				//$(this).parent().parent().removeClass().addClass(oldNav);
				$("#navigation ul").removeClass().addClass(oldNav);
			});
		}
		
		
	$('.sDDL-list1').css({display: "none"});
	$('.sDDL-list2').css({display: "none"});
	
	// quicklinks drop down
	$('#selectDDown1Box').hover(function(){ $('.sDDL-list1').css({display: "block"}); },
	function(){ $('.sDDL-list1').css({display: "none"}); }
	);
	
	$('#selectDDown2Box').hover(function(){ $('.sDDL-list2').css({display: "block"}); },
	function(){ $('.sDDL-list2').css({display: "none"}); }
	);
});
