PageSourceSearch

https://royal-comfort.ru/t/v424/images/site_addons.js

js royal-comfort.ru collected 2026-10-07 21:29:04 UTC 3,999 bytes, 154 lines download raw bytes

1$(function(){
2   $('.button-29').on('click', function(){
3	    $('.sample-popup').bPopup({
4	    	follow: [true, true],
5	        modalClose: true,
6	        zIndex: 150,
7	        opacity: 0.8,
8	        closeClass: 'sample-close',
9	        positionStyle: 'absolute'
10	    });
11	    return false
12	 });
13	 
14	 $('.zayavka, .widget-10, .popupbut, a[href="/popupbut"]').on('click', function(){
15		 $('.sample-popup2').bPopup({
16		    	follow: [true, true],
17		        modalClose: true,
18		        zIndex: 150,
19		        opacity: 0.8,
20		        closeClass: 'sample-close2',
21		        positionStyle: 'absolute'
22		    });
23		   return false
24	 });
25	 
26	 $('.oldprc span').hover(
27		function(){
28		  $(this).parent('.oldprc').find('.prod-price-note').css({'opacity':'1', 'visibility':'visible'})
29		},
30		function(){
31		  $(this).parent('.oldprc').find('.prod-price-note').css({'opacity':'0', 'visibility':'hidden'})
32		});
33		
34	var $menu = $('.block-29'),
35		menuHeight = $menu.height(),
36		$menuEmpty = $('.menu-empty'),
37		menuPos = $menu.offset().top;
38
39	$menuEmpty.height(menuHeight);
40		
41	$(window).scroll(function(){
42		if ( $(this).scrollTop() > menuPos ) {
43			$menu.addClass('fixx');
44		} else {
45			$menu.removeClass('fixx');
46		}
47	});
48});
49$(function() {
50	function coords(str) {
51		return str.split(',');
52	}
53
54	function init(options) {
55		var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
56		options.center = coords(options.center);
57
58		$.each(options.data, function(key, item) {
59			item.coords = coords(item.coords);
60		});
61
62		if (options.type == "google") {
63
64			google.maps.event.addDomListener(window, 'load', function() {
65
66				var map = new google.maps.Map(document.getElementById(options.id), {
67					zoom: parseInt(options.zoom),
68					scrollwheel: false,
69					mapTypeId: options.mapTypeId ? options.mapTypeId : "roadmap",
70					center: new google.maps.LatLng(options.center[0], options.center[1])
71				});
72
73				$.each(options.data, function(key, item) {
74
75					var marker = new google.maps.Marker({
76						position: new google.maps.LatLng(item.coords[0], item.coords[1]),
77						map: map,
78						title: item.name
79					});
80
81					var infowindow = new google.maps.InfoWindow({
82						content: '<div class="baloon-content">' +
83							'<h3 style="margin: 0; padding-bottom: 3px;">' + item.name + '</h3>' +
84							item.desc +
85							'</div>'
86					});
87
88					google.maps.event.addListener(marker, 'click', function() {
89						infowindow.open(map, marker);
90					});
91
92				});
93			});
94
95		} else {
96
97			setTimeout(function(){
98
99			ymaps.ready(function() {
100
101				var map = new ymaps.Map(options.id, {
102					center: options.center,
103					zoom: options.zoom,
104					behaviors: ['drag', 'rightMouseButtonMagnifier'],
105				});
106
107				map.controls.add(
108					new ymaps.control.ZoomControl()
109				);
110
111				$('.show-map').on('click touchend', function(event) {
112					map.container.fitToViewport();
113				});
114
115				$(window).resize(function() {
116					map.container.fitToViewport();
117
118					$('#' + options.id).parent().find('.close-map').on('click', function(event) {
119						map.container.fitToViewport();
120					});
121
122					$('#' + options.id).parent().find('.close-map2').on('click', function(event) {
123						map.container.fitToViewport();
124					});
125				});
126
127				var MyBalloonContentLayoutClass = ymaps.templateLayoutFactory.createClass(
128					'<div class="baloon-content" style="padding: 0 10px;">' +
129					'<h3 style="margin: 0;">$[properties.name]</h3>' +
130					'<p>$[properties.desc]</p>' +
131					'</div>'
132				);
133
134				var myCollection = new ymaps.GeoObjectCollection();
135
136				$.each(options.data, function(key, item) {
137					myCollection.add(new ymaps.Placemark(
138						item.coords,
139						item, {
140							balloonContentLayout: MyBalloonContentLayoutClass
141						}
142					));
143				});
144
145				map.geoObjects.add(myCollection);
146
147			});
148			
149			}, 4000);
150		}
151	}
152
153	window.mjsMap = init;
154});

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.