How to organise jquery code
<p>I discoverd my jquery code is a mess, right now it doesnt follow any type of logic build up.
I have lots of ajax calls, nested functions, dom manipulations, plugin calls in my main js file.</p>

<p>Lot of calls are fired on every page, what is a no-no, and get the undefined error on a few pages because some functions or calls fire on every page, and thats not supose to.</p>

<p>How to organize the code? I have read a lot of articles about prototypical and pseudo classical inheritance but they just explain how things works, like how you can inherit 'Person' from 'Human' or something like this. How can I actually use it in real life? </p>
