how to load jquery and other javascript file
<p>This is my first time using lightbox which uses jquery framework. But when I paste jQuery and Lightbox javascript files into my html page, my current javascript code doesn't work properly. Is the way I set them up wrong? Thank you. This is the order I put my js files </p>

<p>the error I got is:<br>
Uncaught TypeError: Object [object Object] has no method 'dispatchEvent' prototype.js:5734<br>
Edit:</p>

<pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"     type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="random.js" type="text/javascript"&gt;&lt;/script&gt;


&lt;script src="js/jquery-1.7.2.min.js"&gt;&lt;/script&gt;
&lt;script src="load-poll.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/lightbox.js"&gt;&lt;/script&gt;
</code></pre>

<p>And this is the beginning of my own js file as the page loads:</p>

<pre><code>var POLL_WIDTH = 200;
document.observe("dom:loaded", function() {
    if ($("favChar")){
        fetchPoll("favChar");
    }else if ($("favVoice")){
        fetchPoll("favVoice");
    }else if ($("CMTvote")){
        fetchPoll("CMTvote");
    }else if ($("BLdesign")){
        fetchPoll("BLdesign");
    }
});
</code></pre>
