//Purpose: toggle the visibility of fields depending on the value of another field
$(document).ready(function ()
{
toggleFields();
//call this first so we start out with the correct visibility depending on the selected form values
//this will call our toggleFields function every time the selection value of our underAge field changes
$("#emailTo").change(function ()
{
toggleFields();
});
//Function: this toggles the visibility of the child field depending on the selected value of the parent
function toggleFields()
{
if ($("#emailTo").val() == 0)
$(".emailAlternate").show();
else
$(".emailAlternate").hide();
}
});