function main() { //callback function to calculate height needed for .main
	$("#bios").css("height", "auto");
	var footHeight = $("#agent_footer").height();
	footHeight = footHeight+30;
	$("#bios").css("padding-bottom", footHeight+"px");
	if($("#bios").height() < $("#agents").height()) {
		var mainHeight = $("#page").height();
		var realHeight = mainHeight - footHeight;
		realHeight += 35;
		$("#bios").css("height", realHeight+"px");
	}
}
$(document).ready(function() {
	main();
	var agent;
	$("#agents a").click(function() {
		if($(".default").length>0) {
			$("#agents").removeClass("default");
			$("#agents_intro").addClass("inviz");
			$("#agent_footer").removeClass("inviz");
		}
		$("#bios ."+agent).addClass("inviz");
		$("#"+agent).removeClass("bright");
		agent = this.id;
		$("#bios ."+agent).removeClass("inviz");
		$(this).addClass("bright");
		$("#agent_footer").load("inc/agents-quote.php?q="+agent, main());
		return false;
	});
	if(defaultTo == 0) {
		//$("#agents a").eq(0).trigger("click");
		$("#agents").addClass("default");
		//$("#agent_footer").addClass("inviz");
	} else {
		$("#agents_intro").addClass("inviz");
		$("#A"+defaultTo).trigger("click");
	}
});