
$(document).ready( function () {
  $("#form-url").focus();
  
  $("#shortener").submit( function () {
    $.post("/add.php", {'url': $("#form-url").val() }, function (data, textStatus) {
      htmlfield = '<input id="result-box" value="http://qorv.is/'+data+'" />';
      $("#result").html(htmlfield);
      $("#result").effect("highlight", {}, 300);
      $("#result-box").focus();
    }, 'text');
    return false;
  });
  
  $("#footer").css('margin-top', $(window).height()-380);

  }
);
