$(document).ready(function(){
  // Main page focus
  $(".main .search label input").focus();

  $(".form .file input").bind("change", function(){
    $(this).parent().parent().parent().find(".filename").text($(this).val());
    return false;
  });

  // Menu
  $(".menu .static").removeClass("static");
  $(".menu a:not(.current)").addClass("active");
  $(".menu a.current span").css("top", "-5px");
  $(".menu a.active span").hover(function () {
    $(this).stop().animate({
      top: "-5px"
    }, 250);
  }, function () {
    $(this).stop().animate({
      top: "0px"
    }, 250);
  });

  // Login
  $("a.enter").bind("click", function(){
    $(".logon *").hide();
    $(".logon").toggle();
    $(".logon *").fadeIn("500");
	$("#login").focus();
    return false;
  });


  // Comments
/*
  $(".response a").bind("click", function(){
    $(".response form:not(.active)").hide();
    $(".response a").show();
    $(this).next().toggle().find("textarea").focus();
    $(this).toggle();
    return false;
  });
*/
  $(".response a").bind("click", function(){
    $(".response form:not(.active)").hide();
    $(".response a").show();
    $(this).next().fadeIn("500").find("textarea").focus();
    $(this).toggle();
    return false;
  });

});
