title: overriding the javascript ALERT to jquery dialog
body: <p>I was trying to do the magic and turn all of my platform javascript alerts to jquery dialog, I followed the following scripts</p>
  
  <pre><code>&lt;div id="overrideAlert"&gt;&lt;/div&gt;
  
  &lt;script&gt;
  window.alert = function(message) {
      $('#overrideAlert').text(message).dialog({
          modal:true,
          title:'Message',
          buttons: {
              'OK':function(){
                  $(this).dialog('close');
              }
          }
      });
  };
  &lt;/script&gt;
  </code></pre>
  
  <p>But no luck. </p>
  
  <p>Is there a clean solution for this? Thanks, </p>