var GlobalFunctions={getStringDate:function(date,mysql){var todayDate=date.getDate(),todayStringDate=((todayDate<10)?'0':'')+todayDate.toString(),todayMonth=date.getMonth()+1,todayStringMonth=((todayMonth<10)?'0':'')+todayMonth.toString();todayFullYear=date.getFullYear(),todayYear=todayFullYear.toString();return mysql?todayYear+'.'+todayStringMonth+'.'+todayStringDate:todayStringDate+'.'+todayStringMonth+'.'+todayYear;}};function set_cookie(name,value,expires){if(!expires){expires=new Date();}document.cookie=name+"="+escape(value)+"; expires="+expires.toGMTString()+"; path=/";}function save_cookie(name,value){var expires=new Date();expires.setTime(expires.getTime()+(1000*86400));set_cookie(name,value,expires);}function get_cookie(cookie_name){var results=document.cookie.match('(^|;) ?'+cookie_name+'=([^;]*)(;|$)');if(results){return(unescape(results[2]));}else{return null;}}$(function(){$('.js-trigger-site').click(function(){save_cookie('mobile',1);});var translateTimer,translateList=$('.js-translate-list'),translateListItem=translateList.find('.js-change-locale'),localeState=get_cookie('locale')||'ru';function triggerList(show){translateList.toggleClass('b-footer-translate-list--show',show);}translateListItem.click(function(){var $this=$(this),loc=$this.data('locale');Microsoft.Translator.Widget.Translate('ru',loc);$('.js-translate-button').text($this.data('locale'));save_cookie('locale',loc);translateListItem.removeClass('selected');$this.addClass('selected');triggerList();});$('.js-translate-button').mouseenter(function(){triggerList(true);clearTimeout(translateTimer);}).mouseleave(function(){translateTimer=setTimeout(triggerList,100)});translateList.mouseenter(function(){clearTimeout(translateTimer);}).mouseleave(function(){translateTimer=setTimeout(triggerList,100)});translateListItem.filter(function(){return $(this).data('locale')==localeState;}).addClass('selected');if(localeState){}});