$(document).ready(function() {
	
	/*
	* SLIDESHOW ROTATORA
	*/
	$('.rotator .box-body > div').each(function() {
		$(this).css({
			position: 'absolute',
			left: 0,
			top: 0,
			width: $(this).parent().width()
		});
	});
	$('.rotator .box-tabs').tabs('.rotator .box-body > div', {
		rotate: true,
		effect: 'fade',
		fadeOutSpeed: 'medium',
		tabs: 'li'
	}).slideshow({
		autoplay: false,
		interval: 15000
	});
	$('.rotator a.pause').click(function() {
		$(this).removeClass('disabled').parent().find('.play').addClass('disabled');
		$(this).closest('.rotator').find('.box-tabs').data('slideshow').stop();
		return false;
	});
	$('.rotator a.play').click(function() {
		$(this).removeClass('disabled').parent().find('.pause').addClass('disabled');
		$(this).closest('.rotator').find('.box-tabs').data('slideshow').play();
		return false;
	});
	setTimeout(function() {
		$('.rotator a.play').click();
	}, 15000); // opoznienie wlaczenia autorotacji po zaladowaniu strony
	
	$('#box-21').css('visibility','visible');
	
});
