$(document).ready(function() {

	$('a.lightbox').lightBox();

	$(".confirm").click(function() {
			var q = $(this).attr("data-confirm");
			return confirm(q);
	});
	
	$("#open-step-one").click(function() {
		$(this).hide();
		$("#step-one").show(2500);
	});
	$("#application-form").submit(function() {
		$(".error-form").removeClass("error-form");
		$("input[type=text]").filter(".required").each(function() {
			if($(this).val().length < 1) {
				$(this).addClass("error-form");
			}
		});
		$("textarea.required").each(function() {
			if($(this).val().length < 1) {
				$(this).addClass("error-form");
			}
		});
		if($(".error-form").length > 0) {
			alert("Some required fields are not filled out. Please the check the form.");
			return false;
		} else {
			return true;
		}
	});
});