<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">function parseQuery() {
    var res = {};
    location.search.slice(1).split('&amp;')
        .map(function(str) {
            return str.split('=')
        })
        .forEach(function(couple) {
            res[couple[0]] = couple[1];
        });
    return res;
}

function getMapOptions(query, options) {
    if (query.lng !== undefined &amp;&amp; query.lat !== undefined) {
        options.center = [parseFloat(query.lat), parseFloat(query.lng)];
    }
    if (query.zoom !== undefined) {
        options.zoom = parseInt(query.zoom, 10);
    }
    return options;
}

function hr_auth( provider ){
	
	jQuery('.modal .rotating-border').css( 'display' , 'block' );
	jQuery('.modal .auth_body').fadeOut(50);
	
    var hr_window = window.open('?provider='+provider, 'hr_window', 'width=600,height=500,scrollbars=yes');
    
    var Timers = setInterval(function () {
    	
    	if (hr_window.closed) {
    		clearInterval(Timers);
    		jQuery('.modal .rotating-border').css( 'display' , 'none' );
    		jQuery('.modal .auth_body').fadeIn(50);
    	}
        
    }, 1000);
    
    return false;
}

function are_cookies_enabled(){
    var cookieEnabled = (navigator.cookieEnabled) ? true : false;

    if (typeof navigator.cookieEnabled == "undefined" &amp;&amp; !cookieEnabled) { 
        document.cookie="testcookie";
        cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false;
    }
    return (cookieEnabled);
}

// РџРѕРєР°Р· РѕРєРЅР° Р°РІС‚РѕСЂРёР·Р°С†РёРё
function _show_auth_error(el) {
	if( jQuery('.simplemodal-login').length ) {
		jQuery('.simplemodal-login').click();
	}
}

// РўРµРєСЃС‚ РІ С„РѕСЂРјСѓ РёР· Р°СЏРєСЃ РїРѕРёСЃРєР°
function setText(el, text) {
	if( jQuery('#'+el).length ) {
		jQuery('#'+el).val(text);
	}
	
	return false;
}

//Р“Р°Р»РµСЂРµСЏ РґР»СЏ РїСЂРµРІСЊСЋС€РµРє РѕР±РѕСЂСѓРґРѕРІР°РЅРёСЏ
var mySwiper = undefined;
function initSwiper() {
	if (typeof mySwiper != 'undefined') {
		jQuery('.swiper-container').each(function(){
		  this.swiper.destroy();
		});
    }
	mySwiper = new Swiper ('.devices li .swiper-container, .locations li .swiper-container', {
    	loop: true,
    	mousewheelControl: false,
    	initialSlide: 0,
    	centeredSlides: true,
    	slidesPerView: 'auto',
    	effectw: 'slide',
        pagination: {
          el: '.swiper-pagination',
          clickable: true,
        }
    });
}

// Р’С‹СЃРѕС‚Р° Р±Р»РѕРєРѕРІ
function maxh(colums){
	//colums.height(Math.max(colums.height()));
	
	jQuery(colums).height('auto');
	jQuery(colums).height('auto');
	
	var max_col_height = 0; // РјР°РєСЃРёРјР°Р»СЊРЅР°СЏ РІС‹СЃРѕС‚Р°, РїРµСЂРІРѕРЅР°С‡Р°Р»СЊРЅРѕ 0
	jQuery(colums).each(function(){ // С†РёРєР» "РґР»СЏ РєР°Р¶РґРѕР№ РёР· РєРѕР»РѕРЅРѕРє"
		if (jQuery(this).height() &gt; max_col_height) { // РµСЃР»Рё РІС‹СЃРѕС‚Р° РєРѕР»РѕРЅРєРё Р±РѕР»СЊС€Рµ Р·РЅР°С‡РµРЅРёСЏ РјР°РєСЃРёРјР°Р»СЊРЅРѕР№ РІС‹СЃРѕС‚С‹,
			max_col_height = jQuery(this).height(); // С‚Рѕ РѕРЅР° СЃР°РјР° СЃС‚Р°РЅРѕРІРёС‚СЃСЏ РЅРѕРІРѕР№ РјР°РєСЃРёРјР°Р»СЊРЅРѕР№ РІС‹СЃРѕС‚РѕР№
		}
	});
	jQuery(colums).height(max_col_height);
};

// РЁРёСЂРёРЅР° Р±Р»РѕРєРѕРІ РІ СЃС‚РѕР»Р±С†Рµ
function set_width() {
	
	var elements = [ ".devices" ];
	
	jQuery.each(elements, function( index, element ) {
		
		var el = jQuery(element);
		var li = el.find('li');
		
		//jQuery(li).find('.author .right_author').removeClass('right_author_100');
		
		if (typeof jQuery(li) != 'undefined') {
			jQuery(li).each( function() {
				
				var author = jQuery( this ).find('.author');
				var ava = jQuery( this ).find('.author .ava');
				var fio = jQuery( this ).find('.author .center .fio');
				var more = jQuery( this ).find('.author .center .more');
				
				if ( more.width()==0 ) {
					jQuery( fio ).css( 'max-width' , '100%' );
				} else {
					jQuery( fio ).css( 'max-width' , '75%' );
				}
			});
		}
		
		/*if (jQuery(el).width() &lt;= 767) {
			var column = 'col_1';
		} else if (jQuery(el).width() &gt; 767 &amp;&amp; jQuery(el).width() &lt;= 1200) {
			var column = 'col_2';
		} else if (jQuery(el).width() &gt; 1200 &amp;&amp; jQuery(el).width() &lt;= 1400) {
			var column = 'col_3';
		} else if (jQuery(el).width() &gt; 1400 &amp;&amp; jQuery(el).width() &lt;= 1600) {
			var column = 'col_4';
		} else {
			var column = 'col_5';
		}
		
		jQuery( li ).removeClass('col_1');
		jQuery( li ).removeClass('col_2');
		jQuery( li ).removeClass('col_3');
		jQuery( li ).removeClass('col_4');
		jQuery( li ).removeClass('col_5');
		
		if (typeof jQuery(li) != 'undefined') {
			jQuery(li).each( function() {
				jQuery( this ).addClass(column);
			});
		}*/
		
	});
	
	// Р”Р»СЏ РіР»Р°РІРЅРѕР№ РЅРµР°РІС‚РѕСЂРёР·РѕРІР°РЅРЅРѕР№
	/*if (jQuery(window).width() &lt;= 767) {
		if (jQuery(window).height()&gt;550) {
			jQuery("#header, #header .slider, #header .block").height(jQuery(window).height());
		} else {
			jQuery("#header, #header .slider, #header .block").height('550');
		}
	} else {
		jQuery("#header, #header .slider, #header .block").height('626');
	}
	
	jQuery("#header.transparent, #header.transparent .slider, #header.transparent .block").height('auto');*/
	
    return true;
}

//РњРѕРґР°Р»СЊРЅРѕРµ РѕРєРЅРѕ РёР· РљР°Р»РµРЅРґР°СЂСЏ
function _open_ajax(el) {
//$(".event_list a, .ajax_next, .ajax_prev").on("click",function(e) {
	//e.preventDefault();
	
	jQuery('.modal_ajax_nav').css( 'display' , 'none' );
	
	//var el = $(this);
	var href =     jQuery(el).attr("href");
	
	/*
	var post_id =  $(el).data("post_id");
	var el_prew =  $("#event_"+post_id).prevAll();
	var el_next =  $("#event_"+post_id).nextAll();
	var el_first = $(".event_list .item").first();
	var el_last =  $(".event_list .item").last();
	
	if (typeof el_prew.attr('id') == typeof undefined) {
		var prew_id = el_last.attr('id');
	} else {
		var prew_id = el_prew.attr('id');
	}
	$(".ajax_prev").attr("href", $("#"+prew_id+" a").attr("href"));
	$(".ajax_prev").attr("data-post_id", $("#"+prew_id+" a").data("post_id"));
	
	if (typeof el_next.attr('id') == typeof undefined) {
		var next_id = el_first.attr('id');
	} else {
		var next_id = el_next.attr('id');
	}
	$(".ajax_next").attr("href", $("#"+next_id+" a").attr("href"));
	$(".ajax_next").attr("data-post_id", $("#"+next_id+" a").data("post_id"));
	*/
	
	jQuery('#form_ajax_div .body_all').html("");
	
	//jQuery('.modal').modal('hide');
	jQuery('#form_ajax_div').modal('show');
	
	jQuery('.modal .rotating-border').css( 'display' , 'block' );
	
	jQuery.post(href+"?ajax=1", { events_ajax:"1" }, function(req){
		var respond = JSON.parse(req);
		
		if( respond.success=='true' ){
			
    		jQuery(".ajax_prev").attr("href", respond.prev_url);
    		jQuery(".ajax_next").attr("href", respond.next_url);
		
			jQuery('.modal .rotating-border').css( 'display' , 'none' );
			jQuery('#form_ajax_div .body_all').html(respond.html);
			
			setTimeout(function(){
				var left = jQuery('#form_ajax_div .body_all').offset().left;
				jQuery('.modal_ajax_nav').css( 'left' , left );
				jQuery('.modal_ajax_nav').css( 'display' , 'table' );
	        }, 100); 	
		}
		
    });
	
	return false;
}

//Р’С‹РІРѕРґ РІСЃРїР»С‹РІР°СЋС‰РµР№ РЅРѕС‚РёС„РёРєР°С†РёРё
function bottom_notification( title, message, delay = 3000 ) {
	jQuery('.bottom_notification .title b').html( title );
	jQuery('.bottom_notification .message').html( message );
	
	jQuery('.bottom_notification .notification').addClass('show').delay(delay).queue(function(n) {
		jQuery(this).removeClass('show'); n();
	});
	
	/*var Timers_notification = setInterval(function () {
		clearInterval(Timers_notification);
		jQuery('.bottom_notification').slideUp();
    }, 3000);*/
	
	return false;
}

jQuery(function($) {
    "use strict";
    $.noConflict();
    
    $(document).ready(function() {
    	
    	// РђРєС†РёРё Р»РёСЃС‚РёРЅРі
    	$(".sales_list .sale").each(function (i, el) {
    		let date_end = $(el).attr('data-date_end');
    	    let start = new Date(date_end);
    	    
    	    if (start.getTime() - Date.now() &gt; 0) {
    	    	
    	    	let parent = $(el).closest('.device');
    	    	
    	    	if (!$(parent).find('.image_list').length) {
    	    		$(parent).find('a.image').html( '&lt;div class="sales_timer"&gt;&lt;div class="line"&gt;&lt;/div&gt;&lt;/div&gt;' );
    	    	} else {
    	    		$(parent).find('.image_list .swiper-wrapper').before( '&lt;div class="sales_timer"&gt;&lt;div class="line"&gt;&lt;/div&gt;&lt;/div&gt;' );
    	    	}
    	    	let sales_timer = $(el).closest('.device').find('.sales_timer .line');
    	    	
	    	    let timer = () =&gt; {
					let seconds = start.getTime() - Date.now();
					if (seconds &lt;= 0) {
						$(sales_timer).remove();
						return clearInterval(ii);
					}
					seconds /= 1e3; // РјСЃ -&gt; СЃ
					$(sales_timer).html([
					'РћСЃС‚Р°Р»РѕСЃСЊ ',
					Math.floor(seconds / (24 * 60 * 60))&gt;0 ?(Math.floor(seconds / (24 * 60 * 60)))+'Рґ':'', // days
					(seconds / 3600 % 24 |0)&gt;0 ? (seconds / 3600 % 24 |0)+'С‡':'', // hours
					(seconds / 60 % 60   |0)+'Рј', // minutes
					((seconds / 3600 % 24 |0)==0 &amp;&amp; Math.floor(seconds / (24 * 60 * 60))==0) ? (seconds / 1 % 60    |0)+'СЃ':''  // seconds
					].map(d =&gt; d&lt;10?''+d:d).join(' '));
	    	    };
	
	    	    let ii = setInterval(timer, 1000);
	    	    timer();
	    	} else {
	    		$(el).remove();
	    	}
    	});
    	
    	// РђРєС†РёРё РєР°СЂС‚РѕС‡РєР°
    	$(".sales_for_gallery .sale").each(function (i, el) {
    		let date_end = $(el).attr('data-date_end');
    		let type = $(el).attr('data-type');
    	    let start = new Date(date_end);
    	    
    	    if (start.getTime() - Date.now() &gt; 0) {
    	    	
    	    	let parent = $("#to_"+type);
    	    	
    	    	if ($(parent).find('.sale_timer_for_'+type).length) {
    	    		$(parent).find('.sale_timer_for_'+type).html( '&lt;div class="timer"&gt;&lt;div class="line"&gt;&lt;/div&gt;&lt;div class="line2"&gt;РѕСЃС‚Р°Р»РѕСЃСЊ РґРѕ РєРѕРЅС†Р° Р°РєС†РёРё&lt;/div&gt;&lt;/div&gt;' );
    	    	}
    	    	let sales_timer = $(parent).find('.sale_timer_for_'+type).find('.timer .line');
    	    	
	    	    let timer = () =&gt; {
					let seconds = start.getTime() - Date.now();
					if (seconds &lt;= 0) {
						$(sales_timer).remove();
						return clearInterval(ii);
					}
					seconds /= 1e3; // РјСЃ -&gt; СЃ
					$(sales_timer).html([
					'',
					Math.floor(seconds / (24 * 60 * 60))&gt;0 ?(Math.floor(seconds / (24 * 60 * 60)))+'Рґ':'', // days
					(seconds / 3600 % 24 |0)&gt;0 ? (seconds / 3600 % 24 |0)+'С‡':'', // hours
					(seconds / 60 % 60   |0)+'Рј', // minutes
					((seconds / 3600 % 24 |0)==0 &amp;&amp; Math.floor(seconds / (24 * 60 * 60))==0) ? (seconds / 1 % 60    |0)+'СЃ':''  // seconds
					].map(d =&gt; d&lt;10?''+d:d).join(' '));
	    	    };
	
	    	    let ii = setInterval(timer, 1000);
	    	    timer();
	    	} else {
	    		$(el).remove();
	    	}
    	});
    	    
    	// РџРѕРєР°Р· РќРѕРІРѕРµ / РџРѕРїСѓР»СЏСЂРЅРѕРµ / Р’С‹ РЅРµРґР°РІРЅРѕ СЃРјРѕС‚СЂРµР»Рё
		jQuery( document ).on( 'click', '.choose_show_data label', function(e) {
			/*var el = this;
			var to_show = $(el).attr( 'data-to_show' );
			var post_type = $(el).attr( 'data-post_type' );
			var devices_type = $(el).attr( 'data-devices_type' );
			var user_id = $(el).attr( 'data-user_id' );
			
			if (devices_type!='') {
				jQuery.cookie(post_type+"_"+devices_type+"_to_show", to_show, { path    : '/', expires : 1000 });
			} else {
				jQuery.cookie(post_type+"_to_show", to_show, { path    : '/', expires : 1000 });
			}
			
			setShow(user_id, post_type, devices_type, to_show);*/
			
		});
		
		// Р”Р»СЏ РїСЂРµСЂС‹РІР°РЅРёСЏ РїСЂРµРґС‹РґСѓС‰РёС… Р·Р°РїСЂРѕСЃРѕРІ
        window.request = [];
		
		// РџРѕРєР°Р· РќРѕРІРѕРµ / РџРѕРїСѓР»СЏСЂРЅРѕРµ / Р’С‹ РЅРµРґР°РІРЅРѕ СЃРјРѕС‚СЂРµР»Рё
        function setShow(user_id, post_type, devices_type, to_show) {
        	
        	// РџСЂРµСЂС‹РІР°РЅРёРµ РїСЂРµРґС‹РґСѓС‰РёС… Р·Р°РїСЂРѕСЃРѕРІ
			if (typeof window.request !== "undefined") {
    			jQuery.each(window.request, function(key, value) {
    				window.request[key].abort();
    			});
    		}
        	
        	jQuery('.filter_body .rotating-border').css( 'display' , 'block' );
        	jQuery('.filter_body .ajax').fadeOut(250);

        	var request = jQuery.post('/wp-admin/admin-ajax.php?action=go_set_show', { ajax: 1, user_id:user_id, post_type:post_type, devices_type:devices_type, to_show:to_show }, function(req){
        		var respond = JSON.parse(req);
        		
        		jQuery('.filter_body .rotating-border').css( 'display' , 'none' );
        		
        		if( respond.success=='true' ){
        			if( respond.error=='' ){
        				jQuery('.filter_body .ajax').html(respond.html);
        				jQuery('.filter_body .ajax').fadeIn(500);
        				
        				window.history.pushState('data', 'Ajax', respond.url_ajax);
        				
        				// РћР±РЅРѕРІР»РµРЅРёРµ РєР°СЂС‚С‹
        				jQuery(".go_map_update").click();

        				// Р’С‹СЃРѕС‚Р° Р±Р»РѕРєРѕРІ
        				maxh(jQuery(".max_height"));
        				
        			}
        		} else {
        			alert('РћС€РёР±РєР° РїСЂРё РѕС‚РїСЂР°РІРєРµ РґР°РЅРЅС‹С….');
        		}
        		
            });
        	
        	// Р”Р»СЏ РїСЂРµСЂС‹РІР°РЅРёСЏ РїСЂРµРґС‹РґСѓС‰РёС… Р·Р°РїСЂРѕСЃРѕРІ
    		window.request.push(request);
        	
        	return false;
		}
    	
    	// Zoom
		/*jQuery(document).on('click', "a", function(e) {
			
			//e.preventDefault();
			
			//var currentZoom = 0.5;
			jQuery(this).addClass("smalls");
			//jQuery('body').removeClass("big");
		});*/
    	
    	// Р—Р°РїСЂРµС‚РёС‚СЊ enter
    	jQuery(document).on('keyup keypress', '.disable_enter', function (e) {
			  var keyCode = e.keyCode || e.which;
			  if (keyCode === 13) {
			    e.preventDefault();
			    return false;
			  }
		});
    	
    	jQuery('[data-toggle="popover"]').popover({
    		template: '&lt;div class="popover" role="tooltip"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;h3 class="popover-header"&gt;&lt;/h3&gt;&lt;div class="popover-body"&gt;&lt;/div&gt;&lt;/div&gt;',
    		html: true
    	});
    	
    	// РџРѕРґСЃРєР°Р·РєРё РґР»СЏ С„РѕСЂРјС‹ РїРѕРёСЃРєР° Р±Р»РѕРіР°
    	jQuery(".ajax_search_blog input").autocomplete({
    		autoFocus: false,
    		minLength: 1,
    		appendTo: '.ajax_search_blog .ajax_body',
    		open: function(event, ui) {
    			var len = $('.ui-autocomplete &gt; li').length;
    			if (len&gt;0) {
    				jQuery(".ajax_search_blog .ajax_body").css( 'display', 'block' );
    			}
    		},
			source: '/search_elastic.php',
			response: function () {
				
		    },
		    select: function (event, ui) {
		    	$(".ajax_search_blog input").val(ui.item.label);
		    	$(".ajax_search_blog").submit();
		    }
		});
    	
    	// РњРѕР±РёР»СЊРЅС‹Р№ РїРѕРёСЃРє
    	$("#open_search").on("click",function() {
    		if (jQuery(document).width() &lt;= 767) {
	    		jQuery('.search_bar_blog').css( 'width' , '0px' );
	    		jQuery('.search_bar_blog').css( 'display' , 'table' );
	    		jQuery('.search_bar_blog').animate({width:$('.footer_menu').width()-45},1000);
	    		jQuery('.search_bar_blog input').focus();
    		}
    	});
    	
    	$(".search_bar_blog input").focusout(function() {
    		if (jQuery(document).width() &lt;= 767) {
    			jQuery('.search_bar_blog').css( 'display' , 'none' );
    		}
		});
    	
    	// Р’С‹СЃРѕС‚Р° Р±Р»РѕРєРѕРІ
    	maxh(jQuery(".max_height"));
    	
    	// РўРѕР»СЊРєРѕ С†РёС„СЂС‹
    	$(".input_int").inputmask({
  		  alias: 'numeric', 
  		  allowMinus: false,  
  		  digits: 2, 
  		  greedy: false,
  	      placeholder: "",
  		  max: 100000000000000
		});
    	
    	if (jQuery(document).width() &gt; 767) {
	    	jQuery('#section_single .right').hcSticky({
	    		stickTo: '#section_single  .left',
	            top: 20,
	            bottomEnd: 30
	    	});
	    	
	    	jQuery('.lk_grey .left_grey').hcSticky({
	    		stickTo: '.lk_grey  .right_grey',
	            top: 80,
	            bottomEnd: 30
	    	});
	    	
	    	jQuery('.lk_grey .top_nav').hcSticky({
	    		stickTo: '.lk_grey  .right_grey',
	            top: 80,
	            bottomEnd: 30
	    	});
	    	
	    	/*jQuery('.lk_grey .table_responsive_top').hcSticky({
	    		stickTo: '.lk_grey  .top_nav',
	            top: 100,
	            bottomEnd: 30
	    	});*/
	    	
    	}
    	
    	// РЎРѕРѕР±С‰РµСЃС‚РІРѕ
    	$("#open_terms_list").on("click",function() {
    		$('#filters_list').collapse('hide');
    	});
    	
    	// РЎРѕРѕР±С‰РµСЃС‚РІРѕ
    	$("#open_filters_list").on("click",function() {
    		$('#terms_list').collapse('hide');
    	});
    	
    	// РљРЅРѕРїРєР° РєР°СЂС‚С‹ РІ РјРѕР±. РІРµСЂСЃРёРё
    	$(".map-switch").on("click",function() {
    		var i = jQuery( this ).find('i');
    		
    		if ($(i).hasClass('fa-map-o')) {
    			// РџРѕРєР°Р·Р°С‚СЊ РєР°СЂС‚Сѓ
    			$(i).removeClass('fa-map-o');
    			$(i).addClass('fa-list');
    			
    			$('.map_right').addClass('map_mobile');
    			
    			window.map.invalidateSize(true);
    			
    			setTimeout(function(){
    				if (window.map != null) {
    					window.map.invalidateSize(true);
    					//window.map.setZoom(5);
    				}
				},500);
    			
    		} else {
    			// РЎРєСЂС‹С‚СЊ РєР°СЂС‚Сѓ
    			$(i).removeClass('fa-list');
    			$(i).addClass('fa-map-o');
    			
    			$('.map_right').removeClass('map_mobile');
    			
    			window.map.invalidateSize(true);
    		}
    	});
    	
    	// РР·РјРµРЅРµРЅРёРµ РІРёРґР° РѕС‚РѕР±СЂР°Р¶РµРЅРёСЏ
    	$(".to_open_map").on("click",function() {
    		var show = $(this).data("show");
    		
    		jQuery.cookie("show_map", show, { path    : '/', expires : 1000 });
    		
    		$('.to_open_map').removeClass('active');
    		$('.to_open_map_'+show).addClass('active');
    		
    		switch(show) {
	    		case 'full':
	    			// РљСѓРєРё
	    			jQuery.cookie("search_status_map", "", { path    : '/', expires : 100 });
	    			$('#section_list_devices, #section_community_list, #section_list_locations').removeClass('one');
	    			
	    			$('.screen_change').removeClass('full_screen');
	    			
	    			//$('.map_right').css( 'display' , 'block' );
	    			
	    			$('.map_right').css( 'visibility' , 'visible' );
	    			$(".map_right").animate({opacity:'1'},500, function () {
        				$('.map_right .map_setting').css( 'display' , 'none' );
        				$('.map_right .map_update').css( 'display' , 'none' );
        				//jQuery('#section_single .right').hcSticky({stickTo: '#section_single  .left',top: 20,bottomEnd: 30});
            		});
	    			
	    			$('.map_right').addClass('map_mobile');
	    			window.map.invalidateSize(true);

	    			break;
	    		case 'hide':
	    			// РљСѓРєРё
	    			jQuery.cookie("search_status_map", "hide", { path    : '/', expires : 100 });
	    			$('#section_list_devices, #section_community_list, #section_list_locations').removeClass('one');
	    			
	    			$('.map_right').removeClass('map_mobile');
	    			window.map.invalidateSize(true);
	    			
	    			$('.screen_change').addClass('full_screen');
	    			
	    			$('.map_right .map_setting, .map_right .map_update').css( 'display' , 'none' );
        			$(".map_right").animate({opacity:'0'},500, function () {
        				$('.map_right').css( 'visibility' , 'hidden' );
        				// Р“Р°Р»РµСЂРµСЏ РґР»СЏ РїСЂРµРІСЊСЋС€РµРє РѕР±РѕСЂСѓРґРѕРІР°РЅРёСЏ
        		    	initSwiper();
        		    	//$('.map_right').css( 'display' , 'none' );
            		});
        			$(".map_left").animate({width:'100%'},500);
	    			break;
	    		case 'default':
	    			// РљСѓРєРё
	    			jQuery.cookie("search_status_map", "", { path    : '/', expires : 100 });
	    			$('#section_list_devices, #section_community_list, #section_list_locations').removeClass('one');
	    			
	    			$('.map_right').css( 'display' , 'block' );
	    			$('.map_right').removeClass('map_mobile');
	    			
	    			$('.screen_change').removeClass('full_screen');
	    			
	    			$('.map_right').css( 'visibility' , 'visible' );
        			$(".map_right").animate({opacity:'1'},500, function () {
        				//jQuery('#section_single .right').hcSticky({stickTo: '#section_single  .left',top: 20,bottomEnd: 30});
        				//$('.map_right .map_setting').css( 'display' , 'table' );
        				// Р“Р°Р»РµСЂРµСЏ РґР»СЏ РїСЂРµРІСЊСЋС€РµРє РѕР±РѕСЂСѓРґРѕРІР°РЅРёСЏ
        		    	initSwiper();
            		});
        			
        			// Р”Р»СЏ РіР»Р°РІРЅРѕР№ РЅРµР°РІС‚РѕСЂРёР·РѕРІР°РЅРЅРѕР№
        			if (jQuery(window).width() &lt;= 767) {
        				$(".map_left").animate({width:'100%'},500);
        			} else {
        				$(".map_left").animate({width:'70%'},500);
        			}
        			
        			window.map.invalidateSize(true);
		    		break;
	    		case 'one':
	    			// РљСѓРєРё
	    			jQuery.cookie("search_status_map", "one", { path    : '/', expires : 100 });
	    			
	    			$('.map_right').css( 'display' , 'block' );
	    			$('.map_right').removeClass('map_mobile');
	    			
	    			$('.map_right').css( 'visibility' , 'visible' );
        			$(".map_right").animate({opacity:'1'},500, function () {
        				// Р“Р°Р»РµСЂРµСЏ РґР»СЏ РїСЂРµРІСЊСЋС€РµРє РѕР±РѕСЂСѓРґРѕРІР°РЅРёСЏ
        		    	initSwiper();
            		});
        			
        			$('.screen_change').removeClass('full_screen');
        			
        			// Р”Р»СЏ РіР»Р°РІРЅРѕР№ РЅРµР°РІС‚РѕСЂРёР·РѕРІР°РЅРЅРѕР№
        			if (jQuery(window).width() &lt;= 767) {
        				$(".map_left").animate({width:'100%'},500);
        			} else {
        				$(".map_left").animate({width:'384px'},500, function () {
        					$('#section_list_devices, #section_community_list, #section_list_locations').addClass('one');
        	    			window.map.invalidateSize(true);
                		});
        			}
        			
        			window.map.invalidateSize(true);
		    		break;
    		}
    		
    		setTimeout(function(){
				if (window.map != null) {
					window.map.invalidateSize(true);
					// Р—Р°РїСѓСЃРє СЃРѕР±С‹С‚РёСЏ РѕР±РЅРѕРІР»РµРЅРёСЏ СЂР°Р·РјРµСЂРѕРІ Р±СЂР°СѓР·РµСЂР°
					window.dispatchEvent(new Event('resize'));
				}
			},550);
    		
    	});
    	
    	/*
    	// Р¤РёРєСЃРёСЂРѕРІР°РЅРЅС‹Р№ РІРµСЂС…
    	jQuery('#header_auth, #header_pages').hcSticky({
    		stickTo: '#page-wrap',
            top: 0,
            bottomEnd: 0
    	});
    	*/
    	
    	// Р“Р°Р»РµСЂРµСЏ РґР»СЏ РїСЂРµРІСЊСЋС€РµРє РѕР±РѕСЂСѓРґРѕРІР°РЅРёСЏ
    	initSwiper();
    	
    	// Р”Р»СЏ РІСЃРїР»С‹РІР°СЋС‰РµР№ РїРѕРґСЃРєР°Р·РєРё
    	if ($(".tooltips").length &gt;= 1){
	    	var tooltips = $('.tooltips .tooltip_body');
	    	window.onmousemove = function (e) {
	    		
	    		var offset = $(".tooltips").offset();
	    		
	    	    var x = (e.clientX - 5) + 'px',
	    	        y = (e.clientY + 20) + 'px';
	    		
	    		/*var x = (offset.left + 0) + 'px',
		        	y = (offset.top + 155) + 'px';*/
	    		
	    	    for (var i = 0; i &lt; tooltips.length; i++) {
	    	        tooltips[i].style.top = y;
	    	        tooltips[i].style.left = x;
	    	    }
	    	};
    	}
    	
    	// Р—Р°РїРѕР»РЅРёС‚Рµ РІРµСЃСЊ СЃРІРѕР№ РїСЂРѕС„РёР»СЊ, РЅР°Р¶Р°С‚РёРµ РєРЅРѕРїРєРё
		$(".hide_note_profile").on("click",function() {
			jQuery.cookie("hide_note_profile", "yes", { path    : '/', expires : 100 });
			$("#section_note_profile").animate({height:0},1000);
			$("#section_note_profile").fadeOut(100);
    	});
		
		// Р—Р°РїРѕР»РЅРёС‚Рµ РІРµСЃСЊ СЃРІРѕР№ РїСЂРѕС„РёР»СЊ, РїРѕРєР°Р· С„РѕСЂРјС‹
		var hide_note_profile = $.cookie("hide_note_profile");
		if (are_cookies_enabled()){
			if(hide_note_profile!='yes') {
				$('#section_note_profile').fadeIn(1);
				$("#section_note_profile").animate({height:235},1000);
			}
		}
    	
    	// РљРЅРѕРїРєР° РјРµРЅСЋ РґР»СЏ РЅРµР°РІС‚РѕСЂРёР·РѕРІР°РЅРЅРѕРіРѕ
    	$(".menu_button").on("click",function() {
    		/*var flag = $(this).data("flag");
    		if(flag == "close"){
    			$(this).data("flag","show");
    		}
    		if(flag == "show"){
    			$(this).data("flag","close");
    		}
    		$(this).toggleClass("on");*/
    		
    		$('.modal').modal('hide');
	    	$('#popup_menu_div').modal('show');
	    	$('body').css( 'overflow-y' , 'scroll' );
	    	$('body').css( 'padding-right' , '0' );
	    	$('#popup_menu_div').css( 'padding-right' , '0' );
    	});
    	
    	// РљРЅРѕРїРєР° РјРµРЅСЋ
    	$("#profile").on("click",function() {
    		$('.modal').modal('hide');
	    	$('#popup_menu_div').modal('show');
	    	$('body').css( 'overflow-y' , 'scroll' );
	    	$('body').css( 'padding-right' , '0' );
	    	$('#popup_menu_div').css( 'padding-right' , '0' );
    	});
    	
    	// РљРЅРѕРїРєР° РјРµРЅСЋ РїСЂР°РІР°СЏ
    	/*$("#profile_r").on("click",function() {
    		$('.modal').modal('hide');
	    	$('#popup_menu_div_r').modal('show');
	    	$('body').css( 'overflow-y' , 'scroll' );
	    	$('body').css( 'padding-right' , '0' );
	    	$('#popup_menu_div_r').css( 'padding-right' , '0' );
    	});*/
    	
    	// Р’СЃРїР»С‹РІР°СЋС‰РµРµ РѕРєРЅРѕ РїРѕРёСЃРєР°
		$(".search_bar button, .popup_menu_seacrh .input").on("click",function() {
			var tab = $(this).data("tab");
			var target = $(this).data("target");
			jQuery(tab).click();
			jQuery(target).click();
			
			$('.modal').modal('hide');
	    	$('#search_form_div').modal('show');
	    	$('body').css( 'overflow-y' , 'scroll' );
	    	$('body').css( 'padding-right' , '0' );
	    	$('#search_form_div').css( 'padding-right' , '0' );
	    	
	    	var Timers_click = setInterval(function () {
	    		clearInterval(Timers_click);
	    		//jQuery(target).focus();
	    		var tmp = jQuery(target).val();
	    		jQuery(target).focus().val("").blur().focus().val(tmp);
    	    }, 1000);
    	});
		
		// РџРѕСЃР»РµРґРЅРёРµ Р·Р°РїСЂРѕСЃС‹ РґР»СЏ РїРѕРёСЃРєР°
		$("body").on("focus", "input.autocomplete_text", function() {
			var el = this;
    		var form = $(el).closest('form');
    		jQuery(el).closest('form').find('.collapse_text .last_query').css( 'display', 'block' );
			jQuery(el).closest('form').find('.collapse_text .last_search').css( 'display', 'none' );
		});
		
		// РџРѕСЃР»РµРґРЅРёРµ Р·Р°РїСЂРѕСЃС‹ РґР»СЏ РїРѕРёСЃРєР° - СѓР±СЂР°С‚СЊ
		/*$("body").on("blur", "input.autocomplete_text", function() {
			var el = this;
    		var form = $(el).closest('form');
			
			var Timers_clicks = setInterval(function () {
	    		clearInterval(Timers_clicks);
	    		jQuery(el).closest('form').find('.collapse_text .last_query').css( 'display', 'none' );
				jQuery(el).closest('form').find('.collapse_text .last_search').css( 'display', 'none' );
    	    }, 5);
		});*/
		
		// Р’С‹Р±РѕСЂРєР° Р·РЅР°С‡РµРЅРёСЏ
		$('.collapse_text .last_query a').on('click', function(e) {
			var el = this;
            e.preventDefault();
    		var form = $(el).closest('form');
    		var text = jQuery(el).text();
    		jQuery(el).closest('form').find('.autocomplete_text').val(text);
    		jQuery(el).closest('form').find('.collapse_text .last_query').css( 'display', 'none' );
		});
		
    	// РџРµСЂРµРєР»СЋС‡Р°Р»РєРё
    	$( ".tabs" ).tabs({
    		hide: { effect: "fade", duration: 1000 },
    		collapsible: false, 
    		active: false
    	});
    	
    	// Р”Р»СЏ С„РѕСЂРјС‹ РїРѕРёСЃРєР°, С‡С‚Рѕ Р±С‹ СЂР°Р±РѕС‚Р°Р»Рѕ РІС‹РґРµР»РµРЅРёРµ
    	$('.tabs .collapse').on('show.bs.collapse hide.bs.collapse', function(e) {
            e.preventDefault();
        }),
        $('.tabs [data-toggle="collapse"]').on('click', function(e) {
            e.preventDefault();
            
            $($($(this).data('target')).data('parent')+' [data-toggle="collapse"]').addClass('collapsed');
            $(this).removeClass('collapsed');
            
            $($($(this).data('target')).data('parent')+' .collapse').removeClass('show');
            $($(this).data('target')).toggleClass('show');
        });
    	jQuery('.tabs [data-toggle="collapse"]').on('keyup', function () {
    		$($($(this).data('target')).data('parent')+' [data-toggle="collapse"]').addClass('collapsed');
            $(this).removeClass('collapsed');
            
            $($($(this).data('target')).data('parent')+' .collapse').removeClass('show');
            $($(this).data('target')).toggleClass('show');
    	});
    	
    	// РџРѕРґСЃРєР°Р·РєРё РґР»СЏ С„РѕСЂРјС‹ РїРѕРёСЃРєР°
    	/*$("#rent_text").autocomplete({
    		minLength: 1,
    		appendTo: $("#collapse_rent_text .last_search"),
    		open: function(event, ui) {
    			jQuery("#collapse_rent_text .last_query").css( 'display', 'none' );
    			jQuery("#collapse_rent_text .last_search").css( 'display', 'block' );
    		},
    		close: function(event, ui) {
    			jQuery("#collapse_rent_text .last_query").css( 'display', 'block' );
    			jQuery("#collapse_rent_text .last_search").css( 'display', 'none' );
    		},
			source: '/search2.php',
			response: function () {
				jQuery.ajax({
   	 			   type: 'POST',
   	 			   url: '/search.php',
   	 			   data: "ajax=1&amp;text="+$(this).val(),
   	 		       success: function(data){}
   	 			});
		    }
		}).data("ui-autocomplete")._renderItem = function (ul, item) {
    		if (item.label=='') {
        		return '';
    		} else {
            	return $("&lt;li&gt;&lt;/li&gt;").data("item.autocomplete", item).append("" + item.label + "").appendTo(ul);
    		}
	    };*/
    	
    	// РџРѕРґСЃРєР°Р·РєРё РґР»СЏ С„РѕСЂРјС‹ РїРѕРёСЃРєР° v2
    	/*$(".autocomplete_text").autocomplete({
    		minLength: 1,
    		appendTo: function(event) {
    			console.log(event);
    			jQuery(event).closest('form').find('.collapse_text .last_search');
    		},
    		open: function(event, ui) {
    			jQuery("#collapse_rent_text .last_query").css( 'display', 'none' );
    			jQuery("#collapse_rent_text .last_search").css( 'display', 'block' );
    		},
    		close: function(event, ui) {
    			jQuery("#collapse_rent_text .last_query").css( 'display', 'block' );
    			jQuery("#collapse_rent_text .last_search").css( 'display', 'none' );
    		},
			source: '/search2.php',
			response: function () {
				//jQuery(this).closest('form').find('.collapse_text .last_search').html('1111');
				jQuery.ajax({
   	 			   type: 'POST',
   	 			   url: '/search.php',
   	 			   data: "ajax=1&amp;text="+$(this).val(),
   	 		       success: function(data){}
   	 			});
		    }
		});*/
    	
    	// РџРѕРґСЃРєР°Р·РєРё РґР»СЏ С„РѕСЂРјС‹ РїРѕРёСЃРєР° v3
    	$(".autocomplete_text").each(function (i, el) {
    	    el = $(el);
    	    el.autocomplete({
    	    	html:true,
    	    	minLength: 1,
        		appendTo: jQuery(el).closest('form').find('.collapse_text .last_search'),
        		open: function(event, ui) {
        			jQuery(el).closest('form').find('.collapse_text .last_query').css( 'display', 'none' );
        			jQuery(el).closest('form').find('.collapse_text .last_search').css( 'display', 'block' );
        		},
        		close: function(event, ui) {
        			jQuery(el).closest('form').find('.collapse_text .last_query').css( 'display', 'block' );
        			jQuery(el).closest('form').find('.collapse_text .last_search').css( 'display', 'none' );
        		},
    			source: '/search2.php?post_type='+jQuery(el).closest('form').find('input[name="post_type"]').val(),
    			response: function () {},
    	        create: function () {
    	            $(this).data('ui-autocomplete')._renderItem = function (ul, item) {
    	            	if (item.label!='') {
    	            		return $('&lt;li class="divSelection"&gt;')
	    	                    .append('&lt;div&gt;')
	    	                    .append(item.label)
	    	                    .append('&lt;/div&gt;')
	    	                    .append('&lt;/li&gt;')
	    	                    .appendTo(ul);
    	            	} else {
    	            		jQuery(el).closest('form').find('.collapse_text .last_query').css( 'display', 'none' );
    	        			jQuery(el).closest('form').find('.collapse_text .last_search').css( 'display', 'none' );
    	            	}
    	            };
    	        }
    	    });
    	});
    	
    	// РђРЅРёРјР°С†РёСЏ
    	$.fn.animateRotate = function(angle, duration, easing, complete) {
    		return this.each(function() {
    		    var $elem = $(this);

    		    $({deg: 0}).animate({deg: angle}, {
    		      duration: duration,
    		      easing: easing,
    		      step: function(now) {
    		        $elem.css({
    		           transform: 'rotate(' + now + 'deg)'
    		         });
    		      },
    		      complete: complete || $.noop
    		    });
    		});
    	};
    	
    	// РљРЅРѕРїРєР° РѕРїСЂРµРґРµР»РµРЅРёСЏ РіРѕСЂРѕРґР°
		$("#search_form .target").on("click",function() {
    		var el = this;
    		var form = $(el).closest('form');
    		
    		$(el).css({pointerEvents: "none"});
    		$(el).css({cursor: "pointer"});
    		$(el).animateRotate(360, 3000);
    		
    		jQuery.post('/wp-admin/admin-ajax.php?action=get_my_city', {}, function(req){
    			var respond = JSON.parse(req);
    			if( respond.success=='true' ){
    				if( respond.error!='' ){
    					alert(respond.error);
    				} else {
    					form.find('input[name="city"]').val(respond.city);
    				}
    			} else {
    				alert('РћС€РёР±РєР° РїСЂРё РѕС‚РїСЂР°РІРєРµ РґР°РЅРЅС‹С….');
    			}
    			
    			$(el).css({pointerEvents: "initial"});
    	    });
    	});
		
	    // РџРѕРґСЃРєР°Р·РєРё РґР»СЏ С„РѕСЂРјС‹ РїРѕРёСЃРєР° РіРѕСЂРѕРґР°
    	/*$("#rent_city").autocomplete({
    		minLength: 1,
    		appendTo: $("#collapse_rent_city .last_search"),
    		open: function(event, ui) {
    			jQuery("#collapse_rent_city .last_query").css( 'display', 'none' );
    			jQuery("#collapse_rent_city .last_search").css( 'display', 'block' );
    		},
    		close: function(event, ui) {
    			jQuery("#collapse_rent_city .last_query").css( 'display', 'block' );
    			jQuery("#collapse_rent_city .last_search").css( 'display', 'none' );
    		},
			source: '/search_city.php',
			response: function () {
				jQuery.ajax({
   	 			   type: 'POST',
   	 			   url: '/search.php',
   	 			   data: "ajax=1&amp;text="+$(this).val(),
   	 		       success: function(data){}
   	 			});
		    }
		});*/
    	
    	// РџРѕРґСЃРєР°Р·РєРё РґР»СЏ С„РѕСЂРјС‹ РїРѕРёСЃРєР° РіРѕСЂРѕРґР° v2
    	$(".autocomplete_city").each(function (i, el) {
    	    el = $(el);
    	    el.autocomplete({
    	    	html:true,
    	    	minLength: 1,
        		appendTo: jQuery(el).closest('form').find('.collapse_city .last_search'),
        		open: function(event, ui) {
        			jQuery(el).closest('form').find('.collapse_city .last_query').css( 'display', 'none' );
        			jQuery(el).closest('form').find('.collapse_city .last_search').css( 'display', 'block' );
        		},
        		close: function(event, ui) {
        			jQuery(el).closest('form').find('.collapse_city .last_query').css( 'display', 'block' );
        			jQuery(el).closest('form').find('.collapse_city .last_search').css( 'display', 'none' );
        		},
    			source: '/search_city.php',
    			response: function () {},
    	        create: function () {
    	            $(this).data('ui-autocomplete')._renderItem = function (ul, item) {
    	            	if (item.label!='') {
    	            		return $('&lt;li class="divSelection"&gt;')
	    	                    .append('&lt;div&gt;')
	    	                    .append(item.label)
	    	                    .append('&lt;/div&gt;')
	    	                    .append('&lt;/li&gt;')
	    	                    .appendTo(ul);
    	            	} else {
    	            		jQuery(el).closest('form').find('.collapse_city .last_query').css( 'display', 'none' );
    	        			jQuery(el).closest('form').find('.collapse_city .last_search').css( 'display', 'none' );
    	            	}
    	            };
    	        }
    	    });
    	});
	    	
    	// https://xdsoft.net/jqplugins/periodpicker/
    	$("#label_rent_dates").on("click keyup",function() {
    		//var Timers = setInterval(function () {
	    		//clearInterval(Timers);
    		//jQuery('#periodpickerstart').periodpicker('regenerate');   
    	    //}, 300);
    	});
    	
    	/*jQuery('#periodpickerstart').periodpicker({
        	end: '#periodpickerend',
        	inline: true,
        	lang: 'ru',
        	cells: [1, 3],
    	    withoutBottomPanel: true,
    	    yearsLine: false,
    	    title: false,
    	    closeButton: false,
    	    fullsizeButton: false,
    	    clearButtonInButton: true,
            okButton: true,
            animation: false,
            //formatDecoreDateWithYear: 'DD.MM.YYYY',
        	formatDate: 'YYYY.MM.DD',
        	onClearButtonClick: function () {
        		
        	}
    	});*/
    	
    	// https://longbill.github.io/jquery-date-range-picker/
    	/*jQuery('#periodpickerstart').dateRangePicker({
    		inline:true,
    		container: '.periodpickers',
    		alwaysOpen:true,
    		stickyMonths: true,
    		language: 'custom',
    		separator: ' - ',
    	});*/
    	
    	// https://stackoverflow.com/questions/16092288/date-range-picker-on-jquery-ui-datepicker
    	$(".datepicker").datepicker({
			minDate: 0,
			dateFormat: "yy-mm-dd",
			numberOfMonths: [3,1],
			beforeShowDay: function(date) {
				var date1 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#periodpickerstart").val());
				var date2 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#periodpickerend").val());
				var _class = "active_date";
				
				if (date1 &amp;&amp; date.getTime() == date1.getTime() ) {
					_class = "active_date_first";
				}
				
				if (date2 &amp;&amp; date.getTime() == date2.getTime() ) {
					_class = "active_date_last";
				}
				
				return [true, date1 &amp;&amp; ((date.getTime() == date1.getTime()) || (date2 &amp;&amp; date &gt;= date1 &amp;&amp; date &lt;= date2)) ? _class : ""];
			},
			onSelect: function(dateText, inst) {
				var date1 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#periodpickerstart").val());
				var date2 = $.datepicker.parseDate($.datepicker._defaults.dateFormat, $("#periodpickerend").val());
                var selectedDate = $.datepicker.parseDate($.datepicker._defaults.dateFormat, dateText);
                
                if (!date1 || date2) {
					$("#periodpickerstart").val(dateText);
					$("#periodpickerend").val("");
                    $(this).datepicker();
                } else if( selectedDate &lt; date1 ) {
                    $("#periodpickerend").val( $("#periodpickerstart").val() );
                    $("#periodpickerstart").val( dateText );
                    $(this).datepicker();
                } else {
					$("#periodpickerend").val(dateText);
                    $(this).datepicker();
				}
                
                var date_start = $("#periodpickerstart").val();
	        	var date_start_array = date_start.split('-');
	        	
	        	var date_end = $("#periodpickerend").val();
	        	var date_end_array = date_end.split('-');
	        	
	        	var month = {};
	        	month = {
	        		'01':'СЏРЅРІР°СЂСЏ',
	        		'02':'С„РµРІСЂР°Р»СЏ',
	        		'03':'РјР°СЂС‚Р°',
	        		'04':'Р°РїСЂРµР»СЏ',
	        		'05':'РјР°СЏ',
	        		'06':'РёСЋРЅСЏ',
	        		'07':'РёСЋР»СЏ',
	        		'08':'Р°РІРіСѓСЃС‚Р°',
	        		'09':'СЃРµРЅС‚СЏР±СЂСЏ',
	        		'10':'РѕРєС‚СЏР±СЂСЏ',
	        		'11':'РЅРѕСЏР±СЂСЏ',
	        		'12':'РґРµРєР°Р±СЂСЏ'
	        	};
	        	
	        	if (typeof date_start_array[2] !== "undefined" &amp;&amp; typeof date_end_array[2] == "undefined") {
	        		jQuery("#rent_dates").val(date_start_array[2]+' '+month[date_start_array[1]]);
	        		jQuery('#rent_dates_clear').css( 'display' , 'block' );
	        	}
	        	
	        	if (typeof date_start_array[2] !== "undefined" &amp;&amp; typeof date_end_array[2] !== "undefined") {
	        		jQuery("#rent_dates").val(date_start_array[2]+' '+month[date_start_array[1]]+' вЂ” '+date_end_array[2]+' '+month[date_end_array[1]]);
	        		jQuery('#rent_dates_clear').css( 'display' , 'block' );
	        	}
			}
		});
    	
    	// Р’С‹Р±РѕСЂ РґР°С‚
    	jQuery('#periodpickerstart').on('change', function () {
    		
    		// https://www.xdsoft.net/jqplugins/periodpicker/
        	/*var dates = jQuery(this).periodpicker('valueStringStrong');
        	var date = dates.split('-');
        	if (date.length==2) {
	        	var date_start = date[0];
	        	var date_start_array = date_start.split('.');
	        	
	        	var date_end = date[1];
	        	var date_end_array = date_end.split('.');
	        	
	        	
	        	if (date_start==date_end) {
	        		return true;
	        	}
	        	
	        	jQuery(this).periodpicker('hide');
	        	
	        	var month = {};
	        	month = {
	        		'01':'СЏРЅРІР°СЂСЏ',
	        		'02':'С„РµРІСЂР°Р»СЏ',
	        		'03':'РјР°СЂС‚Р°',
	        		'04':'Р°РїСЂРµР»СЏ',
	        		'05':'РјР°СЏ',
	        		'06':'РёСЋРЅСЏ',
	        		'07':'РёСЋР»СЏ',
	        		'08':'Р°РІРіСѓСЃС‚Р°',
	        		'09':'СЃРµРЅС‚СЏР±СЂСЏ',
	        		'10':'РѕРєС‚СЏР±СЂСЏ',
	        		'11':'РЅРѕСЏР±СЂСЏ',
	        		'12':'РґРµРєР°Р±СЂСЏ'
	        	};
	        	
	        	jQuery("#rent_dates").val(date_start_array[2]+' '+month[date_start_array[1]]+' вЂ” '+date_end_array[2]+' '+month[date_end_array[1]]);
	        	
	        	jQuery('#rent_dates_clear').css( 'display' , 'block' );
	        	
        	}*/
        });
    	
    	// РџРѕР»Рµ РїРѕРёСЃРєР°
    	$("input.autocomplete_text").on("click keyup change",function() {
    		var el = this;
    		var parent = $(el).closest('label');
    		var button = parent.find('.clear');
    		
    		if ($(el).val()!='') {
    			$(button).css( 'display' , 'block' );
    		} else {
    			$(button).css( 'display' , 'none' );
    		}
    		
    	});
    	
    	// РџРµСЂРµРєР»СЋС‡РµРЅРёРµ РєР°Р»РµРЅРґР°СЂСЏ
    	$(".datepicker_nav .prew").on("click",function() {
    		jQuery('.periodpickers .ui-datepicker-prev').click();		
    	});
    	
    	$(".datepicker_nav .next").on("click",function() {
    		jQuery('.periodpickers .ui-datepicker-next').click();		
    	});
    	
    	// РљРЅРѕРїРєР° РѕС‡РёСЃС‚РєРё
    	$(".clear").on("click",function() {
    		var el = this;
    		var parent = $(el).closest('label');
    		var input = parent.find('input');
    		
    		$(input).val('');
			$(el).css( 'display' , 'none' );
			
			if ($(el).attr('id')=='rent_dates_clear') {
				//jQuery('#periodpickerstart').periodpicker('clear');
				$("#periodpickerstart").val('');
				$("#periodpickerend").val('');
				$('.datepicker').datepicker('setDate', null);
			}
    		
    	});
    	
    	// https://www.jqueryscript.net/form/Switch-Style-Radio-Buttons-jQuery-Simple-Input-Toggle.html
        jQuery('.radio-toggle').toggleInput();
    	
    	// РЎС‚РёР»РёР·Р°С†РёСЏ
    	//$('input:radio').styler();
    	//$('input.checkbox:checkbox').styler();
    	
		// Р”Р»СЏ РјРѕРґР°Р»СЊРЅРѕРіРѕ РѕРєРЅР°
    	$('.modal').on('hidden.bs.modal', function () {
    		$('.modal .rotating-border').css( 'display' , 'none' );
			$('.modal .auth_body').fadeIn(50);
    	})

    	// РџРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРёРµ РґР°РЅРЅС‹Рµ, РЅР°Р¶Р°С‚РёРµ РєРЅРѕРїРєРё
		$("#cookie-popup button").on("click",function() {
			jQuery.cookie("agree", "yes", { path    : '/', expires : 100 });
			$("#cookie-popup").fadeOut(500);
    	});
		
		// РџРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРёРµ РґР°РЅРЅС‹Рµ, РїРѕРєР°Р· С„РѕСЂРјС‹
		var agree = $.cookie("agree");
		if (are_cookies_enabled()){
			if(agree!='yes') {
				$('#cookie-popup').fadeIn(500);
			}
		}
		
		//РЎРєСЂС‹С‚РёРµ/РѕС‚РєСЂС‹С‚РёРµ РїР°СЂРѕР»СЏ РЅР° С„РѕСЂРјРµ СЂРµРіРёСЃС‚СЂР°С†РёРё
		$(".show-password, .hide-password").on('click', function() {
		    if ($(this).hasClass('show-password')) {
		      $("#password_change").attr("type", "text");
		      $(this).parent().find(".show-password").hide();
		      $(this).parent().find(".hide-password").show();
		    } else {
		      $("#password_change").attr("type", "password");
		      $(this).parent().find(".hide-password").hide();
		      $(this).parent().find(".show-password").show();
		    }
		});
	
		// РџСЂРѕРІРµСЂРєР° РЅР° СЃРѕРІРїР°РґРµРЅРёРµ РїР°СЂРѕР»РµР№
		// РџСЂРѕРІРµСЂРєР° 1 РїР°СЂРѕР»СЏ
    	jQuery("#pass1").on("keyup paste",function() {
    		var pass1 = jQuery("#pass1").val();
    		var pass2 = jQuery("#pass2").val();
    		
    		jQuery('.pass_status li').css( 'display' , 'none' );
    		
    		// Р”Р»РёРЅР° РїР°СЂРѕР»СЏ
    		if (pass1.length &gt;= 1) {
	    		if (pass1.length &lt; 7) {
	    			jQuery('.pass_status li#status1').css( 'display' , 'block' );
					return true;
	    		} else {
	    			jQuery('.pass_status li#status3').css( 'display' , 'block' );
					return true;
	    		}
    		}
    		
    	});
    	
    	// РџСЂРѕРІРµСЂРєР° 2 РїР°СЂРѕР»СЏ
    	jQuery("#pass2").on("keyup paste",function() {
    		var pass1 = jQuery("#pass1").val();
    		var pass2 = jQuery("#pass2").val();
    		
    		jQuery('.pass_status li').css( 'display' , 'none' );
    		
    		// РџР°СЂРѕР»Рё РЅРµ СЃРѕРІРїР°РґР°СЋС‚
    		if (pass2!='') {
    			if (pass1==pass2) {
    				jQuery('.pass_status li#status4').css( 'display' , 'block' );
    				return true;
    			}
    		}
    		
    	});
    	
    	// Quantity buttons
    	$( '.quantity' ).addClass( 'buttons_added' ).append( '&lt;input type="button" value="+" class="plus" /&gt;' ).prepend( '&lt;input type="button" value="-" class="minus" /&gt;' );

    	// Target quantity inputs on product pages
    	$( 'input.qty:not(.product-quantity input.qty)' ).each( function() {
    		var min = parseFloat( $( this ).attr( 'min' ) );

    		if ( min &amp;&amp; min &gt; 0 &amp;&amp; parseFloat( $( this ).val() ) &lt; min ) {
    			$( this ).val( min );
    		}
    	});

    	$( document ).on( 'click', '.plus, .minus', function() {

    		// Get values
    		var $qty		= $( this ).closest( '.quantity' ).find( '.qty' ),
    			currentVal	= parseFloat( $qty.val() ),
    			max			= parseFloat( $qty.attr( 'max' ) ),
    			min			= parseFloat( $qty.attr( 'min' ) ),
    			step		= $qty.attr( 'step' );

    		// Format values
    		if ( ! currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0;
    		if ( max === '' || max === 'NaN' ) max = '';
    		if ( min === '' || min === 'NaN' ) min = 0;
    		if ( step === 'any' || step === '' || step === undefined || parseFloat( step ) === 'NaN' ) step = 1;

    		// Change the value
    		if ( $( this ).is( '.plus' ) ) {

    			if ( max &amp;&amp; ( max == currentVal || currentVal &gt; max ) ) {
    				$qty.val( max );
    			} else {
    				$qty.val( currentVal + parseFloat( step ) );
    			}

    		} else {

    			if ( min &amp;&amp; ( min == currentVal || currentVal &lt; min ) ) {
    				$qty.val( min );
    			} else if ( currentVal &gt; 0 ) {
    				$qty.val( currentVal - parseFloat( step ) );
    			}

    		}

    		// Trigger change event
    		$qty.trigger( 'change' );
    	});
    	
    	// Р”Р»СЏ РєРѕСЂР·РёРЅС‹
    	jQuery(".qty").on("change",function() {
    		// Р”Р»СЏ РєРѕСЂР·РёРЅС‹
    		var el = this;
    		var parent = jQuery(el).closest('.order_body');
			parent.find(".add_to_cart, .add_without_cart").attr('data-quantity', jQuery(el).val());
			
    		return true;
    	});
    	
    	// Р›РёС‡РЅР°СЏ СЃСЃС‹Р»РєР° РґР»СЏ РёРЅРІР°Р№С‚РѕРІ
		jQuery(document).on('click', ".invite_copy_link", function(e) {
			e.preventDefault();
			
			var href = $(this).attr('href');
			
			var $temp = $("&lt;input&gt;");
    	    $("body").append($temp);
    	    $temp.val(href).select();
    	    document.execCommand("copy");
    	    $temp.remove();
    	    alert('РЎСЃС‹Р»РєР° РґР»СЏ РёРЅРІР°Р№С‚Р° СЃРєРѕРїРёСЂРѕРІР°РЅР°.');
		});
    	
    	// РЁРёСЂРёРЅР° Р±Р»РѕРєРѕРІ РІ СЃС‚РѕР»Р±С†Рµ
    	set_width();
    });
    
});

jQuery(window).on('load', function(){
	//jQuery(".search_bar button.dates").click();
	//jQuery(".right #profile").click();
	
	var Timerss = setInterval(function () {
		clearInterval(Timerss);
		jQuery('body').addClass('full_load');
    }, 300);
	
	// Р’С‹СЃРѕС‚Р° Р±Р»РѕРєРѕРІ
	maxh(jQuery(".max_height"));
	
	// РЁРёСЂРёРЅР° Р±Р»РѕРєРѕРІ РІ СЃС‚РѕР»Р±С†Рµ
	set_width();
	
	// РџРѕРєР°Р· СЃР»Р°Р№РґРµСЂРѕРІ
	var Timerss_ = setInterval(function () {
		clearInterval(Timerss_);
		jQuery('#section_list_devices .section_blocks').css( 'height' , 'auto' );
    }, 500);
	
});

jQuery(window).on('resize', function(){
	var Timers_width = setInterval(function () {
		clearInterval(Timers_width);
		// РЁРёСЂРёРЅР° Р±Р»РѕРєРѕРІ РІ СЃС‚РѕР»Р±С†Рµ
		set_width();
    }, 500);
	
	// Р’С‹СЃРѕС‚Р° Р±Р»РѕРєРѕРІ
	maxh(jQuery(".max_height"));
});</pre></body></html>