

/* Start:/bitrix/templates/aspro_next/media/raty-master/lib/jquery.raty.css?15109296481009*/
.cancel-on-png, .cancel-off-png, .star-on-png, .star-off-png, .star-half-png {
  font-size: 2em;
}

@font-face {
  font-family: "raty";
  font-style: normal;
  font-weight: normal;
  src: url("/bitrix/templates/aspro_next/media/raty-master/lib/fonts/raty.eot");
  src: url("/bitrix/templates/aspro_next/media/raty-master/lib/fonts/raty.eot?#iefix") format("embedded-opentype");
  src: url("/bitrix/templates/aspro_next/media/raty-master/lib/fonts/raty.svg#raty") format("svg");
  src: url("/bitrix/templates/aspro_next/media/raty-master/lib/fonts/raty.ttf") format("truetype");
  src: url("/bitrix/templates/aspro_next/media/raty-master/lib/fonts/raty.woff") format("woff");
}

.cancel-on-png, .cancel-off-png, .star-on-png, .star-off-png, .star-half-png {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-family: "raty";
  font-style: normal;
  font-variant: normal;
  font-weight: normal;
  line-height: 1;
  speak: none;
  text-transform: none;
}

.cancel-on-png:before {
  content: "\e600";
}

.cancel-off-png:before {
  content: "\e601";
}

.star-on-png:before {
  content: "\f005";
}

.star-off-png:before {
  content: "\f006";
}

.star-half-png:before {
  content: "\f123";
}

/* End */


/* Start:/bitrix/templates/aspro_next/media/js/useful_lib.js?15076546079265*/

(function($) {
	
	$.set_selected = {version: '1.0.0'};
	$.clearSelect = {version: '1.0.0'};

	$.fn.add_option = function(settings)
	{
            settings = $.extend({

                value : null,
                name : '',

            }, settings);	

            if(settings.value == null)
                return $(this);

            $(this).append("<option value='"+settings.value+"'>"+settings.name+"</option>");
            return $(this);
	}
	
	$.fn.succesErrorForm = function(settings)	
	{
            settings = $.extend({
                    data : [],
            }, settings);

            var text = '';
            for(var k in settings.data)
            {
                text += (text=='')? settings.data[k] : '<br>'+settings.data[k];
                break;
            }

            $(this).find('.error_message').hide();
            $(this).find('.alert-danger').text(' ').hide();
            $(this).find('.alert-success').text(' ').text(text).show();
            $(this).find('span[class*=help-]').text('');
            $(this).find('.has-error').removeClass('has-error');
	}	
	
	$.fn.validErrorForm = function(settings)
	{
            settings = $.extend({
                errors : [],
                dander : null,
            }, settings);

            var errors = settings.errors;
            var dander = settings.dander;
            var el;

            $(this).find('.alert-success').text('').hide();
            $(this).find('.error_message').hide();
            
            $(this).find('span[class*=help-]').text('');
            $(this).find('.has-error').removeClass('has-error');

            for(var k in errors)
            {
                el = $(this).find('input[name='+k+'], textarea[name='+k+']');
                if(el.length>0)
                {
                    el.closest('.form-group')
                        .find('span[class^=help-]')
                        .text('')
                        .text(errors[k]);	

                    el.closest('.form-group').addClass('has-error');
                }
            }

            if(Array.isArray(errors))
            {
                for(var k in errors)
                {
                    var text = $(this).find('.error_message').text();
                    $(this).find('.error_message').text(text+' '+errors[k]);
                }    
                
                $(this).find('.error_message').show();
            }
            
	}
	
	// выбирает в select указанный аттрибут
	$.fn.set_selected = function(settings)
	{
            settings = jQuery.extend({
                    value_select : 1,
            }, settings);
            
            $(this).find('option').each(function(){
                $(this).removeAttr('selected');
            });
            
            $(this).find('option[value='+settings.value_select+']').prop('selected', true).trigger('change');
            return $(this);
	};
	
	$.fn.set_selected_multi = function(settings)
	{
            settings = jQuery.extend({

                values_select : new Array(),

            }, settings);

            $(this).find('option').each(function(){
                $(this).removeAttr('selected');
            });

            for(var k in settings.values_select){
                $(this).find('option[value='+settings.values_select[k]+']').prop('selected', true).trigger('change');
            }
            return $(this);
	};
	
	$.fn.deleteOptions = function(settings)
	{
            settings = jQuery.extend({

                arrOptions : new Array(),

            }, settings);	

            for(key in settings.arrOptions){
                $(this).find('option[value='+settings.arrOptions[key]+']').remove();
            }
            return $(this);
	}
	
	$.fn.scrollView = function () {
            return this.each(function () {
                $('html, body').animate({
                        scrollTop: $(this).offset().top - 100
                }, 1000);
            });
	}
	
	$.fn.succesBootstrapForm = function(settings)	
	{
            settings = $.extend({
                    data : [],		
            }, settings);								

            var text = ' ';		

            for(var k in settings.data)		
            {			
                text += (text=='')? settings.data[k] : ' '+settings.data[k];		
                break;
            }

            $(this).find('.alert-success').text('').text(text).show();				
            $(this).find('span[class*=help-]').text('');		
            $(this).find('.has-error').removeClass('has-error');
	}
	
	// убирает у селекта все выборки
	$.fn.clearSelect = function()
	{
            $(this).find('option').each(function()
            {
                $(this).removeAttr('selected');
            });
            return $(this);
	}
	
	$.to_integer = function(string) {
		
            var result =  parseInt($.trim(string));

            if(!result)
                result = 0;

            return result;
		
	};
	
	$.is_Array = function(obj)
	{		
            if (obj.constructor.toString().indexOf("Array") == -1)
                return false;
            else
                return true;
	}
	
	
	$.is_empty_obj = function(obj)
	{
            for (var i in obj) {
                return false;
            }
            return true;
	}
	
	$.myParseStringAndSetParam = function(href, params)
	{
            var last_index = 0
            for(key in params){
                var href = href.replace(/\{\{[a-z0-9\-\_]*\}\}/i, params[key]);
            }
            return href;
	}
	
	$.price_white = function(el){
            el.text(el.text().replace(/(\d{1,3}(?=(\d{3})+(?:\.\d|\b)))/g,'\$1 '));
	}
	
	$.limitChars = function(word, limit)
	{
            if(word.length <= limit)
                return word + "...";

            return word.substring(0, limit-1);
	}
	
	$.limitCharsAuto = function(regex, word, limit)
	{
            var prefix_start = '';
            var prefix_end = '';

            regex.exec(word);
            vLastIndex = regex.lastIndex;

            if( vLastIndex == 0 )
                return $.limitChars(word, limit);

            if( (vLastIndex + limit/2) > word.length)
            {
                var index_last = word.length;
                var index_first = word.length - limit;

                if(index_first - 1 < 0)
                {
                        index_first = 0;
                }
                else
                {
                        prefix_start = '...';
                }
            }
            else
            {
                prefix_end = '...';
                var index_last = vLastIndex + limit/2;
                var index_first = vLastIndex - limit/2;

                if(index_first - 1 < 0)
                {
                    index_last = index_last - index_first ;
                    index_first = 0;
                }
                else
                {
                    prefix_start = '...';
                }
            }

            var word_split = word.substring(index_first, index_last);
            var word = word_split.replace(regex, '<span class="highlight">$1</span>');

            return prefix_start + word  + prefix_end;
	}
	
	$.windowReload = function()
	{	
            var href = location.href.substring(0, location.href.indexOf("#", 0));
            location.href = href;
	}
	
	$.random = function(start, end)
	{
            return Math.floor((Math.random() * end) + start);
	}
	
	$.updateHistory = function(href)
	{
            window.history.pushState('','изменить историю','?h='+$.random(1,900));
            $(window).off('popstate').on('popstate', function(){
                if(href)
                {
                    location.href = href;
                }
            });
	}	
	
	$.number_format = function( number, decimals, dec_point, thousands_sep ) {	
		// Format a number with grouped thousands
		// 
		// +   original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
		// +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +	 bugfix by: Michael White (http://crestidg.com)

		var i, j, kw, kd, km;

		// input sanitation & defaults
		if( isNaN(decimals = Math.abs(decimals)) ){
			decimals = 2;
		}
		if( dec_point == undefined ){
			dec_point = ",";
		}
		if( thousands_sep == undefined ){
			thousands_sep = ".";
		}

		i = parseInt(number = (+number || 0).toFixed(decimals)) + "";

		if( (j = i.length) > 3 ){
			j = j % 3;
		} else{
			j = 0;
		}

		km = (j ? i.substr(0, j) + thousands_sep : "");
		kw = i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thousands_sep);
		//kd = (decimals ? dec_point + Math.abs(number - i).toFixed(decimals).slice(2) : "");
		kd = (decimals ? dec_point + Math.abs(number - i).toFixed(decimals).replace(/-/, 0).slice(2) : "");


		return km + kw + kd;
	}
	
	$.getViewportSize = function(doc)
	{
            doc = doc || document;

            var elem  = doc.compatMode == 'CSS1Compat' ? doc.documentElement : doc.body;

            return [elem.clientWidth, elem.clientHeight];
	}	
	
	$.fn.outerHTML = function(s) {
            return s
                ? this.before(s).remove()
                : jQuery("<p>").append(this.eq(0).clone()).html();
	};
	
})(jQuery);
/* End */
/* /bitrix/templates/aspro_next/media/raty-master/lib/jquery.raty.css?15109296481009 */
/* /bitrix/templates/aspro_next/media/js/useful_lib.js?15076546079265 */
