jQuery(function(e) {
	var tabs = $("#staff ul").children().size();
	var index = 1;

	for( var i = index; i <= tabs; i++ ) {
		$("#companySplash > #staff > ul > li").eq(i - 1).addClass("tab-" + i.toString());
	}

	$("#companySplash > .profile").hide();
	$("#companySplash > .show").show();

	$("#companySplash > #staff > ul > li > a").click(function(){
		$(this).parent().parent().children().removeClass("selected");
		index = parseInt($(this).parent().attr("class").substring(4));
		$(this).parent().addClass("selected");

		$("#companySplash > .profile").fadeOut("slow");
		$("#companySplash > #close").fadeOut("slow");
		$("#companySplash > .profile").eq(index - 1).fadeIn("slow");
		$("#companySplash > #close").fadeIn("slow");

		return false;
	});

	$("#companySplash > #close > a").click(function(){
		$("#companySplash > #staff > ul > li").removeClass("selected");
		$("#companySplash > .profile").fadeOut("slow");
		$("#companySplash > #close").fadeOut("slow");

		return false;
	});
});
