$(document).ready(function(){
	
	/*
						   
	//Hide those fieldsets with the .more class
   $(".more").css("display","none");

	// #a1
   $("#a1").click(function(){
	if ($("#a1").is(":checked")) {
		$("#step2").fadeOut("slow");
		$("#step9").fadeIn("slow");
	} else {	   
		$("#seniorservicesurvey").unCheckCheckboxes();
		$("#step9,#step10,#step11,#step12").fadeOut("slow");
		$("#step2").fadeIn("slow");
	}
  });

	// #a2
   $("#a2").click(function(){
	if ($("#a2").is(":checked")) {
		$("#step1").fadeOut("slow");
		$("#step3").fadeIn("slow");
	} else {	   
		$("#seniorservicesurvey").unCheckCheckboxes();
		$("#step3,#step4,#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
		$("#step1").fadeIn("slow");
	}
  });

	// #a3yes
   $("#a3yes").click(function(){
	if ($("#a3yes").is(":checked")) {
		$("#step9").fadeIn("slow");
	} else {
		$("#step4,#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step4,#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a3no
   $("#a3no").click(function(){
	if ($("#a3no").is(":checked")) {
		$("#step4").fadeIn("slow");
	} else {
		$("#step4,#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step4,#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a4yes
   $("#a4yes").click(function(){
	if ($("#a4yes").is(":checked")) {
		$("#step9").fadeIn("slow");
	} else {
		$("#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a4no
   $("#a4no").click(function(){
	if ($("#a4no").is(":checked")) {
		$("#step5").fadeIn("slow");
	} else {
		$("#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step5,#step6,#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a5yes
   $("#a5yes").click(function(){
	if ($("#a5yes").is(":checked")) {
		$("#step9").fadeIn("slow");
	} else {
		$("#step6,#step7,#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step6,#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a5no
   $("#a5no").click(function(){
	if ($("#a5no").is(":checked")) {
		$("#step6").fadeIn("slow");
	} else {
		$("#step6,#step7,#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step6,#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a6yes
   $("#a6yes").click(function(){
	if ($("#a6yes").is(":checked")) {
		$("#step9").fadeIn("slow");
	} else {
		$("#step7,#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a6no
   $("#a6no").click(function(){
	if ($("#a6no").is(":checked")) {
		$("#step7").fadeIn("slow");
	} else {
		$("#step7,#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step7,#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a7yes
   $("#a7yes").click(function(){
	if ($("#a7yes").is(":checked")) {
		$("#step9").fadeIn("slow");
	} else {
		$("#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a7no
   $("#a7no").click(function(){
	if ($("#a7no").is(":checked")) {
		$("#step8").fadeIn("slow");
	} else {
		$("#step8,#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step8,#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a8yes
   $("#a8yes").click(function(){
	if ($("#a8yes").is(":checked")) {
		$("#step9").fadeIn("slow");
	} else {
		$("#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a8no
   $("#a8no").click(function(){
	if ($("#a8no").is(":checked")) {
		$("#step9").fadeIn("slow");
	} else {
		$("#step9,#step10,#step11,#step12").unCheckCheckboxes();
		$("#step9,#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a9yes
   $("#a9yes").click(function(){
	if ($("#a9yes").is(":checked")) {
		$("#step10").fadeIn("slow");
	} else {
		$("#step10,#step11,#step12").unCheckCheckboxes();
		$("#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a9no
   $("#a9no").click(function(){
	if ($("#a9no").is(":checked")) {
		$("#step10").fadeIn("slow");
	} else {
		$("#step10,#step11,#step12").unCheckCheckboxes();
		$("#step10,#step11,#step12,#step13").fadeOut("slow");
	}
  });

	// #a10yes
	$("#a10yes").click(function(){
	if ($("#a3").is(":checked")) {
			if ($("#a10yes").is(":checked")) {
				$("#step12").fadeIn("slow");
				} else {
				$("#step12").unCheckCheckboxes();
				$("#step12,#step13").fadeOut("slow");
				}
		} else {
	if ($("#a4").is(":checked")) {
			if ($("#a10yes").is(":checked")) {
				$("#step12").fadeIn("slow");
				} else {
				$("#step12").unCheckCheckboxes();
				$("#step12,#step13").fadeOut("slow");
				}
		} else {
			if ($("#a10yes").is(":checked")) {
				$("#step11").fadeIn("slow");
				} else {
				$("#step11,#step12").unCheckCheckboxes();
				$("#step11,#step12,#step13").fadeOut("slow");
				}
			}
		}
	}); 

	// #a10no
	$("#a10no").click(function(){
	if ($("#a3").is(":checked")) {
			if ($("#a10no").is(":checked")) {
				$("#step12").fadeIn("slow");
				} else {
				$("#step12").unCheckCheckboxes();
				$("#step12,#step13").fadeOut("slow");
				}
		} else {
	if ($("#a4").is(":checked")) {
			if ($("#a10no").is(":checked")) {
				$("#step12").fadeIn("slow");
				} else {
				$("#step12").unCheckCheckboxes();
				$("#step12,#step13").fadeOut("slow");
				}
		} else {
			if ($("#a10no").is(":checked")) {
				$("#step11").fadeIn("slow");
				} else {
				$("#step11,#step12").unCheckCheckboxes();
				$("#step11,#step12,#step13").fadeOut("slow");
				}
			}
		}
	}); 

	// #a11yes
   $("#a11yes").click(function(){
	if ($("#a11yes").is(":checked")) {
		$("#step12").fadeIn("slow");
	} else {
		$("#step12").unCheckCheckboxes();
		$("#step12,#step13").fadeOut("slow");
	}
  });

	// #a11no
   $("#a11no").click(function(){
	if ($("#a11no").is(":checked")) {
		$("#step12").fadeIn("slow");
	} else {
		$("#step12").unCheckCheckboxes();
		$("#step12,#step13").fadeOut("slow");
	}
  });

	// #a12yes
   $("#a12yes").click(function(){
	if ($("#a12yes").is(":checked")) {
		$("#step13").fadeIn("slow");
	} else {
		$("#step13").fadeOut("slow");
	}
  });

	// #a12no
   $("#a12no").click(function(){
	if ($("#a12no").is(":checked")) {
		$("#step13").fadeIn("slow");
	} else {
		$("#step13").fadeOut("slow");
	}
  });
   
   */


	// Make checkboxes behave like radio button groups
	$.radioCheckboxGroup("a9");
	$.radioCheckboxGroup("a10");
	$.radioCheckboxGroup("a11");
	$.radioCheckboxGroup("a12");
	


});

