$(document).keypress(function(e)
    {
  switch(e.keyCode)
  {
      case 27:
    $(".window").each(function()
    {
        var clona=$("div.clona");
        var w=$(this);
        clona.hide();
        w.hide();   
    });
      break;
      case 13:
    $(".window").each(function()
    {
        var w=$(this);
        var href=w.find(".advance");
        if (href.length>0)
        {
          self.location=href.attr("href");
        }
    });
      break;
  }
    });
    


