function showDropMenu(){	

	$(this).css('z-index','901').find("ul").stop().fadeTo('fast', 1).show();
}

function hideDropMenu(){
	$(this).css('z-index','900').find("ul").stop().fadeTo('fast', 0, function() {
      $(this).hide();
  });  
}
function showSidebarResourceDropMenu(){
	$('#resource-arrow').attr('src','/images/shared/dropdown-arrow-up.jpg');
	$("#resource-drop").css('top','101px');
	$("#resource-drop").stop().fadeTo('fast', 1).show();
	
}
function hideSidebarResourceDropMenu(){
	$("#resource-drop").stop().fadeTo('fast', 0, function() {
	    $("#resource-drop").hide();
		$('#resource-arrow').attr('src','/images/shared/dropdown-arrow.jpg');
  });  
}



$(document).ready(function(){
	$(".dropdown-container ul, #resource-drop").css({'opacity':'0'});	
	$("#resource-drop li a").bind("click", function() {window.location = $(this).attr('href');});
	$(".dropdown-container").hover( showDropMenu, hideDropMenu )	
  $(document).click(function(){hideSidebarResourceDropMenu()});
	$("#resource-library-sidebar,#resource-drop").bind("click", function() {
			if ($('#resource-drop').is(':hidden')){			
				showSidebarResourceDropMenu();		
			}
			else{
				hideSidebarResourceDropMenu();		
			}	
		return false;
	});

});		
	