
$(function() {

	$('.rechnungserklaerung .seite').each(function() {
		$(this).css('position', 'relative');
		
		var pixelForOneCm = $(this).width() / 21;
		
		$(this).find('.text').each(function() {
			var left = parseFloat($(this).meta('position-left'));
			var top = parseFloat($(this).meta('position-top'));
			
			var marker = $(this).find('.number').clone();
			$(this).append(marker);
			var content = $(this).find('.content');
			
			marker.css({
				left: (left * pixelForOneCm) + 'px',
				top: (top * pixelForOneCm) + 'px',
				cursor: 'pointer'
			}).click(function() {
				tb_show(null, '#TB_inline?height=300&amp;width=300&amp;inlineId=' + $(this).siblings('.content').attr('id'));
			});
			
			/*marker.click(function() {
				$(this).parents('.text').siblings().not('.closed').toggleClass('closed');
				$(this).parents('.text').toggleClass('closed');
			}); */
			$(this).addClass('closed'); 
		});
	
	
	
	});
	
	$('.rechnungserklaerung > ul').tabs();

});
