// Some functions for SSS, dale! (listening to Calle Ocho :P )

function contactUser(uid,sid,divname)
{
	$('#'+divname).html("<strong><em>Contacting...</em></strong><br />");
	$('#'+divname).load("contactuser.php?sid="+sid+"&uid="+uid);
}

function lostPwd()
{
	email=document.getElementById('loginemail').value;
	$("#lostpwdmsg").load("lostpwd.php?email="+email);
}

function loadStats()
{
	$("#stats").load("stat.php");
}

function addSticker(stid){
	//this function adds a sticker. Can you believe it?
	$("#sticker"+stid).load("addsticker.php?id="+stid);
}

function removeSticker(stid){
	//this function removes a sticker. Can you believe it?
	$("#sticker"+stid).load("removesticker.php?id="+stid);
}

function fancyavailable(id)
{
//$.fancybox('ciao');

$.post("listavailable.php?id="+id, {},
  function(data){
    //alert(data.name); // John
//    $.fancybox(data); //  2pm
	 $.fancybox(data,{
		    'showCloseButton'   : false,
		    'hideOnContentClick': false,
		    'overlayColor'		: '#333',
			'overlayOpacity'	: '0.9',
		    'padding'			: 0,
			'width'				: 460
		});
  }, "html");
}

function showstickers(group,idsingle){
	//this function adds a sticker. Can you believe it?

		$.post("showgroup.php?group="+group+"&idsingle="+idsingle, {},  function(data){
		$("#main").html(data);
		Cufon.refresh();
  }, "html");
}

function addAllTeam(group,idsingle,addAllId){
	//this function adds a sticker. Can you believe it?
		$.post("showgroup.php?group="+group+"&idsingle="+idsingle+"&addall="+addAllId, {},  function(data){
		$("#main").html(data);
		Cufon.refresh();
  }, "html");
}

