// JavaScript Document

    $(document).ready(function()
	{ 
		/// vars
			
			var i_current_banner = 1;
			var i_total_banners= 0;
			
		/// count all banners
			
			i_total_banners = $('.banner_item').length;
			
		/// if there is more than 1 banner, start the slideshow
		
			if(i_total_banners > 1)
			{
                                show_next_banner();
				var id_interval = window.setInterval(show_next_banner, 8000); 
			}
			
		/// the function that show the next banner
			
			function show_next_banner()
			{
					i_current_banner ++;
				
				/// hides all banners and show then the next banner
				
					$('.banner_item').hide();
					$('#banner_item_' + i_current_banner).fadeIn(2000);
					
				/// update the current banner number
					
					if( i_current_banner == i_total_banners) i_current_banner = 0;
			}

    }); 

