// JavaScript Document

$(function(){
	$('form').jqTransform({imgPath:'images/form/'});
	$('.screen2').hide();
	$('.screen1 #next-button').click(function() {
		if (($("#active-months").val()!="") && ($("#serveyesno").val()!="no")) {										  
			$('.screen1').hide(),
			$('.screen2').fadeIn()
		};
		
		if ($("#serveyesno").val()=="no") {
			$('#no-qualify').show()
		};
		
		if ($("#active-months").val()=="") {
			$("div.error span").html('Please enter the number of months you served.');
			$("div.error").show();
		};
		
	});
	$('.screen2 #back-button').click(function() {
		$('.screen2').hide(),
		$('.screen1').fadeIn()
	});
	
	
	$('#no-button').click(function() {
		 $('#no-qualify').show()									   
	});
	
	$('#no-qualify').click(function() {
		 $('#no-qualify').hide()									   
	});
	
	if (($("#degree").val()=="bachelors")) {										  
			$('#interest-area').show()
		}
	
	
	$('#degree').change(function() {
		if (($("#degree").val()=="bachelors")) {										  
			$('#interest-area').show()
		} else {
			$('#interest-area').hide()
		};
	});
	
});