var mr_rotator_current = 1;
var mr_time = 500;

var mr_rotator_3 = 3;
var mr_rotator_2 = 2;
var mr_rotator_4 = 4; 

function mr_rotator_next(){
	
	
	
	$('#mr_'+mr_rotator_current).css('z-index', '9999');
	$('#mr_'+mr_rotator_current).animate({
   		opacity: 0.5,
   		filter: 'alpha(opacity=50)',
    	left: '10px',
    	width: '255px',
    	height: '150px',
    	top: '18px'	
  	}, mr_time, function() {
    	$('#mr_'+mr_rotator_current).css('z-index', '9999');		
  	});
  	
  	
  	
  	
  	
  	$('#mrc_'+mr_rotator_current).animate({
  		padding: '10px',
    	width: '215px',
    	height: '130px'
  	}, mr_time, function() {
  	});
  	
  	//$('#mrc_'+mr_rotator_current).css('padding', '10px');
  ///	$('#mrc_'+mr_rotator_current).css('width', '215px');
  //	$('#mrc_'+mr_rotator_current).css('height', '130px');
  	
  	
  	$('#mrs_'+mr_rotator_current).animate({
    	width: '255px',
    	height: '152px'
  	}, mr_time, function() {
  	});
  	
  	$('#mrh_'+mr_rotator_current).animate({
  		paddingLeft: '40px',
    	fontSize: '14px',
    	height: '25px'
  	}, mr_time, function() {
  	});
  	
  	$('#mrd_'+mr_rotator_current+' a').animate({
    	fontSize: '11px'
  	}, mr_time, function() {
  	});
  	
  	
  	$('#mri_'+mr_rotator_current).animate({
    	top: '15px',
    	width: '35px',
    	left: '20px'
  	}, mr_time, function() {
  	});
  	

	$('#mr_'+mr_rotator_4).animate({
    	left: '155px'
  	}, mr_time, function() {
  		$('#mr_'+mr_rotator_4).css('z-index', '9998');
  	});
  	
  	
  	$('#mr_'+mr_rotator_3).animate({
    	left: '300px'
  	}, mr_time, function() {
  		$('#mr_'+mr_rotator_3).css('z-index', '9999');
  	});


	// aktualne
	
	$('#mr_'+mr_rotator_2).css('filter', 'alpha(opacity=100)');
	$('#mr_'+mr_rotator_2).animate({
   		opacity: 9,
   		filter: 'alpha(opacity=90)',
    	left: '120px',
    	width: '321px',
    	height: '185px',
    	top: '0px'	
  	}, mr_time, function() {
    	$('#mr_'+mr_rotator_2).css('z-index', '10000');
		$('#mr_'+mr_rotator_2).css('opacity', '1');
	
		
		
			
		
			
  						mr_rotator_current++;
						mr_rotator_2++;
						mr_rotator_3++;
						mr_rotator_4++;
						
						if(mr_rotator_current > 4){
							mr_rotator_current = 1;	
						}
						
						if(mr_rotator_2 > 4){
							mr_rotator_2 = 1;	
						}
						if(mr_rotator_3 > 4){
							mr_rotator_3 = 1;	
						}
						if(mr_rotator_4 > 4){
							mr_rotator_4 = 1;	
						}
						
						
						
  				
			
  	});
  	
  	
  		$('#mrc_'+mr_rotator_2).animate({
  					padding: '20px',
    				width: '261px',
    				height: '143px'
  				}, mr_time, function() {
  				
  			});		
  	
  	$('#mrs_'+mr_rotator_2).animate({
    	width: '321px',
    	height: '185px'
  	}, mr_time, function() {
  	});
  	
  	$('#mrh_'+mr_rotator_2).animate({
  		paddingLeft: '60px',
    	fontSize: '18px',
    	height: '38px'
  	}, mr_time, function() {
  	});
  	
  	$('#mrd_'+mr_rotator_2).animate({
    	fontSize: '14px'
  	}, mr_time, function() {
  	});
  	
  	$('#mri_'+mr_rotator_2).animate({
    	top: '20px',
    	width: '53px',
    	left: '30px'
  	}, mr_time, function() {
  	});
  	
}



function mr_rotator_prev(){
	
	
	
	$('#mr_'+mr_rotator_current).css('z-index', '9999');
	$('#mr_'+mr_rotator_current).animate({
   		opacity: 0.5,
   		filter: 'alpha(opacity=50)',
    	left: '300px',
    	width: '255px',
    	height: '150px',
    	top: '18px'	
  	}, mr_time, function() {
    	$('#mr_'+mr_rotator_current).css('z-index', '9999');
		
				
			
  	});
  	
  	
  	
  	
  	
  	$('#mrc_'+mr_rotator_current).animate({
  		padding: '10px',
    	width: '215px',
    	height: '130px'
  	}, mr_time, function() {
  	});
  	
  	
  	
  	$('#mrs_'+mr_rotator_current).animate({
    	width: '255px',
    	height: '152px'
  	}, mr_time, function() {
  	});
  	
  	$('#mrh_'+mr_rotator_current).animate({
  		paddingLeft: '40px',
    	fontSize: '14px',
    	height: '25px'
  	}, mr_time, function() {
  	});
  	
  	$('#mrd_'+mr_rotator_current).animate({
    	fontSize: '11px'
  	}, mr_time, function() {
  	});
  	
  	$('#mri_'+mr_rotator_current).animate({
    	top: '15px',
    	width: '35px',
    	left: '20px'
  	}, mr_time, function() {
  	});
  	

	$('#mr_'+mr_rotator_3).animate({
    	left: '10px'
  	}, mr_time, function() {
  		$('#mr_'+mr_rotator_3).css('z-index', '9999');
  	});
  	
  	
  	$('#mr_'+mr_rotator_2).animate({
    	left: '155px'
  	}, mr_time, function() {
  		$('#mr_'+mr_rotator_2).css('z-index', '9998');
  	});


	// aktualne
	
	$('#mr_'+mr_rotator_4).css('filter', 'alpha(opacity=100)');
	$('#mr_'+mr_rotator_4).animate({
   		opacity: 9,
   		filter: 'alpha(opacity=90)',
    	left: '120px',
    	width: '321px',
    	height: '185px',
    	top: '0px'	
  	}, mr_time, function() {
    	$('#mr_'+mr_rotator_4).css('z-index', '10000');
		$('#mr_'+mr_rotator_4).css('opacity', '1');
		$('#mr_'+mr_rotator_4).css('filter', 'alpha(opacity=100)');
		
		
			
		
			
  						mr_rotator_current--;
						mr_rotator_2--;
						mr_rotator_3--;
						mr_rotator_4--;
						
						if(mr_rotator_current < 1){
							mr_rotator_current = 4;	
						}
						
						if(mr_rotator_2 < 1){
							mr_rotator_2 = 4;	
						}
						if(mr_rotator_3 < 1){
							mr_rotator_3 = 4;	
						}
						if(mr_rotator_4 < 1){
							mr_rotator_4 = 4;	
						}
						
						
						
  				
			
  	});
  	
  	
  		$('#mrc_'+mr_rotator_4).animate({
  					padding: '20px',
    				width: '261px',
    				height: '143px'
  				}, mr_time, function() {
  				
  			});		
  	
  	$('#mrs_'+mr_rotator_4).animate({
    	width: '321px',
    	height: '185px'
  	}, mr_time, function() {
  	});
  	
  	$('#mrh_'+mr_rotator_4).animate({
  		paddingLeft: '60px',
    	fontSize: '18px',
    	height: '38px'
  	}, mr_time, function() {
  	});
  	
  	$('#mrd_'+mr_rotator_4).animate({
    	fontSize: '14px'
  	}, mr_time, function() {
  	});
  	
  	$('#mri_'+mr_rotator_4).animate({
    	top: '20px',
    	width: '53px',
    	left: '30px'
  	}, mr_time, function() {
  	});
	
	
}


