Cufon.replace('.replace_font');
/*
//elements that require hover states
Cufon.replace('.flash_wrapper a span, .promotions li a', {hover: true});
//elements that require a text shadow
Cufon.replace('.page_banner div',{ textShadow: '#333 1px 1px' });*/


$(document).ready(function() {
	$(function() {
		var elements = $('.banner img').length;		
		var el = Math.floor(Math.random() * elements);
		
		$('.banner img:eq('+ el +')').addClass('active');		
	    setInterval( "slideSwitch()", 7000 );
	});
});

function slideSwitch() {
    var active = $('.banner img.active');
    if ( active.length == 0 ) active = $('.banner img:last');
    var next =  active.next().length ? active.next() : $('.banner img:first');

    active.addClass('last-active');

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



