//var $('#rotator div') = $('#rotator div');
var rotation_enabled = true;
var current_index = 0;
var max_index = 8;

	$(document).ready(function() {
		cycler(); });


	function cycler()
	{
		if(rotation_enabled)
		{
			rotate_new(current_index);
			if( current_index < max_index) 
			{
				current_index++; 
			}
			else
			{
				current_index = 0; 
			}
		}

		setTimeout('cycler()',5000); 	
	}

	function stopRotate(k)
	{
		rotation_enabled = false;
		$('#rotator div').hide();
		$($('#rotator div')[k]).fadeIn(500);
		// hide all clouds
		// show needed element
	}

	function startRotate(index)
	{
		rotation_enabled = true;
//		$($('#rotator div')[index]).fadeIn(1000).fadeOut(1000);
		//show all elements one by one
	}

	function rotate_new(index)
	{
		$('#rotator div').hide();
		$('#rotator div').eq(index).fadeIn(500);
		//hide all
		// get element by index and show
	}







