<!--
$(document).ready(function()
{
	BindShoppingCart();
    //var prm = Sys.WebForms.PageRequestManager.getInstance();
    //prm.add_endRequest(BindShoppingCart);
});

function BindShoppingCart()
{
	//When mouse rolls over
	$("#shoppingcart").mouseover(function(){
		$(this).stop().animate({height: $("#shoppingcartheight").val() + 'px'},{queue:false, duration:500, easing: 'easeOutQuart'})
	});

	//When mouse is removed  
	$("#shoppingcart").mouseout(function(){
		$(this).stop().animate({height:'34px'},{queue:false, duration:500, easing: 'easeOutQuart'})
	});

	$('.col3').click(function () {
	    var id = this.id;
	    $("#shoppingcart").mouseover(function(){ $(this).stop(); });
	    $("#shoppingcart").mouseout(function(){ $(this).stop(); });
        $.ajax({
		    url: BasePath + 'shoppingcart_remove.aspx',
		    data: 'id=' + id,
		    type: 'post',
		    cache: false,
    	    success: function (html) { LoadShoppingCart(); }
        });
	});
}

function LoadShoppingCart()
{
    $.ajax({
        url: BasePath + 'shoppingcart_html.aspx',
        data: '',
        type: 'post',
        cache: false,
        success: function (html)
        {
            $("#shoppingcart").html(html);
            SetShoppingCartVisibility();
        }
    });
}

function SetShoppingCartVisibility()
{
    if ($("#shoppingcartcount").val() == "0")
    {
        $("#shoppingcart").stop();
        $("#shoppingcart").height(34);
        $("#shoppingcart").hide();
    }
    else
    {
        $("#shoppingcart").show();
        BindShoppingCart();
    }
}

//-->
