1let headerBannerHeight, currentSearchInputID, elementIDForSearchResults, elementIDForCloseSearchResults; 2$(document).ready(function () { 3 $('body').on('click', '[data-action="remove_class"]', function() { 4 let classToRemove; 5 classToRemove = $(this).attr('data-item'); 6 7 $(this).closest('.' + classToRemove).removeClass(classToRemove); 8 $(this).remove(); 9 }); 10 // $('input[name="search_building"]').on("input",function(ev) { 11 $('input[data-action="search_building"]').on("input",function(ev) { 12 let newElementIDForSearchResults = $(this).attr('element_id_for_search_results'); 13 let newElementIDForCloseSearchResults = $(this).attr('element_id_for_close_search_results'); 14 let newCurrentSearchInputID = $(this).attr('id'); 15 currentSearchInputID = newCurrentSearchInputID; 16 elementIDForCloseSearchResults = newElementIDForCloseSearchResults; 17 elementIDForSearchResults = newElementIDForSearchResults; 18 19 preBuildingSearch(); 20 }); 21 $('[data-action="close_search"]').click( function() { 22 closeBuildingSearch(); 23 }); 24 25 // jQuery('.money').mask('# ##0', { 26 // reverse: true, 27 // }); 28 // $('.money').inputmask({"mask": "[999 ][999 ][999 ]999", numericInput: true, jitMasking: true}); 29 30 $('body').on('click', '[data-action="show_disclaimer"]', function() { 31 let disclaimerID; 32 33 disclaimerID = $(this).attr('data-disclaimer'); 34 35 $('[data-disclaimer="disclaimer_' + disclaimerID + '"]').slideToggle(); 36 }); 37 38 // console.log(screen.width); 39 console.log(document.documentElement.scrollWidth); 40 // console.log(window.innerWidth); 41 if ($('.banner-header-wrapper').length && document.documentElement.scrollWidth <= '799') { 42 let headerBannerHeightCallTimes; 43 headerBannerHeightCallTimes = 0; 44 let timerId = setInterval(() => { 45 headerBannerHeightCallTimes++; 46 headerBannerHeight = getHeaderBannerHeight(); 47 if (headerBannerHeight > 30 || headerBannerHeightCallTimes > 30) { 48 clearInterval(timerId); 49 // $('#asdlNnr3lknr5b3wjr').html('staqc' + headerBannerHeightCallTimes); 50 } 51 // console.log('__Int'); 52 $('.banner-header-stub').css('height', headerBannerHeight + 'px') 53 $('.wrap-header').css('top', headerBannerHeight + 'px'); 54 fixedHead(); 55 }, 200); 56 // $('#asdlNnr3lknr5b3wjr').html('staqc' + headerBannerHeight); 57 }// else { 58 // $('#asdlNnr3lknr5b3wjr').html('_Aedaf' + $('.banner-header-wrapper').length); 59 // } 60 61 if ($('#all_cities_block').length > 0) { 62 $('[data-action="show_all_regions"]')/*.show()*/.fancybox(); 63 } 64 65 $('body').on('click', '.menu-trigger', function() { 66 $('body').toggleClass('mobile-menu-shown'); 67 }); 68 $('body').on('click', '[data-action="show_more_reviews"]', function() { 69 let i = 0, showByQnt = 3, reviewsLeftQnt = 0, showMoreQnt = 0; 70 $('.reviews-block.hided').each(function(k,el) { 71 i++; 72 if (i > showByQnt) return false; 73 $(el).removeClass('hided'); 74 }); 75 reviewsLeftQnt = $('.reviews-block.hided').length; 76 if (reviewsLeftQnt > 0) { 77 if (reviewsLeftQnt >= showByQnt) showMoreQnt = showByQnt; 78 else showMoreQnt = reviewsLeftQnt; 79 80 $('[data-action="show_more_reviews"] .button-reviews-show-more__qnt').html(showMoreQnt); 81 } else $('[data-action="show_more_reviews"]').remove(); 82 }); 83 $('body').on('click', '.b-ad-head__info-icon', function() { 84 $(this).closest('.object').find('.b-disclaimer').toggleClass('shown'); 85 // $('body').toggleClass('mobile-menu-shown'); 86 }); 87 88 $('.input-price-mask').inputmask({"mask": "[999 ][999 ][999 ]999", numericInput: true, jitMasking: true}); 89 console.log('PRE_PERCENTAGE2'); 90 $('.input-percentage-mask').inputmask({"mask": "9[9][.][99]", numericInput: true, jitMasking: true}); 91 92 if ($('.banner-header-swiper.swiper').length > 0) { 93 const swiperBannerHeaderSlider = new Swiper('.banner-header-swiper.swiper', { 94 // Optional parameters 95 autoplay: { 96 delay: 6500, 97 disableOnInteraction: false 98 }, 99 allowTouchMove: false, 100 effect: 'fade', 101 loop: true, 102 speed: 1000, 103 // Navigation arrows 104 navigation: { 105 nextEl: '.banner-header-swiper.swiper .swiper-button-next', 106 prevEl: '.banner-header-swiper.swiper .swiper-button-prev', 107 }, 108 }); 109 } 110 /*$('.banner-header-wrapper.owl-carousel').owlCarousel({ 111 loop: true, 112 lazyLoad: true, 113 nav: true, 114 navText: ['<svg viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg"><path d="M6.45206 11.4841C6.89806 11.0481 6.93306 10.4411 6.45206 9.90807L2.70506 6.00007L6.45206 2.09207C6.93306 1.55907 6.89806 0.951069 6.45206 0.518069C6.00706 0.0820694 5.25506 0.110069 4.83706 0.518069C4.41906 0.924069 0.335056 5.21307 0.335056 5.21307C0.229203 5.3152 0.145013 5.43762 0.0875106 5.573C0.0300083 5.70839 0.00037241 5.85398 0.00037241 6.00107C0.00037241 6.14816 0.0300083 6.29375 0.0875106 6.42913C0.145013 6.56452 0.229203 6.68693 0.335056 6.78907C0.335056 6.78907 4.41906 11.0761 4.83706 11.4841C5.25506 11.8931 6.00706 11.9201 6.45206 11.4841Z"/></svg>', '<svg viewBox="0 0 7 12" xmlns="http://www.w3.org/2000/svg">
114<path d="M0.547944 11.4841C0.101944 11.0481 0.0669441 10.4411 0.547944 9.90807L4.29494 6.00007L0.547944 2.09207C0.0669441 1.55907 0.101944 0.951069 0.547944 0.518069C0.992944 0.0820694 1.74494 0.110069 2.16294 0.518069C2.58094 0.924069 6.66494 5.21307 6.66494 5.21307C6.7708 5.3152 6.85499 5.43762 6.91249 5.573C6.96999 5.70839 6.99963 5.85398 6.99963 6.00107C6.99963 6.14816 6.96999 6.29375 6.91249 6.42913C6.85499 6.56452 6.7708 6.68693 6.66494 6.78907C6.66494 6.78907 2.58094 11.0761 2.16294 11.4841C1.74494 11.8931 0.992944 11.9201 0.547944 11.4841Z"/></svg>'], 115 dots: false, 116 animateOut: 'fadeOut', 117 autoplay: true, 118 autoplayTimeout: 6500, 119 touchDrag: false, 120 mouseDrag: false, 121 responsiveClass: true, 122 items: 1 123 }); 124 125 $('.main-slider').owlCarousel({ 126 loop: true, 127 lazyLoad: true, 128 nav: true, 129 navText: ['<svg viewBox="0 0 7 12" xmlns="https://www.w3.org/2000/svg"><path d="M6.45206 11.4841C6.89806 11.0481 6.93306 10.4411 6.45206 9.90807L2.70506 6.00007L6.45206 2.09207C6.93306 1.55907 6.89806 0.951069 6.45206 0.518069C6.00706 0.0820694 5.25506 0.110069 4.83706 0.518069C4.41906 0.924069 0.335056 5.21307 0.335056 5.21307C0.229203 5.3152 0.145013 5.43762 0.0875106 5.573C0.0300083 5.70839 0.00037241 5.85398 0.00037241 6.00107C0.00037241 6.14816 0.0300083 6.29375 0.0875106 6.42913C0.145013 6.56452 0.229203 6.68693 0.335056 6.78907C0.335056 6.78907 4.41906 11.0761 4.83706 11.4841C5.25506 11.8931 6.00706 11.9201 6.45206 11.4841Z"/></svg>', '<svg viewBox="0 0 7 12" xmlns="https://www.w3.org/2000/svg"><path d="M0.547944 11.4841C0.101944 11.0481 0.0669441 10.4411 0.547944 9.90807L4.29494 6.00007L0.547944 2.09207C0.0669441 1.55907 0.101944 0.951069 0.547944 0.518069C0.992944 0.0820694 1.74494 0.110069 2.16294 0.518069C2.58094 0.924069 6.66494 5.21307 6.66494 5.21307C6.7708 5.3152 6.85499 5.43762 6.91249 5.573C6.96999 5.70839 6.99963 5.85398 6.99963 6.00107C6.99963 6.14816 6.96999 6.29375 6.91249 6.42913C6.85499 6.56452 6.7708 6.68693 6.66494 6.78907C6.66494 6.78907 2.58094 11.0761 2.16294 11.4841C1.74494 11.8931 0.992944 11.9201 0.547944 11.4841Z"/></svg>'], 130 dots: false, 131 animateOut: 'fadeOut', 132 autoplay: true, 133 autoplayTimeout: 8000, 134 touchDrag: false, 135 mouseDrag: false, 136 responsiveClass: true, 137 responsive: { 138 0: { 139 items: 1, 140 }, 141 480: { 142 items: 1, 143 }, 144 600: { 145 items: 1, 146 }, 147 769: { 148 items: 1, 149 }, 150 1040: { 151 items: 1, 152 } 153 } 154 });*/ 155 156 $('body').on('click', '.cities__chosen', function (e) { 157 $(this).closest('.cities').find('.cities__list').toggle(); 158 }); 159 $('body').on('click', '.js_show-phone', function (e) { 160 e.preventDefault(); 161 e.stopPropagation(); 162 let clickFrom; 163 164 clickFrom = $(this).attr('data-from'); 165 if (typeof clickFrom === 'undefined') 166 clickFrom = 'DEFAULT'; 167 168 var $this = $(this), 169 currentId = $this.data('id'), 170 currentType = $this.data('type'), 171 currentPhone = $this.data('phone'), 172 objectID = $this.data('object-id'), 173 objectName = $this.data('object-name'), 174 isUnique = true; 175 176 // console.log(currentId); 177 if (currentPhone != '') { 178 $this.html(currentPhone); 179 $this.attr('href', 'tel:' + currentPhone); 180 $this.removeClass('js_show-phone'); 181 } 182 // newtonCallback.applyCalltracking(); 183 184 if (clickFrom === 'DP') { 185 ym(33684999,'reachGoal','SHOW_PHONE_NF_CART'); 186 } else if (clickFrom === 'NF') { 187 ym(33684999,'reachGoal','SHOW_PHONE_NF') 188 } else if (clickFrom === 'FLT') { 189 ym(33684999,'reachGoal','SHOW_PHONE_FLATS') 190 } else if (clickFrom === 'VTR') { 191 ym(33684999,'reachGoal','SHOW_PHONE_OBYAVA') 192 } else { 193 ym(33684999,'reachGoal','SHOW_PHONE'); 194 } 195 196 if (typeof data !== 'undefined') { 197 console.log(data); 198 $this.html(data) 199 if ( 200 typeof ym !== 'undefined' && 201 typeof objectName !== 'undefined' && 202 typeof objectID !== 'undefined' 203 ) { 204 var params = {'ÐовоÑÑÑойки': {}} 205 params['ÐовоÑÑÑойки'][objectName+'('+
205objectID+')'] = (currentType === 'adv') ? 'ÐÑоÑмоÑÑ ÑелеÑона в обÑÑвлениÑÑ ' : 'ÐÑоÑмоÑÑ ÑелеÑона' 206 ym(33684999,'reachGoal','statistics', params) 207 } 208 } 209 }); 210}); 211 212function preBuildingSearch() { 213 if (typeof preBuildingSearchID != 'undefined') clearTimeout(preBuildingSearchID); 214 preBuildingSearchID = setTimeout(BuildingSearch, 1000); 215} 216function BuildingSearch() { 217 // var search = $.trim($('input[name="search_building"]').val()); 218 var search = $.trim($('input#' + currentSearchInputID).val()); 219 if (search.length > 0) { 220 $('#' + elementIDForSearchResults).addClass('loader'); 221 $('#' + elementIDForSearchResults).removeClass('hide'); 222 $('#' + elementIDForCloseSearchResults).removeClass('hide'); 223 } else { 224 $('#' + elementIDForSearchResults).removeClass('loader'); 225 $('#' + elementIDForSearchResults).addClass('hide'); 226 $('#' + elementIDForCloseSearchResults).addClass('hide'); 227 } 228 if (search.length < 2) return false; 229 else { 230 $.ajax({
231 type: "POST", 232 url: "/ajax/search_building.php", 233 data: { 'search': search } 234 }).done(function(data) { 235 let searchResult; 236 if (typeof data != 'undefined' && typeof data.RESULT != 'undefined') { 237 searchResult = data.RESULT; 238 } else { 239 searchResult = '<div class="search-unit__not-found">ÐиÑего не найдено - попÑобÑйÑе измениÑÑ Ð·Ð°Ð¿ÑоÑ.</div>'; 240 } 241 $('#' + elementIDForSearchResults).removeClass('loader'); 242 $('#' + elementIDForSearchResults).html(searchResult); 243 }); 244 } 245} 246function closeBuildingSearch() { 247 // $('input[name="search_building"]').val(''); 248 $('input#' + currentSearchInputID).val(''); 249 $('#' + elementIDForCloseSearchResults).addClass('hide'); 250 $('#' + elementIDForSearchResults).addClass('hide'); 251 $('#' + elementIDForSearchResults).html(''); 252} 253 254function getHeaderBannerHeight() { 255 let maxHeight, thisHeight; 256 maxHeight = 0; 257 258 $('.banner-header-wrapper .swiper-slide').each(function(k, v) { 259 thisHeight = $(v).outerHeight(true); 260 if (maxHeight < thisHeight) maxHeight = thisHeight; 261 }); 262 263 return maxHeight; 264} 265 266function fixedHead() { 267 checkHeaderPosition(); 268 $(window).scroll(function() { 269 checkHeaderPosition(); 270 }); 271 function checkHeaderPosition() { 272 if (headerBannerHeight <= $(window).scrollTop()) { 273 if ($('.wrap-header').hasClass('fixed') == false) $('.wrap-header').addClass('fixed'); 274 } else { 275 $('.wrap-header').removeClass('fixed'); 276 } 277 } 278} 279 280function createCookie(name, value, days) { 281 var expires; 282 if (days) { 283 var date = new Date(); 284 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 285 expires = "; expires=" + date.toGMTString(); 286 } 287 else { 288 expires = ""; 289 } 290 document.cookie = name + "=" + value + expires + "; path=/"; 291} 292function getCookie(c_name) { 293 if (document.cookie.length > 0) { 294 c_start = document.cookie.indexOf(c_name + "="); 295 if (c_start != -1) { 296 c_start = c_start + c_name.length + 1; 297 c_end = document.cookie.indexOf(";", c_start); 298 if (c_end == -1) { 299 c_end = document.cookie.length; 300 } 301 return unescape(document.cookie.substring(c_start, c_end)); 302 } 303 } 304 return ""; 305}
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.