$(document).ready(function(){
	maxWidth = 198;
	minWidth = 56;
	minWidthAux = 55;

		$("#bt0").hover(function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		if($(".contActual").length){
			limite1=$(".contActual").attr('id').length-1;
			aux1=$(".contActual").attr('id').substring(limite1);
		}
		if($("#sub" + aux).length){
			$("#bt0").animate({width: maxWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
							$(".bt0").css("background", "url('/fotos/calendario/bt01_1279814216.png') no-repeat scroll -56px 0 transparent");
					}
	},function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		aux1="";
		if($("#sub" + aux).length){
			$("#bt0").animate({width: minWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
			$(".bt0").css("background", "url('/fotos/calendario/bt01_1279814216.png') no-repeat scroll 0 0 transparent");
		}
	});
		$("#bt1").hover(function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		if($(".contActual").length){
			limite1=$(".contActual").attr('id').length-1;
			aux1=$(".contActual").attr('id').substring(limite1);
		}
		if($("#sub" + aux).length){
			$("#bt1").animate({width: maxWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
							$(".bt1").css("background", "url('/fotos/calendario/bt02_1279817546.png') no-repeat scroll -56px 0 transparent");
					}
	},function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		aux1="";
		if($("#sub" + aux).length){
			$("#bt1").animate({width: minWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
			$(".bt1").css("background", "url('/fotos/calendario/bt02_1279817546.png') no-repeat scroll 0 0 transparent");
		}
	});
		$("#bt2").hover(function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		if($(".contActual").length){
			limite1=$(".contActual").attr('id').length-1;
			aux1=$(".contActual").attr('id').substring(limite1);
		}
		if($("#sub" + aux).length){
			$("#bt2").animate({width: maxWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
							$(".bt2").css("background", "url('/fotos/calendario/bt03_1279817556.png') no-repeat scroll -56px 0 transparent");
					}
	},function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		aux1="";
		if($("#sub" + aux).length){
			$("#bt2").animate({width: minWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
			$(".bt2").css("background", "url('/fotos/calendario/bt03_1279817556.png') no-repeat scroll 0 0 transparent");
		}
	});
		$("#bt3").hover(function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		if($(".contActual").length){
			limite1=$(".contActual").attr('id').length-1;
			aux1=$(".contActual").attr('id').substring(limite1);
		}
		if($("#sub" + aux).length){
			$("#bt3").animate({width: maxWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
							$(".bt3").css("background", "url('/fotos/calendario/bt04_1279817568.png') no-repeat scroll -56px 0 transparent");
					}
	},function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		aux1="";
		if($("#sub" + aux).length){
			$("#bt3").animate({width: minWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
			$(".bt3").css("background", "url('/fotos/calendario/bt04_1279817568.png') no-repeat scroll 0 0 transparent");
		}
	});
		$("#bt4").hover(function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		if($(".contActual").length){
			limite1=$(".contActual").attr('id').length-1;
			aux1=$(".contActual").attr('id').substring(limite1);
		}
		if($("#sub" + aux).length){
			$("#bt4").animate({width: maxWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
							$(".bt4").css("background", "url('/fotos/calendario/bt05_1279817581.png') no-repeat scroll -56px 0 transparent");
					}
	},function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		aux1="";
		if($("#sub" + aux).length){
			$("#bt4").animate({width: minWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
			$(".bt4").css("background", "url('/fotos/calendario/bt05_1279817581.png') no-repeat scroll 0 0 transparent");
		}
	});
		$("#bt5").hover(function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		if($(".contActual").length){
			limite1=$(".contActual").attr('id').length-1;
			aux1=$(".contActual").attr('id').substring(limite1);
		}
		if($("#sub" + aux).length){
			$("#bt5").animate({width: maxWidth+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
							$(".bt5").css("background", "url('/fotos/calendario/bt06_1279817592.png') no-repeat scroll -57px 0 transparent");
					}
	},function(){
		limite=$(this).attr('id').length-1;
		aux=$(this).attr('id').substring(limite);
		
		aux1="";
		if($("#sub" + aux).length){
			$("#bt5").animate({width: minWidthAux+"px"}, { queue:false, duration:400});
		}
		if(!$(this).hasClass("contActual")){
			$(".bt5").css("background", "url('/fotos/calendario/bt06_1279817592.png') no-repeat scroll 0 0 transparent");
		}
	});
	});

