function validate() {
	if($("input.group").length > 0) {
		if($("input.group").is(":checked")) {
			alert("success");
			$("form:first").submit();
				return false; 
		} else {
			alert("You must select an organization type.");
		}	
	} else {
		$("form:first").submit();
			return false; 
	}
}
$(document).ready(function() {
	$('ul.interest li').each(
	   function()
	   {
		$(this).simpletip({
			position: 'top',
			offset: [0, 0],
			content: $(this).attr("title")
		});
	   }
	).attr("title", '');
	
	$('input.group').click(function () {
		var company = $(this).val();
		if (company == '7') {$("[name='RET']").val('http://www.t4tchicago.org/go/users/register/thanks/nonprofit/');
			$(".additional").hide();
			$(".additional.nonprofits").show();
			$("#registration #staffing").slideDown();
			$("#registration #revenue").slideDown();
			$("#registration #website").slideDown();
		} else {$("[name='RET']").val('http://www.t4tchicago.org/go/users/register/thanks/volunteer/');	
			$(".additional").hide();
			$(".additional.volunteers").show();
			$("#registration #revenue").slideUp();
			$("#registration #staffing").slideUp();
			$("#registration #website").slideUp();
		}
	});
	
	$("[name='password_confirm']").keyup(function() {
		if($(this).val() == $("[name='password']").val()) {$("#confirmed").show();} else {$("#confirmed").hide();}
	});
	
	$(document).bind("keydown", function(e) {  
		if (e.keyCode == 13) {  
			if($("input.group").length > 0) {
				if($("input.group").is(":checked")) {
					$("form:first").submit();
						return false; 
				} else {
					alert("You must select an organization type.");
				}	
			} else {
				$("form:first").submit();
					return false; 
			}
		}
	});
	$("#submit").bind("click", function(e) { 
		if($("input.group").length > 0) {
			if($("input.group").is(":checked")) {
				$("form:first").submit();
					return false; 
			} else {
				alert("You must select an organization type.");
			}	
		} else {
			$("form:first").submit();
				return false; 
		}
	});
});