function slideSwitch() {
    var $active = $('#banner_l img.active');
    if ( $active.length == 0 ) $active = $('#banner_l img:last');
    var $next =  $active.next().length ? $active.next() : $('#banner_l 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_s() {
    var $active = $('#sidebanner img.active');
    if ( $active.length == 0 ) $active = $('#sidebanner img:last');
    var $next =  $active.next().length ? $active.next() : $('#sidebanner 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() {
    setInterval( "slideSwitch()", 4000 );
    setInterval( "slideSwitch_s()", 4000 );
});



