	 $(document).ready(function() {

			$("ul.dropdown li").hover(function() {
				$(this).addClass("hover");
				$('> .dir',this).addClass("open");
				$('ul:first',this).css('visibility', 'visible');
			}, function() {
				$(this).removeClass("hover");
				$('.open',this).removeClass("open");
				$('ul:first',this).css('visibility', 'hidden');
			});
			

			$("table.search_results").hide();
			$("table.search_results#items").show();
			
			$("a.s_r_npcs").click(function() {
				$("table.search_results").hide();
				$("table.search_results#npcs").show();
			});
			$("a.s_r_items").click(function() {
				$("table.search_results").hide();
				$("table.search_results#items").show();
			});
			$("a.s_r_recipes").click(function() {
				$("table.search_results").hide();
				$("table.search_results#recipes").show();
			});
			
			$("table.search_results_nav td").removeClass("selected");
			$("table.search_results_nav td#items").addClass("selected");
			
			$("table.search_results_nav td").click(function() {
				$("table.search_results_nav td").removeClass("selected");
				$(this).addClass("selected");
			});
			
			



			
			
			
	

			
			$('a#ajax').one('mouseover', function() {
				var number=$(this).attr("itemid");
				$("div[itemajid="+number+"]").load("../items/aj/"+number+" table.iteminfo", function() {
					$("table[tableid|="+number+"]").hide();
				});
			}).mouseover(function(){
				var number=$(this).attr("itemid");
				$("table[tableid|="+number+"]").css('position','absolute');
				$("table[tableid|="+number+"]").fadeIn(50);
				$("table[tableid|="+number+"]").css({left:kmouse.pageX+15, top:kmouse.pageY+15});
			 }).mousemove(function(kmouse){
				 var number=$(this).attr("itemid");
				 $("table[tableid|="+number+"]").css('position','absolute');
				 $("table[tableid|="+number+"]").fadeIn(50);
				 $("table[tableid|="+number+"]").css({left:kmouse.pageX+15, top:kmouse.pageY+15});
			 }).mouseout(function(){
				 var number=$(this).attr("itemid");
				 $("table[tableid|="+number+"]").fadeOut(0);
			 });  
			
			
			
				$('img#item').mouseover(function(){
					var number=$(this).attr("itemid");
					$("table[tableid|="+number+"]").css('position','absolute');
					$("table[tableid|="+number+"]").fadeIn(50);
				 }).mousemove(function(kmouse){
					 var number=$(this).attr("itemid");
					 $("table[tableid|="+number+"]").css({left:kmouse.pageX+15, top:kmouse.pageY+15});
				 }).mouseout(function(){
					 var number=$(this).attr("itemid");
					 $("table[tableid|="+number+"]").fadeOut(0);
				 });  
				
				$("div#item_name").mouseover(function(){
					var number=$(this).attr("itemid");
					$("table[tableid|="+number+"]").css('position','absolute');
					$("table[tableid|="+number+"]").fadeIn(50);
				 }).mousemove(function(kmouse){
					 var number=$(this).attr("itemid");
					 $("table[tableid|="+number+"]").css({left:kmouse.pageX+15, top:kmouse.pageY+15});
				 }).mouseout(function(){
					 var number=$(this).attr("itemid");
					 $("table[tableid|="+number+"]").fadeOut(0);
				 });  
			
			
			
			

		});
	 
	 
	 

	 
	 
	 
