datepick plugin - text and date in div but not dialog box

datepick plugin - text and date in div but not dialog box

The following js/jquery places the expected text in the dialog div - but it shows as plain text not within a dialog box.  The date picker is keith woods excellent date picker.

As each date is hovered over the correct date is picked up e.g sample output is " I am currently not in a dialog wed 17-oct-2012" - it's just not in a dialog!?
                      
  1.     <script type="text/javascript">
  2.       $(document).ready(function() {
  3.         $('#hoverPicker').datepick({
  4.         onShow: $.datepick.hoverCallback(showDialog),
  5.         dateFormat: 'D dd-mm-yyyy',
  6.         showTrigger: '#calImg'});
  7.     });
  8.    
  9.     function showDialog(date, selectable) {
  10.         var eventid = "test";
  11.         $('#dialog').attr('title', "test title");
  12.    
  13.         // put the date in the dialog box
  14.         $("#dialog").html("I am currently not in a dialog  " + (selectable ? $.datepick.formatDate('D dd-M-yyyy', date) : '') || 'nothing');
  15.         // show the dialog box
  16.         $('#dialog').dialog('open');
  17.     };
  18.     </script>


html is:

  1.     <pre><div id="dialog"></div></pre>

which looked at in Firebug shows:

  1.     <pre>
  2.     <div id="dialog" title="test title">I‌·am‌·currently‌·not‌·in‌·a‌·dialog‌·‌·wed 17-oct-2012</div>
  3.     </pre>


And the head elements are:

  1.  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
  2. <script type="text/javascript" src="http://www.zzz.co.uk/admin02/jqdp406kw/jquery.datepick.js"></script>
  3. <script type="text/javascript" src="http://www.zzz.co.uk/admin02/jqdp406kw/jquery.datepick.ext.js"></script>