Minimising jQuery Code
<p>How would you recommend on minimizing this code? As you can see there is a lot of repeating code.</p>

<p>Im sure many of you may have written code as i have below. But im hoping that there is a way to shorten the amount of code needed. </p>

<p>Any help is much appreciated :)</p>

<pre><code>if(index &gt;= 2 &amp;&amp; index &lt;= 5)
{
    $(".menu-item-2 img").attr( "src" , "images/menu-market-active.png"  );
    $(".menu-item-3 img").attr( "src" , "images/menu-quote.png"  ); 
    $(".menu-item-4 img").attr( "src" , "images/menu-order.png"  ); 
    $(".menu-item-5 img").attr( "src" , "images/menu-in.png"  ); 
    $(".menu-item-6 img").attr( "src" , "images/menu-taking.png"  ); 
}
if(index &gt;= 6 &amp;&amp; index &lt;= 10)
{
    $(".menu-item-2 img").attr( "src" , "images/menu-market.png"  );
    $(".menu-item-3 img").attr( "src" , "images/menu-quote-active.png"  ); 
    $(".menu-item-4 img").attr( "src" , "images/menu-order.png"  ); 
    $(".menu-item-5 img").attr( "src" , "images/menu-in.png"  ); 
    $(".menu-item-6 img").attr( "src" , "images/menu-taking.png"  ); 
}
if(index &gt;= 11 &amp;&amp; index &lt;= 16)
{
    $(".menu-item-2 img").attr( "src" , "images/menu-market.png"  );
    $(".menu-item-3 img").attr( "src" , "images/menu-quote.png"  ); 
    $(".menu-item-4 img").attr( "src" , "images/menu-order-active.png"  ); 
    $(".menu-item-5 img").attr( "src" , "images/menu-in.png"  ); 
    $(".menu-item-6 img").attr( "src" , "images/menu-taking.png"  ); 
}
if(index &gt;= 17 &amp;&amp; index &lt;= 21)
{
    $(".menu-item-2 img").attr( "src" , "images/menu-market.png"  );
    $(".menu-item-3 img").attr( "src" , "images/menu-quote.png"  ); 
    $(".menu-item-4 img").attr( "src" , "images/menu-order.png"  ); 
    $(".menu-item-5 img").attr( "src" , "images/menu-in-active.png"  ); 
    $(".menu-item-6 img").attr( "src" , "images/menu-taking.png"  ); 
}
if(index &gt;= 22)
{
    $(".menu-item-2 img").attr( "src" , "images/menu-market.png"  );
    $(".menu-item-3 img").attr( "src" , "images/menu-quote.png"  ); 
    $(".menu-item-4 img").attr( "src" , "images/menu-order.png"  ); 
    $(".menu-item-5 img").attr( "src" , "images/menu-in.png"  ); 
    $(".menu-item-6 img").attr( "src" , "images/menu-taking-active.png"  ); 
}
</code></pre>

<p>EDIT:</p>

<p>The images are a menu bar across the bottom of the page. Sort of like a chapter of a book. One button will show as activated (a different image) when you are in that section and the others will not. Also i am using jQuery cycle.</p>
