var basketInst = umiBasket.getInstance();
basketInst.foo_onAfterAddElement = basketInst.onAfterAddElement;
basketInst.foo_onUpdate = basketInst.onUpdate;

basketInst.onAfterAddElement = function(iElementId, iCount) {
	// 
	this.foo_onAfterAddElement(iElementId, iCount);

	// own
	if (iCount) {
		var the_tobasket = $j("#tobasket_"+iElementId);
		if (the_tobasket.length) {
			the_tobasket.attr('onclick', "");
			the_tobasket.unbind();
			the_tobasket.attr('href', "/eshop/basket/");
			the_tobasket.attr('title', "перейти в корзину");
			the_tobasket.removeClass();
			the_tobasket.addClass("h");
		}
	}
}

basketInst.onUpdate = function(oBasketInfo, b_full) {
	// 
	this.foo_onUpdate(oBasketInfo, b_full);

	// own
	if (parseInt(oBasketInfo.total_count)) {
		$j('#basket').show();
	} else {
		$j('#basket').hide();
	}
}
