$(function() {
    $("#popup").dialog(
      {
        autoOpen: false,
        position: "top",
        width: "auto",
        title: "screenshot"
      }
    );
    $(".screenshots a").click(
      function() {
        $("#popup").html("<img src=\"" + $(this).attr("href") + "\" alt=\"screenshot\" />");
        $("#popup").dialog("open");
        return false;
      });
  });
