Cufon.replace('.profiler-intro-header h2', {
	fontSize: '23px'
});
Cufon.replace('.profiler-intro-header h3', {
	fontSize: '14px'
});
Cufon.replace('.col-13-2 h3, .profiler-complete h4');

$(document).ready(function () {
	
	// Highlight label and hide error message on label click
	$("#answers label, #answers input").click(function(){
		$("#answers tr").removeClass("selected");
		$(this).closest("tr").addClass("selected");
		$("#err-msg:visible")
			.slideUp("fast",function(){
				$(this).remove();
			});
	});
	
	// Submit div
	$("#submit-answer")
		.html("Submit Answer")
		.show()
		.click(function(){
			
			// Check to make sure there's a selection
			if (!$("#answers input:checked").length) {
				if (!$("#err-msg").length) {
					var errText;
					if ($("body.en").length) {
						errText = 'Please select an answer first.';
					} else {
						errText = 'Por favor, seleccione una respuesta primero.';
					}
					$("<p id='err-msg'>"+ errText +"</p>")
						.insertAfter(this)
						.hide()
						.slideDown("normal");
				}
				return false;
			}
			
			// Submit
			$("#profiler-form").submit();
			
		});
	$(".es #submit-answer").html("ENVIAR RESPUESTA");
});