function _Helper(){var that=this;this.server_url='http://s1.nice-cream.ru/widget/server.php';this.css_url='http://s1.nice-cream.ru/widget/helper.css';this._animation_fps=60;this.params={'sid':-1,'z-index':10000,'margin-right':'5%','userpic':'http://s1.nice-cream.ru/widget/img/userpic.jpg','txt':{'block':{'title':'Юрист Online!','header':'Бесплатная консультация прямо у нас на сайте!','footer':'Ответ через 1 минуту','message_placeholder':'Текст сообщения','submit':'Отправить'},'window':{'thank_you':'Спасибо!
Ваша заявка принята.','title':{'_0':'Мы получили Ваш вопрос','_1':'Юрист, возможно, уже готовит на него ответ','_2':'Как нам можно с Вами связаться?'},'inputs':{'name':{'label':'* Имя:','placeholder':'Иван Иванов'},'city':{'label':'* Город:','placeholder':'Москва'},'phone':{'label':'* Телефон:','placeholder_code':'495','placeholder_num':'555-55-55','example':'Например: (495) 555-16-17'},},'secure':'В соответствии с Федеральным законом Российской Федерации от 27 июля 2006 г. N 152 \"О персональных данных\" - мы гарантируем полную анонимность всех консультаций.','footer':'Предположительное время ответа
1 минута','submit':'Отправить'}},'errors':{'block':{'empty_question':'Пожалуйста, введите текст вопроса!','short_question':'Слишком короткий вопрос!'},'window':{'empty':'Не все поля заполнены.','short_name':'Слишком короткое имя.','short_code':'Код города слишком короткий.','short_phone':'Номер телефона слишком короткий.'}},'colors':{'header':'#2f60a0','block_background':'#e9eced','window_background_top':'#f3f3f3','window_background_middle':'#e4e7ea','window_background_bottom':'#d1d5da','button_background':'red'},'open_timeout':7000,'thank_you_timeout':2000,'speed':{'open':500,'close':300,'window_open':300,'window_close':300,'window_thank_you':300}};this.setParams=function(_params){for(var key in _params){if(_params.hasOwnProperty(key)){this.params[key]=_params[key]}}};this.loadCss=function(){var head=document.getElementsByTagName('head')[0];var css=document.createElement('link');css.rel='stylesheet';css.type='text/css';css.href=this.css_url;css.media='all';head.appendChild(css)};this.getStyle=function(el,styleProp){var value,defaultView=(el.ownerDocument||document).defaultView;if(defaultView&&defaultView.getComputedStyle){styleProp=styleProp.replace(/([A-Z])/g,"-$1").toLowerCase();return defaultView.getComputedStyle(el,null).getPropertyValue(styleProp)}else if(el.currentStyle){styleProp=styleProp.replace(/\-(\w)/g,function(str,letter){return letter.toUpperCase()});value=el.currentStyle[styleProp];if(/^\d+(em|pt|%|ex)?$/i.test(value)){return(function(value){var oldLeft=el.style.left,oldRsLeft=el.runtimeStyle.left;el.runtimeStyle.left=el.currentStyle.left;el.style.left=value||0;value=el.style.pixelLeft+"px";el.style.left=oldLeft;el.runtimeStyle.left=oldRsLeft;return value})(value)}return value}};this._animation_fps=Math.floor(1000/this._animation_fps);this._animations=[];this.animateProcess=function(){var animations_to_delete=[];var animations_count=this._animations.length;for(var i=0;i0){}else{time=1}for(var key in params){if(params.hasOwnProperty(key)){for(var i=0;i