var prevclick = "projects";

function scrollstudiobar(){
	$('#studiobar').jScrollPane({ showArrows: true, scrollbarWidth: 13, scrollbarTrackWidth: 8, scrollbarMargin: 10 }); 
}

function showbox(choice)
{
	if (choice == "people") {
		$("#contactbox").hide();
		$(".peopleresults").show();
		//$('.peopleresults').jScrollPane({ showArrows: true, scrollbarWidth: 13, scrollbarTrackWidth: 8, scrollbarMargin: 10 });
	}
	else {
		$("#contactbox").show();
		$(".peopleresults").hide();
		//$('.peopleresults').jScrollPaneRemove();
	}
}

function showmore(projtype)
{
	if ($("#rec_"+projtype+" span.count").attr("id") > 2) 
	{
		$("#rec_"+projtype+" span.two").toggle();
		
		var total = $("#rec_"+projtype+" div").size();
		for (var i=2; i < total; i++)
		{
			if (i == (total-1)) { $("#rec_"+projtype+" div.p"+i).slideToggle(function() { scrollstudiobar(); }); }
			else { $("#rec_"+projtype+" div.p"+i).slideToggle(); }
		}
	}
}

var cid = 0;
function cycleContent(direction)
{
	var lisize = $("#studiofeature > li").size()-1;
	
	if (direction == "prev") {
		$("#content"+cid).hide();
		cid --;
		if (cid < 0) { cid = lisize; }
		$("#content"+cid).fadeIn();
	}
	else {
		$("#content"+cid).hide();
		cid ++;
		if (cid > lisize) { cid = 0; }
		$("#content"+cid).fadeIn();
	}
}
