understanding var window = this in 1.3.2

understanding var window = this in 1.3.2

I am trying to catch up to 1.3.2 as a general developer and in particular as a contributor to john's envjs project.
In particular I've been trying to make the global window and document object references scope-able inside closures so that a single shell can manage multiple instancse.  I'm not having much luck and might give up but I'm trying to understand if it's even possible.
I was looking at the 1.3.2 source and noticed a treatment of window that I'd never seen before and frankly am a bit perplexed by it.
in 1.3.2 line sixteen sets the window equal to the jQuery sources anonymous closure scope.  And window continues to be referenced throughout in what is apparently a mixture of traditional and non-traditional ways.  is this possible?  at what points are the global window object and jquery closure window the same and different.
can someone give me a brief summary of the pattern so I can see if it's something I can make use of in envjs?
thanks a ton and especially to John and Yehuda.<br clear="all">
--
Christopher Thatcher