var DocWebObserver = function()
{
	var inTime = 500;
	var outTime = 0;
	var pastObj;
	var pastSrc;
	isFirst = new Boolean(true);
	
	// Default
	$('.webBox .imageL li').shuffle();
	$(".webBox .imageL li:gt(7)").css("display", "none");
	
	var len = $(".webBox .imageL li").length;
	$(".webBox .imageL li").autoHeight({height:'height'},{column:len});
		
	$("#web01").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web01").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});
	
	$("#web02").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web02").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});
	
	$("#web03").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web03").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});
	
	$("#web04").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web04").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});
	
	$("#web05").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web05").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});
	
	$("#web06").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web06").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});
	
	$("#web07").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web07").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});
	
	$("#web08").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web08").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});

	$("#web09").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web09").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeIn(inTime);
		
		changeCurrent(this);
	});

	$("#web10").click(function() {
		$(".webBox .imageL li").fadeOut(outTime);
		$(".webBox .imageL .web10").fadeIn(inTime);
		
		$(".webBox .nurseBox").fadeOut(outTime);
		
		changeCurrent(this);
	});
	
	
	function changeCurrent(obj)
	{
		if (!isFirst)
		{
			$(pastObj).find(".navCr").remove();
		}
		
		var target = $(obj).find("img");
		var src = $(target).attr("src").replace("_off", "_on");
		var tag = "<img src='" + src + "' class='navCr' />";
		
		$(tag).appendTo(obj);
		
		
		pastObj = obj;
		isFirst = false;
	}
	
}


