//$(document).ready(function() { var T1 = T1 || {}; T1.ruFinance = function() { var proto = { ruInsurance: function(ccCode){ proto.postData({action: 'http://banknew.toyota.ru/configuratorFull', code: ccCode}); }, ruFinance: function(ccCode){ proto.postData({action: 'http://banknew.toyota.ru/configuratorFull', code: ccCode}); }, postData: function(data){ var action = data.action || T1.settings.finance.urlMyFinanceMiniCC, ccCode = data.code, proxy = ''; // get data $.ajax({ url: proxy + '/proxy/config/' + ccCode + '/full', dataType: 'json' }).done(function(obj, status, data){ // open the offer link PubSub.publish(T1.constants.FORM_CROSS_DOMAIN_POST, { action: action, target: T1.utilities.browser.isSafari ? "_blank" : "_overlayer", fields: { configuration: JSON.stringify(data.responseJSON) } }); }); } }; var self = proto; return{ ruFinance: proto.ruFinance, ruInsurance: proto.ruInsurance }; }(); //});