function clearInput(e){
if(e.value=='Enter Keywords or Item#...')e.value="";
}
$.noConflict();
jQuery(document).ready(function($) {
var mouse_is_inside = false; 

$('#searchbox').hover(function(){  
        mouse_is_inside=true;  
    }, function(){  
        mouse_is_inside=false;  
    }); 
 
    $("body").mouseup(function(){  
        if(! mouse_is_inside) $('#resultsContainer').hide("blind"); 
    });  

//If Keydown In Search Box
$("#searchbox").keyup(function(){
			   
//If Search Box Value is Nothing
if($("#searchbox").val() == "")
{
//Hide the Div, No Search Query Is Given. 		
$("#resultsContainer").hide("blind");
exit();
			
} else {
								   
//Get the Result		
getResults()
}
});
function getResults()
{	
if($("#searchbox").val() == "")
{			
//Hide the Div, No Search Query Is Given. 		
$("#resultsContainer").hide("blind");
exit();
}
		
//Use Searches.php to find result
$.get("searches.php",{ query: $("#searchbox").val(), type: "results"}, function(data){
															
//Insert HTML and Show The Div
if (!$("#resultsContainer").is(":visible")) {
$("#resultsContainer").show("blind");
}
$("#resultsContainer").html(data);		
});
}
});
