$(document).ready(function(){
	$("#shelp").hide();
	$("#frontslide").cycle({ 
		fx:    "fade", 
		speed:  5000 
	});
	$("select[row]").change(function(){
		$("span[row=" + $(this).attr("row") + "]").hide();
		$("span[id=" + $(this).val() + "]").show();
	});
	$("img[pic]").fadeTo(1, 0.3);
	$("img[pic]").hover(
    function () {
      $(this).fadeTo("slow", 1);
    }, 
    function () {
      $(this).fadeTo("slow", 0.3);
    }
  );
  $("img[class=foto]").fadeTo(1, 0.3);
  $("img[class=foto]").hover(
    function () {
      $(this).fadeTo("slow", 1);
    }, 
    function () {
      $(this).fadeTo("slow", 0.3);
    }
  );
  var incol = $("input[name=keyword]").css("color");
  var sname = $("input[name=keyword]").val();
  $("input[name=keyword]").css( {"color": "#C0C0C0", "font-style": "italic"} );
  $("input[name=keyword]").focus(function(){
  	$("input[name=keyword]").val('');
  	$("input[name=keyword]").css( {"color":"" + incol + "", "font-style": "normal"} );
  	$("input[name=keyword]").keyup(function() {
	 		$("#shelp").load("http://" + window.location.hostname + "/static/shelp.php", { keyword: $("input[name=keyword]").val() }, function() {
			 	if ($("#shelp").is(":empty")) {
			 		$("#shelp").hide();
			 	} else {
			 		$("#shelp").show();
			 		$("div[class=sdiv]").click(function() {
				  	$("input[name=keyword]").val($(this).text());
				  	document.searchform.submit();
				  });
			 	}
 			});
	 	});
  });
  $("td[class=countopmenu]").hover(
  	function () {
  		$(this).css( {"text-decoration":"underline" });
  	},
  	function () {
  		$(this).css( {"text-decoration":"none" });
  	}
  );
});