if (typeof smarttel == 'undefined') { var smarttel = { 'isModalOpen': false, 'isCallbackLeavingSend': false, 'isCallbackSend': false }, stJquery; window.onload = function() { var stOldJquery = false; if (window.jQuery) { stOldJquery = jQuery; } var newScript = document.createElement('script'); newScript.src = ('https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'); document.getElementsByTagName('head')[0].appendChild(newScript); newScript.onload = function () { if (stOldJquery) { stJquery = $.noConflict(); $ = jQuery = stOldJquery; } else { stJquery = jQuery; } var stCallbackRunned = false, stCallbackTimer = setTimeout(callback, 10*1000); stJquery.get("https://ipinfo.io", function () {}, "jsonp").always( function (resp) { clearTimeout(stCallbackTimer); countryCode = (resp && resp.country) ? resp.country : undefined; callback(countryCode); } ); function callback(countryCode) { if (stCallbackRunned) { return; } else { stCallbackRunned = true; } if (countryCode === undefined) { countryCode = "RU"; } // Get Params smarttel['code'] = '10340d2971755e5fb644468a6c1058bc8e8809f3'; smarttel['host'] = 'https://business.mtt.ru'; var dt = new Date(); stJquery.ajax({ url: smarttel['host'] + '/callback/', data: { code: smarttel['code'], country: countryCode, offset: dt.getTimezoneOffset(), day: dt.getDay(), hour: dt.getHours(), minutes: dt.getMinutes() }, dataType: 'jsonp', success: function (data) { if (data.success) { if (!stJquery('#smarttel-container').length) { stJquery('body').append('