function findMutuals() {
  $('#failed').attr("style", "");
  $('#found').html("");
  
  var me = $('#me').attr("value");
  var other = $('#other').attr("value");
  $('#in-progress').attr("style", "display: block;");
  $.ajax({
    type: "GET",
    url: "/mutual/" + me + "/" + other,
    success: function(friends) {
      $('#found').html(friends);
    },
    error: function(xhr, status, error) {
      $('#failed').attr("style", "display: block;");
    },
    complete: function(xhr, status) {
      $('#in-progress').attr("style", "");      
    }
  }
  );
}

function setMe(new_me) {
  $('#me').attr("value", new_me);
}

function setOther(new_other) {
  $('#other').attr("value", new_other);
}

function showSet(row) {
  $("#me-" + row).attr("style", "display: inline;");
  $("#other-" + row).attr("style", "display: inline;");
}

function hideSet(row) {
  $("#me-" + row).attr("style", "");
  $("#other-" + row).attr("style", "");
}