$(document).ready(function(){ // Runs whenever the page is 'ready' - fully loaded
  var toggleClass = ""; // Create an empty variable to store the item we want to show
  $("#episodes a").click(function() { // Select every anchor that's under #nav-primary inside a 'li' and attach a function to the 'click' event.
    toggleClass = $(this).attr("class"); // Set the toggleClass variable to the value of the class attribute (attr) of current element (this).
    $("#episode-info div").addClass("hidden"); // Set all other items inside the body to be hidden
    $("#"+toggleClass).removeClass("hidden"); // Remove the hidden class on the one item to be shown
    $("#episodes li").removeClass("selected"); $(this).parent().addClass("selected");
    return false;
  });
});

