$(document).ready(function(){
	$(function() {
		$("#header").fadeTo("fast", 0.4);
		$(".nav").fadeTo("fast", 0.1);
		//$("#about").slideDown("slow");
		$("#question").html("find out who tristan jud is?");
	});
	
	$("#header").hover(function(){
		$(this).fadeTo("slow", 1.0);
	},function(){
		$(this).fadeTo("slow", 0.4);
	});
	
	$("#header").click(function(){
		if($("#about").is(":hidden"))
		{
			$("#about").slideDown("slow");
			$("#question").html("hi my name is tristan jud");
		} else {
			$("#about").slideUp("slow");
			$("#question").html("find out who tristan jud is?");
		}

	});
	
	$(".nav").hover(function(){
		$(this).fadeTo("slow", 0.4);
	},function(){
		$(this).fadeTo("slow", 0.1);
	});
	
	$(function() {
	    var $sidebar   = $(".nav"),
	        $window    = $(window),
	        offset     = $sidebar.offset(),
	        topPadding = 100;
	
	    $window.scroll(function() {
	        if ($window.scrollTop() > offset.top) {
	            $sidebar.stop().animate({
	                marginTop: $window.scrollTop() - offset.top + topPadding
	            });
	        } else {
	            $sidebar.stop().animate({
	                marginTop: 0
	            });
	        }
	    });
	
	});
});
