function slideSwitch() {
		var $active = $('#slideshow IMG.active');

		if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

		// use this to pull the images in the order they appear in the markup
		var $next =  $active.next().length ? $active.next()
				: $('#slideshow IMG:first');

		// uncomment the 3 lines below to pull the images in random order
		
		// var $sibs  = $active.siblings();
		// var rndNum = Math.floor(Math.random() * $sibs.length );
		// var $next  = $( $sibs[ rndNum ] );


		$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()", 5000 );
});

$(document).ready(
	function()
	{
		$(window).bind('load', function() {
        $('#logo1').bubbletip($('#logo1_up'));
				$('#logo2').bubbletip($('#logo2_up'));
				$('#logo3').bubbletip($('#logo3_up'));
				$('#logo4').bubbletip($('#logo4_up'));
				$('#logo5').bubbletip($('#logo5_up'));
				$('#logo6').bubbletip($('#logo6_up'));
				$('#logo7').bubbletip($('#logo7_up'));
				$('#logo8').bubbletip($('#logo8_up'));
				$('#logo9').bubbletip($('#logo9_up'));
				$('#logo10').bubbletip($('#logo10_up'));
				$('#logo11').bubbletip($('#logo11_up'));
				$('#logo12').bubbletip($('#logo12_up'));
				$('#logo13').bubbletip($('#logo13_up'));
				$('#logo14').bubbletip($('#logo14_up'));
				$('#logo15').bubbletip($('#logo15_up'));
				$('#logo16').bubbletip($('#logo16_up'));
    });
	}
);
