if(jQuery('#rotator') && rotatorImages && rotatorImages.lentgh > 1) {
    var imagesUrl = ''
    var iteration = 1
    var pic = ['pic1.jpg', 'pic2.jpg']
    function preloadRotator () {
        var rotatorImages = new Array;
        for(var i = 0; i < pic.length; i++)
        {
            rotatorImages[pic[i]] = new Image();
            rotatorImages[pic[i]].src = imagesUrl + pic[i];
        }
    }
    function nextImage ( ) {
        image = getImage()
        jQuery('#rotator').fadeOut('slow', function () {
            if(!splash) {
                jQuery('#rotator').css('background', 'url('+ imagesUrl + image +') no-repeat 4px 3px')
            } else {
                jQuery('#rotator').css('background', 'url('+ imagesUrl + image +') no-repeat 3px 3px')
            }
            jQuery('#rotator').fadeIn('slow')
        }
        )
    }
    function getImage () {
        image = pic[iteration]
        if (iteration == pic.length - 1) {
            iteration = 0
        } else {
            ++iteration
        }
        return image
    }
    jQuery('#rotator').ready(function () {
        setInterval('nextImage()', 10000)
    })
}
