banner_rotate = function()
{

    var $active = $('.page-banner .banners img.active');

    if($active.length == 0 ) $active = $('.page-banner .banners img:last');

    var $next =  $active.next().length ? $active.next():$('.page-banner .banners img:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, 2000, function(){

        $active.removeClass('active last-active');

    });

}
$(document).ready(function(context)
{

    bannerCount = $('.page-banner .banners img').length;

    if(bannerCount > 1){$(function(){ bannerTimer = setInterval(banner_rotate, 5000); });}

});
