JavaScript has closures which are, to say the least, nifty.
Have a look at this question:
How do JavaScript closures work?
It should help you understand why everyone is telling you to put a var something = this above the function and use something inside of it to maintain a reference to the original this.