$(function(){	$('#menu li.main').mouseover( function(){		$(this).children('a').addClass('active');
		$(this).children('ul').show();	});
	$('#menu li.main').mouseout( function(){		$(this).children('a').removeClass('active');
		$(this).children('ul').hide();
	});

	$("table tbody tr").hover(
		function(){ $(this).css("background-color", "#f5f9f7"); },
		function(){ $(this).css("background-color", "#fff"); }
	);

	if(isIe()){ // ie bug fix - poprawa szerokości linków w podmenu		$('ul.submenu').each( function(){			$(this).css('display', 'block');
			$(this).css('visibility', 'hidden');
			var w = $(this).attr('offsetWidth');
			$(this).css('display', 'none');
			$(this).css('visibility', 'visible');

			$(this).children('li').children('a').css('width', w + 'px');
		});	}
});

function isIe(){
	return navigator.userAgent.toLowerCase().indexOf('msie') > -1;
}

function checkForm(kom){	var ok = true;

	if(document.getElementById('imie').value.length < 3)
		ok = false;
	if(document.getElementById('mail').value.length < 3)
		ok = false;
	if(document.getElementById('tresc2').value.length < 5)
		ok = false;

	if(!ok)
		alert(kom);

	return ok;
}