jQuery(function($) {
	/****************menu header*********************/		
		$($("#menu_header").children("tbody").children("tr").children("td")).filter(".menu_tab").each(function(i){
			var pos="0px 46px";		var ccolor="#000000";	
			
			if(boton_current==i)
			{	pos="0px 0px";	ccolor="#FFFFFF";
				$(this).prev().css({background:"url(../image/background_tab_left_menu2.png) no-repeat right"}); 
				$(this).next().css({background:"url(../image/background_tab_right_menu2.png) no-repeat left"});
				$(this).children("a").removeAttr("href").css({cursor:"auto"});
			}
			$(this).css({background:"url(../image/bg_li_header.jpg)",backgroundPosition: pos});
			$(this).children("a").css({color: ccolor});
			if(boton_current!=i)
			{
				$(this).prev().children("img").attr({src:"../image/background_tab_left_menu.png"});
				$(this).next().children("img").attr({src:"../image/background_tab_right_menu.png"});
				
				$(this).mouseover(function(){
					$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:500,complete:function(){
						$(this).prev().css({background:"url(../image/background_tab_left_menu2.png) no-repeat right"}); 
						$(this).next().css({background:"url(../image/background_tab_right_menu2.png) no-repeat left"});
					}})
					$(this).children("a").css({color:"#FFFFFF"});
				})
				.mouseout(function(){
					$(this).stop().animate({backgroundPosition:"(0px 46px)"}, {duration:500, complete:function(){
						$(this).css({backgroundPosition: "0px 46px"});
						$(this).prev().css({background:"url(../image/background_tab_left_menu.png) no-repeat right"}); 
						$(this).next().css({background:"url(../image/background_tab_right_menu.png) no-repeat left"});
					}});
					$(this).children("a").css({color:"#000000"});					
				});
			}				
		});
		/********************menu footer**********************/
		$($("#menu_footer").children("ul").children("li")).each(function(i){
			
			if(boton_current==i)
			{
			$(this).children("a").css({background:"url(../image/bg_li_footer.png)",backgroundPosition:"0px 30px",
			cursor:"auto"}).removeAttr("href");
			
			}else
			{
				$(this).children("a").css({background:"url(../image/bg_li_footer.png)",backgroundPosition:"0px -1px"})
				.mouseover(function(){
					$(this).stop().animate({backgroundPosition:"(0px 30px)"}, {duration:500,complete:function(){	
					}})
				})
				.mouseout(function(){
					$(this).stop().animate({backgroundPosition:"(0px -1px)"}, {duration:500, complete:function(){
						$(this).css({backgroundPosition: "0px -1px"});
					}})
				});
			}
			
		});
		/*******************version controller*******************/
		if($.browser.msie && parseInt($.browser.version)<7)
		{			
			$("#left").css({background:"none"});
			$("#right").css({background:"none"});
			cursor_support="hand";
		}
		
	});
		