$(document).ready(function(){
	for(var i=1; i<7;i++){
		$("#m"+i).mouseover(function(e){
			$("#"+e.currentTarget.id).removeClass("mItemOut");
			$("#"+e.currentTarget.id).addClass("mItemOver");
		});
		
		$("#m"+i).mouseout(function(e){
			$("#"+e.currentTarget.id).addClass("mItemOut");
			$("#"+e.currentTarget.id).removeClass("mItemOver");
		});
	}
	
	lastBlock = $("#a1");	
    maxWidth = 572;
    minWidth = 0;	


	for(i=1; i<4;i++){
		$("#a"+i).click( function(){
		var tmp = $(lastBlock).attr("id");
    	tmp = tmp.substr(1,1);
    	
        $(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
        
        $(lastBlock).children("#tab"+tmp).css("backgroundImage", "url(images/slider/panel_"+tmp+"_out.png)");        
		        
		$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});		
		lastBlock = this;
		
		tmp = $(lastBlock).attr("id");
    	tmp = tmp.substr(1,1);
		
        $(lastBlock).children("#tab"+tmp).css("backgroundImage", "url(images/slider/panel_"+tmp+"_over.png)");	});
	}

   /*
 $("#sliderBoxBig ul li a").click( function(e){
    	
    	var tmp = $(lastBlock).attr("id");
    	tmp = tmp.substr(1,1);
    	
        $(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
        
        $(lastBlock).children("#tab"+tmp).css("backgroundImage", "url(images/slider/panel_"+tmp+"_out.png)");        
		        
		$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});		
		lastBlock = this;
		
		tmp = $(lastBlock).attr("id");
    	tmp = tmp.substr(1,1);
		
        $(lastBlock).children("#tab"+tmp).css("backgroundImage", "url(images/slider/panel_"+tmp+"_over.png)");	});
*/
});
