$(document).ready(function()
{
	$('div#rotator1').cycle({
		speed:		2000,	// speed of the transition (any valid fx speed value) 
		timeout:	1000,	// milliseconds between slide transitions (0 to disable auto advance)
		continuous:	0,		// true to start next transition immediately after current one completes 
		fx: 		'fade'	// choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});

	$(function()
	{
		$('a[rel=lightbox]').lightBox();
	});

//	var alt = '';
//	
//	$('ul.subnav li a img').each(function()
//	{
//		alt = $(this).attr('alt');
//		$(this).parent().html(alt);
//	});
//
//	$('ul#main-menu > li.l4').find('ul').remove();

	
	var offerMenu = $('ul.leftMenuMain li.l3 ul').html();
	
	$('a.offerMenu').after('<ul class="offer">' + offerMenu + '</ul>');


	var height = 0;
	
	$('#footer .inner').each(function()
	{	
		if (height < $(this).height())
		{
			height = $(this).height();
		}
	});

	$('#footer .inner').height(height);

//-------------------------------------
	
	// kasuj tylko te elmenty ktore maja jedynie klase .hide a nie obie .hide.dots
	$('#products .hide').filter(function()
	{
		return !$(this).hasClass('dots');
	}).remove();
	
	
	/*
	$('#products .middle').each(function()
	{
		var row = [
		    $(this).prev('div.item'),
		    $(this),
		    $(this).next('div.item')
		];

		var height = 0;
		
		for (var i = 0; i < row.length; i++)
		{
			if (height < row[i].height())
			{
				height = row[i].height();
			}
		}
		
		console.log(height);
		
		for (var i = 0; i < row.length; i++)
		{
			row[i].height(height);
		}
	});
	*/


	$('ul#products li.dots:last').remove();
	
});

