$(document).ready(function() {

				$("#schoolProgramInfo").hide();

				var prequalForm= new PrequalForm("prequalQuestions");
				var contactForm= new ContactForm("formQuestions");
				
				$('#prequalQuestions').bind("load",function(){
					prequalForm.load("prequalJSON.html?domain=DF");
				});
				
				$('#prequalQuestions').bind("submit",function(){
					prequalForm.validate("prequalJSON.html?domain=DF");
					return false;
				});
				
				$("#prequalQuestions").trigger("load");
								
				$('#formQuestions').bind("load",function(){
					contactForm.load("contactFormJSON.html?domain=DF");
				});
				
				$('#formQuestions').bind("submit",function(){
					contactForm.validate("formJSON.html?domain=DF");
					
				});
				$("#formQuestions").hide();
				$("#formQuestions").trigger("load");
				
				$("form[name='geoform'] select[name='AreaOfInterest']").change(function(){
					var aoi = $(this).find("option:selected").val();
					$("select[name='ProgramsOfInterestType']").trigger('load', [aoi]);
				});
				
				$("select[name='ProgramsOfInterestType']").bind('load', function(event, aoi){
					//var aoi = $("form[name='geoform'] select[name='AreaOfInterest'] option:selected").val();
					if(aoi.match("---") == null){
						$.getJSON('getaoi2options.html', {AreaOfInterest:aoi}, function(aoi2options) {
							var output = []; 
							var i;
							output.push("<option selected='True' value='---Select a Program---'>---Select a Program---</option>"); 
							for (i in aoi2options)
						  	{
						  		output.push('<option value="'+ aoi2options[i] +'">'+ aoi2options[i] +'</option>'); 
						  	}
						  	$('#SF_ProgramsOfInterestType select').html(output.join(''));
						  	$("select[name='ProgramsOfInterestType']").change();
						});
					}
				});
				
				$("form[name='geoform'] select[name='ProgramsOfInterestType']").change(function(){
					$('#SF_ProgramsOfInterestType').hide();
					/*var aoi = $("form[name='geoform'] select[name='AreaOfInterest'] option:selected").val();
					if(aoi.match("---") == null){
						$('#SF_ProgramsOfInterestType').show();
					}else {
						$('#SF_ProgramsOfInterestType').hide();
					}*/
					$('#SF_ProgramsOfInterestType select').filter(function(){
						return ($(this).children("option").size())-2;
					}).parent().show();
				}).change();

				$("form[name='geoform']").submit(function(){
					$('#searchSubmit').click();
					return false;
				});

				$('#searchSubmit').click(function(){
					var searchSchools = schools();
					searchSchools.search();
				}).click();

			});/*JQuery ended*/