var prevclick = "projects";
var prevClient = "client0";

function showClient(clientSelect)
{
	$("#"+prevClient).hide();
	prevClient = clientSelect;
	$("#"+clientSelect).show();
}

function showbox(choice)
{
	if (choice == "project") {
		$("#relproject").show();
		$("#relcontent").hide();
		$("#projbut").show();
		$("#relbut").hide();
	}
	else {
		$("#relproject").hide();
		$("#relcontent").show();
		$("#projbut").hide();
		$("#relbut").show();
	}
}

function scrollstudiobar()
{
	$('#relatedbox').jScrollPane({ showArrows: true, scrollbarWidth: 13, scrollbarTrackWidth: 8, scrollbarMargin: 20 }); 
}

function showmore(projtype)
{
	var posa = $('#workfoot').position();
	$('#relatedbox').css('height',posa.top+'px');
	if ($("#"+projtype+" div").attr("id") > 2) 
	{
		$("#"+projtype+" span.two").toggle();
		
		var total = $("#"+projtype+" li").size();
		for (var i=3; i <= total; i++)
		{
			if (i == total) { $("#"+projtype+" li:nth-child("+i+")").slideToggle(function() { scrollstudiobar(); }); }
			else { $("#"+projtype+" li:nth-child("+i+")").slideToggle(); }
		}
	}
}
