$(function(){
	
	$('.nav').click(function(ev){
		ev.preventDefault();
		
		/*var name = $(this).attr('href').substr(1);
		//alert(name);
		
		var bgColor;
		alert(bgColor);
		if(name = 'home') {
			bgColor = '13c2e2';
		} else if(name = 'about') {
			bgColor = 'e03112';
		} else if(name = 'networks') {
			bgColor = 'a5c023';
		} else if(name = 'contact') {
			bgColor = 'df7213';
		}
		alert(bgColor);
		$('body').animate({ backgroundColor: '#'+bgColor }, 500);
		$('#content').scrollTo( '#'+name, 500, {queue:true} );
		*/
	
	$('#monkey a').hover(function(){
		//$('body').animate({ backgroundColor: "#5f8419" }, 500);
		$(this).animate({backgroundColor: '#5f8419'}, 500);
	}, function(){
		//$('body').animate({ backgroundColor: "#444" }, 500);
		$(this).animate({backgroundColor: '#444'}, 500);
	});
		if($(this).hasClass('home')) {
			$('body').animate({ backgroundColor: "#13c2e2" }, 500);
			$('#content').scrollTo( '#home', 500, {queue:true} );
		} else if($(this).hasClass('about')) {
			$('body').animate({ backgroundColor: "#e03112" }, 500);
			$('#content').scrollTo( '#about', 500, {queue:true} );
		} else if($(this).hasClass('networks')) {
			$('body').animate({ backgroundColor: "#a5c023" }, 500);
			$('#content').scrollTo( '#networks', 500, {queue:true} );
		} else if($(this).hasClass('contact')) {
			$('body').animate({ backgroundColor: "#9a32b0" }, 500);
			$('#content').scrollTo( '#contact', 500, {queue:true} );
		} else if($(this).hasClass('monkey')) {
			$('body').animate({ backgroundColor: "#666" }, 500);
			$('#content').scrollTo( '#monkey', 500, {queue:true} );
		}
	});
});
