//Обрабатываем таблицу с ценами

var add_blk = 0;
$(document).ready( function(){
/*
	$("#table_price tr[class!=price_head][class!=open_razdel_list]").toggle(0);

	$(".open_razdel_list TD P").prepend('<span id="razdel_list_open_status">[ + ]</span>');
	
	$(".open_razdel_list").click( function(){
		
		if( $(this).children().children().children().html() != "[ - ]" )
		{
			$(this).children().children().children().html( "[ - ]");
			add_blk = 1;
		}
		else
		{
			$(this).children().children().children().html( "[ + ]");
			add_blk = 0;
		}
		

		  var select = $(this);
		  var count = 0;
		  var br = 0;
		  $(this).nextAll().each(function(){ 
			
			if($(this).hasClass("open_razdel_list"))
			{
				br = 1;
				
					
			}
			
			if( br == 0 )
			{
				count = count + 1;
			}
		  });
		  
		 
		  
		  var i = 0;				
		  for(i=0;i<count;i++)
		  {
				select = select.next();
				select.toggle(0);
		  }
		
	});*/
	
	//$("#table_price tr[class!=price_head][class!=open_razdel_list]").toggle(0);
	$("#table_price table").toggle(0);

	$(".open_razdel_list TD P").prepend('<span id="razdel_list_open_status">[ + ]</span>');
	
	$(".open_razdel_list").click( function(){
		
		if( $(this).children().children().children().html() != "[ - ]" )
		{
			$(this).children().children().children().html( "[ - ]");
			add_blk = 1;
		}
		else
		{
			$(this).children().children().children().html( "[ + ]");
			add_blk = 0;
		}
		
		$(this).next().children().children().toggle(0);
		/*
		  var select = $(this);
		  var count = 0;
		  var br = 0;
		  $(this).nextAll().each(function(){ 
			
			if($(this).hasClass("open_razdel_list"))
			{
				br = 1;
				
					
			}
			
			if( br == 0 )
			{
				count = count + 1;
			}
		  });
		  
		 
		  
		  var i = 0;				
		  for(i=0;i<count;i++)
		  {
				select = select.next();
				select.toggle(0);
		  }*/
		
	});
});
