function popup(url) {
  this.url = url;
  this.reference = null;

  this.open = function() {
    $.get(url, function(data) {
      var newElements = this.reference = $(data).appendTo('body');
      newElements.find("a.close").click(function () {
        newElements.remove();
        return false;
      });
      /*newElements.find("form").submit(function () {
        var formdata = $(this).serialize();
        $.post(this.action, formdata, function(data) {
          newElements.html(data);
        });
        return false;
      }); */s	  
    });
  };
    
  this.close = function() {
    this.reference.remove();
  }
}

