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


		function pokaz_ukryj(blok) {
			if (document.getElementById(blok).style.display=="block") {		  
				$(".submenu").css("display","none");
			} else {
				$(".submenu").css("display","none");
				document.getElementById(blok).style.display="block";
			}
		}

		function ukryj(blok) {
				document.getElementById(blok).style.display="none";
		}
	function print_site() {
		window.print()
  }
	
	
	
function podaj_zdjecie(wartosc,divek,loader,ile) {

if (wartosc>=ile) wartosc = 0;
if (wartosc<0) wartosc = ile-1;



 var ajax_method = typeof XMLHttpRequest == "undefined"?new ActiveXObject('Microsoft.XMLHttp'):new XMLHttpRequest();
 ajax_method.onreadystatechange = function(){
									if (ajax_method.readyState == 1) 
									{
                        document.getElementById(divek).innerHTML=document.getElementById(loader).innerHTML;
									}
								
                if (ajax_method.readyState == 4) {
                        if (ajax_method.status == 200) {
                                document.getElementById(divek).innerHTML=ajax_method.responseText;
																document.getElementById('kontroler').value=parseInt(wartosc);
                        }
                }
        };
        ajax_method.open( "POST", 'request/galeria.php', true );
        ajax_method.setRequestHeader('Content-Type',
        'application/x-www-form-urlencoded');
        ajax_method.send("limit="+wartosc);

        
			
}
