$(document).ready(function () {
	$('#add-to-cart').removeAttr('onclick');

	$('#add-to-cart').click(function () {
		$.ajax({
			type: 'post',
			url: 'index.php?route=module/cart/callback',
			dataType: 'html',
			data: $('#product :input'),
			success: function (html) {
				$('#cart').html(html);

			},	
			complete: function () {

                                $(".shopping-cart").addClass("cart-hover");
                                $("#shopping-cart-full").slideDown("slow").delay(1300);
                                $("#shopping-cart-full").slideUp("slow");
                                $(".shopping-cart").removeClass("cart-hover");

                                 $(".shopping-cart").mouseover(function(){
                                    $("#shopping-cart-full").slideDown("slow");
                                    $(this).addClass("cart-hover");
                                });

                                $(".full-cart").mouseleave(function(){
                                    $("#shopping-cart-full").slideUp("slow");
                                    $(".shopping-cart").removeClass("cart-hover");
                                });

                                $("#go-checkout").hover(function() {
                                    $(this).attr("src","catalog/view/theme/default/image/go-to-checkout-hover.jpg");
                                }, function() {
                                    $(this).attr("src","catalog/view/theme/default/image/go-to-checkout.jpg");
                                });
			}			
		});			
	});			
});
