$(document).ready(function () {
	
	clearit();
	$('.conservation, .karner, .other, .stewardship, .research1, .education, .international, .research2, .professional, .additional, .contact, .intro').bind('mousewheel', function(event, delta, deltaX, deltaY) {
    console.log(delta, deltaX, deltaY);
});
	$(".conservation, .karner, .other, .stewardship, .research1, .education, .international, .research2, .professional, .additional, .contact, .intro").jScrollPane({showArrows: true});
	$('li').first().css('background-image', 'none');
    $('#nav li').hover(
        function () {
            $('ul', this).slideDown(100);
        },
        function () {
            $('ul', this).slideUp(100);        
        }
    );
	
	$("#cons").css('background-color', '#040');
	    $("#cons").css('color', '#eee');
	$("#cons").click(function() {
	   clearit();
	   $(".conservation").fadeIn();
	   $("#cons").css('background-color', '#040');
	    $("#cons").css('color', '#eee');
	});
	
	$("#karn").click(function() {
	   clearit();
	   $(".karner").fadeIn();
	   $("#karn").css('background-color', '#040');
	    $("#karn").css('color', '#eee');
	});
	
	$("#othe").click(function() {
	   clearit();
	   $(".other").fadeIn();
	   $("#othe").css('background-color', '#040');
	    $("#othe").css('color', '#eee');
	});
	
	$("#stew").click(function() {
	   clearit();
	   $(".stewardship").fadeIn();
	   $("#stew").css('background-color', '#040');
	    $("#stew").css('color', '#eee');
		$("#wfs").css('background-color', '#040');
	    $("#wfs").css('color', '#eee');
	});
	
	$("#res1").click(function() {
	   clearit();
	   $(".research1").fadeIn();
	   $("#res1").css('background-color', '#040');
	    $("#res1").css('color', '#eee');
		$("#wfs").css('background-color', '#040');
	    $("#wfs").css('color', '#eee');
	});
	
	$("#res2").click(function() {
	   clearit();
	   $(".research2").fadeIn();
	   $("#res2").css('background-color', '#040');
    	$("#res2").css('color', '#eee');
	});
	
	$("#educ").click(function() {
	   clearit();
	   $(".education").fadeIn();
	   $("#educ").css('background-color', '#040');
	    $("#educ").css('color', '#eee');
		$("#wfs").css('background-color', '#040');
	    $("#wfs").css('color', '#eee');
	});
	
	$("#inte").click(function() {
	   clearit();
	   $(".international").fadeIn();
	   $("#inte").css('background-color', '#040');
	    $("#inte").css('color', '#eee');
		$("#wfs").css('background-color', '#040');
	    $("#wfs").css('color', '#eee');
	});
	
	$("#prof").click(function() {
	   clearit();
	   $(".professional").fadeIn();
	   $("#prof").css('background-color', '#040');
	    $("#prof").css('color', '#eee');
		$("#wfs").css('background-color', '#040');
	    $("#wfs").css('color', '#eee');
	});
	
	$("#addi").click(function() {
	   clearit();
	   $(".additional").fadeIn();
	   $("#addi").css('background-color', '#040');
	    $("#addi").css('color', '#eee');
		
	});
	
	$("#cont").click(function() {
	   clearit();
	   $(".contact").show();
	   $("#cont").css('background-color', '#040');
	    $("#cont").css('color', '#eee');
	});
	
 	function clearit() {
		$(".conservation, .karner, .other, .stewardship, .research1, .education, .international, .research2, .professional, .additional, .contact, .intro ").fadeOut();
		 $("#cons, #karn, #othe, #stew, #res1, #res2, #educ, #inte, #prof, #addi, #cont, #wfs").css('background-color', '#eee');
		 $("#cons, #karn, #othe, #stew, #res1, #res2, #educ, #inte, #prof, #addi, #cont, #wfs").css('color', '#111');
	}
	$('#date').append(Date());
	$("#datepicker").datepick();
	$(".intro").fadeIn();
	
});

