$(function(){
	var txtShow={'ru':'Показать', 'en':'Show'};
	var txtHide={'ru':'Скрыть', 'en':'Hide'};
	var txtNote={'ru':'примечание', 'en':'Note'};
	var txtTV={'ru':'ТВ-трансляции', 'en':'TV Schedule'};
	$('span[id^=toggle]').add('tr[id^=note]').add('tr[id^=tv]').css('cursor','pointer');
	/*
	.mouseover(
		function(){
			$(this).css('text-decoration','underline');
		}
	)
	.mouseout(
		function(){
			$(this).css('text-decoration','none');
		}
	)
	*/
	$('span[id^=toggleTV]').attr('title',txtShow[cskabasketLang]+' '+txtTV[cskabasketLang])
	.click(
		function(){
			id=$(this).attr('id').replace(/toggleTV/,'');
			tvHidden=$('tr#tv'+id).is(':hidden');
			if (tvHidden) {
				$('tr#tv'+id).show();
				$(this).attr('title',txtHide[cskabasketLang]+' '+txtTV[cskabasketLang]);
			} else {
				$('tr#tv'+id).hide();
				$(this).attr('title',txtShow[cskabasketLang]+' '+txtTV[cskabasketLang]);
			}
		}
	);
	$('span[id^=toggleNote]').attr('title',txtShow[cskabasketLang]+' '+txtNote[cskabasketLang])
	.click(
		function(){
			id=$(this).attr('id').replace(/toggleNote/,'');
			noteHidden=$('tr#note'+id).is(':hidden');
			if (noteHidden) {
				$('tr#note'+id).show();
				$(this).attr('title',txtHide[cskabasketLang]+' '+txtNote[cskabasketLang]);
			} else {
				$('tr#note'+id).hide();
				$(this).attr('title',txtShow[cskabasketLang]+' '+txtNote[cskabasketLang]);
			}
		}
	);
	$('tr[id^=tv]').attr('title',txtHide[cskabasketLang]+' '+txtTV[cskabasketLang])
	.click(
		function() {
			id=$(this).attr('id').replace(/tv/,'');
			$(this).hide();
			$('span#toggleTV'+id).attr('title',txtShow[cskabasketLang]+' '+txtTV[cskabasketLang]);
		}
	);
	$('tr[id^=note]').attr('title',txtHide[cskabasketLang]+' '+txtNote[cskabasketLang])
	.click(
		function() {
			id=$(this).attr('id').replace(/note/,'');
			$(this).hide();
			$('span#toggleNote'+id).attr('title',txtShow[cskabasketLang]+' '+txtNote[cskabasketLang]);
		}
	);
});
