Determining object type of a Jquery selector
<p>I have a listbox which (sometimes) uses OptionGroups as well, meaning that if I select the parent of a certain OPTION in my listbox, as follows:</p>

<pre><code>var optionGroup = $(this.options(index)).parent();
</code></pre>

<p>it can either be an OptionGroup (if they're used), or the Select element itself.</p>

<p>Is there an easy way of determining which kind of object I'm dealing with here?</p>
