Get photo number from id?
<p>I have a bunch of photos in an array.</p>

<pre><code>&lt;div&gt;
  &lt;img id="photo1"&gt;
  &lt;img id="photo2"&gt;
  &lt;img id="photo3"&gt;
  &lt;img id="photo4"&gt;
&lt;/div&gt;
</code></pre>

<p>I have a slideshow. My slideshow works by showing the photo number based in the div.. i.e.</p>

<pre><code>var photos = $('div img');
$(photos[0]).show();
</code></pre>

<p>Is there a quick way to get img position in the div? So #photo1 would be 0, #photo4 would be 3. If not.. what is the most efficient way to get the img id and return (number - 1)?</p>
