var basketInst = umiBasket.getInstance();
basketInst.foo_onAfterAddElement = basketInst.onAfterAddElement;

basketInst.onAfterAddElement = function(iElementId, iCount) {
	// 
	this.foo_onAfterAddElement(iElementId, iCount);

	// own
	if (iCount) {
		var the_gbasket = $("#gizmo\\.basket");
		if (the_gbasket.length && the_gbasket.css('display') !== "block") {
			the_gbasket.toggle("fast");
		}

		var the_basketsumm = $("#basketsumm");
		if (the_basketsumm.length && the_basketsumm.css('display') !== "block") {
			the_basketsumm.toggle("fast");
		}

		var the_basketNOsumm = $("#basketNOsumm");
		if (the_basketNOsumm.length && the_basketNOsumm.css('display') !== "none") {
			the_basketNOsumm.toggle("fast");
		}

		var the_tobasket = $("#link_tobasket_"+iElementId);
		if (the_tobasket.length) {
			the_tobasket.attr('onclick', "");
			the_tobasket.attr('href', "/eshop/basket/");
			the_tobasket.attr('title', "перейти в корзину");
			//the_tobasket.html("<img alt=\"уже в корзине\" src=\"/xsltTpls/shop/img/icon2_done.gif\"/>");
		}
		var the_tobasket_img = $("#link_tobasket_"+iElementId+" img");
		if (the_tobasket_img.length) {
			the_tobasket_img.attr('src', "/xsltTpls/shop/img/icon2_done.gif");
			the_tobasket.attr('alt', "уже в корзине");
		}
	}
}