/*! Tinycon - A small library for manipulating the Favicon Tom Moor, http://tommoor.com Copyright (c) 2012 Tom Moor MIT Licensed @version 0.6 */ (function(){var e={};var t=null;var n=null;var r=document.title;var i=null;var s=null;var o={};var u=window.devicePixelRatio||1;var a=16*u;var f={width:7,height:9,font:10*u+"px arial",colour:"#ffffff",background:"#F03D25",fallback:true,abbreviate:true};var l=function(){var e=navigator.userAgent.toLowerCase();return function(t){return e.indexOf(t)!==-1}}();var c={ie:l("msie"),chrome:l("chrome"),webkit:l("chrome")||l("safari"),safari:l("safari")&&!l("chrome"),mozilla:l("mozilla")&&!l("chrome")&&!l("safari")};var h=function(){var e=document.getElementsByTagName("link");for(var t=0,n=e.length;t0)w(n,e,t);E()};if(!r.match(/^data/)){i.crossOrigin="anonymous"}i.src=r};var b=function(e){if(o.fallback){if((e+"").length>0){document.title="("+e+") "+r}else{document.title=r}}};var w=function(e,t,n){if(typeof t=="number"&&t>99&&o.abbreviate){t=S(t)}var r=(t+"").length-1;var i=o.width*u+6*u*r,s=o.height*u;var f=a-s,l=a-i-u,h=16*u,p=16*u,d=2*u;e.font=(c.webkit?"bold ":"")+o.font;e.fillStyle=o.background;e.strokeStyle=o.background;e.lineWidth=u;e.beginPath();e.moveTo(l+d,f);e.quadraticCurveTo(l,f,l,f+d);e.lineTo(l,h-d);e.quadraticCurveTo(l,h,l+d,h);e.lineTo(p-d,h);e.quadraticCurveTo(p,h,p,h-d);e.lineTo(p,f+d);e.quadraticCurveTo(p,f,p-d,f);e.closePath();e.fill();e.beginPath();e.strokeStyle="rgba(0,0,0,0.3)";e.moveTo(l+d/2,h);e.lineTo(p-d/2,h);e.stroke();e.fillStyle=o.colour;e.textAlign="right";e.textBaseline="top";e.fillText(t,u===2?29:15,c.mozilla?7*u:6*u)};var E=function(){if(!v().getContext)return;m(v().toDataURL())};var S=function(e){var t=[["G",1e9],["M",1e6],["k",1e3]];for(var n=0;n=t[n][1]){e=x(e/t[n][1])+t[n][0];break}}return e};var x=function(e,t){var n=new Number(e);return n.toFixed(t)};e.setOptions=function(e){o={};for(var t in f){o[t]=e.hasOwnProperty(t)?e[t]:f[t]}return this};e.setImage=function(e){t=e;E();return this};e.setBubble=function(e,t){e=e||"";y(e,t);return this};e.reset=function(){m(n)};e.setOptions(f);window.Tinycon=e})()