var cart = {
    timeout: 1,
    add: function(url, id) 
    {
        new jQuery.ajax(
            {
                url: url,
                data: {id: id},
                type: 'post',
                dataType: 'json',
                success: function(result){
                    var blockTop = jQuery(window).scrollTop() + (jQuery(window).height() / 2);
                    jQuery('#cartWares').html(result.wares);
                    jQuery('#cartTotalPrice').html(result.totalPrice);
                },
                error: function(){ }
            }
        );
        return false;
    },
    infoTimeout: function() 
    { 
        cart.timeout--; 
        if (cart.timeout > 0) { 
            setTimeout(cart.infoTimeout, 1200); 
        } else 
            jQuery('#add-cart-confirm-block').fadeOut('slow');
    } 
};
