$(document).ready(function(){
				$('#h_searcher').hide();
				var box = document.getElementById('searchbox');
				var search_screen = document.getElementById('h_searcher');
				
				//var left = (search_screen["at_position"] == "x") ? box.offsetWidth +2 : 0;
				var left = 0;
				
				for (; box; box = box.offsetParent)
				  {
					left += box.offsetLeft;
				  }
				//alert(left);
				search_screen.style.left = left+'px';
				
				
				
	});

/*		$(".result tr").mouseover(function() {
					$(this).addClass("over");
					alert("asd");
					}).mouseout(function() {
					$(this).removeClass("over");
				});*/
	
	$(document).bind('click', function(e) {

                var $clicked=$(e.target); // get the element clicked
				
                if($clicked.is('#h_searcher') || $clicked.parents().is('#h_searcher')) 
				{ 

				} 
				else 
				{ 
					$('#h_searcher').hide();
				}
				
	}); 
	
	
	
	function lookup(inputString) {

		
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#h_searcher').hide();
		} else {
			$.post("search_req.php", {s: ""+inputString+""}, 
			function(data)
			{
				//alert (data.length);
				if(data.length >0) 
				{
					
					$('#h_searcher').show();
					$('#h_searcher').html(data);
				}
			});
		}
	} // lookup
	
	