$(document).ready(function(){
	
		// remove link background images since we're re-doing the hover interaction below 
		// (doing it this way retains the CSS default hover states for non-javascript-enabled browsers)
		// we also want to only remove the image on non-selected nav items, so this is a bit more complicated
		$(".navCamere").children("li").each(function() {
			var current = "navCamere current-" + ($(this).attr("class"));
			var parentClass = $(".navCamere").attr("class");
			if (parentClass != current) {
				$(this).children("a").css({backgroundImage:"none"});
			}
		});	


		// create events for each nav item
		attachNavEvents(".navCamere", "imperial");
		attachNavEvents(".navCamere", "presidential");
		attachNavEvents(".navCamere", "suite");
		attachNavEvents(".navCamere", "junior");
		attachNavEvents(".navCamere", "superior");
		attachNavEvents(".navCamere", "executive");
	

		function attachNavEvents(parent, myClass) {
			$(parent + " ." + myClass).mouseover(function() {
				var classe_ul=$(".navCamere").attr("class");
				
					$(this).append('<div class="navCamere-' + myClass + '"></div>');
					$("div.navCamere-" + myClass).css({display:"none"}).fadeIn(200);
				
			}).mouseout(function() {
				$("div.navCamere-" + myClass).fadeOut(200, function() {
					$(this).remove();
				});
			}).mousedown(function() {
				$("div.navCamere-" + myClass).attr("class", "navCamere-" + myClass + "-click");
			}).mouseup(function() {
				$("div.navCamere-" + myClass + "-click").attr("class", "navCamere-" + myClass);
			});
			
		}



	});
