$(document).ready(function() {

	//for #form_1
	
		var form = '#form_1' // working within form_1

		var youth1 = '#li_16, #li_17, #li_18, #li_19, #li_20,'; //youth1
		var youth2 = '#li_21, #li_23, #li_39, #li_24, #li_42,'; //youth2
		var youth3 = '#li_26, #li_28, #li_43, #li_29, #li_41,'; //youth3
				   
		var adult1 = '#li_27, #li_22, #li_40, #li_32,'; //adult1
		var adult2 = '#li_30, #li_31, #li_45, #li_25,'; //adult2
		 
		var senior1 = '#li_34, #li_36, #li_46, #li_38,'; //senior1
		var senior2 = '#li_33, #li_35, #li_44, #li_37,'; //senior2		
		
		$(formform).find(youth1);
		$(form).find(youth1).hide();
		$(form).find(youth2).hide();
		$(form).find(youth3).hide();
		$(form).find(adult1).hide();
		$(form).find(adult2).hide();
		$(form).find(senior1).hide();
		$(form).find(senior2).hide();
		
		//Summer Camp Registration Form
		$.youthMap = {
		  '' : $([]),
		  '1' : $(form).find(youth1),
		  '2' : $(form).find(youth1 + youth2),
		  '3' : $(form).find(youth1 + youth2 + youth3)
		};
		
		$.adultMap = {
		  '' : $([]),
		  '1' : $(form).find(adult1),
		  '2' : $(form).find(adult1 + adult2)		  
		};

		$.seniorMap = {
		  '' : $([]),
		  '1' : $(form).find(senior1),
		  '2' : $(form).find(senior1 + senior2)		  
		};
		
		//Youth Select
		$(form).find('#element_48').change(function() {
		  // hide all
		  $.each($.youthMap, function() { this.hide(); });
		  // show current
		  $.youthMap[$(this).val()].show();
		});
		
		//Adult Select
		$(form).find('#element_49').change(function() {
		  // hide all
		  $.each($.adultMap, function() { this.hide(); });
		  // show current
		  $.adultMap[$(this).val()].show();
		});
		
		//Senior Select
		$(form).find('#element_50').change(function() {
		  // hide all
		  $.each($.seniorMap, function() { this.hide(); });
		  // show current
		  $.seniorMap[$(this).val()].show();
		});

	//end #form_1
		
});

