$(document).ready(function(){

	// set types
	types = new Array('personal', 'institution');
	// initially hide all but book of chosen (in case we get the form back for errors)
	var chosen = $("#account_type option:selected").val();
	for(var i=0, len=types.length; i<len; ++i) {
		$('#' + types[i]).css('display', 'none');
	}
	$('#' + chosen).css('display', 'block');

	// on change selected only show that block
	$("#account_type").change(function() {
		var chosen = $("#account_type option:selected").val();
		for(var i=0, len=types.length; i<len; ++i) { $('#' + types[i]).css('display', 'none'); }
		$('#' + chosen).css('display', 'block');
	});

});
