what's the purpose of passing "window" and/or "undefined"?

what's the purpose of passing "window" and/or "undefined"?

    I've noticed the following in the jQuery Mobile source code. What's the purpose of passing window  and/or undefined
    1. (function($, window, undefined ) {

    2.       // do stuff

    3. })( jQuery, this )
    window is global by default correct? and undefined...well, i'm at a total loss. Not even sure what that means. I know i can do a comparison like...if(typeof myvar === "undefined")...yeah, i'm confused :P