function addFavorite(el,t,i)
{
	$.getJSON
	(
		'/ajax/add_favorite.php?t='+t+'&i='+i,
		function (data)
		{
			if ('pass' == data.status)
			{
				swapGraphic();
			}
			else
			{
				$(el).removeAttr('onClick');
				$(el).parent().append(data.msg);
			}
		}
	);
	return false;
}

function deleteFavorite(t,i)
{
	if (confirm("Are you sure you want to delete this from your profile?"))
	{
		$.getJSON
		(
			'/ajax/add_favorite.php?a=delete&t='+t+'&i='+i,
			function (data)
			{
				if ('pass' == data.status)
				{
					$("#mng_fav_"+t+"_"+i).fadeOut("slow");
				}
			}
		);
	}
	return false;
}

function swapGraphic() {
	$("#big_button").fadeOut("fast", function() {
		$("#button_text").fadeIn("fast");
	});
}
