1var shopHeaderMiniCartTimer = null; 2 3function shopHeaderMiniCartShow(opts) { 4 var $ = jQuery; 5 var $w = $('#header-mini-cart-popup'); 6 if (!$w.length) { 7 console.warn('shopHeaderMiniCartShow: #header-mini-cart-popup not found'); 8 return; 9 } 10 opts = opts || {}; 11 12 // Update popup content 13 var $name = $w.find('.header-mini-cart-popup__name'); 14 $name.text(opts.name || ''); 15 16 var $img = $w.find('.header-mini-cart-popup__img'); 17 $img.attr('src', opts.image || '').attr('alt', opts.name || ''); 18 19 var $meta = $w.find('.header-mini-cart-popup__meta'); 20 var metaPrefix = opts.qty > 1 ? String(opts.qty) + ' Ã ' : ''; 21 $meta.html(metaPrefix + (opts.priceHtml || '')); 22 23 var $cartLink = $w.find('.header-mini-cart-popup__cart'); 24 var cartHref = $('#cart .cart-summary').attr('href'); 25 if (cartHref && $cartLink.length) { 26 $cartLink.attr('href', cartHref); 27 } 28 29 function hidePopup() { 30 $w.addClass('header-mini-cart-popup-hidden').attr('aria-hidden', 'true'); 31 } 32 33 function scheduleHide() { 34 var isMobile = MatchMedia("only screen and (max-width: 760px)"); 35 var hideDelay = isMobile ? 6000 : 4000; 36 clearTimeout(shopHeaderMiniCartTimer); 37 shopHeaderMiniCartTimer = setTimeout(function () { 38 if (!$w.is(':hover')) { 39 hidePopup(); 40 } 41 }, hideDelay); 42 } 43 44 clearTimeout(shopHeaderMiniCartTimer); 45 $w.removeClass('header-mini-cart-popup-hidden'); 46 $w.attr('aria-hidden', 'false'); 47 48 $w.off('.shopMiniCart'); 49 $w.on('mouseenter.shopMiniCart', function () { 50 clearTimeout(shopHeaderMiniCartTimer); 51 }); 52 $w.on('mouseleave.shopMiniCart', function () { 53 scheduleHide(); 54 }); 55 $w.on('touchstart.shopMiniCart', function () { 56 clearTimeout(shopHeaderMiniCartTimer); 57 }); 58 $w.find('.header-mini-cart-popup__continue').off('click.shopMiniCart').on('click.shopMiniCart', function (e) { 59 e.preventDefault(); 60 clearTimeout(shopHeaderMiniCartTimer); 61 hidePopup(); 62 }); 63 64 scheduleHide(); 65} 66 67function collectProductCardMiniCartData($form) { 68 var $ = jQuery; 69 var name = $('h1[itemprop="name"]').first().text().trim(); 70 var img = $('#product-image').attr('src') || ''; 71 var qty = parseInt($form.find('input[name="quantity"]').val(), 10) || 1; 72 var priceHtml = $form.find('.add2cart .price').first().html() || ''; 73 return { name: name, image: img, qty: qty, priceHtml: priceHtml }; 74} 75 76function collectListItemMiniCartData(f) { 77 var $ = jQuery; 78 f = $(f); 79 var $li = f.closest('li'); 80 var name = $li.find('[itemprop="name"]').first().text().trim(); 81 var $img = $li.find('img[itemprop="image"]').first(); 82 if (!$img.length) { 83 $img = $li.find('figure img').first(); 84 } 85 var img = ($img.attr('src') || $img.attr('data-src') || '').trim(); 86 var qty = parseInt(f.find('input[name="quantity"]').val(), 10) || 1; 87 var priceHtml = $li.find('.pricing .price').first().html() || ''; 88 return { name: name, image: img, qty: qty, priceHtml: priceHtml }; 89} 90 91window.shopHeaderMiniCartShow = shopHeaderMiniCartShow; 92window.collectProductCardMiniCartData = collectProductCardMiniCartData; 93window.collectListItemMiniCartData = collectListItemMiniCartData; 94 95$(document).ready(function () { 96 97 // countdown 98 // was reworked 99 // if ($.fn.countdowntimer) { 100 // $('.js-promo-countdown').each(function () { 101 // var $this = $(this).html(''); 102 // var id = ($this.attr('id') || 'js-promo-countdown' + ('' + Math.random()).slice(2)); 103 // $this.attr('id', id); 104 // var start = $this.data('start').replace(/-/g, '/'); 105 // var end = $this.data('end').replace(/-/g, '/'); 106 // $this.countdowntimer({ 107 // startDate: start, 108 // dateAndTime: end, 109 // size: 'lg' 110 // }); 111 // }); 112 // } 113 114 //SLIDERS 115 // inited in templated home.slider.html 116 // $('.homepage-bxslider').bxSlider( { auto : $('.homepage-bxslider li').length > 1, pause : 7000, autoHover : true, pager: $('.homepage-bxslider li').length > 1 }); 117 // $('.homepage-bxslider').css('height','auto'); 118 119 $('.related-bxslider').bxSlider( { minSlides: 1, maxSlides: 4, slideWidth: 146, slideMargin: 10, infiniteLoop: true, pager: false, onSliderLoad: function(){ $('.related-bxslider img').retina(); } }); 120 $('.onsale-bxslider').bxSlider( { minSlides: 1, maxSlides: 6, slideWidth: 146, slideMargin: 10, infiniteLoop: true, pager: false, onSliderLoad: function(){ $('.onsale-bxslider img').retina(); } }); 121 122 // SIDEBAR HEADER click (smartphones only) 123 if ( (!!('ontouchstart' in window)) && MatchMedia("only screen and (max-width: 760px)") ) { 124 $('.nav-sidebar-body').css('opacity',1); 125 $('.nav-sidebar-body').hide(); 126 $('a.nav-sidebar-header').click(function(){ 127 { 128 $('.nav-sidebar-body').slideToggle(200); 129 return false; 130 } 131 }); 132 } 133 134 //CART dialog for multi-SKU products 135 $('.dialog').on('click', 'a.dialog-close', function () { 136 $(this).closest('.dialog').hide().find('.cart').empty(); 137 return false; 138 });
139 $(document).keyup(function(e) { 140 if (e.keyCode == 27) { 141 $(".dialog:visible").hide().find('.cart').empty(); 142 } 143 }); 144 145 // COMPARE 146 $(".container").on('click', '.product-list a.compare', function () { 147 var compare = $.cookie('shop_compare'); 148 $.cookie('shop_compare', compare, { expires: 30, path: '/'}); 149 150 if (!$(this).find('i').hasClass('active')) { 151 if (compare) { 152 compare += ',' + $(this).data('product'); 153 } else { 154 compare = '' + $(this).data('product'); 155 } 156 if (compare.split(',').length > 0) { 157 if (!$('#compare-leash').is(":visible")) { 158 $('#compare-leash').css('height', 0).show().animate({height: 39},function(){ 159 var _blinked = 0; 160 setInterval(function(){ 161 if (_blinked < 4) 162 $("#compare-leash a").toggleClass("just-added"); 163 _blinked++; 164 },500); 165 }); 166 } 167 var url = $("#compare-leash a").attr('href').replace(/compare\/.*$/, 'compare/' + compare + '/'); 168 $('#compare-leash a').attr('href', url).show().find('strong').html(compare.split(',').length); 169 } else { 170 $('#compare-leash').hide(); 171 } 172 $.cookie('shop_compare', compare, { expires: 30, path: '/'}); 173 } else { 174 if (compare) { 175 compare = compare.split(','); 176 } else { 177 compare = []; 178 } 179 var i = $.inArray($(this).data('product') + '', compare); 180 if (i != -1) { 181 compare.splice(i, 1) 182 } 183 if (compare.length > 0) { 184 $.cookie('shop_compare', compare.join(','), { expires: 30, path: '/'}); 185 var url = $("#compare-leash a").attr('href').replace(/compare\/.*$/, 'compare/' + compare.join(',') + '/'); 186 $('#compare-leash a').attr('href', url).show().find('strong').html(compare.length); 187 } else { 188 $('#compare-leash').hide(); 189 $.cookie('shop_compare', null, {path: '/'}); 190 } 191 } 192 $(this).find('i').toggleClass('active'); 193 return false; 194 }); 195 196 197 //SHOW PREVIEW 198 $(".container").on('click', '.js-product-card-dialog', function () { 199 var f = $(this); 200 f.find('.adding2cart').addClass('icon16 loading').show(); 201 if (f.data('url')) { 202 var d = $('#dialog'); 203 var c = d.find('.preview_product'); 204 c.load(f.data('url'), function () { 205 f.find('.adding2cart').hide(); 206 c.prepend('<a href="#" class="dialog-close">×</a>'); 207 d.show(); 208 }); 209 return false; 210 } 211 212 213 }); 214 215 216 //ADD TO CART 217 $(".container").on('submit', '.product-list form.addtocart', function () { 218 var f = $(this); 219 f.find('.adding2cart').addClass('icon16 loading').show(); 220 if (f.data('url')) { 221 var d = $('#dialog'); 222 var c = d.find('.cart'); 223 c.load(f.data('url'), function () { 224 f.find('.adding2cart').hide(); 225 c.prepend('<a href="#" class="dialog-close">×</a>'); 226 d.show(); 227 }); 228 return false; 229 } 230 $.post(f.attr('action') + '?html=1', f.serialize(), function (response) { 231 f.find('.adding2cart').hide(); 232 233 if (response.status == 'ok') { 234 235 var cart_total = $(".cart-total"); 236 var cart_count = $(".cart-count"); 237 238 cart_total.closest('.cart-id').removeClass('empty'); 239 if( $(window).scrollTop() >= 55 ) 240 $('.cart-id').addClass('fixed'); 241 242 243 if ( MatchMedia("only screen and (max-width: 760px)") ) { 244 245 f.find('[type="submit"] svg').hide(); 246 f.find('[type="submit"] span').text('РкоÑзине'); 247 248 // mobile: show "added to cart" message 249 f.find('input[type="submit"]').hide(); 250 f.find('.price').hide(); 251 f.find('span.added2cart').show(); 252 cart_total.html(response.data.total); 253 cart_count.html(response.data.count); 254 255 // ÐоказÑваем miniCart и на мобилÑнÑÑ 256 var miniListData = collectListItemMiniCartData(f); 257 shopHeaderMiniCartShow(miniListData); 258 259 if ($('.cart-id').hasClass('fixed')) 260 $('.cart-to-checkout').hide(); 261 } else { 262 263 f.find('[type="submit"] span').text('РкоÑзине'); 264 265 // flying cart 266 var origin = f.closest('li'); 267 268 var block = $('<div></div>').append(origin.html()); 269 block.css({ 270 'z-index': 100500, 271 background: '#fff', 272 top: origin.offset().top, 273 left: origin.offset().left, 274 width: origin.width()+'px', 275 height: origin.height()+'px', 276 position: 'absolute', 277 overflow: 'hidden' 278 }).appendTo('body').css({'border':'2px solid #eee','padding':'20px','background':'#fff'}).animate({ 279 top: cart_total.offset().top, 280 left: cart_total.offset().left, 281 width: '10px', 282 height: '10px', 283 opacity: 0.7 284 }, 700, function() { 285 $(this).remove(); 286 cart_total.html(response.data.total); 287 cart_count.html(response.data.count); 288 289 if ($('.cart-id').hasClass('fixed')) 290 $('.cart-to-checkout').show(); 291 }); 292 293 var miniListData = collectListItemMiniCartData(f); 294 shopHeaderMiniCartShow(miniListData); 295 296 } 297 } else if (response.status == 'fail') { 298 alert(response.errors); 299 } 300 301 }, "json"); 302 return false; 303 });
304 305 306 //PRODUCT FILTERING 307 var f = function () { 308 309 var ajax_form_callback = function (f) { 310 var fields = getFields(f); 311 var params = []; 312 313 $.each(fields, function(i, field) { 314 if (field.name && field.value) { 315 params.push(field.name + '=' + field.value); 316 } 317 }); 318 319 var url = location.pathname + ( params.length ? "?" + params.join('&') : ""); 320 321 $(window).lazyLoad && $(window).lazyLoad('sleep'); 322 $('#product-list').html('<img src="' + f.data('loading') + '">'); 323 $.get(url, function(html) { 324 var tmp = $('<div></div>').html(html); 325 $('#product-list').html(tmp.find('#product-list').html()); 326 if (!!(history.pushState && history.state !== undefined)) { 327 window.history.pushState({}, '', url); 328 } 329 $(window).lazyLoad && $(window).lazyLoad('reload'); 330 }); 331 332 function getFields($form) { 333 var result = []; 334 335 var form_array = $form.serializeArray(); 336 337 $.each(form_array, function(i, field) { 338 var full_name = field.name, 339 search_string = "[unit]"; 340 341 var is_unit = (full_name.substr(-(search_string.length)) === search_string); 342 if (is_unit) { 343 var param_name = full_name.substr(0, full_name.length - search_string.length); 344 var is_param_set = checkParam(param_name); 345 if (is_param_set) { 346 result.push(field); 347 } 348 349 } else { 350 result.push(field); 351 } 352 }); 353 354 return result; 355 356 function checkParam(param_name) { 357 var result = false; 358 359 $.each(form_array, function(i, field) { 360 if (field.name === param_name +"[min]" || field.name === param_name +"[max]") { 361 if (field.value.length) { 362 result = true; 363 return true; 364 } 365 } 366 }); 367 368 return result; 369 } 370 } 371 }; 372 373 $('.filters.ajax form input').change(function () { 374 ajax_form_callback($(this).closest('form')); 375 }); 376 $('.filters.ajax form').submit(function () { 377 ajax_form_callback($(this)); 378 return false; 379 }); 380 381 $('.filters .slider').each(function () { 382 if (!$(this).find('.filter-slider').length) { 383 $(this).append('<div class="filter-slider"></div>'); 384 } else { 385 return; 386 } 387 var min = $(this).find('.min'); 388 var max = $(this).find('.max'); 389 var min_value = parseFloat(min.attr('placeholder')); 390 var max_value = parseFloat(max.attr('placeholder')); 391 var step = 1; 392 var slider = $(this).find('.filter-slider'); 393 if (slider.data('step')) { 394 step = parseFloat(slider.data('step')); 395 } else { 396 var diff = max_value - min_value; 397 if (Math.round(min_value) !== min_value || Math.round(max_value) !== max_value) { 398 var tail_length = 0; 399 try { 400 if (min_value > 0) { 401 var min_tail = (min_value + "").split(".")[1]; 402 if (min_tail && min_tail.length) { 403 tail_length = min_tail.length; 404 } 405 } 406 407 if (max_value > 0) { 408 var max_tail = (max_value + "").split(".")[1]; 409 if (max_tail && max_tail.length && max_tail.length > tail_length) { 410 tail_length = max_tail.length; 411 } 412 } 413 } catch(error) { 414 (console && console.log(error.message)); 415 } 416 417 if (tail_length > 0) { 418 step = 1 / Math.pow(10, tail_length); 419 } 420 421 // step = diff / 10; 422 // var tmp = 0; 423 // while (step < 1) { 424 // step *= 10; 425 // tmp += 1;
426 // } 427 // step = Math.pow(10, -tmp); 428 // tmp = Math.round(100000 * Math.abs(Math.round(min_value) - min_value)) / 100000; 429 // if (tmp && tmp < step) { 430 // step = tmp; 431 // } 432 // tmp = Math.round(100000 * Math.abs(Math.round(max_value) - max_value)) / 100000; 433 // if (tmp && tmp < step) { 434 // step = tmp; 435 // } 436 } 437 } 438 slider.slider({ 439 range: true, 440 min: parseFloat(min.attr('placeholder')), 441 max: parseFloat(max.attr('placeholder')), 442 step: step, 443 values: [parseFloat(min.val().length ? min.val() : min.attr('placeholder')), 444 parseFloat(max.val().length ? max.val() : max.attr('placeholder'))], 445 slide: function( event, ui ) { 446 var v = ui.values[0] == $(this).slider('option', 'min') ? '' : ui.values[0]; 447 min.val(v); 448 v = ui.values[1] == $(this).slider('option', 'max') ? '' : ui.values[1]; 449 max.val(v); 450 }, 451 stop: function (event, ui) { 452 min.change(); 453 } 454 }); 455 min.add(max).change(function () { 456 var v_min = min.val() === '' ? slider.slider('option', 'min') : parseFloat(min.val()); 457 var v_max = max.val() === '' ? slider.slider('option', 'max') : parseFloat(max.val()); 458 if (v_max >= v_min) { 459 slider.slider('option', 'values', [v_min, v_max]); 460 } 461 }); 462 }); 463 464 window.addEventListener('popstate', function(event) { 465 location.reload(); 466 }); 467 }; 468 f(); 469 470 //SLIDEMENU sidebar navigation 471 $('.slidemenu') 472 .on('afterLoadDone.waSlideMenu', function () { 473 f(); 474 $('img').retina(); 475 $(window).lazyLoad && $(window).lazyLoad('reload'); 476 }) 477 .on('onLatestClick.waSlideMenu', function () { 478 if ( (!!('ontouchstart' in window)) && ( MatchMedia("only screen and (max-width: 760px)") ) ) {
479 $('.nav-sidebar-body').slideUp(200); 480 } 481 }); 482 483 //LAZYLOADING 484 if ($.fn.lazyLoad) { 485 var paging = $('.lazyloading-paging'); 486 if (!paging.length) { 487 return; 488 } 489 490 var times = parseInt(paging.data('times'), 10); 491 var link_text = paging.data('linkText') || 'Load more'; 492 var loading_str = paging.data('loading-str') || 'Loading...'; 493 494 // check need to initialize lazy-loading 495 var current = paging.find('li.selected'); 496 if (current.children('a').text() != '1') { 497 return; 498 } 499 paging.hide(); 500 var win = $(window); 501 502 // prevent previous launched lazy-loading 503 win.lazyLoad('stop'); 504 505 // check need to initialize lazy-loading 506 var next = current.next(); 507 if (next.length) { 508 win.lazyLoad({ 509 container: '#product-list .product-list', 510 load: function () { 511 win.lazyLoad('sleep'); 512 513 var paging = $('.lazyloading-paging').hide(); 514 515 // determine actual current and next item for getting actual url 516 var current = paging.find('li.selected'); 517 var next = current.next(); 518 var url = next.find('a').attr('href'); 519 if (!url) { 520 win.lazyLoad('stop'); 521 return; 522 } 523 524 var product_list = $('#product-list .product-list'); 525 var loading = paging.parent().find('.loading').parent(); 526 if (!loading.length) { 527 loading = $('<div><i class="icon16 loading"></i>'+loading_str+'</div>').insertBefore(paging); 528 } 529 530 loading.show(); 531 $.get(url, function (html) { 532 var tmp = $('<div></div>').html(html); 533 if ($.Retina) { 534 tmp.find('#product-list .product-list img').retina(); 535 } 536 product_list.append(tmp.find('#product-list .product-list').children()); 537 var tmp_paging = tmp.find('.lazyloading-paging').hide(); 538 paging.replaceWith(tmp_paging); 539 paging = tmp_paging; 540 541 times -= 1; 542 543 // check need to stop lazy-loading 544 var current = paging.find('li.selected'); 545 var next = current.next(); 546 if (next.length) { 547 if (!isNaN(times) && times <= 0) { 548 win.lazyLoad('sleep'); 549 if (!$('.lazyloading-load-more').length) { 550 $('<a href="#" class="lazyloading-load-more">' + link_text + '</a>').insertAfter(paging) 551 .click(function () { 552 loading.show(); 553 times = 1; // one more time 554 win.lazyLoad('wake'); 555 win.lazyLoad('force'); 556 return false; 557 }); 558 } 559 } else { 560 win.lazyLoad('wake'); 561 } 562 } else { 563 win.lazyLoad('stop'); 564 $('.lazyloading-load-more').hide(); 565 } 566 567 loading.hide(); 568 tmp.remove(); 569 }); 570 } 571 }); 572 } 573 } 574 575}); 576 577// Show Filters for Mobile 578( function($) { 579 580 var storage = { 581 shownClass: "is-shown" 582 }; 583 584 var bindEvents = function() { 585 $("#filters-toggle-link").on("click", function() { 586 toggleFilters( $(this) ); 587 }); 588 }; 589 590 var toggleFilters = function($link) { 591 var $filters = $link.closest(".filters"), 592 activeClass = storage.shownClass, 593 show_text = $link.data("show-text"), 594 hide_text = $link.data("hide-text"), 595 is_active = $filters.hasClass(activeClass); 596 597 if (is_active) { 598 $filters.removeClass(activeClass); 599 $link.text(show_text); 600 } else { 601 $filters.addClass(activeClass); 602 $link.text(hide_text); 603 } 604 }; 605 606 $(document).ready( function() { 607 bindEvents(); 608 });
609 610})(jQuery); 611 612// Shop :: Promo CountDown 613var CountDown = ( function($) { 614 615 CountDown = function(options) { 616 var that = this; 617 618 // DOM 619 that.$wrapper = options["$wrapper"]; 620 621 // VARS 622 that.start = options["start"]; 623 that.end = options["end"]; 624 that.format = "%days%:%hours%:%minutes%:%seconds%"; 625 626 // DYNAMIC VARS 627 that.period = that.getPeriod(); 628 that.time_period = null; 629 that.timer = 0; 630 631 // INIT 632 that.run(); 633 }; 634 635 CountDown.prototype.getPeriod = function() { 636 var that = this, 637 start_date = new Date( that.start ), 638 end_date = new Date( that.end ); 639 640 return (end_date > start_date) ? (end_date - start_date) : 0; 641 }; 642 643 CountDown.prototype.getData = function() { 644 var that = this, 645 period = that.period; 646 647 var second = 1000, 648 minute = second * 60, 649 hour = minute * 60, 650 day = hour * 24, 651 residue; 652 653 var days = Math.floor(period/day); 654 residue = ( period - days * day ); 655 656 var hours = Math.floor(residue/hour); 657 residue = ( residue - hours * hour ); 658 659 var minutes = Math.floor(residue/minute); 660 residue = ( residue - minutes * minute ); 661 662 var seconds = Math.floor(residue/second); 663 664 return { 665 days: days, 666 hours: hours, 667 minutes: minutes, 668 seconds: seconds 669 } 670 }; 671 672 CountDown.prototype.getTime = function() { 673 var that = this, 674 data = that.getData(), 675 result = that.format; 676 677 return result 678 .replace("%days%", (data.days < 10) ? "0" + data.days : data.days) 679 .replace("%hours%", (data.hours < 10) ? "0" + data.hours : data.hours) 680 .replace("%minutes%", (data.minutes < 10) ? "0" + data.minutes : data.minutes) 681 .replace("%seconds%", (data.seconds < 10) ? "0" + data.seconds : data.seconds); 682 }; 683 684 CountDown.prototype.run = function() { 685 var that = this, 686 timer = 1000; 687 688 if (that.period > 0) { 689 var time = that.getTime(); 690 691 that.$wrapper.html(time); 692 693 that.period -= timer; 694 695 if (that.period > 0) { 696 that.timer = setTimeout( function () { 697 that.run(); 698 }, timer); 699 } 700 701 } else { 702 that.destroy(); 703 } 704 }; 705 706 CountDown.prototype.destroy = function() { 707 var that = this; 708 709 that.$wrapper.remove(); 710 }; 711 712 return CountDown; 713 714})(jQuery); 715 716$(function() { 717 function ftHighlight(t) { 718 t && ((t = $(t)).addClass("added"), setTimeout(function () { 719 t.removeClass("added") 720 }, 1e3)) 721 } 722 function pSetList(t, e, a, i, o) { 723 var t = $(t), 724 s = $.cookie("shop_" + e), 725 l = t.data("product"); 726 "remove" == a ? (s = s ? s.split(",") : [], -1 != (a = $.inArray(l + "", s)) && s.splice(a, 1), 0 === s.length ? $.removeCookie("shop_" + e, {path: "/"}) : $.cookie("shop_" + e, s.join(","), { 727 expires: 30, 728 path: "/" 729 }), $(".to_" + e + '[data-product="' + l + '"]').removeClass("active"), $("#ft_" + e).find(".count").html(s.length), !0 === i && (a = t.parents(".product-list").find(".product").length, t.closest(".product").fadeOut(300).remove(), 1 == a) && window.location.reload()) : (s = s && null !== s && "" !== s ? l + "," + s : "" + l, $(".to_" + e + '[data-product="' + l + '"]').addClass("active"), $("#ft_" + e).find(".count").html(s.split(",").length), $.cookie("shop_" + e, s, { 730 expires: 30, 731 path: "/" 732 })), o || ftHighlight("#ft_" + e) 733 } 734 735 $(document).on("click", "a.to_favorites", function (el) { 736 el.preventDefault(); 737 var t = "favorites"; 738 var f_count = $('#ft_favorites').find('.count'); 739 740 if (!$(f_count).hasClass('opacity-1')) { 741 f_count.addClass('opacity-1'); 742 } 743 744 return $(this).hasClass("active") ? $(".products_list_favorites").length ? pSetList(this, t, "remove", !0) : pSetList(this, t, "remove") : pSetList(this, t, "add"), !1 745 }) 746 $(document).on("click", ".a.to_favorites.active", function (el) { 747 el.preventDefault(); 748 pSetList(this, "favorites", "remove", !0) 749 }) 750 751 $(document).on("click", ".btn_clear_list", function () { 752 $.removeCookie("shop_favorites", {path: "/"}), window.location.reload() 753 }) 754});
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.