// JavaScript Document
/*Menu*/
$(function(){
	var libraryShow = false;
	var safetsmartShow = false;
	var modulesShow = false;
	$(".menuLibrary ul a").each(function(){
		if(location.pathname == $(this).attr("href")||location.pathname == $(".menuLibrary>a").attr("href")){
			libraryShow = true;
		}
	});
	$(".menuSafetsmart>ul>li>a").each(function(){
		if(location.pathname == $(this).attr("href")||location.pathname == $(".menuSafetsmart>a").attr("href")){
			safetsmartShow = true;
		}
	});
	$(".menuModules ul a").each(function(){
		if(location.pathname == $(this).attr("href")||location.pathname == $(".menuModules>a").attr("href")){
			modulesShow = true;
		}
	});
	if(libraryShow){
		$(".menuLibrary ul").show();	
	}
	if(safetsmartShow){
		$(".menuSafetsmart>ul").show();	
	}
	if(modulesShow){
		$(".menuSafetsmart ul").show();	
	}
});

/*Hide no literature found message*/
$(function(){
	if($(".literatureMod").text() == 'No literature found.'){
		$(".literatureMod").hide();	
	}
});
