function slideSwitch() {
	var $active = $('#wrap_banner div.active');

	if ( $active.length == 0 ) $active = $('#wrap_banner div:last');

	// use this to pull the divs in the order they appear in the markup
	var $next =  $active.next().length ? $active.next()
		: $('#wrap_banner div:first');

	// uncomment below to pull the divs randomly
	// var $sibs  = $active.siblings();
	// var rndNum = Math.floor(Math.random() * $sibs.length );
	// var $next  = $( $sibs[ rndNum ] );
	
	$active.addClass('last-active');
	$active.css({opacity: 1.0})
		.addClass('active')
		.animate({opacity: 0.0}, 1500, function() {
		});
	$next.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 1500, function() {
			$active.removeClass('active last-active');
		});
}
var slide=false;
$(function() {
	if (slide)
		setInterval( "slideSwitch()", 6500 );
});

function sliderSwitch() {
	var $active = $('#header_banner div.active');

	if ( $active.length == 0 ) $active = $('#header_banner div:last');

	// use this to pull the divs in the order they appear in the markup
	var $next =  $active.next().length ? $active.next()
		: $('#header_banner div:first');

	// uncomment below to pull the divs randomly
	// var $sibs  = $active.siblings();
	// var rndNum = Math.floor(Math.random() * $sibs.length );
	// var $next  = $( $sibs[ rndNum ] );
	
	$active.addClass('last-active');
	$active.css({opacity: 1.0})
		.addClass('active')
		.animate({opacity: 0.0}, 2000, function() {
		});
	$next.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 2000, function() {
			$active.removeClass('active last-active');
		});
}
$(function() {
	setInterval( "sliderSwitch()", 6500 );
});
