var sysinfo = 'none';

$( function() {

	// Сокрытие/показ системной информации
	$('div.sysinfo').css('display', sysinfo);
	$(document).keyup( function(e) {
		if (e.keyCode == 120) {
			if (sysinfo == 'none') {
				sysinfo = 'block';
				$('div.sysinfo').fadeIn(200);
			} else {
				sysinfo = 'none';
				$('div.sysinfo').fadeOut(200);
			}
		}
	});
	
	
	/*
	if ($.browser.msie && $.browser.version == '6.0') {
		$('#noie').slideDown(500).one('click', function(){$(this).slideUp(500);});
	}
	*/
	var html;
	try {
		var hl = decodeURIComponent( location.href.split('?')[1].match(/hl=(.*)[\&]{0,1}?$/i)[1] );
		html = $('td.content').html().replace( new RegExp( hl, "img" ), '<span class="hl">' + hl + '</span>' );
		$('td.content').html( html );
	} catch(e) {
		//alert('Ошибка '+e.message );		
	};
	
	/*
	try {
		var sword = $('#searchword').text();
		if ( $.trim(sword) != '') {
			html = $('td.content').html().replace( new RegExp( sword, "img" ), '<span class="hl">' + sword + '</span>' );
			$('td.content').html( html );
		}
	} catch (e) {};
	*/
	
});

function putSysinfo(data) {
	$('.sysinfo').append('<p>' + data + '</p>');
}
