if(typeof mailru!=='object'){mailru={};}(function(window,undefined){var loader,document=window.document,readyModules=[],onReadyCallbacks=[],branch=window.location.href.match(/__branch=([a-z0-9\-]+)/i),protocol,statBrowserName,hosts={};if(branch){branch=branch[1];}function detectBrowser(){var ua=window.navigator.userAgent,tem=ua.match(/(OPR|Edge|Amigo)\/(\d+)/),result=ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(result[1])){tem=/\brv[ :]+(\d+)/g.exec(ua)||[];result=['MSIE',tem[1]];}else if(result[1]==='Chrome'&&tem!==null){if(tem[1]==='OPR'){result=['Opera',tem[2]];}else{result=[tem[1],tem[2]];}}else{if(result[2]){result=[result[1],result[2]]}else{result=[navigator.appName,navigator.appVersion]}tem=ua.match(/version\/(\d+)/i);if(tem!==null){result.splice(1,1,tem[1]);}}return{name:result[0],version:result[1]};}function extend(dst,src){var p;for(p in src){if(src.hasOwnProperty(p)&&p!=0){if(dst.hasOwnProperty(p)){extend(dst[p],src[p]);}else{dst[p]=src[p];}}}}if(window.location.protocol==="https:"){protocol='https://';}else{protocol='http://';}if(!!window.location.href.match(/__prerelease/i)){hosts.connect=protocol+"connect.myalpha6.i.mail.ru/";hosts.imgsmail=protocol+"psi.imgsmail.ru/";hosts.appsmail=protocol+"myalpha6.appsmail.ru/";hosts.mymail=protocol+"my.myalpha6.i.mail.ru/";}else if(branch){hosts.connect=protocol+branch+".connect.myalpha15.i.mail.ru/";hosts.imgsmail=protocol+branch+".myalpha.imgsmail.ru/";hosts.appsmail=protocol+branch+".myalpha15.appsmail.ru/";hosts.mymail=protocol+branch+".my.myalpha15.i.mail.ru/";}else{hosts.connect=protocol+"connect.mail.ru/";hosts.imgsmail=protocol+"my2.imgsmail.ru/";hosts.appsmail=protocol+"www.appsmail.ru/";hosts.mymail=protocol+"my.mail.ru/";}mailru.browser=detectBrowser();if(mailru.browser.name==='Opera'&&mailru.browser.version<15){mailru.isOpera=true;statBrowserName='OperaPresto';}else if(mailru.browser.name==='MSIE'){mailru.isIE=true;statBrowserName=mailru.browser.name+mailru.browser.version;}else{statBrowserName=mailru.browser.name;}(new Image()).src=protocol+'my.mail.ru/grstat?value=1&name=my.api.browsers.'+statBrowserName+'&r='+Math.random();loader={modules:{receiver:2,proxy:1,api:11,xdm:1},require:function(module,onready,deferLoad){var moduleName,moduleVersion,scriptTag,src=this.getHost('imgsmail')+'mail/ru/images/js/connect/';if(module.name){moduleName=module.name;if(module.version){moduleVersion=module.version;}else{moduleVersion='latest';}}else{moduleName=module;}if(readyModules[moduleName]){onready();}else{src+=moduleName+'/';if(moduleVersion){src+=moduleVersion+'/';}src+=moduleName;if(!module.dev&&!branch){src+='_min';}if(!onReadyCallbacks[moduleName]){if(onReadyCallbacks[moduleName]===undefined){onReadyCallbacks[moduleName]=[];}onReadyCallbacks[moduleName].push(onready);scriptTag=document.createElement('script');scriptTag.type='text/javascript';scriptTag.src=src+'.js?'+this.modules[moduleName];if(deferLoad){scriptTag.defer="defer";}document.getElementsByTagName('head')[0].appendChild(scriptTag);}else{onReadyCallbacks[moduleName].push(onready);}}},onready:function(module){var i,callbacks=onReadyCallbacks[module],throwingMatch=location.href.match(/throwing=1/i),throwExceptions=(throwingMatch&&throwingMatch.length>0);if(callbacks){readyModules[module]=true;if(callbacks.length){for(i=0;i<callbacks.length;i+=1){if(!throwExceptions){try{callbacks[i]();}catch(e){}}else{callbacks[i]();}}}}},getHost:function(hostname){return hosts[hostname];},getEnv:function(){var isHttps=window.location.protocol==='https:',prerelease=window.location.href.match(/__prerelease/i)!==null,branchMatch=window.location.href.match(/__branch=([a-z0-9\-]*)/i),branch=(branchMatch&&branchMatch.length>0)?branchMatch[1]:'';return{'branch':branch,'isHttps':isHttps,'prerelease':prerelease};},getMode:function(moduleEnv){var mode='http-live';if(moduleEnv.branch!==''&&moduleEnv.isHttps){mode='https-alpha';}else if(moduleEnv.branch!==''){mode='http-alpha';}else if(moduleEnv.prerelease){mode='http-prerelease';}else if(moduleEnv.isHttps){mode='https-live';}return mode;}};if(mailru.loader){if(!mailru.loader.onready){extend(mailru.loader,loader);}}else{mailru.loader=loader;}mailru.isApp=window.name.indexOf('mailruapp')!==-1;if(window.postMessage){mailru.intercomType='event';}else{mailru.intercomType='hash';}mailru.init=function(onready,private_key,DOMFlashId){mailru.loader.require('api',function(){var el;try{mailru.app.init(private_key);}catch(e){}if(DOMFlashId&&(el=document.getElementById(DOMFlashId))){window.setTimeout(onready,1);mailru.events.listen('event',function(name,data){document.getElementById(DOMFlashId).mailruEvent(name,data);});}});};mailru.autoInit=(function(){if(!mailru.disableAutoInit){var a=document.getElementsByTagName('a'),al=a.length,i;for(i=0;i<al;i+=1){if(typeof a[i]!=='undefined'&&a[i].className.indexOf('mrc__plugin')!=-1){mailru.loader.require('api',function(){mailru.plugin.init();});break;}}}})();}(window));