var check = 0;

function getFoto(url){
	if(check == 0){
		check = 1;
		$.post(url, { strona : 1 },
      		function(data){
    			if(data.length > 0){
    				$("#los_foto_div").attr('src', data); 
    				check = 0;
    			} else {
    				alert('Coś poszło nie tak');
    			}
  			}
  		);
	}
}

function pokaz(obj, src){
	alert(obj);
}
function sendForm(div, action){
	var form = $("#"+div);
	form.attr('action', action);
	form.submit();
}
$(document).ready(function(){
      
    $("table.wyniki tr:even").addClass("even");
	$("table.wyniki tr:odd").addClass("odd");
	$("table.wyniki tbody tr").mouseover(function() {
    	$(this).addClass("tr_hover");
	}).mouseout(function() {
    	$(this).removeClass("tr_hover");
	});


    $("table.wyniki2 tr:even").addClass("even2");
	$("table.wyniki2 tr:odd").addClass("odd2");
	$("table.wyniki2 tbody tr").mouseover(function() {
    	$(this).addClass("tr_hover2");
	}).mouseout(function() {
    	$(this).removeClass("tr_hover2");
	});
	
	$(".gal_show").mouseover(function() {
    	$(this).addClass("gal_show_hover");
	}).mouseout(function() {
    	$(this).removeClass("gal_show_hover");
	});
		
    $("#checked_box").toggle(
      function () {
      	$("#checked_box").attr('checked', 'true');
        $('.ptaszki').attr('checked', 'true');
      },
      function () {
      	$("#checked_box").removeAttr('checked');
        $('.ptaszki').removeAttr('checked');
      }
    );
	
 });
