$(document).ready(function() {
  colors = ["green", "yellow", "orange", "salmon", "red"]
  currentColor = 0;
  $("div.post").each(function() {
    $(this).addClass(colors[currentColor]);
    currentColor = currentColor + 1;
    if (currentColor > 4) {
      currentColor = 0
    }
  })
  
  $("div.client div.project span").hide();
  $("div.client div.project").each(function() {
    $(this).mouseenter(function() {
      $(this).find("span").slideToggle();
    });
    $(this).mouseleave(function() {
      $(this).find("span").slideToggle();
    });
  });
  
  $("div.project").click(function() {
    var idToLoad = $(this).attr('data-id-to-load');
    $.facebox($(idToLoad).html());
  });
  
  $("div.explanation div.inner").hide();
  
  $("div.explanation").live('mouseenter', function() {
    $(this).find("div.inner").slideToggle();
  });
  
  $("div.explanation").live('mouseleave', function() {
    $(this).find("div.inner").slideToggle();
  });
});
