$(document).ready(function()
{
	$("#close-tab a").bind("click", function()
	{
		$("#block-tofriend").hide();
		$("#other-stuff .block:visible").fadeOut("fast", function()
		{
			$("#other-stuff").hide();
			$("#previewPlayer").css("height", "100%");
		});
		
		
		return false;
	});
	
	$("#other-stuff .block").hide();
	$("#block-tofriend").hide();
	
	$("#player-stuff .features a.go-to").bind("click", function()
	{
		var elClass = $(this).attr("href").slice(1);
		
		$("#block-tofriend").hide();
		
		if ($("#other-stuff ."+elClass).is(":visible"))
		{
			$("#other-stuff ."+elClass).fadeOut("fast", function()
			{
				$("#other-stuff").hide();
				$("#previewPlayer").css("height", "100%");
			});
		}
		else
		{
			$("#previewPlayer").css("height", "0%");
			$("#other-stuff .block").hide();
			$("#other-stuff").show();
			$("#other-stuff ."+elClass).fadeIn();
		}
		
		return false;
	});
	
	$("#email-from").focus(function()
	{
		$("#block-tofriend").slideDown();
	});
	
});
