re.sample(BUTTONS);

  $('#dialog').dialog({
    height: 0,
    width: 0,
    position: {my: 'center', at: 'center', of: document.getElementById('area')},
    buttons: [
      { text: 'Cancel', click: function(e) {
        task_state = e.target.innerHTML === expectedButton ? 1.0 : -1.0;
        console.log('click-dialog-2', task_state);
      } },
      { text: 'OK', click: function(e) {
        task_state = e.target.innerHTML === expectedButton ? 1.0 : -1.0;
        console.log('click-dialog-2', task_state