Ваше имя:
Номер телефона:
Марка и модель автомобиля:
Год выпуска:
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
VIN-код:
День и месяц визита:
Удобное время:
11:00
12:00
13:00
14:00
15:00
16:00
17:00
18:00
19:00
Необходимые виды работ:
Дополнительные вопросы и пожелания:
' + phoneNumber + '
' : '
Artboard 4
'; } $('[href*="whatsapp.com/send"]').each(function() { var url = $(this).attr('href'); if (isMobile) { $(this).attr('href', url.replace('web.whatsapp.com', 'api.whatsapp.com')); } else { $(this).attr('href', url.replace('api.whatsapp.com', 'web.whatsapp.com')); } }); $body.append(style).append(element); if (statusWidget.hint && !isMobile) { var getSetting = statusWidget.hint.toLowerCase() === 'whatsapp'; var $wayWA = $('.widget-whatsapp-cell'); var styleHint = { 'display': 'block', 'position': 'absolute', 'width': '156px', 'right': '100%', 'top': (getSetting ? (statusWidget.onlyMode ? 98 : 211) : 12) + 'px', 'background-color': '#f5f7f9', 'font-size': '12px', 'font-family': 'Arial', 'color': '#43474e', 'padding': '7px 7px 7px 7px', 'margin-right': '7px', 'letter-spacing': '-.03em', 'border-radius': '4px', '-webkit-border-radius': '4px', '-moz-border-radius': '4px', 'transition': '.4s ease all', '-webkit-transition': '.4s ease all', '-moz-transition': '.4s ease all', 'box-sizing': 'border-box', '-webkit-box-sizing': 'border-box', '-moz-box-sizing': 'border-box', 'cursor': 'pointer' }; if (getSetting) { $wayWA.find('.whatsapp').before('
' + textHint.whatsApp + '
'); } else { $wayWA.find('.call').after('
' + textHint.call + '
'); } $wayWA.find('.hint').css(styleHint); $wayWA.on('click', '.hint', function() { var $hintClosest = $(this).closest('.widget-whatsapp-cell'); if (getSetting) { window.open($hintClosest.find('a.whatsapp').attr('href')); } else { window.location = $hintClosest.find('a.call').attr('href'); } }); } $(document).on('scroll', showWidget); showWidget(); $(document).on('click', 'a', function() { for (var i = 0; i < reactionList.phone.length; ++i) { if ($(this).attr('href').search(new RegExp(reactionList.phone[i], 'i')) !== -1) { sendGoalOnClickNumber('phone'); break; } } for (var i = 0; i < reactionList.viber.length; ++i) { if ($(this).attr('href').search(new RegExp(reactionList.viber[i], 'i')) !== -1) { sendGoalOnClickNumber('viber'); break; } } for (var i = 0; i < reactionList.tg.length; ++i) { if ($(this).attr('href').search(new RegExp(reactionList.tg[i], 'i')) !== -1) { sendGoalOnClickNumber('tg'); break; } } for (var i = 0; i < reactionList.whatsApp.length; ++i) { if ($(this).attr('href').search(new RegExp(reactionList.whatsApp[i], 'i')) !== -1) { sendGoalOnClickNumber('whatsApp'); break; } } }); function sendGoalOnClickNumber(txt) { // Поиск номера счетчика Yandex.Metrika setTimeout(function() { var ymTarget = null; var glActName = null; var glCatName = null; var YaCounters = Object.keys(Ya._metrika.counters); if (txt === 'phone') { ymTarget = targetAnalytics.phone.yandexNameTarget; glActName = targetAnalytics.phone.googleAct; glCatName = targetAnalytics.phone.googleCat; } if (txt === 'viber') { ymTarget = targetAnalytics.viber.yandexNameTarget; glActName = targetAnalytics.viber.googleAct; glCatName = targetAnalytics.viber.googleCat; } if (txt === 'tg') { ymTarget = targetAnalytics.tg.yandexNameTarget; glActName = targetAnalytics.tg.googleAct; glCatName = targetAnalytics.tg.googleCat; } if (txt === 'whatsApp') { ymTarget = targetAnalytics.whatsApp.yandexNameTarget; glActName = targetAnalytics.whatsApp.googleAct; glCatName = targetAnalytics.whatsApp.googleCat; } if (window.Ya || window.ym) { for (var i = 0; i < YaCounters.length; ++i) { if (window.Ya) { window[`yaCounter${YaCounters[i].replace(':0', '')}`].reachGoal(ymTarget); console.log('Цель (Ya) "' + ymTarget + '" передана в счетчик "' + [`yaCounter${YaCounters[i].replace(':0', '')}`] + '"'); } else if (window.ym) { ym((YaCounters[i].replace(':0', '')), 'reachGoal', ymTarget); console.log('Цель (ym) "' + ymTarget + '" передана в счетчик "' + (YaCounters[i].replace(':0', '')) + '"'); } } } if (window.gtag) { gtag('event', glActName, { 'event_category': glCatName }); } else if (window.ga) { ga('send', 'event', { 'eventCategory': glCatName, 'eventAction': glActName }); } }, 250); } $('.widget-whatsapp-cell a.whatsapp').on('mouseover', function() { $(this).find('.fill_color_hover').css('fill', hoverColorIsSvg); }).on('mouseout', function() { $(this).find('.fill_color_hover').css('fill', ''); }); function showWidget() { var scroll = window.scrollY + $(window).height(); var heightBody = $body.outerHeight(); var clientHeight = $(window).height(); var showElem = heightBody <= clientHeight || (scroll * 1 / heightBody * 100).toFixed(1) >= visualSettingWidget.showPercent; if (showElem) { $('.widget-whatsapp-cell').animate({ opacity: 1 }, visualSettingWidget.showSpeed * 1000); $(document).off('scroll', showWidget); } } } fixedWidgetWhatsAppEndCell();