$(document).ready(function() {
	$("th").each(function(){
		//Genauig&#8203;keit
		var s = $(this).text();
		if (s.length > 0) {
			s = s.split(" ");
			var l = s.length;
			var la = null;
			for (var i = 0; i < l; i++) {
				var a = s[i].split("\u200B");
				la = a.length;
				if (la > 1) {
					for (var j = 0; j < la; ++j) {
					a[j] = '<span class="wrap" rel="'+ i +'">' + a[j] + '</span>';
				}
				s[i] = a.join('<span class="spacewrap"> </span>');
				}
			}
			if (la > 1) {
				$(this).html(s.join(' '));
				var lt = false;
				var lh = false;
				var prev = null;
				$(this).find('span.wrap').each(function(){
					var spanwrap = this;
					if (!lt) {
						lt = parseInt($(spanwrap).offset().top);
						lh = $(spanwrap).height();
						prev = $(spanwrap);
					}else if ( (lt != parseInt($(spanwrap).offset().top)) || lh != $(spanwrap).height() ) {
						lt = parseInt($(spanwrap).offset().top);
						lh = $(spanwrap).height();
						if (prev.attr('rel') == $(spanwrap).attr('rel')) {
							prev.html(prev.html() + '- ');
						}
						prev = $(spanwrap);
					}

				});
				$(this).find('.wrap').each(function(){
					$(this).replaceWith( $(this).text() );
				});
			}
		}
		$(this).find("span.spacewrap").remove();
	});
});
