PageSourceSearch

https://magnaflux-russia.com/js/func.js

js magnaflux-russia.com collected 2026-10-08 13:28:27 UTC 3,886 bytes, 124 lines download raw bytes

1$(document).ready(function() {
2	$(".lh_menu").ussIsVisible(null, null, "parent");
3	inputHelper(".subscribe_form .emailfield input", "Ââåäèòå ñâîé e-mail");
4	$.fn.lh_menu = function() {
5		this.addClass("menu_w");
6		return this.each(function() {
7			var _this = $(this);
8			var wParent = 100;
9			var wcount = _this.find(">li").length;
10			_this.find(">li").each(function() {
11				$(this).width(Math.floor(wParent / wcount) + "%");
12			});
13		});
14	};
15	//ðàñêîììåíòèòü, åñëè íàäî ÷òîáû â ãîðèçîíòàëüíîì ìåíþ âñå ïóíêòû áûëè îäíîé øèðèíû
16	//$('.lh_menu > ul').lh_menu();
17	$("a.add_to_cart").wrapInner('<span class="cart_ico"></span>');
18	// $(".lf_rasp").css("padding-bottom", $(".lf_hold").height());
19	// $(".lf_hold").css("margin-top", -1 * $(".lf_hold").height());
20	// Ìîáèëüíîå ìåíþ
21	$(".lh_mobile_menu").click(function(event) {
22		if ($(".l-header .lh_menu > ul").is(":visible")) {
23			$(".l-header .lh_menu > ul").slideUp();
24		} else {
25			$(".l-header .lh_menu > ul").slideDown();
26		}
27	});
28	$(".side_menu .h3").click(function(event) {
29		if ($(window).width() > 980) return false;
30		if ($(".side_menu > ul").is(":visible")) {
31			$(".side_menu > ul").slideUp();
32		} else {
33			$(".side_menu > ul").slideDown();
34		}
35		$(window).resize(function(e) {
36			if ($(window).width() > 768) {
37				$(".side_menu > ul").show();
38			}
39		});
40	});
41	$("body").click(function(event) {
42		if ($(".lh_mobile_menu").is(":visible") && $(".l-header .lh_menu > ul").is(":visible")) {
43			if ($(event.target).closest(".lh_menu").length == 0 && !$(event.target).hasClass(".lh_mobile_menu")) {
44				$(".l-header .lh_menu > ul").slideUp();
45			}
46		}
47	});
48	// --------------------------------------------------
49	mobileBlocksMove();
50	$(window).resize(function(event) {
51		mobileBlocksMove();
52	});
53	/*$(".slider .slides")
54		.sliderHeight()
55		.slick({
56			slidesToShow: 1,
57			slidesToScroll: 1,
58			arrows: true,
59			dots: true,
60			touchMove: false,
61			autoplay: true,
62			autoplaySpeed: 4500,
63			infinite: true,
64			fade: true,
65			appendDots: $(".slider-navigation"),
66			appendArrows: $(".slider-navigation"),
67		});*/
68
69		$('.uss_shop_form').find('.buttons').insertAfter('.uss_shop_form .group__3');
70});
71
72function inputHelper(element, value) {
73	if (!$(element).val()) {
74		$(this).val(value);
75	}
76	$(element).val(value);
77	//$(element).css('color', '#B1B6BE');
78	$(element).blur(function() {
79		if (!$(this).val()) {
80			$(this).val(value);
81			//$(this).css('color', '#B1B6BE');
82		}
83	});
84	$(element).focus(function() {
85		if ($(this).val() == value) {
86			$(this).val("");
87		}
88		//$(this).css('color', '#000');
89	});
90}
91// Ìîáèëüíûå áëîêè
92function mobileBlocksMove() {
93	if ($(window).width() <= 768) {
94		$(".l-header .l-header-holder > .lh_menu").insertBefore($(".lh_search"));
95		$(".lh_l .lh_basket").insertBefore($(".lh_search"));
96		$(".header_layout11 .lh_slogan_text").insertBefore($(".lh_contact"));
97		$(".header_layout2 .lh_contact").insertBefore($(".lh_slogan_text"));
98		if (
99			!$(".l-header .lh_basket,.l-header .lh_search")
100				.parent("*")
101				.hasClass("cart-search")
102		) {
103			$(".l-header .lh_basket,.l-header .lh_search").wrapAll('<div class="cart-search"></div>');
104		}
105		$('.lh_r .lh_contact').appendTo('.lh_l');
106	} else {
107		if (
108			$(".lh_search")
109				.parent("*")
110				.hasClass("cart-search")
111		) {
112			$(".lh_search").unwrap();
113		}
114		$(".l-header .lh_menu").insertAfter($(".lh_wrap"));
115		$(".header_layout2 .lh_basket").insertBefore($(".lh_l"));
116		$(".header_layout3 .lh_basket").insertBefore($(".lh_r"));
117		$(".header_layout4 .lh_basket").insertAfter($(".lh_slogan_text"));
118		$(".header_layout6 .lh_basket, .header_layout7 .lh_basket, .header_layout8 .lh_basket, .header_layout10 .lh_basket, .header_layout12 .lh_basket").insertAfter($(".lh_contact"));
119		$(".header_layout11 .lh_slogan_text").appendTo($(".lh_m"));
120		$(".header_layout2 .lh_contact").insertAfter($(".lh_search"));
121
122		$('.lh_l .lh_contact').prependTo('.lh_r');
123	}
124}

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.