$(document).ready(function() {
  var path = location.pathname;
  
  if (path ==  '/posts/'){
    $("#posts-header").addClass("selected");
    $("#posts-footer").addClass("selected");    
  } else if (path == '/about_ryan_higdon/'){
    $("#about-ryan-higdon-header").addClass("selected");
    $("#about-ryan-higdon-footer").addClass("selected");
  } else if (path == '/about_ryan_higdon/resume/'){
    $("#about-ryan-higdon-resume-header").addClass("selected");
    $("#about-ryan-higdon-resume-footer").addClass("selected");
  } else if (path == '/about_ryan_higdon/sources/'){
    $("#about-ryan-higdon-sources-header").addClass("selected");
    $("#about-ryan-higdon-sources-footer").addClass("selected");
  } else if (path == '/about_ryan_higdon/contact/'){
    $("#about-ryan-higdon-contact-header").addClass("selected");
    $("#about-ryan-higdon-contact-footer").addClass("selected");
  }
      
});

//TODO Condense these 4 functions to 1.  Should be easy but more important things to do right now.

/*
* Used on post_list.html for hiding comments
*/
function showComment(counter){
  $("#blog-comments" + counter ).css("display", "inline");
}

/*
* Used on post_list.html for hiding comments
*/
function hideComment(counter){
$("#blog-comments" + counter ).css("display", "none");
}


/*
* Used on post_detail.html for showing comments
*/
function show_comments(){
  $("#blog-comments").css("display", "inline");
}

/*
* Used on post_detail.html for hiding comments
*/
function hide_comments(){
$("#blog-comments" ).css("display", "none");
}