$(document).ready(function() {

	if ($('#formSubmitted').hasClass('yep')) {
		$('#subWrapper').css('height', 1704);
		$('#ourStory,#ourValues,#responsibilities,#onCampus').hide();
	} else {
		$('#subWrapper').css('height', 985);
		$('#ourValues,#responsibilities,#applyForm,#onCampus').hide();
	}
	$('#bodyMenu li a, #mainButton').click(function() {
		var linkRel = $(this).attr('rel');
		if (linkRel == 'applyForm') {
			$('#subWrapper').animate({
				height: "1704px"
			}, 800);
		} else if (linkRel == 'onCampus') {
			$('#subWrapper').animate({
				height: "1650px"
			}, 800);			
		} else {
			$('#subWrapper').animate({
				height: "985px"
			}, 800);
		}
		$.scrollTo('#mainButton', 800);
		$('#bodyContent > div:visible').slideUp('slow');
		$('#'+linkRel).slideDown('slow');
		return false;
	});
	$('form').submit(function() {
		if ($('#haveReadValues').is(':checked')) {
			// do nothing
		} else {
			alert('You must affirm that you have read the Southern Tide values before you submit your application.');
			return false;
		}
	});
});