	var timeout;
	function changeBanner(i) {
		var show_next=false;
		var to_hide;
		var to_show;
		$('.banner_item').each(function() {
			if (typeof(i)!=='undefined') {
				if ($(this).attr('id')=='banner_'+i) {
					$('.banner_button').removeClass('banner_button_current');
					$('#button_banner_'+i).addClass('banner_button_current');
					var to_show=$(this);
					$('.banner_item').each(function(){
						if ($(this).css('display')=='inline-block') {
							var to_hide=$(this);
							to_hide.fadeOut( 'slow', function(){to_hide.css('dispaly','none'); to_show.fadeIn('slow',function(){ to_show.css('display','inline-block'); });} )
							}
						});
					}
				}
			else {
				if (show_next) {
					$('.banner_button').removeClass('banner_button_current');
					$('#button_'+$(this).attr('id')).addClass('banner_button_current');
					var to_show=$(this);
					to_hide.fadeOut( 'slow', function(){to_hide.css('dispaly','none'); to_show.fadeIn('slow',function(){ to_show.css('display','inline-block'); });} );
					show_next=false;
					return false;
					}
				if ($(this).css('display')=='inline-block') {
					to_hide=$(this);
					show_next=true;
					}
				}
			});
		if (show_next) {
			$('.banner_item').each(function(){
				$('.banner_button').removeClass('banner_button_current');
				$('#button_'+$(this).attr('id')).addClass('banner_button_current');
				var to_show=$(this);
				to_hide.fadeOut( 'slow', function(){to_hide.css('dispaly','none'); to_show.fadeIn('slow',function(){ to_show.css('display','inline-block'); });} );
				return false;
				});
			}
		if (typeof(i)==='undefined') {
			timeout=setTimeout('changeBanner();',5000);
			}
		else {
			clearTimeout(timeout);
			}
		}
	$(document).ready(function() {
		timeout=setTimeout('changeBanner();',5000);
		$('.banner_button').click(function (){
			var id=$(this).attr('id').split('_')[2];
			changeBanner(id);
			});
		});


