$(function() {
    $(document).keypress(function(event){
		if (event.ctrlKey==0) {
			if ($("#search").attr("value")=="") {
				if ((event.keyCode!=13)|(event.keyCode!=8)) {
					$("#search_box").stop().fadeIn();
					void(0);
				}
				if (event.charCode==65) {
					$("#search").attr("value","A").focus();
				} else if (event.charCode==66) {
					$("#search").attr("value","B").focus();
				} else if (event.charCode==67) {
					$("#search").attr("value","C").focus();
				} else if (event.charCode==68) {
					$("#search").attr("value","D").focus();
				} else if (event.charCode==69) {
					$("#search").attr("value","E").focus();
				} else if (event.charCode==70) {
					$("#search").attr("value","F").focus();
				} else if (event.charCode==71) {
					$("#search").attr("value","G").focus();
				} else if (event.charCode==72) {
					$("#search").attr("value","H").focus();
				} else if (event.charCode==73) {
					$("#search").attr("value","I").focus();
				} else if (event.charCode==74) {
					$("#search").attr("value","J").focus();
				} else if (event.charCode==75) {
					$("#search").attr("value","K").focus();
				} else if (event.charCode==76) {
					$("#search").attr("value","L").focus();
				} else if (event.charCode==77) {
					$("#search").attr("value","M").focus();
				} else if (event.charCode==78) {
					$("#search").attr("value","N").focus();
				} else if (event.charCode==79) {
					$("#search").attr("value","O").focus();
				} else if (event.charCode==80) {
					$("#search").attr("value","P").focus();
				} else if (event.charCode==81) {
					$("#search").attr("value","Q").focus();
				} else if (event.charCode==82) {
					$("#search").attr("value","R").focus();
				} else if (event.charCode==83) {
					$("#search").attr("value","S").focus();
				} else if (event.charCode==84) {
					$("#search").attr("value","T").focus();
				} else if (event.charCode==85) {
					$("#search").attr("value","U").focus();
				} else if (event.charCode==86) {
					$("#search").attr("value","V").focus();
				} else if (event.charCode==87) {
					$("#search").attr("value","W").focus();
				} else if (event.charCode==88) {
					$("#search").attr("value","X").focus();
				} else if (event.charCode==89) {
					$("#search").attr("value","Y").focus();
				} else if (event.charCode==90) {
					$("#search").attr("value","Z").focus();
				} else if (event.charCode==97) {
					$("#search").attr("value","a").focus();
				} else if (event.charCode==98) {
					$("#search").attr("value","b").focus();
				} else if (event.charCode==99) {
					$("#search").attr("value","c").focus();
				} else if (event.charCode==100) {
					$("#search").attr("value","d").focus();
				} else if (event.charCode==101) {
					$("#search").attr("value","e").focus();
				} else if (event.charCode==102) {
					$("#search").attr("value","f").focus();
				} else if (event.charCode==103) {
					$("#search").attr("value","g").focus();
				} else if (event.charCode==104) {
					$("#search").attr("value","h").focus();
				} else if (event.charCode==105) {
					$("#search").attr("value","i").focus();
				} else if (event.charCode==106) {
					$("#search").attr("value","j").focus();
				} else if (event.charCode==107) {
					$("#search").attr("value","k").focus();
				} else if (event.charCode==108) {
					$("#search").attr("value","l").focus();
				} else if (event.charCode==109) {
					$("#search").attr("value","m").focus();
				} else if (event.charCode==110) {
					$("#search").attr("value","n").focus();
				} else if (event.charCode==111) {
					$("#search").attr("value","o").focus();
				} else if (event.charCode==112) {
					$("#search").attr("value","p").focus();
				} else if (event.charCode==113) {
					$("#search").attr("value","q").focus();
				} else if (event.charCode==114) {
					$("#search").attr("value","r").focus();
				} else if (event.charCode==115) {
					$("#search").attr("value","s").focus();
				} else if (event.charCode==116) {
					$("#search").attr("value","t").focus();
				} else if (event.charCode==117) {
					$("#search").attr("value","u").focus();
				} else if (event.charCode==118) {
					$("#search").attr("value","v").focus();
				} else if (event.charCode==119) {
					$("#search").attr("value","w").focus();
				} else if (event.charCode==120) {
					$("#search").attr("value","x").focus();
				} else if (event.charCode==121) {
					$("#search").attr("value","y").focus();
				} else if (event.charCode==122) {
					$("#search").attr("value","z").focus();
				} else if (event.keyCode==8) {
					$("#search_box").fadeOut();
					$("#search").attr("value","");
				}
			} else {
				if (event.keyCode==27) {
					$("#search_box").fadeOut();
					$("#search").attr("value","");
				}
			}
		}
    });
    
	$("#search").click(function(){ return false; });
    $("#search_box").click(function(){
        $("#search_box").fadeOut();
        $("#search").attr("value","");
    });
});