$.ajaxSetup( {
 type: "POST",
 url: "/sys/ajax.php",
 dataType: "html"
});

function delFromCart(id) {
 var suma = $("#content td b#suma").text();
 var cena = parseInt($("#content tr#tr_"+id+" td.cena").text());
 $.ajax({
  data: "o=delFromCart&id="+id,
  success: function(html) {
   $("#tr_"+id).remove();
   $("#content td b#suma").text(suma-cena);
  }
 })
}

function setPaymentMethod(type, id) {
 $.ajax({
  data: "o=setPaymentMethod&type="+type+"&id="+id,
  success: function(html) {
   $("p.info").remove();
   $("div#PaymentMethodList").remove();
   $("div#paymentMethod").show();
   $("div#paymentMethod div").hide();
   $("div#paymentMethod div#type_"+type).show();
   $("div#paymentMethod ul li b").text(html);
  }
 })
}



function doubleclick(id) {
 $a = $('#id_'+id);
 if ($a.hasClass('off')) return false;

 var href = $a.attr('href');
 $a.addClass('off').removeAttr('href');
// alert(href);
 window.location = href;

 return false;
}
