Include jQuery, if not included already
<p>I want to include the jquery in file, if not included already in the page.
How can I do this?</p>

<p>I wrote this, but it's giving undesired output.</p>

<pre><code>&lt;script type="text/javascript"&gt;
if ('undefined' == typeof window.jQuery) {
    // jQuery not present
//  alert("Jquery Unavailable");
&lt;?php echo '&lt;script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"&gt;&lt;/script&gt;'; ?&gt;
} else {
    // jQuery present
    alert("Jquery Available");
}
&lt;/script&gt;
</code></pre>
