function loadMiniBasket(){
	$.ajax({
		url: "/pws/ssnMiniBasketCount.jsp",
		cache: false,
		success: function(html){
			$("div#miniBasket div#miniBasketOverview p").html(html);
		}
	});
	$.ajax({
		url: "/pws/ssnMiniBasketProducts.jsp",
		cache: false,
		success: function(html){
			$("div#miniBasket div#miniBasketDetail").html(html);
			$("div#miniBasketDetail a.removeItem").click(function(){
				productId = $(this).attr('id').substring(6);
				$.get("/pws/UpdateBasket.ice", {Update:"Remove", ProductID:productId}, function(){
					loadMiniBasket();
				});
				return false;																		
			});
		}
	});
	
}

$(document).ready(function(){	
	
	loadMiniBasket();
	
	$("div#miniBasket").hoverIntent(
		function(){
			$("div#miniBasketDetail").slideDown("fast");			
		},
		function(){
			$("div#miniBasketDetail").slideUp("fast");
		}
	);
	
});