if(typeof String.prototype.trim!=="function")String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};if(typeof Array.prototype.some!=="function")Array.prototype.some=function(e,h){var i=this.length;if(typeof e!="function")throw new TypeError;for(var d=0;d<i;d++)if(d in this&&e.call(h,this[d],d,this))return!0;return!1};
var __=function(){var e=function(a,b){return!a||!a.className?!1:a.className.split(" ").some(function(a){return a===b})},h=function(a,b){if(a){typeof a.length=="undefined"&&(a=[a]);for(var c=0;c<a.length;c++)if(!e(a[c],b)){var l=a[c].className.split(" ");l.push(b);a[c].className=l.join(" ")}}},i=function(a,b){if(a){typeof a.length=="undefined"&&(a=[a]);for(var c=0;c<a.length;c++)a[c].className=a[c].className.replace(RegExp("(\\s"+b+")|("+b+"\\s)|"+b),"")}},d=function(a){d=window.JSON?function(a){try{return JSON.parse(a)}catch(c){throw"Possible invalid JSON encountered: "+
c.toString();}}:function(a){return eval("("+a+")")};return d(a)},j=function(){j=window.ActiveXObject?function(){return new ActiveXObject("Microsoft.XMLHTTP")}:function(){return new XMLHttpRequest};return j()},m=function(a){return function(){var b=window.event;b.target=b.srcElement;b.preventDefault=function(){b.returnValue=!1};b.stopPropagation=function(){b.cancelBubble=!0};a.call(b.srcElement,b)}},f=function(a,b,c){b.addEventListener?f=function(a,b,c){b.addEventListener(a,c,!1)}:b.attachEvent&&(f=
function(a,b,c){b.attachEvent("on"+a,m(c))});f(a,b,c)},g=function(a,b,c){b.removeEventListener?g=function(a,b,c){b.removeEventListener(a,c,!1)}:b.attachEvent&&(g=function(a,b,c){b.detachEvent("on"+a,m(c))});g(a,b,c)},k=function(a,b){k=document.getElementsByClassName?function(a,b){b||(b=document);return b.getElementsByClassName(a)}:function(a,b){var d=[];b||(b=document);for(var e=b.getElementsByTagName("*"),h=e.length,i=RegExp("(^|\\s)"+a+"(\\s|$)"),f=0,g=0;f<h;f++)i.test(e[f].className)&&(d[g]=e[f],
g++);return d};return k(a,b)};return{el:function(a){return document.getElementById(a)},hasClass:e,addClass:h,removeClass:i,toggleClass:function(a,b){e(a,b)?i(a,b):h(a,b)},parseJSON:d,ajax:function(a){var b=j();b.onreadystatechange=function(){switch(b.readyState){case 1:typeof a.loading=="function"&&a.loading();break;case 2:typeof a.loaded=="function"&&a.loaded();break;case 4:var c=b.responseText;switch(b.status){case 200:typeof a.success=="function"&&a.success(c);break;case 404:typeof a.error=="function"&&
a.error();break;case 500:typeof a.error=="function"&&a.error()}typeof a.complete=="function"&&a.complete()}};b.open((a.type||"get").toUpperCase(),a.url,!0);b.send(null)},listen:f,unlisten:g,getElementsByClassName:k,map:function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a,a[d]);return c}}}();
if(!window.requestAnimationFrame)window.requestAnimationFrame=function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();
var windowHalfX=window.innerWidth/2,windowHalfY=window.innerHeight/2,mking=function(){function d(){for(var a=document.querySelectorAll("div.dialog"),b=0;b<a.length;b++)if(a[b].className.match(/dialog-open/)){a[b].className="dialog dialog-close";break}c.style.display="none";e.style.opacity=1;c.removeEventListener("click",d,!1)}function i(a){a.preventDefault();d(!0);a=a.target.getAttribute("rel");c.style.display="block";e.style.opacity=0.5;__.el(a).className="dialog dialog-open";__.el(a).style.top=
windowHalfY-__.el(a).offsetHeight/2-(windowHalfY-250)+"px";c.addEventListener("click",d,!1);"_gaq"in window&&_gaq.push(["_trackPageview","/"+a])}function j(a,b,c){b(a.getContext("2d"));a.addEventListener("click",function(a){window.open(c);"_gaq"in window&&_gaq.push(["_trackEvent","Social Outbound","Click",c]);a.preventDefault();a.stopPropagation()},!1)}function g(){if(!h){if(document.createElement("canvas").getContext)document.body.className="willrun";h=!0}return document.body.className.match(/willrun/)}
var h,c,e,f={linkedin:{prg:function(a){a.strokeStyle="rgba(86, 230, 231, 0.9)";a.globalAlpha="1.0";a.lineWidth="1";a.lineCap="butt";a.lineJoin="round";a.mitterLimit="1";a.font="normal normal 12 Courier";a.mitterLimit="10";a.beginPath();a.moveTo(36.35,69);a.lineTo(36.35,36.61);a.lineTo(25.63,36.61);a.lineTo(25.63,69);a.lineTo(36.35,69);a.lineTo(36.35,69);a.closePath();a.moveTo(30.99,32.19);a.bezierCurveTo(34.73,32.19,37.06,29.7,37.06,26.59);a.bezierCurveTo(36.99,23.42,34.73,21,31.06,21);a.bezierCurveTo(27.4,
21,25,23.42,25,26.59);a.bezierCurveTo(25,29.7,27.33,32.19,30.92,32.19);a.lineTo(30.99,32.19);a.lineTo(30.99,32.19);a.closePath();a.stroke();a.beginPath();a.moveTo(42.28,69);a.lineTo(53,69);a.lineTo(53,50.91);a.bezierCurveTo(53,49.94,53.07,48.98,53.35,48.29);a.bezierCurveTo(54.13,46.35,55.89,44.35,58.85,44.35);a.bezierCurveTo(62.73,44.35,64.28,47.32,64.28,51.67);a.lineTo(64.28,69);a.lineTo(75,69);a.lineTo(75,50.43);a.bezierCurveTo(75,40.48,69.71,35.85,62.66,35.85);a.bezierCurveTo(56.88,35.85,54.34,
39.1,52.93,41.31);a.lineTo(53,41.31);a.lineTo(53,36.61);a.lineTo(42.28,36.61);a.bezierCurveTo(42.42,39.65,42.28,69,42.28,69);a.lineTo(42.28,69);a.closePath();a.stroke()},link:"http://www.linkedin.com/in/whatismking"},twitter:{prg:function(a){a.fillStyle="rgba(86, 230, 231, 0.9)";a.globalAlpha="1.0";a.lineCap="butt";a.lineJoin="round";a.mitterLimit="1";a.font="normal normal 12 Courier";a.beginPath();a.moveTo(62.96,54.82);a.lineTo(62.94,54.73);a.bezierCurveTo(69.14,54.11,74,48.75,74,42.36);a.bezierCurveTo(74,
35.59,68.51,30.08,61.75,30.08);a.lineTo(48.5,30.08);a.lineTo(48.5,28.78);a.bezierCurveTo(48.5,22.01,43,16.5,36.25,16.5);a.bezierCurveTo(29.48,16.5,24,22.01,24,28.78);a.lineTo(24,59.38);a.bezierCurveTo(24,70.69,31.66,79.5,43.02,79.5);a.lineTo(61.75,79.5);a.bezierCurveTo(68.51,79.5,74,73.99,74,67.22);a.bezierCurveTo(74,60.85,69.15,55.45,62.96,54.82);a.closePath();a.moveTo(61.76,74.08);a.lineTo(44.83,74.08);a.bezierCurveTo(44.65,74.08,44.49,74.06,44.33,74.06);a.bezierCurveTo(34.28,73.79,29.4,67.42,29.4,
58.68);a.bezierCurveTo(29.41,58.59,29.41,58.5,29.41,58.39);a.lineTo(29.41,28.78);a.bezierCurveTo(29.41,25,32.47,21.92,36.26,21.92);a.bezierCurveTo(40.02,21.92,43.1,25,43.1,28.78);a.lineTo(43.1,35.5);a.lineTo(61.76,35.5);a.bezierCurveTo(65.53,35.5,68.61,38.58,68.61,42.36);a.bezierCurveTo(68.61,46.15,65.53,49.22,61.76,49.22);a.lineTo(43.1,49.22);a.lineTo(43.1,59.11);a.bezierCurveTo(43.1,59.91,43.33,60.36,44.07,60.36);a.lineTo(61.76,60.36);a.bezierCurveTo(65.53,60.36,68.61,63.43,68.61,67.22);a.bezierCurveTo(68.61,
71,65.53,74.08,61.76,74.08);a.closePath();a.fill()},link:"http://twitter.com/#!/mattking/"},stackoverflow:{prg:function(a){a.fillStyle="rgba(86, 230, 231, 0.9)";a.strokeStyle="transparent";a.globalAlpha="1.0";a.lineWidth="1";a.lineCap="butt";a.lineJoin="round";a.mitterLimit="1";a.font="normal normal 12 Courier";a.strokeStyle="rgba(86, 230, 231, 0.9)";a.mitterLimit="10";a.moveTo(41.59,35.26);a.lineTo(63.12,48.27);a.lineTo(60.3,52.94);a.lineTo(38.77,39.93);a.lineTo(41.59,35.26);a.closePath();a.moveTo(35.73,
47.51);a.lineTo(59.93,54.34);a.lineTo(58.45,59.59);a.lineTo(34.25,52.76);a.lineTo(35.73,47.51);a.closePath();a.moveTo(33.44,58.34);a.lineTo(58.47,60.76);a.lineTo(57.95,66.19);a.lineTo(32.91,63.77);a.lineTo(33.44,58.34);a.closePath();a.moveTo(32.85,67.92);a.lineTo(57.87,67.92);a.lineTo(57.87,73.24);a.lineTo(32.85,73.24);a.lineTo(32.85,67.92);a.closePath();a.moveTo(66.65,81.89);a.lineTo(25,81.89);a.lineTo(25.03,55.29);a.lineTo(29.82,55.33);a.lineTo(29.66,76.7);a.lineTo(61.59,76.7);a.lineTo(61.59,55.41);
a.lineTo(66.65,55.41);a.lineTo(66.65,81.89);a.closePath();a.moveTo(64.05,47.29);a.lineTo(49.4,26.85);a.lineTo(53.84,23.67);a.lineTo(68.49,44.11);a.lineTo(64.05,47.29);a.closePath();a.moveTo(69.62,43.81);a.lineTo(65.47,19.01);a.lineTo(70.86,18.11);a.lineTo(75,42.92);a.lineTo(69.62,43.81);a.closePath();a.stroke();a.fill()},link:"http://stackoverflow.com/users/211187/matt-king"}};return{init:function(){document.body.style.width=windowHalfX*2+"px";document.body.style.height=windowHalfY*2+"px";__.listen("resize",
window,function(){windowHalfX=window.innerWidth/2;windowHalfY=window.innerHeight/2;document.body.style.width=windowHalfX*2+"px";document.body.style.height=windowHalfY*2+"px"});c=__.el("screen");e=__.el("content");if(g()){for(var a=document.querySelectorAll("div.item"),b=0;b<a.length;b++)a[b].getAttribute("id")!="item-avatar"&&a[b].addEventListener("click",i,!1),setTimeout(function(a){return function(){a.className+=" open-item"}}(a[b]),200+100*b);for(k in f)j(__.el(k),f[k].prg,f[k].link)}},willRun:g}}();
var experience=function(){function m(a){for(k in a)this[k]=a[k];this.end_year=this.start_year+this.duration/12}function n(a){for(var b=__.el("experience").getElementsByClassName("wrapper")[0].scrollLeft,b=a.offsetX||a.clientX-(windowHalfX-350)+b,a=a.offsetY||a.clientY-(windowHalfY-165),a={bounds:{left:b-c,top:a-c,right:b+c,bottom:a+c}},b=!1,d=0;d<f.length;d++)if(f[d].collides(a))f[d].active=!0,f[d].draw(),f[d].showInfo(),b=!0;else if(f[d].active)f[d].active=!1,f[d].draw();b?document.body.style.cursor=
"help":(document.body.style.cursor="default",i.style.display="none")}var f=[],j,b,g,l,c=6,h,i;m.prototype.draw=function(){if(!this.bounds)this.x=((this.start_year-g)*12+(this.start_month-1))*c,this.y=c*this.buffer+this.idx*c*this.buffer,this.w=this.duration*c,this.setBounds();this.ctx.fillStyle=this.active?"rgb(75, 204, 204)":"rgb(103, 153, 153)";this.ctx.fillRect(this.x+0.5,this.y+0.5,this.w,c)};m.prototype.setBounds=function(){this.bounds={left:this.x-c,top:this.y-c,right:this.x+this.w+c,bottom:this.y+
c}};m.prototype.collides=function(a){return this.bounds.right>a.bounds.left&&this.bounds.left<a.bounds.right&&this.bounds.bottom>a.bounds.top&&this.bounds.top<a.bounds.bottom?!0:!1};m.prototype.showInfo=function(){var a=__.el("experience").getElementsByClassName("wrapper")[0].scrollLeft;i.style.left=this.x-a+500>700?this.x+this.w-a-500+10+"px":this.x-a+10+"px";i.style.top=this.y+c+30+"px";i.innerHTML="<h3>"+this.name+" - "+this.start_month+"/"+this.start_year+"</h3> <p>"+this.description+"</p>";i.style.display=
"block"};return{init:function(a){if(mking.willRun()){j=__.el("experience-grid");b=j.getContext("2d");for(var e=0;e<a.length;e++){var d=new m(a[e]);d.ctx=b;d.idx=e;d.buffer=5;if(!g||d.start_year<g)g=d.start_year;if(!l||d.end_year>l)l=d.end_year;f.push(d)}h=(l-g)*12*c+1;j.width=h;j.height=331;j.style.marginBottom="20px";b.strokeStyle="rgba(86, 230, 231, 0.2)";for(a=3;a<Math.ceil(331/c);a++)b.beginPath(),b.moveTo(0,a*c+0.5),b.lineTo(h,a*c+0.5),b.stroke();b.beginPath();b.moveTo(h+0.5,0.5);b.lineTo(h+
0.5,331);b.stroke();for(a=0;a<h/c;a++)b.beginPath(),b.moveTo(a*c+0.5,3*c+0.5),b.lineTo(a*c+0.5,331),b.stroke();b.beginPath();b.moveTo(0.5,331.5);b.lineTo(h+0.5,331.5);b.stroke();b.strokeStyle="rgba(86, 230, 231, 0.9)";for(a=1;a<=l-g;a++)b.beginPath(),b.moveTo(a*c*12+0.5,0.5),b.lineTo(a*c*12+0.5,331.5),b.stroke();b.font='11px "Anonymous Pro"';b.fillStyle="rgba(86, 230, 231, 0.9)";e=42;for(a=g;a<l;a++)b.fillText(a,e+0.5,12.5),e+=12*c;for(e=0;e<f.length;e++)f[e].draw();__.listen("mousemove",j,n);i=__.el("experience-description")}}}}();
var skills=function(){function h(a){for(k in a)this[k]=a[k];this.setBounds()}function r(a){__.el("experience").getElementsByClassName("wrapper");for(var b=a.offsetX||a.clientX-(windowHalfX-350),a=a.offsetY||a.clientY-(windowHalfY-165),b={bounds:{left:b-5,top:a,right:b+5,bottom:a+5}},d,a=0,c=i.length;a<c;a++)i[a].collides(b)?d=i[a]:i[a].active&&i[a].mouseout();if(d)d.active=!0,d.mouseover()}function s(){for(var a=0,b=i.length;a<b;a++)if(i[a].active){i[a].mouseout();break}j.style.display="none"}var i=
[],m,e,j,n=["rgb(9, 26, 26)","rgb(34, 51, 51)","rgb(51, 77, 77)","rgb(103, 153, 153)","rgb(75, 204, 204)"],p=["Shows Interest","Dabbled","Advanced Tactics","Highly Skilled","Expert"];h.prototype.setBounds=function(){this.bounds={top:this.y,right:this.x+this.width,bottom:this.y+this.height,left:this.x};this.states={}};h.prototype.genGradient=function(a,b,d){this.states[a]||(this.states[a]=this.ctx.createRadialGradient(this.x+this.width/2,this.y+this.height/2,10,this.x+this.width/2,this.y+this.height/
2,this.width),this.states[a].addColorStop(0,b),this.states[a].addColorStop(1,d));return this.states[a]};h.prototype.fillWithGradient=function(a,b,d){this.ctx.fillStyle=this.genGradient(a,b,d);this.ctx.fillRect(this.x,this.y,this.width,this.height);this.ctx.strokeStyle="#111";this.ctx.strokeRect(this.x+0.5,this.y+0.5,this.width,this.height)};h.prototype.fillWithText=function(){this.ctx.fillStyle="#FFF";this.ctx.shadowOffsetX=1;this.ctx.shadowOffsetY=1;this.ctx.shadowBlur=1;this.ctx.shadowColor="#000";
this.ctx.fillText(this.name,this.x+this.textBufferX-0.5,this.y+this.textBufferY)};h.prototype.draw=function(){this.ctx.save();this.fillWithGradient("inactive",n[this.score-1],"rgba(12, 12, 12, 1)");this.fillWithText();this.ctx.restore()};h.prototype.collides=function(a){return this.bounds.right>a.bounds.left&&this.bounds.left<a.bounds.right&&this.bounds.bottom>a.bounds.top&&this.bounds.top<a.bounds.bottom?!0:!1};h.prototype.mouseover=function(){this.ctx.save();this.fillWithGradient("active","rgba(201, 201, 201, 0.8)",
"rgba(12, 12, 12, 1)");this.fillWithText();this.ctx.restore();this.display()};h.prototype.mouseout=function(){this.ctx.clearRect(this.x,this.y,this.width,this.height);this.draw();this.active=!1};h.prototype.display=function(){j.innerHTML=this.description;j.style.top=this.y+55+"px";j.style.left=this.x+20+"px";j.style.display="block"};return{init:function(a){if(mking.willRun()){m=__.el("skills-grid");e=m.getContext("2d");e.font='normal 11px "Anonymous Pro"';var b=0,d=0,c=[];j=__.el("skill-description");
for(var f=0;f<a.length;f++){var o=Math.floor(e.measureText(a[f].name).width)+50;if(b+o>674||f==a.length-1){for(var l=Math.floor((674-b)/c.length),g=0;g<c.length;g++){if(g>0)c[g].x=c[g-1].width+c[g-1].x;c[g].width+=l;c[g].textBufferX+=Math.ceil(l/2);if(g==c.length-1){var q=((674-b)/c.length-l)*c.length;c[g].width+=q;c[g].textBufferX+=Math.floor(q/2)}c[g].setBounds();c[g].draw()}i=i.concat(c.splice(0));d+=34;b=0}l=new h({name:a[f].name,description:a[f].description,score:a[f].score,ctx:e,fillStyle:"rgb(86, 230, 231)",
strokeStyle:"rgb(86, 230, 231)",width:o,height:34,x:b,y:d,textBufferX:Math.round(25)+0.5,textBufferY:22});c.push(l);b+=o}b=0;for(f=n.length-1;f>=0;f--)e.save(),a=40*(n.length-1-f),a+=b,d=e.createRadialGradient(a+10,340,2,a+10,340,20),d.addColorStop(0,n[f]),d.addColorStop(1,"rgba(12, 12, 12, 1)"),e.fillStyle=d,e.fillRect(a,330,20,20),e.strokeRect(a,330,20,20),e.fillStyle="#FFF",e.font='11px "Anonymous Pro"',e.fillText(p[f],a+30,343),b+=Math.round(e.measureText(p[f]).width)+10,e.restore();__.listen("mousemove",
m,r);__.listen("mouseout",m,s)}}}}();
var sparkles=function(){function b(a){for(k in a)this[k]=a[k];this.canvasElement=document.createElement("canvas");this.ctx=this.canvasElement.getContext("2d");a=Math.ceil(Math.random()*10)*(this.idx/4);this.width+=a;this.height+=a;this.canvasElement.className="sparkle";this.canvasElement.width=this.width+30;this.canvasElement.height=this.height+30;this.canvasElement.style.position="absolute";this.canvasElement.style.left=this.x+"px";this.canvasElement.style.top=this.y+"px";this.canvasElement.style.zIndex=
this.idx;this.container.appendChild(this.canvasElement);this.canvasElement.addEventListener("webkitTransitionEnd",function(a){return function(){a.transitionEnd.call(a)}}(this),!1);this.canvasElement.addEventListener("transitionend",function(a){return function(){a.transitionEnd.call(a)}}(this),!1)}function c(){for(var a=Math.round(Math.random()*50+10),d=0;d<a;d++){var c=new b({x:Math.ceil(Math.random()*2E3),y:Math.ceil(Math.random()*300+100),width:20,height:20,color:"rgba(86, 230, 231, 0.4)",idx:d,
container:document.body});c.draw();e.push(c)}}function f(){for(;e.length>0;){var a=e.shift();setTimeout(function(a){return function(){a.drop.call(a)}}(a),Math.random()*1E4)}setTimeout(function(){c();f()},Math.random()*1E4+1E4)}var e=[];b.prototype.draw=function(){var a=this.ctx.createRadialGradient(this.width/2,this.height/2,2,this.width/2,this.height/2,this.width/2);a.addColorStop(0,this.color);a.addColorStop(1,"rgba(0, 0, 0, 0)");this.ctx.fillStyle=a;this.ctx.fillRect(0,0,this.width,this.height);
this.ctx.shadowOffsetX=Math.random()*10-5;this.ctx.shadowOffsetY=Math.random()*10-5;this.ctx.shadowBlur=40;this.ctx.shadowColor=this.color;this.ctx.beginPath();this.ctx.arc(this.width/2-(Math.random()*10-5),this.height/2-(Math.random()*10-5),this.width/4,0,Math.PI/180*360);this.ctx.fill();this.ctx.shadowOffsetX=Math.random()*10-5;this.ctx.shadowOffsetY=Math.random()*10-5;this.ctx.fillStyle="rgba(75, 204, 204, 0.3)";this.ctx.arc(this.width/2+(Math.random()*10-5),this.height/2+(Math.random()*10-5),
this.width/4,0,Math.PI/180*360);this.ctx.fill()};b.prototype.destroy=function(){this.container.removeChild(this.canvasElement)};b.prototype.drop=function(){this.moved=!0;var a="translate("+Math.ceil(Math.random()*window.innerWidth-window.innerWidth/2)+"px, "+Math.ceil(Math.random()*window.innerHeight+window.innerHeight)+"px) rotate("+(Math.ceil(Math.random()*360)+360)+"deg)";this.canvasElement.style.MozTransform=a;this.canvasElement.style.webkitTransform=a};b.prototype.transitionEnd=function(){this.moved&&
this.destroy()};return{init:function(){mking.willRun()&&(c(),f())}}}();

