//	add-on code for jQuery
//	written by Gerry danen
//	version 1.0 - 15 Jan 2007

$(document).ready(function() {
	$("#first_field_to_enter")[0].focus();
	//	test for presence of second input field before trying to focus
	$('#second_field_to_enter,#first_field_to_enter')[0].focus();
});


$.fn.check = function(mode) {
	var mode = mode || 'on'; // if mode is undefined, use 'on' as default
	return this.each(function() {
		switch(mode) {
		case 'on':
			this.checked = true;
			break;
		case 'off':
			this.checked = false;
			break;
		case 'toggle':
			this.checked = !this.checked;
			break;
		}
	});
};
