jQuery(document).ready(function($) {
	$('table.syndmused td.info').each(function() {
		var a = $(this).parent().prev().find('td.right');
		$(a).css('cursor', 'pointer');
		$(a).css('text-decoration', 'underline');
		$(a).click(function() {
			var strDisplay = $(a).parent().next().find('td.info').css('display');
			$(a).parent().parent().find('td.info').hide();
			//if (strDisplay != 'none') {
				$(a).parent().next().find('td.info').show();
			//}
		})
//		alert($(a).html());
	});
	
	// new hack
	$('.peidetud').each(function() {
		$(this).parent('td,p').contents().each(function(i, node) {
	//console.log(1);
			if (node.nodeName == '#text' && !$(node).hasClass('peidetud')) {
				$(node).wrap('<span style="cursor: pointer; text-decoration: underline" class="peidetud_click"/>');
			}
		});
		//$(a).css('cursor', 'pointer');
		//$(a).css('text-decoration', 'underline');
	});
	$('.peidetud_click').click(function(el) {
		$(this).parent('td,p').find('.peidetud').each(function(i, node) {
			$(node).show();
		});
	});
});
