Can someone explain how this part
<p>The complete code can be found here: <a href="http://www.webdeveloper.com/forum/showthread.php?t=224180#6" rel="nofollow">http://www.webdeveloper.com/forum/showthread.php?t=224180#6</a> This emulates jquery like functionality.  The next part defines the methods</p>

<pre><code>//define some methods for the utility:
var meths={
    hide:function(a){if(a)a.style.display="none";},
    show:function(a){if(a)a.style.display="";},
    remove:function(a){if(a)a.parentNode.removeChild(a);},
    color:function(a){a.style.color=this||a.style.color;},
    size:function(a){if(a)a.style.fontSize=this||a.style.fontSize;}

};//end meths
</code></pre>

<p>I get the above part. This is, of course, a part of a closure.   I can't seem to understand the next part and how calling <code>X.hide()</code> calls the corresponding method in X. If someone would take the time to explain this</p>

<pre><code>//bind the methods to the collection array:
for(var meth in meths)
  (function(n,m){
    output[n]=function(x){output.map(m,x); return output;}
  }(meth, meths[meth]));//next method

return output;
</code></pre>
