
	$(document).ready( function() {
							
		$(".drop-menu").each(function() {
			$(this).find(".sub-drop-menu").hide();		
			$(this).find(".menu-1").filter(":last").css("border-bottom", "0");
		});
		
		$(".drop-menu:last").css("background-image", "none");

		if (getUrlVars()["show"] == "content") {
			var slected_menu_item = $("DIV[id=menu-item-" + getUrlVars()["id"] + "]");
			if (slected_menu_item.length > 0) {	
				slected_menu_item.children("a").addClass("drop-menu-active");
				slected_menu_item.find(".sub-drop-menu").show();
			}	else {
				var slected_menu_item = $("DIV[id=sub-menu-item-" + getUrlVars()["id"] + "]");
				slected_menu_item.parents(".drop-menu").show().find(".sub-drop-menu").show();		
				slected_menu_item.children("a").addClass("drop-menu-active");		
			}
		}		
		
		function getUrlVars() {
			var vars = [], hash;
			var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
			for (var i = 0; i < hashes.length; i++) {
				hash = hashes[i].split('=');
				vars.push(hash[0]);
				vars[hash[0]] = hash[1];
			}
			return vars;
		}	
		
	});		

