If you enable the `alert(rand)` at the bottom of my if/else statement, you will notice that when ran, it will constantly loop over the else section of my if/else statement. It's probably a simple fix, but I can't seem to figure it out. I had it working in the earlier stages of development but can't seem to figure it out now.

I'll post the code below, but it's probably easier to look at my jsfiddle, here: <http://jsfiddle.net/zAPsY/7/> Thanks.

```
    $(document).ready(function(){
//You can edit the following file paths to change images in selection
var img1 = '<img src="images/luke.jpg">';
var img2 = '<img src="images/luke.jpg">';
var img3 = '<img src="images/luke.jpg">';
var img4 = '<img src="images/luke.jpg">';
var img5 = '<img src="images/luke.jpg">';
var img6 = '<img src="images/luke.jpg">';
var all = img1 + img2 + img3 + img4 + img5 + img6;

//Rotation
var speed = 0.00;
var radius = 80;
var count = 0;

$("#run").bind("click",runButtonClick);

function rotate()
{
    var centerx = $(document).width()/2;
    var centery = $(document).height()/2;           
    var num_items = $("#container > img").length;       
    $("#container > img").each(function(){
        var angle = count * (Math.PI/180);              
        var newx = centerx + Math.cos(angle)*radius - $(this).width()/2;                
        var newy = centery + Math.sin(angle)*radius - $(this).height()/2;               
        $(this).css("left",newx+"px").css("top",newy+"px");             
        count += 360/num_items + speed;
    });
}
setInterval(rotate,100/1000);

//Append elements to container
$("#appendall").click(function(){$('#container').append(all);});
$('#append').children().eq(2).click(function(){$('#container').append(img1);});
$('#append').children().eq(3).click(function(){$('#container').append(img2);});
$('#append').children().eq(4).click(function(){$('#container').append(img3);});
$('#append').children().eq(5).click(function(){$('#container').append(img4);});
$('#append').children().eq(6).click(function(){$('#container').append(img5);});
$('#append').children().eq(7).click(function(){$('#container').append(img6);});

//Refresh page
$("#reset").click(function(){location.reload();});

//IF speed is greater than 0 - ELSE add animation to div element
function runButtonClick() {
    var maxcount = 0.40;
    var incdec = 0.01;
    setInterval(function(){counter();}, 100);       
    counter()
    speed;
    function counter()
    {
        if (maxcount >= 0.00)
            {
                maxcount = maxcount - incdec;
                speed = speed + incdec;
                //alert(speed)
                //alert(maxcount)
            }               
        else if (maxcount <= 0.00)
            {   
                speed = 0.00;
                //Find amount of div elements and add 1
                var brewees = $('#container').children().length +=1;
                //get a random number
                var rand = (Math.floor(Math.random()*brewees)); 
                var ap = '20px';
                var ab = '#ddd';
                var ad = 1000;
                //match random number corrosponding child in div
                $('#container').children().eq(parseFloat(rand))
                .animate({padding: ap, background : ab}, {duration:ad});
                alert(rand);
            }
    }
}

```

});