// JavaScript Document
function Show(id)
{
	a = document.getElementById(id);
	if(a.style.display=='none') { a.style.display=''; }
}
function NShow(id)
{
	a = document.getElementById(id);
	if(a.style.display=='') 
	{ 
		a.style.display='none'; 
	}
}
function VShow(id)
{
	a = document.getElementById('video1');
	a.style.display='none';
	a = document.getElementById('video2');
	a.style.display='none';
	a = document.getElementById('video2');
	a.style.display='none';
	a = document.getElementById('video3');
	a.style.display='none';
	a = document.getElementById('video4');
	a.style.display='none';
	a = document.getElementById(id);
	a.style.display='';
}

jQuery(document).ready(function(){
	window.setInterval(function(){
		var img = jQuery('#rotate img');

		for (var i=0;i<img.length;i++)
		{			
			if (jQuery(img[i]).css('display')!='none')
			{
				if (i==img.length-1) 
						jQuery(img[0]).next('img').fadeIn('slow',function(){
							  jQuery(img[i]).fadeOut('slow'); });
					else
						jQuery(img[i]).next('img').fadeIn('slow',function(){
							  jQuery(img[i]).fadeOut('slow'); });		
				return;				
			}
		}
	},5000);
	window.setInterval(function(){
		var img = $('#rotate2 img');

		for (var i=0;i<img.length;i++)
		{			
			if ($(img[i]).css('display')!='none')
			{
				$(img[i]).fadeOut('slow',function(){
					if (i==img.length-1) 
					$(img[0]).next('img').fadeIn('slow');
					else
					$(img[i]).next('img').fadeIn('slow');
				});
				
				return;				
			}
		}
	},5000);
});
