function getAjaxValue(link, div, strona){
	$('#'+div+' .loading_div').fadeIn();
	
	$.post(link, { strona : strona },
      	function(data){
    		if(data.length > 0){
    			$("#"+div).html(data); 
    		} else {
    			alert('Coś poszło nie tak');
    		}
  		}
  	);
}
function sendForm(id){
	$("#"+id).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.wyniki tbody td").click(function(){
		if(this.id > 0) document.location.href = 'http://jolantaprzybysz.pl/index.php/obiekt/edit_form?id='+this.id+'';
	});

    $("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");
	});
	
	$("table.wyniki2 tr").click(function(){
		if(this.id > 0) document.location.href = 'http://jolantaprzybysz.pl/index.php/home/show?id='+this.id+'';
	});
	
	$(".fotka_show").mouseover(function() {
    	$(this).addClass("fotka_show_hover");
	}).mouseout(function() {
    	$(this).removeClass("fotka_show_hover");
	});
	
	$(".koszyk_table tr").mouseover(function() {
    	$(this).addClass("k_tr_hover2");
	}).mouseout(function() {
    	$(this).removeClass("k_tr_hover2");
	});
	
	function pokaz(obj, src){
		alert(obj);
	}
 });
