$(document).ready(function() {

	$('#businessResource').hide();
	$('#wrapperDistrict').hide();
	$('#wrapperCareer').hide();
	$('#mainDivider').hide();
	$('.course-browser').hide();
	$('#mailReturn').hide();
	$('#courseClose').hide();
	$('#careerPath').hide();
	$('#programReturn').hide();

	$('.careerLink').click(function(){
		$('div:#careerPath').fadeIn();
		$('div:#programReturn').fadeIn();
		$('div:#programRight').fadeOut();
		$('div:#programInfo').fadeOut();
	});

	$('#programReturn').click(function(){
		$('div:#careerPath').fadeOut();
		$('div:#programReturn').fadeOut();
		$('div:#programRight').fadeIn();
		$('div:#programInfo').fadeIn();
	});

	$('#students').click(function() {
		$('div:#studentResource').fadeIn();
		$('div:#businessResource').fadeOut();
	});

	$('#business').click(function() {
		$('div:#studentResource').fadeOut();
		$('div:#businessResource').fadeIn();
	});

	$('#districtTab').click(function(){
		$('#wrapperDistrict').fadeIn();
		$('#wrapperCareer').fadeOut();
		$('#mainDivider').fadeIn();
		$('#contactHeader').stop().animate({top: "320px"}, 600);
		var pos = $("#address").offset().top;
		$('html, body').animate({scrollTop: pos}, {duration: 1000, easing: 'easeOutExpo'});
		$('#mailReturn').fadeIn();
		return false; // override browser behavior to jump to the #anchor; we're doing it manually.
	});

	$('#careerTab').click(function(){
		$('#wrapperDistrict').fadeOut();
		$('#wrapperCareer').fadeIn();
		$('#mainDivider').fadeIn();
		$('#contactHeader').stop().animate({top: "320px"}, 600);
		var pos = $("#address").offset().top;
		$('html, body').animate({scrollTop: pos}, {duration: 1000, easing: 'easeOutExpo'});
		$('#mailReturn').fadeIn();
		return false; // override browser behavior to jump to the #anchor; we're doing it manually.
	});

	$('#mailReturn').click(function(){
		//$('#wrapperDistrict').fadeOut();
		//$('#wrapperCareer').fadeOut();
		//$('#mainDivider').fadeOut();
		$('#contactHeader').stop().animate({top: "-55px"}, 600);
		var pos = $("#contact").offset().top - 100;
		$('html, body').animate({scrollTop: pos}, {duration: 1000, easing: 'easeOutExpo'});
		$('#mailReturn').fadeOut();
		return false; // override browser behavior to jump to the #anchor; we're doing it manually.
	});

	$('#courseButton, a.courseBrowser').click(function(){
		//$('#courseMiddle').animate({height: "auto"}, 600);
		$('.course-browser').fadeIn();
		$('#courseClose').fadeIn();

		var pos = $("#courseClose").offset().top;
		$('html, body').animate({scrollTop: pos}, {duration: 1000, easing: 'easeOutExpo'});
		return false; // override browser behavior to jump to the #anchor; we're doing it manually.
	});

	$('#courseClose').click(function(){
		//$('#courseMiddle').animate({height: "0"}, 600);
		//gotoStepOne();
		$('#courseClose').fadeOut();
		$('.course-browser').fadeOut();

		//var pos = $("#apply").offset().top;
		//$('html, body').animate({scrollTop: pos}, {duration: 1000, easing: 'easeOutExpo'});
		return false; // override browser behavior to jump to the #anchor; we're doing it manually.
	});

	$('#courseExpressSignUp').click(function(){
		expressSignUp();
		return false;
	});

	$('.careerTable tbody tr:even').css('background-color', '#F4E5D2');
	$('.districtTable  tr:even').css('background-color', '#F4E5D2');

});

