jQuery - Not this or prev or next?
<p>How can I select all divs of a class except 'this', and also not the next and previous div? The code below selects everything except for 'this':</p>

<pre><code>$(".image-div").not(this).each(function() {
            $(this).animate({
                    width: '250px'
                }, 500, function() {
                // Animation complete.
            });
        }   
    });
</code></pre>

<p>Thanks </p>

<p>UPDATE - Here is my full code: </p>

<pre><code>$(".image-div").click(function () {


    if ($(this).css('width') != '500px') {

        $(this).animate({
            width: '500px'
            }, 500, function() {
            // Animation complete.
        });

        $(this).prev().animate({
            width: '125px'
            }, 500, function() {
            // Animation complete.
        });

        $(this).next().animate({
            width: '125px'
            }, 500, function() {
            // Animation complete.
        });


    } else {
        $(this).animate({
            width: '250px'
            }, 500, function() {
            // Animation complete.
        });
    }


    $(".image-div").not(this).each(function() {
            $(this).animate({
                    width: '250px'
                }, 500, function() {
                // Animation complete.
            });

    });


});
</code></pre>

<p>All div.image-div's start out 250px wide. I need it so when you click on a div, it expands to 500px and its neighbors on both sides (also div.image-div's) shrink to 125px.</p>

<p>When you click on the div again it and its neighbors re-size to 250px. Also if you click on another div, all the divs (except for the clicked on div and its neighbors) re-size to 250px.</p>

<p>Thanks </p>
