rotate_counter = 0;
rotate_max = $('#image_rotator_nav ul li').size();
rotate_pause = false;

function rotateOne() {
        if (!rotate_pause) {
            rotate_counter += 1;
            if (rotate_counter >= rotate_max)
                rotate_counter = 0;

            $($('#image_rotator_nav ul li a')[rotate_counter]).click();
        }
    }

$(document).ready(function(){
        if (rotate_max > 0)
            setInterval('rotateOne()', 5000);
});


