$(document).ready(function() {
  
  anchor = window.location.hash.toString(); // get anchor if there is one
  $("div.post-content").hide(); // hide everything at the start
  
  if (anchor == '') { // test to see if there's an anchor
    $("div.post-content:first").slideDown("slow"); // otherwise, show the top post
  } else {
    $("div#"+anchor+" .post-content:hidden").slideDown("slow"); // show that post
  }
  
  $(".post .post-header").click(function() { // watch the header of every post for a click
    $(".post-content").slideUp("slow"); // slide everything up
    $(this).siblings(".post-content:hidden").slideDown("slow"); // only open something back up if it was  hidden in the first place
  })
  
  var i = Math.round(Math.random()*5);; // make a counter from a random int, 0-4
  
  $('.post-content a').each(function () {
    var colors = ["#FF7F00", "#0075EB", "#6C00D9", "#D9006C", "#6CD900"]; // orange, blue, purple, pink, green
    var hue = colors[(i % 5)]; // set the color from the array
    $(this).css("color", hue); // apply the css
    i++; // add one to the counter
  });
});

$(document).ready(function() {
  $(".music").html("Hello!");
  $('a.lightbox').lightBox();
});