// Show/hide "my tools" menu
/*document.getElementById("tools-toggle").onhover = function () { 
	document.getElementById("tools").display = 'block';
}*/

function toggle_dropdown(mainelement,show) {
	var listelements = mainelement.getElementsByTagName('li'); 
	for(var a=1; a < listelements.length; a++) { 
		if(show) { 
			listelements[a].style.display = 'block';
		}
		else {
			listelements[a].style.display = 'none';
		}
	}
}

function add_event_listeners() { 
	document.getElementById("tools").onmouseover = function () {
		toggle_dropdown(document.getElementById('tools'),true);
		return false;
	}
	document.getElementById("tools").onmouseout = function () {
		toggle_dropdown(document.getElementById('tools'),false);
		return false;
	}

	document.getElementById("hospitals-dropdown").onmouseover = function () { 
		toggle_dropdown(document.getElementById("hospitals-dropdown"),true); 
		return false;
	}

	document.getElementById("hospitals-dropdown").onmouseout = function () { 
		toggle_dropdown(document.getElementById("hospitals-dropdown"),false); 
		return false;
	}
}

/*
$(document).ready(function(){
	$("#my-tools").hover(function()
	{
		$("#tools").show();
	},
	function()
	{
		$("#tools").hide();
	});
});

// Accordion for drug view page
$(document).ready(function(){
	$(".accordion div.answer").hide();

	$(".accordion h3").click(function(){
		$(this).next("div").slideToggle("slow")
		.siblings("div.answer:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});
});

// Show/hide "categories" menu
$(document).ready(function(){
	$("div.dropdown").hover(function()
	{
		$("#category-list").show();
	},
	function()
	{
		$("#category-list").hide();
	});
});
*/
