$(document).ready(function() {
    
    function disableLink(e) {
        e.preventDefault();
        return false;
    }
    
    
    function hideAnim(section) {
        //alert(section);
        $(section).animate({opacity: 0}, 500,function() {
        	$(section).hide();
        	});
    }


    function showAnim(section) {
        $(section).delay(600).show(0).animate({opacity: 1}, 500);
    }    
    
    
    
    $("#nav a").click(function(e) {
        $("#nav a").removeClass("on");
        $(this).addClass("on");
	});
        
    $("#navHome").click(function(e) {
        e.preventDefault();

        showAnim("#home"); 
        hideAnim("#story");
        hideAnim("#menu");

        return false;
        
    });
    
    
    
    $("#navStory").click(function(e) {
        e.preventDefault();
   
        hideAnim("#home");
        showAnim("#story");
        hideAnim("#menu");

    });
    
    $("#navMenu").click(function(e) {
        e.preventDefault();

        hideAnim("#home");
        hideAnim("#story");
        showAnim("#menu");

    });
    

    
    $(".ingredients").animate({opacity: 0}, 0);
    $("#home").css({display: "block"}).animate({opacity: 1}, 500);
    
    
}); //END Document Ready
