jQuery(document).ready(function()
{
	var stop_closing = false;
	
	$('.hinted').bind('mouseover', function(e)
	{
		e.stopPropagation();
		
		var els = $('.top_hint');
		for (var i = 0; i<els.length; i++)
		{
			if ($(els[i]).attr('id') != $(this).parent().children('.top_hint').attr('id')) $(els[i]).hide();
			else $(els[i]).show();
		}

	});
	$('.top_hint').bind('mouseover', function(e)
	{
		stop_closing = true;
	});
	$('.top_hint').bind('mouseout', function(e)
	{
		stop_closing = false;
	});
	$('body').bind('mouseover', function(e)
	{
		if (!stop_closing) $('.l1-text span .top_hint').hide();
	});
	
	
	if ( $('.make-js').length > 0 )
	{
		$('.make-js').bind('click', function(e){
			e.preventDefault();			
			MakeInformer(this);
		});
	}
});

function MakeInformer(element)
{	
	$panel = $(element).parent();
	id = $panel.children('.make-js').attr("rel"); 
	$('#script_' + id).html('count_items=<b>' + $panel.children('.informers-count').val() + '</b>&amp;r_id=<b>' + $panel.children('.informers-rubric').val() + '</b>');
}
