times=window.times||{};times.mobile=window.times.mobile||{};times.mobile.lazyFonts={constants:{fontsCssHref:"https://m.timesofindia.com/fonts_b64_css/minify-1,v-1.cms"},DOMready:function(a){if(document.attachEvent?document.readyState==="complete":document.readyState!=="loading"){a()}else{document.addEventListener("DOMContentLoaded",a)}},isLocalStorageSupported:function(){try{window.localStorage.test="2";window.localStorage.removeItem("test")}catch(a){return false}return true},isAjaxSupported:function(){return window.XMLHttpRequest },makeAjaxRequest:function(a){try{if(a.loader&&typeof a.loader=="function"){a.loader()}var c=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");if(c){c.onreadystatechange=function(){if(c.readyState==4){if(c.status==200){a.handleResponse(c.responseText)}else{if(a.fail&&typeof a.fail=="function"){a.fail()}}}};c.open(a.method?a.method:"GET",a.url,true);c.send(null)}}catch(b){c=false}},fileIsCached:function(a){return this.isLocalStorageSupported()&&localStorage.font_css_cache&&(localStorage.font_css_cache_file===a) },injectFontsStylesheet:function(){var b=this;if(!b.isLocalStorageSupported()||!b.isAjaxSupported()){var a=document.createElement("link");a.href=b.constants.fontsCssHref;a.rel="stylesheet";a.type="text/css";document.getElementsByTagName("head")[0].appendChild(a)}else{if(b.fileIsCached(b.constants.fontsCssHref)){b.injectRawStyle(localStorage.font_css_cache)}else{b.makeAjaxRequest({url:this.constants.fontsCssHref,handleResponse:function(c){b.injectRawStyle(c);localStorage.font_css_cache=c;localStorage.font_css_cache_file=b.constants.fontsCssHref }})}}},injectRawStyle:function(b){var a=document.createElement("style");a.setAttribute("type","text/css");if(a.styleSheet){a.styleSheet.cssText=b}else{a.innerHTML=b}document.getElementsByTagName("head")[0].appendChild(a)},lazyLoad:function(){if((this.isLocalStorageSupported()&&localStorage.font_css_cache)){this.injectFontsStylesheet()}else{this.DOMready((times.mobile.lazyFonts.injectFontsStylesheet).bind(this))}},init:function(){this.lazyLoad()}};times.mobile.lazyFonts.init();