var activateOverlay = function(html){
  $("#overlay").show().find(".container").html(html);
}

$(document).ready(function(){
  
  $("#overlay a.close-overlay").click(function(){
    $("#overlay").hide();
    return false;
  });
  
  $(window).keydown(function(e){
    if(e.keyCode==27) $("#overlay").hide();
  });
  
  $("#clip-list a.clip").toggle(function(e){
    $("div.expand").hide();
    $(this).parent().find("div.expand").show();
    return false;
  }, function(e){
    $(this).parent().find("div.expand").hide();
    return false;
  });
  
});