Dynamic Button Names for jQueryUI.dialog()

Dynamic Button Names for jQueryUI.dialog()

So I'm stumped on this one.  Does anyone have any idea how to create a dialog that uses dynamic values to control the names of the dialog's buttons?  Here's what I've tried, but when I use the below code, I end up with a dialog that has button names of 'button1' and 'button2' rather than 'Yes' and 'No'.  Any ideas?
  1. function conditionalDialog(button1, button2){
  2.   $.dialog({
  3.     autoOpen: true,
  4.     title: 'Condition',
  5.     modal:true,
  6.     buttons:{
  7.       button1: function(){
  8.         //handle 'yes'
  9.       },
  10.       button2: function(){
  11.         //handle 'no'
  12.       }
  13.     }
  14. });
  15. conditionalDialog('Yes', 'No');