Run document.ready only if jquery is loaded
<p>I have this code in a global JS file.</p>

<pre><code>$(document).ready(function() {
       DoStuff();
 });
</code></pre>

<p>Unfortunately there are pages that include this file but doesn't include the jquery file. So I get errors:</p>

<pre><code>Message: The value of the property '$' is null or undefined, 
not a Function object
</code></pre>

<p>How do I run <code>document.ready()</code> only if JQuery file is loaded.</p>
