﻿function slideSwitch(switchSpeed)
{
    var $active = $('#divSlides img.ImgActive');
    if ($active.length == 0) $active = $('#divSlides IMG:last');

    var $next = $active.next('IMG').length ? $active.next('IMG') : $('#divSlides IMG:first');

    $active.addClass('ImgLastActive');

    $next.css({ opacity: 0.0 })
        .addClass('ImgActive')
        .animate({ opacity: 1.0 }, switchSpeed, function()
        {
            $active.removeClass('ImgActive ImgLastActive');
        });
}

$(function() { setInterval("slideSwitch(1000)", 5500); });

