PageSourceSearch

https://www.salonfurnishing.ca/staging/wp-content/plugins/wpbingo/assets/js/filter.js

js salonfurnishing.ca collected 2026-10-04 02:57:55 UTC 24,749 bytes, 624 lines download raw bytes

1(function($) {
2	$.fn.binFilterProduct = function(opts) {
3		/* default configuration */	
4		var config = $.extend({}, {
5			widget_id : null,
6			id_category:null,
7			base_url: null,
8			attribute:null,
9			showcount:null,
10			show_price:null,
11			relation:null,
12			show_only_sale:null,
13			show_in_stock:null,
14			layout_shop:null,
15			show_brand:null,
16			array_value_url : null,
17			canbeloaded : true,
18		}, opts);
19		$(document).ready(function(){
20			_event_dropdown_filter();
21			_event_filter_product();
22			_event_click_pagination();
23			if( $( "nav.woocommerce-pagination").hasClass("shop-loadmore") ){
24				_event_click_load_more();
25			}			
26			if( $( "nav.woocommerce-pagination").hasClass("shop-infinity") ){
27				_event_load_infinity();
28			}
29			_eventFilter(1,false);
30			_event_clear_all();
31			_event_click_categories();
32			_event_click_sub_categories();
33			$("li",".woocommerce-sort-count").click(function() {
34				$("li",".woocommerce-sort-count").removeClass("active");
35				$(this).addClass("active");
36				_eventFilter();
37				return false;
38			});		
39
40			$("li",".woocommerce-ordering").click(function() {
41				_eventFilter();
42				return false;
43			});			
44
45			var view_products = $(".display",".bwp-top-bar");
46			$("a",view_products).click(function(e) {
47				e.preventDefault();
48				if(!$(this).hasClass("active")){
49					$("a",view_products).removeClass('active');
50					var this_class	= $("ul.products").data("col");
51					$(this).addClass('active');								
52					_eventFilter();
53				}
54				return false;
55			});
56
57			$(".back-to-shop").click(function() {
58				var $text = $(this).text();
59				$(".text-title-heading").text($text);
60				$("li",".woocommerce-product-subcategories").removeClass("active");
61				$(".item-category",".filter_category_product").removeClass("active");
62				$("input",config.widget_id).attr('checked', false);
63				$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
64				$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
65				_eventFilter(1,true,true,true);
66				return false;
67			});			
68			
69		});		
70		
71		function _event_click_sub_categories(){
72			var $subcategories = $(".woocommerce-product-subcategories");
73			$("li",$subcategories).click(function() {
74				$("li",$subcategories).removeClass("active");
75				$(this).addClass("active");
76				config.id_category = $(this).data("id_category");
77				var $text = $(".woocommerce-loop-category__title a",$(this)).text();
78				$(".text-title-heading").text($text);
79				if( $(".filter_category_product").length > 0){
80					$(".item-category",".filter_category_product").removeClass("active");
81					$(".item-category[data-id_category="+$(this).data("id_category")+"]",".filter_category_product").addClass('active');
82				}		
83				$("input",config.widget_id).attr('checked', false);
84				$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
85				$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
86				_eventFilter(1,true,true);
87				return false;
88			});
89		}
90		
91		function _event_click_categories(){
92			var $subcategories = $(".filter_category_product");
93			$(".item-category",$subcategories).click(function() {
94				$(".item-category",$subcategories).removeClass("active");
95				$(this).addClass("active");
96				var $id_category = $(this).data("id_category");
97				var $text = $("label",$(this)).text();
98				$(".text-title-heading").text($text);
99				if( $(".woocommerce-product-subcategories").length > 0){
100					$("li",".woocommerce-product-subcategories").removeClass("active");
101					$("li[data-id_category="+$id_category+"]",".woocommerce-product-subcategories").addClass('active');
102				}
103				config.id_category = $id_category;
104				$("input",config.widget_id).attr('checked', false);
105				$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
106				$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
107				_eventFilter(1,true,true);
108				return false;
109			});
110		}		
111		
112		function _event_dropdown_filter(){
113			var $form_filter = $("#bwp_form_filter_product",".filter_dropdown");
114			var $form_filter2 = $("#bwp_form_filter_product",".filter_popup");
115			$("h3",$form_filter).click(function() {
116				if($(this).parent().hasClass("active")){
117					$(this).parent().removeClass("active");
118				}else{
119					$(this).parent().addClass("active");
120				}
121			});
122			$("h3",$form_filter2).click(function() {
123				if($(this).parent().hasClass("active")){
124					$(this).parent().removeClass("active");
125				}else{
126					$(this).parent().addClass("active");
127				}
128			});	
129		}
130		
131		function _event_clear_all(){
132			$(".filter_clear_all",".woocommerce-filter-title").click(function(e) {
133					$("input",config.widget_id).attr('checked', false);
134					$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
135					$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
136					_eventFilter();
137			});
138		}
139		
140		function _event_click_pagination(){
141			$( "nav.woocommerce-pagination a.page-numbers").click(function(e) {
142					e.preventDefault();
143					$('ul.products','.main-archive-product').scrollTop(300);
144					var status_id = $(this).attr('href').split('=');
145					var paged = (status_id[1]) ? status_id[1] : 1;
146					_eventFilter(paged);
147				return false;
148			});		
149		}
150		
151		function _event_click_load_more(){
152			$( "nav.woocommerce-pagination .woocommerce-load-more").click(function(e) {
153				$(this).addClass("active");
154				e.preventDefault();
155				var paged = $(this).data('paged') + 1;
156				_eventFilter(paged,false,false,false,true);
157				return false;
158			});		
159		}
160		
161		function _event_load_infinity(){
162			$(window).scroll(function(){
163				if ( $(document).scrollTop() > ( $(document).height() - 2000 ) && config.canbeloaded == true && $(".woocommerce-load-more").length > 0 ){
164					$( "nav.woocommerce-pagination").addClass("active");
165					var paged = $(".woocommerce-load-more").data('paged') + 1;
166					_eventFilter(paged,false,false,false,true);
167					return false;
168				}
169			});
170		}
171		
172		function _event_filter_product(){
173			min_price = $("#price-filter-min-text",config.widget_id).val();
174			max_price =  $("#price-filter-max-text",config.widget_id).val();
175			$("#bwp_slider_price").slider({
176			range:true,
177			min: $("#bwp_slider_price",config.widget_id).data('min'),
178			max: $("#bwp_slider_price",config.widget_id).data('max'),		
179			values: [min_price,max_price],
180			slide : function( event, ui ) {
181					$("#text-price-filter-min-text",config.widget_id).html(ui.values[0]);
182					$("#text-price-filter-max-text",config.widget_id).html(ui.values[1]);			
183					$("#price-filter-min-text",config.widget_id).val(ui.values[0]);
184					$("#price-filter-max-text",config.widget_id).val(ui.values[1]);		
185				},
186			change: function( event, ui ) {
187					_eventFilter();	
188					return false;	
189				}		   			
190			});	
191
192			$( "#button-price-slider",config.widget_id ).click(function(e) {
193				e.preventDefault();
194				_eventFilter();
195				return false;
196			});	
197			
198			$("input:checkbox",config.widget_id ).on('click', function(){
199				_eventFilter();	
200				return false;
201			});			
202			
203			$("li",config.widget_id ).on('click', function(){
204				if($("input",$(this)).is(':checked'))
205					$("input",$(this)).attr("checked", false);
206				else
207					$("input",$(this)).attr("checked", true);	
208				_eventFilter();	
209				return false;
210			});
211			
212			$("span",".woocommerce-filter-title" ).on('click', function(){
213				if( $(this).hasClass("text-price") ){
214					$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
215					$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
216				}else{
217					var $name = $(this).data("name");
218					var $value = $(this).data("value");
219					$("input[value="+$value+"]","#"+$name+"").attr("checked", false);
220				}
221				_eventFilter();
222				return false;
223			});			
224		}	
225		
226		function _eventFilter(paged=1,load=true,direction=false,back=false,loadmore=false){
227				if(load){
228					$('html, body').animate({
229						scrollTop: 300
230					}, 300);		
231					$('.content-products-list','.main-archive-product').addClass('active');
232					$('.content-products-list','.main-archive-product').append( '<div class="loading loading-filter"></div>' );	
233				}
234				var $filter = new Object();
235				var $ajax_url = filter_ajax.ajaxurl;
236				var $id_category		= config.id_category;
237				if($('li.active','.woocommerce-product-subcategories').length > 0){
238					var $id_category	= $('.woocommerce-product-subcategories').find('li.active').data("id_category");
239				}
240				if($('.item-category.active','.filter_category_product').length > 0){
241					var $id_category	= $('.filter_category_product').find('.item-category.active').data("id_category");
242				}
243				if(back){
244					$id_category = config.id_category = 0;
245				}
246				$filter.orderby 		=	$('.woocommerce-ordering').find('li.active').data("value");
247				$filter.product_count 	=	$('.woocommerce-sort-count').find('li.active').data("value");	
248				$filter.views			= ($('.view-grid.active').length > 0) ?  'grid' : 'list';	
249				$filter.data 			= 	$("#bwp_form_filter_product",config.widget_id).serializeArray();
250				$filter.default_min_price 	= $("#bwp_slider_price",config.widget_id).data("min");
251				$filter.default_max_price 	= $("#bwp_slider_price",config.widget_id).data("max");	
252				$filter.min_price 			= $("#price-filter-min-text",config.widget_id).val();	
253				$filter.max_price 			= $("#price-filter-max-text",config.widget_id).val();
254				$filter.paged				= paged;
255				$filter.loadmore			= loadmore ? 1 : 0;
256				$filter.shop_paging			= $('.woocommerce-pagination').data("shop_paging") ? $('.woocommerce-pagination').data("shop_paging") : 'shop-pagination';
257				jQuery.ajax({
258					type: "POST", 
259					url: $ajax_url,
260					dataType: 'json',
261					data: {
262						filter 			: $filter,
263						action 			: "bwp_filter_products_callback",
264						id_category 	: $id_category,
265						base_url 		: config.base_url,
266						attribute 		: config.attribute,
267						relation 		: config.relation,
268						show_price 		: config.show_price,
269						showcount 		: config.showcount,
270						show_only_sale 	: config.show_only_sale,
271						show_in_stock 	: config.show_in_stock,
272						show_brand 		: config.show_brand,
273						layout_shop 	: config.layout_shop,
274						show_category 	: config.show_category,
275						array_value_url : config.array_value_url
276					},
277					beforeSend: function( xhr ){
278						config.canbeloaded = false;
279					},					
280					success: function (result) {
281						config.canbeloaded = true;
282						if (result.products){
283							if(loadmore){
284								$('.content-products-list .products-list','.main-archive-product').append(result.products);
285							}else{
286								$('.content-products-list','.main-archive-product').html(result.products);
287							}
288							_event_click_quickview_button($ajax_url);
289							_wpbingo_countdown_product( $('ul.products','.main-archive-product') );
290							_wpbingo_click_atribute_image();
291							_wpbingo_click_add_to_cart();
292						}else{
293							$('.content-products-list','.main-archive-product').html('');
294						}
295						
296						if($id_category > 0){
297							$(".back-to-shop").addClass("active");
298						}else{
299							$(".back-to-shop").removeClass("active");
300						}
301						
302						if(direction){
303							if ($(".page-title").data("bg_default")){
304								if(result.result_background){
305									$(".page-title").css("background-image", "url(" + result.result_background + ")");
306								}else{
307									$(".page-title").css("background-image", "url(" + $(".page-title").data("bg_default") + ")");
308								}
309							}
310						}
311						if($('.bestseller-product','.content-products-list').length > 0 ){
312							_event_load_slick_carousel( $('.bestseller-product .slick-carousel','.content-products-list') );
313							_event_check_nav_slick( $('.bestseller-product .slick-carousel','.content-products-list') );
314							_wpbingo_countdown_product( $('.bestseller-product','.content-products-list') );
315						}
316						_event_after_sucsess_ajax(result,config);
317						if(load){
318							setTimeout(function() {
319								$('.content-products-list','.main-archive-product').removeClass('active');
320								$( '.loading','.main-archive-product' ).remove();
321							}, 400);
322						}
323					},
324					error:function(jqXHR, textStatus, errorThrown) {
325						console.log("error " + textStatus);
326						console.log("incoming Text " + jqXHR.responseText);
327					}
328				});
329			return false;	
330		}
331		
332		function _event_click_quickview_button($ajax_url){
333			$('.quickview-button').on( "click", function(e) {
334				e.preventDefault();
335				var product_id  = $(this).data('product_id');
336				$(".quickview-"+product_id).addClass("loading");
337				$.ajax({
338					url: $ajax_url,
339					data: {
340						"action" : "funio_quickviewproduct",
341						'product_id' : product_id
342					},
343					success: function(results) {
344						$('.bwp-quick-view').empty().html(results).addClass("active");
345						$(".quickview-"+product_id).removeClass("loading");				
346						$("#quickview-slick-carousel .slick-carousel").each(function(){
347							_event_load_slick_carousel($(this));
348							_event_check_nav_slick($(this));
349						});
350						if( typeof jQuery.fn.tawcvs_variation_swatches_form != 'undefined' ) {
351							$( '.variations_form' ).wc_variation_form();
352							$( '.variations_form' ).tawcvs_variation_swatches_form();
353						}else{
354							var form_variation = $(".bwp-quick-view").find('.variations_form');
355							var form_variation_select = $(".bwp-quick-view").find('.variations_form .variations select');
356							form_variation.wc_variation_form();
357							form_variation_select.change();
358						}
359						if( $(".product-countdown",".bwp-quick-view").length > 0 ){
360							_event_countdown_quickview( $(".product-countdown",".bwp-quick-view") );
361						}
362						_event_close_quickview();
363					},
364					error: function(errorThrown) { console.log(errorThrown); },
365				});
366			});
367		}
368			
369		function _event_check_nav_slick($element){
370			if($(".slick-arrow",$element).length > 0){
371				var $prev = $(".fa-angle-left",$element).clone();
372				$(".fa-angle-left",$element).remove();
373				if($element.parent().find(".fa-angle-left").length == 0){
374					$prev.prependTo($element.parent());
375				}
376				$prev.on( "click", function() {
377					$element.slick('slickPrev');
378				});
379				var $next =  $(".fa-angle-right",$element).clone();
380				$(".fa-angle-right",$element).remove();
381				if($element.parent().find(".fa-angle-right").length == 0){
382					$next.appendTo($element.parent());
383				}
384				$next.on( "click", function() {
385					$element.slick('slickNext');
386				});
387			}	
388		}
389		function _event_countdown_quickview($element){
390			$this = $element;
391			$id = $(this).data("id");			
392			$current_time 	= new Date().getTime();
393			$sttime 	= $(this).data('sttime');
394			$countdown_time = $this.data('cdtime');
395			$day = $this.data('day') ? $this.data('day') : "D";
396			$hour = $this.data('hour') ? $this.data('hour') : "H";
397			$min = $this.data('min') ? $this.data('min') : "M";
398			$sec = $this.data('sec') ? $this.data('sec') : "S";			
399			var $austDay 	= new Date();
400			$austDay 		= new Date( $countdown_time * 1000 );	
401			if( $sttime > $current_time  ){
402				$this.remove();
403				return ;
404			}
405			if( $countdown_time.length > 0 && $current_time > $countdown_time ){
406				$this.remove();
407				return ;
408			}
409			if( $countdown_time.length <= 0 ){
410				$this.remove();
411				return ;
412			}
413			$this.countdown($austDay, function(event) {
414				$(this).html(
415					event.strftime('<span class="countdown-content"><span class="days"><span class="countdown-amount">%D</span><span class="countdown-text">'+$day+'</span></span><span class="countdown-section hours"><span class="countdown-amount">%H</span><span class="countdown-text">'+$hour+'</span></span><span class="countdown-section mins"><span class="countdown-amount">%M</span><span class="countdown-text">'+$min+'</span></span><span class="countdown-section secs"><span class="countdown-amount">%S</span><span class="countdown-text">'+$sec+'</span></span></span>')
416				);
417			}).on('finish.countdown', function(event){
418				$this.remove();
419				$id = $this.data( 'id' );
420				$target = this;
421				$this.hide('slow', function(){ $(this).remove(); });	
422				$price = $this.data( 'price' );
423				$('#' + $id + ' .item-price > span').hide('slow', function(){ $('#' + $id + ' .item-price > span').remove(); });					
424				$('#' + $id + ' .item-price' ).append( '<span><span class="amount">' + $price + '</span></span>' );
425			});	
426		}		
427		function _event_close_quickview(){
428			$('.quickview-close').on( "click", function(e) {
429				e.preventDefault();
430				$('.bwp-quick-view').empty().removeClass("active");
431			});		
432		}
433		function _wpbingo_click_atribute_image(){
434			$(".image-attribute",".product-attribute").on( "click", function() {
435				if(!$(this).hasClass("active")){
436					$(".image-attribute",".product-attribute").removeClass("active");
437					$(this).addClass("active");
438					var $parent = $(this).closest(".products-entry");
439					var $thumb = $(".product-thumb-hover", $parent);
440					var $image = $(this).data("image");
441					$("img",$thumb).last().attr("src", $image);	
442				}
443			});
444		}
445		function _wpbingo_click_add_to_cart(){
446			$(".cart-remove").on( "click", function() {
447				if( $(".funio-topcart.popup").hasClass("active") ){
448					$(".funio-topcart.popup").removeClass("active");
449				}
450				if( $("body").hasClass("not-scroll") ){
451					$("body").removeClass("not-scroll");
452				}
453			});
454			$(".cart-icon").on( "click", function() {
455				if( !$("body").hasClass("not-scroll") && $(".funio-topcart").hasClass("popup") ){
456					$("body").addClass("not-scroll");
457				}
458			});
459			$(".remove-cart-shadow").on( "click", function() {
460				if( $(".funio-topcart.popup").hasClass("active") ){
461					$(".funio-topcart.popup").removeClass("active");
462				}
463				if( $("body").hasClass("not-scroll") ){
464					$("body").removeClass("not-scroll");
465				}
466			});
467		}		
468		function _event_load_slick_carousel($element){
469			$element.slick({
470				arrows: $element.data("nav") ? true : false ,
471				dots: $element.data("dots") ? true : false ,
472				prevArrow: '<i class="slick-arrow fa fa-angle-left"></i>',
473				nextArrow: '<i class="slick-arrow fa fa-angle-right"></i>',
474				draggable : $element.data("draggable") ? false : true ,
475				slidesToShow: $element.data("columns"),
476				asNavFor: $element.data("asnavfor") ? $element.data("asnavfor") : false ,
477				vertical: $element.data("vertical") ? true : false ,
478				verticalSwiping: $element.data("verticalswiping") ? $element.data("verticalswiping") : false ,
479				rtl: ($("body").hasClass("rtl") && !$element.data("vertical")) ? true : false ,
480				centerMode: $element.data("centermode") ? $element.data("centermode") : false ,
481				focusOnSelect: $element.data("focusonselect") ? $element.data("focusonselect") : false ,
482				responsive: [	
483					{
484					  breakpoint: 1200,
485					  settings: {
486						slidesToShow: $element.data("columns1"),
487					  }
488					},				
489					{
490					  breakpoint: 1024,
491					  settings: {
492						slidesToShow: $element.data("columns2"),
493					  }
494					},
495					{
496					  breakpoint: 768,
497					  settings: {
498						slidesToShow: $element.data("columns3"),
499						vertical: false,
500						verticalSwiping : false,
501					  }
502					},
503					{
504					  breakpoint: 480,
505					  vertical: false,
506					  verticalSwiping : false,				  
507					  settings: {
508						slidesToShow: $element.data("columns4"),
509						vertical: false,
510						verticalSwiping : false,					
511					  }
512					}
513				]								
514			});	
515		}		
516		
517		function _event_after_sucsess_ajax(result,config){
518			if (result.pagination) 
519				$('nav.woocommerce-pagination').replaceWith(result.pagination);
520			else
521				$('nav.woocommerce-pagination').html('');
522			if (result.result_count) 
523				$('.woocommerce-result-count').replaceWith(result.result_count);
524			else
525				$('.woocommerce-result-count').html('');
526			if (result.total_html) 
527				$('.woocommerce-found-posts').replaceWith(result.total_html);
528			else
529				$('.woocommerce-found-posts').html('');
530			if (result.result_breadcrumb){
531				$('.breadcrumb').html(result.result_breadcrumb);
532			}
533			$('.woocommerce-filter-title').html(result.result_title);
534			$('.bwp-filter-ajax',config.widget_id).replaceWith(result.left_nav);
535			if(($("#price-filter-min-text",config.widget_id).val() != $("#bwp_slider_price",config.widget_id).data("min")) || ($("#price-filter-max-text",config.widget_id).val() != $("#bwp_slider_price",config.widget_id).data("max")))
536				check_price = true;
537			else
538				check_price = false;
539			_event_click_categories();
540			_event_dropdown_filter();
541			_event_filter_product();
542			_addClassProductList();
543			_event_clear_all();
544			_event_click_pagination();
545			if( $( "nav.woocommerce-pagination").hasClass("shop-loadmore") ){
546				_event_click_load_more();
547			}
548			if( $( "nav.woocommerce-pagination").hasClass("shop-infinity") ){
549				_event_load_infinity();
550			}
551			_event_ajax_add_to_cart();
552			if (result.base_url != '') 
553				history.pushState({}, "", result.base_url.replace(/&amp;/g, '&').replace(/%2C/g, ','));
554		}
555		
556		function _event_ajax_add_to_cart(){
557			$( "a.ajax_add_to_cart" ).on( "click", function() {
558				setTimeout(function() {	
559					if(!$(".top-cart",".wpbingoCartTop").hasClass("open"))
560						$(".top-cart",".wpbingoCartTop").addClass("open");
561				}, 2000);
562			});
563		}	
564
565		function _addClassProductList(){
566			var class_product_default = $("ul.products-list").data("col") ? $("ul.products-list").data("col") : "";
567			var class_product_item = $('.view-grid.active').data('col') ? $('.view-grid.active').data('col') : class_product_default;
568			if(class_product_item){
569				var list_class 	= "col-lg-12 col-md-12 col-xs-12";	
570				if($('.view-grid').hasClass('active')){
571					$("ul.products-list").removeClass('list').addClass('grid');
572					$("ul.products-list li").removeClass(list_class).addClass(class_product_item);
573				}	
574				if($('.view-list').hasClass('active')){
575					$("ul.products-list").removeClass('grid').addClass('list');
576					$("ul.products-list li").removeClass(class_product_item).addClass(list_class);
577				}	
578			}
579		}
580		
581		return false;
582	};
583	
584	function _wpbingo_countdown_product($element){
585		$('.product-countdown',$element).each(function(event){
586			var $this = $(this);
587			var $id = $(this).data("id");		
588			var $current_time 	= new Date().getTime();
589			var $sttime 	= $(this).data('sttime');
590			var $countdown_time = $this.data('cdtime');
591			var $day = $this.data('day') ? $this.data('day') : "D";
592			var $hour = $this.data('hour') ? $this.data('hour') : "H";
593			var $min = $this.data('min') ? $this.data('min') : "M";
594			var $sec = $this.data('sec') ? $this.data('sec') : "S";			
595			var $austDay 	= new Date();
596			$austDay 		= new Date( $countdown_time * 1000 );	
597			if( $sttime > $current_time  ){
598				$this.remove();
599				return ;
600			}
601			if( $countdown_time.length > 0 && $current_time > $countdown_time ){
602				$this.remove();
603				return ;
604			}
605			if( $countdown_time.length <= 0 ){
606				$this.remove();
607				return ;
608			}
609			$this.countdown($austDay, function(event) {
610				$(this).html(
611					event.strftime('<span class="countdown-content"><span class="days"><span class="countdown-amount">%D</span><span class="countdown-text">'+$day+'</span></span><span class="countdown-section hours"><span class="countdown-amount">%H</span><span class="countdown-text">'+$hour+'</span></span><span class="countdown-section mins"><span class="countdown-amount">%M</span><span class="countdown-text">'+$min+'</span></span><span class="countdown-section secs"><span class="countdown-amount">%S</span><span class="countdown-text">'+$sec+'</span></span></span>')
612				);
613			}).on('finish.countdown', function(event){
614				$this.remove();
615				$id = $this.data( 'id' );
616				$target = this;
617				$this.hide('slow', function(){ $(this).remove(); });	
618				$price = $this.data( 'price' );
619				$('#' + $id + ' .item-price > span').hide('slow', function(){ $('#' + $id + ' .item-price > span').remove(); });			
620				$('#' + $id + ' .item-price' ).append( '<span><span class="amount">' + $price + '</span></span>' );
621			});			
622		});	
623	}	
624})(jQuery);

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.