
$(document).ready(function(){

    // Tooltip
    $('#forumtv a[title]').monnaTip();

	$('#fb').toggle(function(){
			
			$(this).animate({
				right: '0px'
			}, 1000);
			
		}, function(){
		
			$(this).animate({
				right: '-240px'
			}, 500);
	});
	
	$('#lofslidecontent45').lofJSidernews({
		interval:			4000,
		easing:				'easeInOutQuad',
		duration:			1200,
		maxItemDisplay:		3,
		navPosition:		'horizontal',
		navigatorHeight:	15,
		navigatorWidth:		25,
		mainWidth:			454
	});
	
});

// JavaScript Document
function showhidelayer(layername){
	if(document.getElementById(layername).style.display=='none'){
		document.getElementById(layername).style.display='block';
	}
	else{
		document.getElementById(layername).style.display='none'; 
	} 
}

function closeDIV(layername){
	document.getElementById(layername).style.display='none';
}

function MaxL(obj, max)
{
   if (obj.value.length > max)
   {
      alert('Tekst jest za długi. Maksymalnie '+max+' znaków. Wpisano ' + obj.value.length + ' znaków.');
      obj.value = obj.value.substr(0, max);
   }
}

var counter1 = 0;   // tutaj podaj, ile checkboxow jest zaznaczonych na starcie
var counter2 = 0;   // tutaj podaj, ile checkboxow jest zaznaczonych na starcie

function checkboxesLimit(id, ile)
{
	if (document.getElementById(id).checked==true)
		counter1++;
	else
		counter1--;

	if (counter1>ile) {
		document.getElementById(id).checked=false;
		counter1--;
	}
}

function checkboxesLimit2(id, ile)
{
	
	if (document.getElementById(id).checked==true)
		counter2++;
	else
		counter2--;

	if (counter2>ile) {
		document.getElementById(id).checked=false;
		counter2--;
	}
}



