if(data.account&&data.account!==this.model.get('account')){this.changeAccount(data.account);}},render:function(){this.focusedElementId=$(':focus').attr('id');console.log('payment_method:render');$(this.el).html(this.template({'model':this.model.toJSON()}));$('img').error(function(){$(this).hide();});$('#'+this.focusedElementId).focus();},});qc.Cart=qc.Model.extend({defaults:'',initialize:function(){this.set('config',config.account[this.get('account')].cart);},changeAccount:function(account){this.set('account',account);this.set('config',config.account[this.get('account')].cart);} > $('[name="services-name"]').change(function(){
> if ($(this).prop("checked")){
> $(".service-price").text($(this).data("price") + parseInt($(".service-price").text()));
> $(".total-price").text(numberWithSpaces(parseInt($(".total-price").text().replace(/\s+/g, '')) + $(this).data("price")));
> } else {
> if ($(this).data("price") - parseInt($(".service-price").text()) > 0) {
> $(".service-price").text($(this).data("price") - parseInt($(".service-price").text()));
> } else {
> $(".service-price").text('0');
> }
> $(".total-price").text(numberWithSpaces(parseInt($(".total-price").text().replace(/\s+/g, '')) - $(this).data("price")));
> }
> });