
 function slideSwitch() {
    var $active = $('#picts_part img.active');

    if ( $active.length == 0 ) $active = $('#picts_part img:last');

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

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

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

$(function() {
    setInterval( "slideSwitch()", 5000 );
});



//$(function() {
//    //setInterval( "slideSwitch()", 5000 );
//    $('#test2').crossSlide({
//  sleep: 2,  //sec
//  fade: 1    //sec
//}, [
//  { src: 'lib/1.jpeg' },
//  { src: 'lib/2.jpeg' },
//  { src: 'lib/3.jpeg' },
//  { src: 'lib/4.jpeg' }
//]);
//    
//    
//});

