|
'); $(el).append(g); $(g).show(); }
_uPostForm('',{type:'POST',url:'/shop/basket',data:{'mode':'clear'}});
ga_event('basket_clear');
return false;
}
function removeBasket(id){
if(lock_buttons) return false; else lock_buttons = 1;
$('#basket-item-'+id+' .sb-func').removeClass('remove').addClass('myWinLoadS').attr('title','');
_uPostForm('',{type:'POST',url:'/shop/basket',data:{'mode':'del', 'id':id}});
return false;
}
function add2Basket(id,pref){
if(lock_buttons) return false; else lock_buttons = 1;
var opt = new Array();
$('#b'+pref+'-'+id+'-basket').attr('disabled','disabled');
$('#'+pref+'-'+id+'-basket').removeClass('done').removeClass('err').removeClass('add').addClass('wait').attr('title','');
$('#'+pref+'-'+id+'-options-selectors').find('input:checked, select').each(function(){ opt.push(this.id.split('-')[3]+(parseInt(this.value) ? '-'+this.value :''));});
_uPostForm('',{type:'POST',url:'/shop/basket',data:{'mode':'add', 'id':id, 'pref':pref, 'opt':opt.join(':'), 'cnt':$('#q'+pref+'-'+id+'-basket').attr('value')}});
ga_event('basket_add');
return false;
}
function buyNow(id,pref){
if(lock_buttons) return false; else lock_buttons = 1;
var opt = new Array();
$('#b'+pref+'-'+id+'-buynow').attr('disabled','disabled');
$('#'+pref+'-'+id+'-buynow').removeClass('done').removeClass('err').removeClass('now').addClass('wait').attr('title','');
$('#'+pref+'-'+id+'-options-selectors').find('input:checked, select').each(function(){ opt.push(this.id.split('-')[3]+(parseInt(this.value) ? '-'+this.value :''));});
_uPostForm('',{type:'POST',url:'/shop/basket',data:{'mode':'add', 'id':id, 'pref':pref, 'opt':opt.join(':'), 'cnt':$('#q'+pref+'-'+id+'-basket').attr('value'), 'now':1}});
ga_event('basket_buynow')
return false;
}
//-->
|
|