$(document).ready(function() {
  //When the user clicks a link in the link list, the blow code fires
  $('.nav-list > a').click(function(e) { 
    
    e.preventDefault(); //Stops the browser from going to the desired link 
    // 
    pageToLoad = $(this).attr('href'); //Gets the value inside the anchor link's href attribute and stores it in a pageToLoad variable
    
    $('.l-project-area .content').fadeOut('100', function() { //Fades out the content that is in the project area
      
        $(this).html(''); //Clears the HTML inside of the content area
        
        $.get(pageToLoad, function(data) { //loads the data from the pageToLoad variable
          
          $('.l-project-area .content').html(data); //inserts the data variable containing the HTML into the content block

          $('.l-project-area .content').fadeIn(); //Fades in the content area because it was previously hidden (see above)
        
        });
    
      });  
  });
  
});
