$(document).ready(function(){
  var forms = document.getElementsByTagName("form");
  for (var i=0; i<forms.length; i++) {
    forms[i].reset();
  }
  
  // MULTIPLE CHOICE RADIO BUTTON  
  $(".radio .submit_button").click(function(){
    $(this).closest(".question_wrap").find(".answer").show();
    $(this).closest(".question_wrap").find(".correct").addClass("correct_answer");
  });
  
  // CHECKBOXES
  $(".checkboxes .submit_button").click(function(){
    $(this).closest(".question_wrap").find(".answer").show();
    $(this).closest(".question_wrap").find(".correct").addClass("correct_answer");
  });
  
  // INLINE DROPDOWNS  
  $(".dropdown .submit_button").click(function(){
    $(this).closest(".question_wrap").find(".dropdown_correct").show();
    $(this).closest(".question_wrap").find(".answer").show();
    $(this).closest(".question_wrap").find(".correct").addClass("correct_answer");
  });
  
});

//special interaction for feedback on response d in question 5 in non-exempt

function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		// for standards compliance browsers
		var styleOnOff = document.getElementById(whichLayer).style;
		styleOnOff.display = styleOnOff.display = "block";

	}
	else if (document.all)
	{
		// for older IE
		var styleOnOff = document.all[whichLayer].style;
		styleOnOff.display = styleOnOff.display = "block";

	}
}
