var stop_interval_bannerSwitch;

function bannerSwitch() {
    var $active = $('.banner_all div.active');
    if ($active.length == 0) $active = $('.banner_all div:last');
    var $next = $active.next().length ? $active.next()
        : $('.banner_all div:first');
    $active.addClass('last-active');
    $next.addClass('active');
    $active.removeClass('active last-active');
    
    $('.banner_holder_top').html($('.banner_holder_bottom').html());
    $('.banner_holder_top').animate({ opacity: "1.0" }, 0);
    $('.banner_holder_bottom').html($next.html());
    //$('.banner_holder_top').animate({ opacity: "0.0" }, 1000);
	
	  $('.banner_holder_top').animate({
			opacity: 0.00
		  }, 1000, function() {
			// Animation complete.
			$('.banner_holder_top').html($('.banner_holder_bottom').html());
		  });


}

$(document).ready(function() {
    $('.banner_holder_bottom').html($('.banner_all div:first').html());
	$('.banner_holder_top').html($('.banner_holder_bottom').html());
    $('.banner_all div:first').addClass('active');
    stop_interval_bannerSwitch = setInterval("bannerSwitch()", 8000);
});

