	$(function(){
		$('.tnv_list').each(
				function(index){
					$(this).removeClass('tnv_nojquery').addClass('tnv_jquery');
					var move_categs = $('.cat_news',this);
					//alert(move_categs.length);
					move_categs.each(
							function (index){		
								var eg = $(this).find('li').first().find('span').first();
						//		eg.appendTo($(this).parent());
							}
					);
					var categs = $(' > li > span',this);
					
					var itemwth = 0;
					var charWidth = 7;
					$(this).css({
						'background' : 'url(fileadmin/styles/mpic_2col/img/tabmenu_left.gif) no-repeat',
					    'padding' : '28px 0 0 0'
					});
					$('.cat_news', this).hide();      
					
					categs.first().addClass('active');
					categs.first().css({'border-left' : '1px solid #90A0B4'});

					categs.each(function (index){
						$(this).addClass('menu_item').css({			
							//'width' : $(this).outerWidth() ,
							'left' : itemwth
						});
						itemwth = itemwth + $(this).outerWidth() + 2;
						$(this).children().removeAttr("href");
					});
					
					$('.cat_news', this).first().show();
					$('.cat_news', this).first().css({'display' : 'block'});	
					
					categs.click(function(){
						
						categs.removeClass('active before_active');

						$(this).addClass('active');
						$('.cat_news', $('.tnv_list').eq(index)).hide();
						
						$(this).parent().children().show();
						$(this).parent().prevAll().find('span').addClass('before_active');
						
						itemwth = 0;
						categs.each(function (index){
							$(this).addClass('menu_item').css({			
								//'width' : $(this).outerWidth() ,
								'left' : itemwth
							});
							itemwth = itemwth + $(this).outerWidth() + 2;
							$(this).children().removeAttr("href");
						});
						
					});
					
					categs.mouseover(function(){$(this).addClass('mouseover')});
					categs.mouseout(function(){$(this).removeClass('mouseover')});

					
				}
		);
		
	});
