/* Copyright 2009 FitnessKeeper, Inc.  All Rights Reserved. */

function requestAsFriend(u, f)
{
   $.post(contextPath + "/my/RequestFriend/" + u, {ajax: true}, f);
}

function acceptFriendRequest(u, f)
{
   $.post(contextPath + "/my/AcceptFriendRequest/" + u, {ajax: true}, f);
}

function ignoreFriendRequest(u, f)
{
   $.post(contextPath + "/my/IgnoreFriendRequest/" + u, {ajax: true}, f);
}

function cancelFriendRequest(u, f)
{
   $.post(contextPath + "/my/CancelFriendRequest/" + u, {ajax: true}, f);
}

function removeFriend(un, u, f)
{
   if (confirm("Are you sure you want to remove " + un + " from your street team?"))
   {
      $.post(contextPath + "/my/RemoveFriend/" + u, {ajax: true}, f);
   }
}

function showLoginRequiredForFriending()
{
   // TODO: replace this with lightbox
   alert("You must be logged in to become street teammates.");
}
