$(document).ready(function(){
	$("#cartListDetail .tableStyle1 tr:even").addClass("even");
	$("#cartListDetail .tableStyle1 tr:odd").addClass("odd");
	if (document.all){ 
		
		var cartCloseHeight="39px";
		var cartOpenHeight="180px";
		$("#cartToggleBtn").click(function(){
			var isOpenNow=($("#cartListContainer").css("height")==cartOpenHeight? true : false);
			$(this).removeClass();
			$(this).addClass(isOpenNow? "toOpen" : "toClose");
			$(this).html(isOpenNow? "OPEN" : "CLOSE");
			$("#cartListContainer").animate({height:(isOpenNow? cartCloseHeight : cartOpenHeight), duration:"slow", queue:false});
			
			return false;
		});
		
		if (document.getElementById("UcCartList1_hCartcount")){
			if (document.getElementById("UcCartList1_hCartcount").value < 1){
				$("#cartListTableHead").hide("slow");
				$("#cartListTableContainer").hide("slow");	
				$("#cartListTotal").hide("slow");	
			}
		}
		
		$("#cartToggleBtn").focus(function(){
			$(this).blur();
		});	 
	}else{
		var cartCloseHeight="4px";
		var cartOpenHeight="125px";
		$("#cartToggleBtn").click(function(){
			var isOpenNow=($("#cartListContainer").css("height")==cartOpenHeight? true : false);
			$(this).removeClass();
			$(this).addClass(isOpenNow? "toOpen" : "toClose");
			$(this).html(isOpenNow? "OPEN" : "CLOSE");
			$("#cartListContainer").animate({height:(isOpenNow? cartCloseHeight : cartOpenHeight), duration:"slow", queue:false});
			return false;
		});
		
		if (document.getElementById("UcCartList1_hCartcount")){
			if (document.getElementById("UcCartList1_hCartcount").value < 1){
				$("#cartListTableHead").hide("slow");
				$("#cartListTableContainer").hide("slow");	
				$("#cartListTotal").hide("slow");	
			}
		}
		
		$("#cartToggleBtn").focus(function(){
			$(this).blur();
		});	 
	}
	
});
