jQuery events are triggered twice
<p>I'm using jQuery version 1.4.2.
Somehow, all my jQuery functions are triggered twice without any visible reason (one jQuery library include, one document.ready function etc.).</p>

<p>I can solve the problem by unbind every custom-event before binding function to it (<code>$(...).unbind('click').bind('click', function(){...})</code>). This method works well with my own functions, but doesn't with external plug-ins (e.g. prettyPhoto).</p>

<p>What could be the source for the problem and how can I solve it?
Thank you!</p>

<p>~~~~~~~~~~~~~~~~~~~~~~~</p>

<p>Eventually I found what causes the problem: a wrap method! Whenever I use it it cause the document.ready function to fire twice. How could I prevent it from doing this?</p>
