$(document).ready(function(){
	
	var activecolor = '#712C16';
	var passivecolor = '#B8968A';
	
	$(".naviLinks").css('color', passivecolor);
	if (top.location.hash != "") {
		$("a[href*=" + top.location.hash + "]").css('color', activecolor);
	} else{
		$("a[href*=#home]").css('color', activecolor);
	}
	
	$(".naviLinks").click(function() {
		// Set all current links to passive
		$(".naviLinks").css('color', passivecolor);
		$(this).css('color', activecolor);
		
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = $(this.hash);
			var myHash = this.hash;
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset}, 1000, 'easeInOutQuart', function() { top.location.hash = myHash; });
				return false;
			}
		}
	});
	
});
