

$(document).ready(function(){  

	var records_tooltip = $('.record_tooltip');
	//records_tooltip.tooltip();
	var records_tooltip_length = records_tooltip.length;
	for (var i = 0; i < records_tooltip_length; i++){
	
		var td = records_tooltip[i];
		var id = td.id;
		td = $('#' + id);
		td.tooltip({
			track: true,
			bodyHandler: function() { 
				id = (this.id).split('_');
				var indeks = id[1];
				var chmurka = $('#tooltip_' + indeks).html();
       	 		return $('#tooltip_' + indeks).html();
    		}
    		
		});
		
		var aaa;
	}
	
	
	/* chmurka przypisana do strefy */
	var strefy_tooltip = $('.strefa_tooltip');
	//records_tooltip.tooltip();
	var strefy_tooltip_length = strefy_tooltip.length;
	for (var i = 0; i < strefy_tooltip_length; i++){
	
		var strefa = strefy_tooltip[i];
		var id = strefa.id;
		strefa = $('#' + id);
		strefa.tooltip({
			track: true,
			bodyHandler: function() { 
				id = (this.id);
				var chmurka = $('#tooltip_' + id).html();
       	 		return $('#tooltip_' + id).html();
    		}
    		
		});
		
		var aaa;
	}
	
});



