PageSourceSearch

https://hotlider.ru/bitrix/templates/elektro_flat/script.js

js hotlider.ru collected 2026-09-26 05:40:32 UTC 2,829 bytes, 104 lines download raw bytes

1function adjustItemHeight(item) {
2	var maxHeight = 0;
3	item.css("height", "auto");
4	item.each(function() {
5		if($(this).height() > maxHeight) {
6			maxHeight = $(this).height();
7		}
8	});
9	item.height(maxHeight);
10}
11
12$(function(){
13	$(".close").live("click", function() {
14		CloseModalWindow("#addItemInCart")
15	});
16	$(document).keyup(function(event){
17		if(event.keyCode == 27) {
18			CloseModalWindow("#addItemInCart")
19		}
20	});
21});
22
23function CentriredModalWindow(ModalName){
24	$(window).resize(function () {
25		modalHeight = ($(window).height() - $(ModalName).height()) / 2;
26		$(ModalName).css({
27			'top': modalHeight + 'px'
28		});
29	});
30	$(window).resize();
31}
32
33function OpenModalWindow(ModalName){
34	$(ModalName).fadeIn(300);	
35	$("#bgmod").fadeIn(300);
36}
37
38function CloseModalWindow(ModalName){
39	$("#bgmod").fadeOut(300);
40	$(ModalName).fadeOut(300);	
41}
42
43function refreshCartLine(result, disabled) {
44	disabled = disabled || false;	
45
46	var basketCont, sumOld, sumCurr;
47	
48	basketCont = $(".cart_line");
49	
50	basketCont.find(".qnt").text($(result).find(".qnt").text());
51	
52	basketCont.find(".sum").data("decimal", $(result).find(".sum").data("decimal"));
53	
54	sumOld = basketCont.find(".sum").data("sum");						
55	basketCont.find(".sum").data("sum", $(result).find(".sum").data("sum"));
56	sumCurr = basketCont.find(".sum").data("sum");
57	
58	if(sumCurr != sumOld) {
59		var options = {
60			useEasing: false,
61			useGrouping: true,
62			separator: basketCont.find(".sum").data("separator"),
63			decimal: basketCont.find(".sum").data("dec-point")
64		}
65		var counter = new countUp("cartCounter", sumOld, sumCurr, basketCont.find(".sum").data("decimal"), 0.5, options);
66		counter.start();
67	}
68	
69	if(disabled != true)
70		basketCont.find(".oformit_cont").html($(result).find(".oformit_cont").html());	
71}
72
73function addToCompare(href, btn, site_dir) {
74	$.ajax({
75		type: "POST",
76		url: href,
77		success: function(html){			
78			$.post(site_dir + "ajax/compare_line.php", function(data) {
79				$(".compare_line").replaceWith(data);
80			});
81			$("#" + btn).removeClass("catalog-item-compare").addClass("catalog-item-compared").removeAttr("onclick").css({"cursor": "default"});
82		}
83	});
84	return false;
85}
86
87function addToDelay(id, qnt_cont, props, select_props, btn, site_dir, dsbl) {
88	dsbl = dsbl || false;
89	$.ajax({
90		type: "POST",
91		url: site_dir + "ajax/add2delay.php",
92		data: "id=" + id + "&qnt=" + $("#" + qnt_cont).val() + "&props=" + props + "&select_props=" +select_props,
93		success: function(html){
94			$.post(site_dir + "ajax/delay_line.php", function(data) {
95				$(".delay_line").replaceWith(data);
96			});
97			$.post(site_dir + "ajax/basket_line.php", function(data) {
98				refreshCartLine(data, dsbl);				
99			});			
100			$("#" + btn).removeClass("catalog-item-delay").addClass("catalog-item-delayed").removeAttr("onclick").css({"cursor": "default"});
101		}
102	});
103	return false;
104}

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.