Module Revealing Pattern for Media

Because its in a closure you cant just say Media=something and it will be global in the window scope, because its in the closure scope.....so, we have to attach it to the window to make it global.

There is no this in an Immediately-invoked function expression. well there is, its window or something.
Self was just picked as the objects name as it just kinda makes sense to me as were all use to using it as a this replacement.
It ends up being the object you where making in the old code when we assign it to window.Media.  And most variables in this are global within the scope and then attached to self.  But variables that arent an object or array  have to be attached directly to self and referenced within the scope as self.variable.  Objects and array variables dont have to be referenced that way because their pointer references.  So if we create a global one first and then attach it to self both variables point to the same object structure.  Be careful when doing stuff to these in the closure because if you where to delete the global variable and replace it with another object `variable=[]' the one on self would still point to the original object.

Hope thats helped, Im not very good at explaining stuff some times coz I can never remember the names or details.
But if you look up Module Reveal pattern, closures and Immediately-invoked function expression you should be able to understand whats going on.  Ill try to help if I can.