title: javascript jquery like construction
body: <p>I wonder if it is possible to create some sort of construction where one could do the following:</p>
  
  <p><code>$("some element").somemethod(arg)</code>, which would be exactly the same as saying <code>$.somemethod("some element", arg)</code></p>
  
  <p>I know it is possible to use, for example, <code>$(selector).each(callback)</code> in jquery, which appears to be the equivalent of <code>$.each(selector, callback)</code>. I find it hard to understand how jquery does this, though. It seems like the method "each" is defined twice, but this is something I would like to avoid. Is this possible?</p>