$(function(){
	//Make each label the width of the max
 
	var container = $(this);
	
	$('#form')
	   .jqTransform()
	   .validate({
			errorElement: 'p',
			errorPlacement: function(error, element) {
			$(element).closest('.rowElem').append(error);
			},
         	submitHandler: function(form) {
			   $(form).ajaxSubmit({
					success: function(returned) {
						$('#form').hide();
						$('#form_area').append("<p class='thanks'>Thanks! Your request has been sent.</p>" + returned)
					}
           		});
         	}
        }); 
        
    $("#addURLSArea").hide();
        

    $('.jqTransformCheckbox').click(function(){
        if ($('#multCheck:checked').val() == 'on') {
            $("#addURLSArea").slideDown();
        } else {
            $("#addURLSArea").slideUp();
        }
    });  
    
    $(".jqTransformRadio").click(function() {
        if ($(".jqTransformRadio").eq(1).attr("class") == "jqTransformRadio jqTransformChecked") {
            $("#curTextArea").slideUp();
        } else {
            $("#curTextArea").slideDown();
        }
    });
	
});