jQuery: How to obtain the index of a list element
<p>Given the following HTML:</p>

<pre><code>&lt;ul&gt;
    &lt;li class="imgThumbLi"&gt;
        &lt;img src="larry.jpg"/&gt;
    &lt;/li&gt;
    &lt;li class="imgThumbLi"&gt;
        &lt;img src="curly.jpg"/&gt;
    &lt;/li&gt;
    &lt;li class="imgThumbLi"&gt;
        &lt;img src="moe.jpg"/&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Then I have some jQuery to handle whenever someone hovers their mouse over one of these <code>&lt;img&gt;</code> elements:</p>

<pre><code>$(".imgThumbLi").live({
    mouseenter:
        function() {
            // Obtain the source of the current image we're hovering over.
            var src = $(this).children('img')[0].src;

            // Now I need to know which &lt;li&gt; the "current" (one we're hovering
            // over) image's parent &lt;li&gt; we're in, as a zero-based  index
            // of the &lt;ul&gt;.
            var currListElementIndex = ????
        }
    }
);
</code></pre>

<p>So, if the user was hovering over <code>larry.jpg</code>, then the value of <code>currListElementIndex</code> would be <code>0</code>. If they were hovering over <code>moe.jpg</code>, then the value would be <code>2</code>, etc. Thanks in advance!</p>

<p><strong>Edit</strong>: Because of some other constraints, I can't add IDs to the <code>&lt;li&gt;</code> elements or do anything else that is that obvious...I need to obtain the <code>&lt;ul&gt;</code> somehow (maybe via a <em>parent</em> function??) and figure out which index of that <code>&lt;ul&gt;</code> I'm in.</p>
