/*
	Make all fieldsets expandable/collapsable
	
	Relies on a structure like:
	
	<fieldset>
		<legend>blah</legend>
		<div class="fieldset_content">
			content here	
		</div>
	</fieldset>
	
*/

$(document).ready(function(){

	$('legend').css({cursor: 'pointer'}); // todo: Move to css file.
	var info = 'Click to hide/show.';
	$('legend').attr({alt: info, title: info});
	
	$('legend').toggle(
		function() {
			$(this).next().hide('fast');
		},
		function() {
			$(this).next().show('fast');
		}
	);
	
});	
