JQuery popup.....Uncaught TypeError: Object [object Object] has no method 'dialog'
<p>I have been searching for the solution to this problem for a few days now and have gained a few grey hairs in the process. I am echoing a JQuery popup script in php:</p>

<pre><code>  echo '&lt;link rel="stylesheet" 
  href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /&gt;
  &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt;            
  &lt;script src="functions.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt; $(document).ready(function() { JQueryAlert("INSERT MESSAGE HERE!", 120); }); &lt;/script&gt;';
</code></pre>

<p>The problem is, sometimes it fires and sometimes it doesn't. When it doesn't fire it outputs the following error message in Chromes JS console: Uncaught TypeError: Object [object Object] has no method 'dialog' </p>

<p>From what I can discern from similar questions(<a href="http://stackoverflow.com/questions/15963209/uncaught-typeerror-object-object-has-no-method-dialog">Uncaught TypeError: Object #&lt;Object&gt; has no method &#39;dialog&#39;</a>), the problem is a duplicate call of a javascript library, however, I have eliminated this possibility by whittling my javascript libraries to a bare minimum(any less and it won't be able to function). Any idea what is causing this?? I would be eternally grateful to anyone who can provide a solution!!</p>
