$(function(){
	var flagC = 1;
	var flagD = 1;
	
	$("#cat_weblog").mouseover(function(){
		flagC = 1;
		flagD = 0;
		$("#cat_photolog").stop();
		$("#cat_photolog img.cat_img").stop();
		$("#cat_weblog img.cat_img").stop();
		$("#cat_photolog").animate({width: '34%'}, 500, "easeOutCubic");
		$("#cat_weblog img.cat_img").animate({opacity: '0'}, 500, "easeOutCubic");
		$("#cat_photolog img.cat_img").animate({opacity: '1'}, 500, "easeOutCubic");
	});
	
	$("#cat_photolog").mouseover(function(){
		flagC = 0;
		flagD = 1;
		$("#cat_photolog").stop();
		$("#cat_photolog img.cat_img").stop();
		$("#cat_weblog img.cat_img").stop();
		$("#cat_photolog").animate({width: '66%'}, 500, "easeOutCubic");
		$("#cat_photolog img.cat_img").animate({opacity: '0'}, 500, "easeOutCubic");
		$("#cat_weblog img.cat_img").animate({opacity: '1'}, 500, "easeOutCubic");
	});
	
	$("#cat_weblog, #cat_photolog").mouseout(function(){
		if((flagC == 1 && flagD == 0) || (flagC == 0 && flagD == 1)){
			$("#cat_photolog").stop();
			$("#cat_photolog img.cat_img").stop();
			$("#cat_weblog img.cat_img").stop();
			$("#cat_photolog").animate({width: '50%'}, 500, "easeOutCubic");
			$("#cat_photolog img.cat_img").animate({opacity: '1'}, 500, "easeOutCubic");
			$("#cat_weblog img.cat_img").animate({opacity: '1'}, 500, "easeOutCubic");
		}
	});
});


$(function(){
	$("#photoList li").mouseover(function(){
		$(this).stop();
		$(this).animate({
			height:"139px",
			opacity: 1
		},250);
	});
	
	$("#photoList li").mouseout(function(){
		$(this).stop();
		$(this).animate({
			height:"50px",
			opacity: 0.5
		},250);
	});
	
});

