// JAvascript
function slideSwitch() {
    var $active = $('#cadre_photo img.active');

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

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

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

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

function slideSwitch_back() {
    var $active = $('#cadre_photo img.active');

    if ( $active.length == 0 ) $active = $('#cadre_photo img:first');

    var $prev =  $active.prev().length ? $active.prev()
		:  $('#cadre_photo img:last') ;


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

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




