1var is_send = false; 2 3$(document).ready(() => { 4 $(".phone-mask").mask("+7 (999) 999-9999"); 5 6 /** 7 * cookie-confirm 8 */ 9 10 var cookieBtn = document.querySelector('.cookie-confirm .btn'); 11 if (cookieBtn) { 12 cookieBtn.addEventListener('click', function (e) { 13 e.preventDefault(); 14 document.cookie = "cookieConfirm=yes; max-age=" + 60 * 60 * 24 * 30 + "; path=/; secure"; 15 16 var cookieEl = document.querySelector('.cookie-confirm'); 17 if (cookieEl) { 18 cookieEl.style.display = 'none'; 19 } 20 }); 21 } 22 23 /** 24 * HAMBURGER 25 */ 26 $('.menu-toggle-inner').on('click', (e) => { 27 e.preventDefault(); 28 $('.adaptive-menu-toggle').toggleClass('adaptive-menu-toggle--open'); 29 $('.headerNav_adaptive').toggleClass('header_opened'); 30 }); 31 32 //инÑÑа поÑÑÑолио в ÑÑÑÑÐ³Ð°Ñ 33 $('.instaWorks__list').slick({ 34 infinite: false, 35 arrows: false, 36 dots: true, 37 slidesToShow: 4, 38 autoplay: true, 39 responsive: [ 40 { 41 breakpoint: 1000, 42 settings: { 43 slidesToShow: 3, 44 } 45 }, 46 { 47 breakpoint: 767, 48 settings: { 49 slidesToShow: 2, 50 } 51 }, 52 ] 53 }); 54 55 // ÑÐµÐºÐ±Ð¾ÐºÑ ÑоглаÑÐ¸Ñ Ð¿Ð¾Ð»Ð¸Ñики 56 $('.agree .checkbox').on('click', function () { 57 $(this).toggleClass('active'); 58 }); 59 60 // кнопка ввеÑÑ 61 // $(window).scroll(function () { 62 // if ($(this).scrollTop() > 300) { 63 // $('.up_btn').fadeIn(); 64 // } else { 65 // $('.up_btn').fadeOut(); 66 // } 67 // }); 68 // $('.up_btn').click(function () { 69 // $('body,html').animate({ 70 // scrollTop: 0 71 // }, 1000); 72 // return false; 73 // }); 74 75 76 //оÑкÑÑÑÑ Ð·Ð°ÐºÑÑÑÑ ÑпиÑок гоÑодов 77 $('.hide_city, .cities_list__wrapper div').bind('click', function () { 78 $('.cities_list').hide(); 79 $('.ip_city').text($(this).text()); 80 81 if ($(this).text() == 'СанкÑ-ÐеÑеÑбÑÑг') { 82 setGeoIp('SPB', 1); 83 } else { 84 if ($(this).text() == 'ÐоÑква' || $(this).text() == 'ÐоÑковÑÐºÐ°Ñ Ð¾Ð±Ð»Ð°ÑÑÑ') { 85 setGeoIp('MSK', 1); 86 } else { 87 setGeoIp($(this).text(), 1); 88 } 89 } 90 }); 91 92 // оÑкÑÑÑÑ ÑкÑÑÑÑй блок 93 $('.openHideBlock').on('click', function (e) { 94 e.preventDefault(); 95 96 $(this).parents('.s_section').hide(); 97 $('.hide__block').slideDown(); 98 }); 99 100 101 // ÑкопиÑоваÑÑ ÑÑÑÐ»ÐºÑ Ð² казино 102 $('.copy__link').on('click', function () { 103 var linkBuffer = "https://xn----8sbangqocjlfl2ajs.xn--p1ai" + $(this).prev().attr('href'), 104 thisTextBuffer = $(this).children(".copy__link__modal"); 105 106 navigator.clipboard.writeText(linkBuffer) 107 .then(() => { 108 console.log('СкопиÑовано'); 109 thisTextBuffer.text("СкопиÑовано").show(); 110 }) 111 .catch(error => { 112 console.error(`ТекÑÑ Ð½Ðµ ÑкопиÑован ${error}`); 113 thisTextBuffer.text(`ТекÑÑ Ð½Ðµ ÑкопиÑован ${error}`).show(); 114 }) 115 116 setTimeout(function(){ 117 thisTextBuffer.hide(); 118 }, 2000); 119 }); 120 121 122 123 /** 124 * ÐнимаÑÐ¸Ñ ÑÑÑки игÑового авÑомаÑа в Ñазделе section.reg 125 * 126 * slotMachine {HTMLElement} ÐгÑовой авÑÐ¾Ð¼Ð°Ñ 127 * activateButton {HTMLElement} Ðнопка, к нажаÑÐ¸Ñ ÐºÐ¾ÑоÑой пÑивÑзана анимаÑÐ¸Ñ 128 */ 129 const slotMachine = document.getElementById('slot-machine'); 130 131 if (slotMachine) { 132 const activateButton = document.getElementById('slot-machine_btn'); 133 134 // ÐейÑÑÐµÐ¹Ð¼Ñ Ð´Ð²Ð¸Ð¶ÐµÐ½Ð¸Ñ ÑÑÑки игÑового авÑомаÑа 135 const keyframesHandleBall = [ 136 {translate: "0 -100px"}, 137 {translate: "12px 12px"}, 138 {translate: "0 100px"}, 139 {translate: "12px 12px"}, 140 {translate: "0 -100px"}, 141 ]; 142 const keyframesHandleLever = [ 143 {rotate: "207deg", height: "100px"}, 144 {rotate: "270deg", height: "40px"}, 145 {rotate: "333deg", height: "100px"}, 146 {rotate: "270deg", height: "40px"}, 147 {rotate: "207deg", height: "100px"}, 148 ]; 149 const keyframesTimings = { 150 duration: 800, 151 iterations: 1, 152 }; 153 154 let isSlotMachineAnimating = false; 155 156 activateButton.addEventListener('click', animateSlotMachineHandle); 157 158 function animateSlotMachineHandle() { 159 if (isSlotMachineAnimating) { 160 return 161 } 162 163 isSlotMachineAnimating = true; 164 165 slotMachine.querySelector('.slot-machine__handle__lever').animate(keyframesHandleLever, keyframesTimings); 166 slotMachine.querySelector('.slot-machine__handle__ball').animate(keyframesHandleBall, keyframesTimings); 167 setTimeout(() => isSlotMachineAnimating = false, (keyframesTimings.duration + 50)); 168 169 } 170 } 171
172 /** 173 * ÐÐ¾Ð½ÐµÑ Ð°Ð½Ð¸Ð¼Ð°Ñии 174 */ 175 176 $("[data-fancybox]").fancybox({ 177 //опÑии 178 touch: false 179 180 }); 181 182 $('.mk_usluga_item').on('click', function () { 183 const name = $(this).attr('data-name'); 184 $('#form_reg input[name="data[new][usluga]"]').val(name); 185 }) 186 187 /** 188 * tooltip 189 */ 190 191 let timerId; 192 $('.haveSublist .soc-nav__link').on('click', function (e) { 193 e.preventDefault(); 194 let toolWrapper = $(this).next(); 195 196 if (timerId){ 197 clearTimeout(timerId); 198 } 199 if (toolWrapper.hasClass('visible')){ 200 toolWrapper.removeClass('visible'); 201 } else { 202 toolWrapper.addClass('visible'); 203 timerId = setTimeout(() => toolWrapper.removeClass('visible'), 2000); 204 } 205 }); 206 207 if ( window.innerWidth > 1000 ) { 208 $('.haveSublist .soc-nav__link').on('mouseenter', function () { 209 $(this).next().addClass('visible'); 210 }); 211 212 $('.haveSublist .soc-nav__link').on('mouseleave', function () { 213 $(this).next().removeClass('visible'); 214 }); 215 } 216 217}); 218 219 220//ÑÑаÑое из Ñаблона /land_ru/js/custom_library.js 221 222function setGeoIp(geo, is_reload) { 223 224 if (!is_send) { 225 226 is_send = true; 227 228 jQuery.post('/udata://custom/setGeoIp/' + geo + '/', {}, function (data) { 229 230 is_send = false; 231 232 if (is_reload) { 233 234 location.reload(); 235 236 } else { 237 238 $('.choose_geo').hide(); 239 240 } 241 242 }); 243 244 } 245 246} 247 248function sendCallForm(obj, form_id, type_error) { 249 var bool = true; 250 251 var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 252 253 var validate = jQuery('#' + form_id + '_validate').text(); 254 255 var fields = validate.split(','); 256 var fLen = fields.length; 257 258 if (fLen > 0) { 259 260 for (var i = 0; i < fLen; i++) { 261 let formId = '#' + fields[i].trim().replace(/\r?\n/g, ""); 262 var temp_value = jQuery(formId).val(); 263 264 if (temp_value == "" || temp_value == undefined || temp_value == 'undefined') { 265 266 bool = false;
267 268 if (type_error == 1) { 269 270 jQuery(formId).css('border', 'solid 2px #ff0000'); 271 272 } else { 273 274 jQuery(formId).css('border', 'solid 2px #ff0000'); 275 276 } 277 278 } else { 279 280 if (fields[i].indexOf('email') != -1) { 281 282 if (!re.test(temp_value)) { 283 284 bool = false; 285 286 if (type_error == 1) { 287 288 jQuery(formId).css('border', 'solid 2px #ff0000'); 289 290 } else { 291 292 jQuery(formId).css('border', 'solid 2px #ff0000'); 293 294 } 295 296 } else { 297 298 if (type_error == 1) { 299 300 jQuery(formId).css('border', 'solid 1px #ccc4c4'); 301 302 } else { 303 304 jQuery(formId).css('border', 'solid 1px #ccc4c4'); 305 306 } 307 308 } 309 310 } else { 311 312 if (type_error == 1) { 313 314 jQuery(formId).css('border', 'solid 1px #ccc4c4'); 315 316 } else { 317 318 jQuery(formId).css('border', 'solid 1px #ccc4c4'); 319 320 } 321 322 } 323 324 } 325 326 } 327 328 } 329 330 if (!$('#' + form_id + '_agree').hasClass('active')) { 331 332 bool = false; 333 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ ÑоглаÑиÑÑÑÑ Ñ ÐолиÑикой конÑиденÑиалÑноÑÑи.'); 334 335 } 336 337 if (bool) { 338 339 if (!is_send) { 340 341 is_send = true; 342 343 // Ðизейблим ÐºÐ½Ð¾Ð¿ÐºÑ 344 if (obj) { 345 obj.style.opacity = '0.5'; 346 obj.style.pointerEvents = 'none'; 347 obj.style.cursor = 'not-allowed'; 348 } 349 350 jQuery.ajax({ 351 type: 'POST', 352 url: '/udata/webforms/ajaxsend/', 353 data: new FormData(jQuery("#" + form_id)[0]), 354 processData: false, 355 contentType: false, 356 success: function (data) { 357 358 if (jQuery("success", data).length) { 359 360 ym(50771491, 'reachGoal', 'conn'); 361 362 $.fancybox.open('<div class="message"><h2 class="popup__title">СпаÑибо!</h2><p class="popup__desc">ÐаÑа заÑвка оÑпÑавлена!</p></div>'); 363 364 $('.bubble').fadeOut(300); 365 366 } else { 367 368 if (jQuery("error", data).length) { 369 370 var error_txt = jQuery("error", data).text(); 371 372 alert(error_txt); 373 374 } 375 376 } 377 }, 378 complete: function() { 379 // Ðнейблим ÐºÐ½Ð¾Ð¿ÐºÑ 380 if (obj) { 381 obj.style.opacity = '1'; 382 obj.style.pointerEvents = 'auto'; 383 obj.style.cursor = 'pointer'; 384 } 385 is_send = false; 386 } 387 }); 388 389 390 // jQuery.post('/udata/webforms/ajaxsend/', jQuery("#" + form_id).serialize(), function(data){ 391 // 392 // is_send = false; 393 // 394 // if(jQuery("success", data).length) { 395 // 396 // ym(50771491,'reachGoal','conn'); 397 // 398 // //alert('ÐаÑе ÑообÑение ÑÑпеÑно оÑпÑавлено'); 399 // 400 // $.fancybox.open('<div class="message"><h2 class="popup__title">СпаÑибо!</h2><p class="popup__desc">ÐаÑа заÑвка оÑпÑавлена!</p></div>'); 401 // 402 // $('.bubble').fadeOut(300); 403 // 404 // } 405 // else { 406 // 407 // if(jQuery("error", data).length) { 408 // 409 // var error_txt = jQuery("error", data).text(); 410 // 411 // alert(error_txt); 412 // 413 // } 414 // 415 // } 416 // 417 // }); 418 419 } 420 421 } else { 422 423 return false; 424 425 } 426 427} 428 429function sendCasinoForm(obj, form_id, type_error) { 430 var bool = true; 431 var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 432 var validate = jQuery('#' + form_id + '_validate').text(); 433 434 var fields = validate.split(','); 435 var fLen = fields.length; 436 437 if (fLen > 0) { 438 for (var i = 0; i < fLen; i++) { 439 let formId = '#' + fields[i].trim().replace(/\r?\n/g, ""); 440 var temp_value = jQuery(formId).val(); 441 if (temp_value == "" || temp_value == undefined || temp_value == 'undefined') { 442 bool = false;
443 if (type_error == 1) { 444 jQuery(formId).css('border', 'solid 2px #ff0000'); 445 } else { 446 jQuery(formId).css('border', 'solid 2px #ff0000'); 447 } 448 } else { 449 if (fields[i].indexOf('email') != -1) { 450 if (!re.test(temp_value)) { 451 bool = false; 452 if (type_error == 1) { 453 jQuery(formId).css('border', 'solid 2px #ff0000'); 454 } else { 455 jQuery(formId).css('border', 'solid 2px #ff0000'); 456 } 457 } else { 458 if (type_error == 1) { 459 jQuery(formId).css('border', 'solid 1px #ccc4c4'); 460 } else { 461 jQuery(formId).css('border', 'solid 1px #ccc4c4'); 462 } 463 } 464 } else { 465 if (type_error == 1) { 466 jQuery(formId).css('border', 'solid 1px #ccc4c4'); 467 } else { 468 jQuery(formId).css('border', 'solid 1px #ccc4c4'); 469 } 470 } 471 } 472 } 473 } 474 475 if (!$('#' + form_id + '_agree').hasClass('active')) { 476 bool = false; 477 alert('ÐÑ Ð´Ð¾Ð»Ð¶Ð½Ñ ÑоглаÑиÑÑÑÑ Ñ ÐолиÑикой конÑиденÑиалÑноÑÑи.'); 478 } 479 480 const buttonText = ['ÐÑпÑавлÑем...', 'ÐÑовеÑÑем...', 'СÑиÑаем...']; 481 let j = 1; 482 483 const changeText = () => { 484 $('#slot-machine_btn').text(buttonText[j]) 485 j = buttonText.length === j ? 0 : j + 1 486 } 487 488 489 if (bool) { 490 if (!is_send) { 491 is_send = true; 492 const changeIntervalText = setInterval(changeText, 1000); 493 jQuery.ajax({ 494 type: 'POST', 495 url: '/udata/webforms/casinosend/.json', 496 data: new FormData(jQuery("#" + form_id)[0]), 497 processData: false, 498 contentType: false, 499 success: function (data) { 500 is_send = false; 501 clearInterval(changeIntervalText); 502 $('#slot-machine_btn').text('ÐаÑегиÑÑÑиÑоваÑÑÑÑ Ð¸ наÑаÑÑ Ð·Ð°ÑабаÑÑваÑÑ') 503 if (data.success) { 504 $('.slot-machine__inner.slot-machine__inner_2 .slot-machine__prise__value span').text(data.promokod) 505 $('.slot-machine__inner.slot-machine__inner_1').hide() 506 $('.slot-machine__inner.slot-machine__inner_2').show() 507 ym(50771491, 'reachGoal', 'conn'); 508 // $.fancybox.open('<div class="message"><h2 class="popup__title">ÐÑ Ð²ÑигÑали!</h2><p class="popup__desc">ÐÐ°Ñ ÐºÑпон на ÑÐºÐ¸Ð´ÐºÑ '+data.promokod+'!</p></div>'); 509 // $('.bubble').fadeOut(300); 510 } else { 511 if (data.udata.error) { 512 var error_txt = data.udata.error; 513 alert(error_txt); 514 } 515 516 } 517 518 } 519 }); 520 } 521 522 } else { 523 524 return false; 525 526 } 527 528}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.