 function slideSwitch() {

        var $active = $('#slideshow img.active');

        if( $active.length === null ) $active = $('#slideshow img:last');

        var $next = $active.next().length ? $active.next() : $('#slideshow img:first');

        $active.addClass('last-active');

        $next.css({opacity: 0.0})
            .addClass('active')
            .animate({opacity: 1.0}, 1500, function(){
                $active.removeClass('active last-active');
            });

        //$next.addClass('active');
        //$active.removeClass('active');
    }

    $(function() {
        /*var s_width = $('#slideshow').outerWidth();
        var i_width = $('#slideshow img:last').outerWidth();
        var offset = s_width/2 - i_width/2;

        $('#slideshow img').each(function() {
            $(this).css({'left': offset + 'px'});
        });*/

        setInterval( "slideSwitch()", 6000 );

    });
