//<![CDATA[
	Cufon.replace('h1', {hover: true})('h2', {hover: true})('h3', {hover: true})('.nursery-text li.current_page_item a', {hover: true})('.nursery-text li a', {hover: true});
	
	var current_page;
	
	$(document).ready(function() {
	
		$("a#threesixtylink").fancybox({
		    'padding'           : 0,
	        'autoScale'     	: false,
	        'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'titlePosition'		: 'outside',
			'overlayColor'		: '#1c6777',
			'overlayOpacity'	: 0.8
		});
	
		current_page = $('#top-nav li.current_page_item');
		
		$('#contact').show();
		
		if (!window.location.hash) {
			location.href = "#top";
		}

		$(window).scroll(function() {
			if ($(window).scrollTop()+12 >= $('#contact').height()) { back_from_contact(); } else { going_to_contact(); }
		});
		
		$(window).scroll(function() {
			if ($(window).scrollTop()+12 >= $('#contact').height() && $(window).scrollTop()+12  <= $('#contact').height() + $('#post-10').height()) { nursery_active(); }
		});
		
		$(window).scroll(function() {
			if ($(window).scrollTop()+12 >= $('#contact').height() + $('#post-10').height() && $(window).scrollTop()+12 <= $('#contact').height() + $('#post-10').height() + $('#post-12').height()) { dolphin_active(); }
		});
		
		$(window).scroll(function() {
			if ($(window).scrollTop()+12 >= $('#contact').height() + $('#post-10').height() + $('#post-12').height() && $(window).scrollTop()+12 <= $('#contact').height() + $('#post-10').height() + $('#post-12').height() + $('#post-14').height()) { starfish_active(); }
		});

		$(window).scroll(function() {
			if ($(window).scrollTop()+12 >= $('#contact').height() + $('#post-10').height() + $('#post-12').height() + $('#post-14').height()) { seahorse_active(); }
		});
		
		$(window).scroll(function() {
			if ($(window).scrollTop()+12 >= $('#contact').height() && $(window).scrollTop()+12 <= $('#contact').height() + $('#post-2').height()) { welcome_active(); }
		});
		
		$(window).scroll(function() {
			if ($(window).scrollTop()+12 >= $('#contact').height() + $('#post-2').height()) { mission_active(); }
		});
		

	});
	
	function back_from_contact() {
    	$(current_page).addClass('current_page_item');
		$('#right-col').fadeIn("slow");
    	$('#contact-us-button').removeClass('current_page_item');
	}
	
	function going_to_contact() {
   		$('#top-nav li.current_page_item').removeClass('current_page_item');
   		$('#contact-us-button').addClass('current_page_item');
    	$('#right-col').fadeOut("slow");
	}
	
	function nursery_active() {
   		$('#button-10').addClass('current_page_item');
   		$('#button-12').removeClass('current_page_item');
   		$('#button-14').removeClass('current_page_item');
   		$('#button-16').removeClass('current_page_item');
	}
	
	function seahorse_active() {
   		$('#button-10').removeClass('current_page_item');
   		$('#button-12').addClass('current_page_item');
   		$('#button-14').removeClass('current_page_item');
   		$('#button-16').removeClass('current_page_item');
	}
	
	function starfish_active() {
   		$('#button-10').removeClass('current_page_item');
   		$('#button-12').removeClass('current_page_item');
   		$('#button-14').addClass('current_page_item');
   		$('#button-16').removeClass('current_page_item');	}
	
	function dolphin_active() {
   		$('#button-10').removeClass('current_page_item');
   		$('#button-12').removeClass('current_page_item');
   		$('#button-14').removeClass('current_page_item');
   		$('#button-16').addClass('current_page_item');
	}
	
	function welcome_active() {
   		$('#button-2').addClass('current_page_item');
   		$('#button-35').removeClass('current_page_item');
	}
	
	function mission_active() {
   		$('#button-2').removeClass('current_page_item');
   		$('#button-35').addClass('current_page_item');
	}
//]]>
