jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(h,g,a,e,f){return jQuery.easing[jQuery.easing.def](h,g,a,e,f)},easeInQuad:function(h,g,a,e,f){return e*(g/=f)*g+a},easeOutQuad:function(h,g,a,e,f){return -e*(g/=f)*(g-2)+a},easeInOutQuad:function(h,g,a,e,f){if((g/=f/2)<1){return e/2*g*g+a}return -e/2*((--g)*(g-2)-1)+a},easeInCubic:function(h,g,a,e,f){return e*(g/=f)*g*g+a},easeOutCubic:function(h,g,a,e,f){return e*((g=g/f-1)*g*g+1)+a},easeInOutCubic:function(h,g,a,e,f){if((g/=f/2)<1){return e/2*g*g*g+a}return e/2*((g-=2)*g*g+2)+a},easeInQuart:function(h,g,a,e,f){return e*(g/=f)*g*g*g+a},easeOutQuart:function(h,g,a,e,f){return -e*((g=g/f-1)*g*g*g-1)+a},easeInOutQuart:function(h,g,a,e,f){if((g/=f/2)<1){return e/2*g*g*g*g+a}return -e/2*((g-=2)*g*g*g-2)+a},easeInQuint:function(h,g,a,e,f){return e*(g/=f)*g*g*g*g+a},easeOutQuint:function(h,g,a,e,f){return e*((g=g/f-1)*g*g*g*g+1)+a},easeInOutQuint:function(h,g,a,e,f){if((g/=f/2)<1){return e/2*g*g*g*g*g+a}return e/2*((g-=2)*g*g*g*g+2)+a},easeInSine:function(h,g,a,e,f){return -e*Math.cos(g/f*(Math.PI/2))+e+a},easeOutSine:function(h,g,a,e,f){return e*Math.sin(g/f*(Math.PI/2))+a},easeInOutSine:function(h,g,a,e,f){return -e/2*(Math.cos(Math.PI*g/f)-1)+a},easeInExpo:function(h,g,a,e,f){return(g==0)?a:e*Math.pow(2,10*(g/f-1))+a},easeOutExpo:function(h,g,a,e,f){return(g==f)?a+e:e*(-Math.pow(2,-10*g/f)+1)+a},easeInOutExpo:function(h,g,a,e,f){if(g==0){return a}if(g==f){return a+e}if((g/=f/2)<1){return e/2*Math.pow(2,10*(g-1))+a}return e/2*(-Math.pow(2,-10*--g)+2)+a},easeInCirc:function(h,g,a,e,f){return -e*(Math.sqrt(1-(g/=f)*g)-1)+a},easeOutCirc:function(h,g,a,e,f){return e*Math.sqrt(1-(g=g/f-1)*g)+a},easeInOutCirc:function(h,g,a,e,f){if((g/=f/2)<1){return -e/2*(Math.sqrt(1-g*g)-1)+a}return e/2*(Math.sqrt(1-(g-=2)*g)+1)+a},easeInElastic:function(l,k,f,g,h){var j=1.70158;var i=0;var e=g;if(k==0){return f}if((k/=h)==1){return f+g}if(!i){i=h*0.3}if(e<Math.abs(g)){e=g;var j=i/4}else{var j=i/(2*Math.PI)*Math.asin(g/e)}return -(e*Math.pow(2,10*(k-=1))*Math.sin((k*h-j)*(2*Math.PI)/i))+f},easeOutElastic:function(l,k,f,g,h){var j=1.70158;var i=0;var e=g;if(k==0){return f}if((k/=h)==1){return f+g}if(!i){i=h*0.3}if(e<Math.abs(g)){e=g;var j=i/4}else{var j=i/(2*Math.PI)*Math.asin(g/e)}return e*Math.pow(2,-10*k)*Math.sin((k*h-j)*(2*Math.PI)/i)+g+f},easeInOutElastic:function(l,k,f,g,h){var j=1.70158;var i=0;var e=g;if(k==0){return f}if((k/=h/2)==2){return f+g}if(!i){i=h*(0.3*1.5)}if(e<Math.abs(g)){e=g;var j=i/4}else{var j=i/(2*Math.PI)*Math.asin(g/e)}if(k<1){return -0.5*(e*Math.pow(2,10*(k-=1))*Math.sin((k*h-j)*(2*Math.PI)/i))+f}return e*Math.pow(2,-10*(k-=1))*Math.sin((k*h-j)*(2*Math.PI)/i)*0.5+g+f},easeInBack:function(i,h,a,e,f,g){if(g==undefined){g=1.70158}return e*(h/=f)*h*((g+1)*h-g)+a},easeOutBack:function(i,h,a,e,f,g){if(g==undefined){g=1.70158}return e*((h=h/f-1)*h*((g+1)*h+g)+1)+a},easeInOutBack:function(i,h,a,e,f,g){if(g==undefined){g=1.70158}if((h/=f/2)<1){return e/2*(h*h*(((g*=(1.525))+1)*h-g))+a}return e/2*((h-=2)*h*(((g*=(1.525))+1)*h+g)+2)+a},easeInBounce:function(h,g,a,e,f){return e-jQuery.easing.easeOutBounce(h,f-g,0,e,f)+a},easeOutBounce:function(h,g,a,e,f){if((g/=f)<(1/2.75)){return e*(7.5625*g*g)+a}else{if(g<(2/2.75)){return e*(7.5625*(g-=(1.5/2.75))*g+0.75)+a}else{if(g<(2.5/2.75)){return e*(7.5625*(g-=(2.25/2.75))*g+0.9375)+a}else{return e*(7.5625*(g-=(2.625/2.75))*g+0.984375)+a}}}},easeInOutBounce:function(h,g,a,e,f){if(g<f/2){return jQuery.easing.easeInBounce(h,g*2,0,e,f)*0.5+a}return jQuery.easing.easeOutBounce(h,g*2-f,0,e,f)*0.5+e*0.5+a}});(function(y){var P=y.fn.domManip,B="_tmplitem",O=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,z={},D={},C,N={key:0,data:{}},G=0,A=0,J=[];function E(i,b,j,f){var a={data:f||(f===0||f===false)?f:b?b.data:{},_wrap:b?b._wrap:null,tmpl:null,parent:b||null,nodes:[],calls:S,nest:U,wrap:V,html:T,update:R};i&&y.extend(a,i,{nodes:[],parent:b});if(j){a.tmpl=j;a._ctnt=a._ctnt||a.tmpl(y,a);a.key=++G;(J.length?D:z)[G]=a}return a}y.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,a){y.fn[b]=function(r){var c=[],e=y(r),o,d,q,p,f=this.length===1&&this[0].parentNode;C=z||{};if(f&&f.nodeType===11&&f.childNodes.length===1&&e.length===1){e[a](this[0]);c=this}else{for(d=0,q=e.length;d<q;d++){A=d;o=(d>0?this.clone(true):this).get();y(e[d])[a](o);c=c.concat(o)}A=0;c=this.pushStack(c,b,e.selector)}p=C;C=null;y.tmpl.complete(p);return c}});y.fn.extend({tmpl:function(f,e,a){return y.tmpl(this[0],f,e,a)},tmplItem:function(){return y.tmplItem(this[0])},template:function(a){return y.template(a,this[0])},domManip:function(a,p,o){if(a[0]&&y.isArray(a[0])){var c=y.makeArray(arguments),e=a[0],n=e.length,l=0,b;while(l<n&&!(b=y.data(e[l++],"tmplItem"))){}if(b&&A){c[2]=function(d){y.tmpl.afterManip(this,d,o)}}P.apply(this,c)}else{P.apply(this,arguments)}A=0;!C&&y.tmpl.complete(z);return this}});y.extend({tmpl:function(b,g,f,a){var j,l=!a;if(l){a=N;b=y.template[b]||y.template(null,b);D={}}else{if(!b){b=a.tmpl;z[a.key]=a;a.nodes=[];a.wrapped&&L(a,a.wrapped);return y(H(a,null,a.tmpl(y,a)))}}if(!b){return[]}if(typeof g==="function"){g=g.call(a||{})}f&&f.wrapped&&L(f,f.wrapped);j=y.isArray(g)?y.map(g,function(c){return c?E(f,a,b,c):null}):[E(f,a,b,g)];return l?y(H(a,null,j)):j},tmplItem:function(a){var d;if(a instanceof y){a=a[0]}while(a&&a.nodeType===1&&!(d=y.data(a,"tmplItem"))&&(a=a.parentNode)){}return d||N},template:function(d,a){if(a){if(typeof a==="string"){a=M(a)}else{if(a instanceof y){a=a[0]||{}}}if(a.nodeType){a=y.data(a,"tmpl")||y.data(a,"tmpl",M(a.innerHTML))}return typeof d==="string"?(y.template[d]=a):a}return d?typeof d!=="string"?y.template(null,d):y.template[d]||y.template(null,O.test(d)?d:y(d)):null},encode:function(b){return(""+b).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});y.extend(y.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){z={}},afterManip:function(h,a,c){var g=a.nodeType===11?y.makeArray(a.childNodes):a.nodeType===1?[a]:[];c.call(h,a);K(g);A++}});function H(h,j,i){var a,d=i?y.map(i,function(b){return typeof b==="string"?h.key?b.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+B+'="'+h.key+'" $2'):b:H(b,h,b._ctnt)}):h;if(j){return d}d=d.join("");d.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(l,b,k,g){a=y(k).get();K(a);if(b){a=I(b).concat(a)}if(g){a=a.concat(I(g))}});return a?a:I(d)}function I(d){var a=document.createElement("div");a.innerHTML=d;return y.makeArray(a.childNodes)}function M(a){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+y.trim(a).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(w,v,u,r,h,n,o){var t=y.tmpl.tag[u],s,p,q;if(!t){throw"Unknown template tag: "+u}s=t._default||[];if(n&&!/\w$/.test(h)){h+=n;n=""}if(h){h=F(h);o=o?","+F(o)+")":n?")":"";p=n?h.indexOf(".")>-1?h+F(n):"("+h+").call($item"+o:h;q=n?p:"(typeof("+h+")==='function'?("+h+").call($item):("+h+"))"}else{q=p=s.$1||"null"}r=F(r);return"');"+t[v?"close":"open"].split("$notnull_1").join(h?"typeof("+h+")!=='undefined' && ("+h+")!=null":"true").split("$1a").join(q).split("$1").join(p).split("$2").join(r||s.$2||"")+"__.push('"})+"');}return __;")}function L(d,a){d._wrap=H(d,true,y.isArray(a)?a:[O.test(a)?a:y(a).html()]).join("")}function F(b){return b?b.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function Q(d){var c=document.createElement("div");c.appendChild(d.cloneNode(true));return c.innerHTML}function K(q){var i="_"+A,d,c,f={},a,r,b;for(a=0,r=q.length;a<r;a++){if((d=q[a]).nodeType!==1){continue}c=d.getElementsByTagName("*");for(b=c.length-1;b>=0;b--){g(c[b])}g(d)}function g(s){var w,n=s,t,l,u;if(u=s.getAttribute(B)){while(n.parentNode&&(n=n.parentNode).nodeType===1&&!(w=n.getAttribute(B))){}if(w!==u){n=n.parentNode?n.nodeType===11?0:n.getAttribute(B)||0:0;if(!(l=z[u])){l=D[u];l=E(l,z[n]||D[n]);l.key=++G;z[G]=l}A&&v(u)}s.removeAttribute(B)}else{if(A&&(l=y.data(s,"tmplItem"))){v(l.key);z[l.key]=l;n=y.data(s.parentNode,"tmplItem");n=n?n.key:0}}if(l){t=l;while(t&&t.key!=n){t.nodes.push(s);t=t.parent}delete l._ctnt;delete l._wrap;y.data(s,"tmplItem",l)}function v(e){e=e+i;l=f[e]=f[e]||E(l,z[l.parent.key+i]||l.parent)}}}function S(e,h,g,f){if(!e){return J.pop()}J.push({_:e,tmpl:h,item:this,data:g,options:f})}function U(f,e,a){return y.tmpl(y.template(f),e,a,this)}function V(a,f){var e=a.options||{};e.wrapped=f;return y.tmpl(y.template(a.tmpl),a.data,e,a.item)}function T(f,e){var a=this._wrap;return y.map(y(y.isArray(a)?a.join(""):a).filter(f||"*"),function(b){return e?b.innerText||b.textContent:b.outerHTML||Q(b)})}function R(){var a=this.nodes;y.tmpl(null,null,null,this).insertBefore(a[0]);y(a).remove()}})(jQuery);(function(a){a.extend(a.fx.step,{backgroundPosition:function(c){if(c.state===0&&typeof c.end=="string"){var e=a.curCSS(c.elem,"backgroundPosition");e=f(e);c.start=[e[0],e[2]];var b=f(c.end);c.end=[b[0],b[2]];c.unit=[b[1],b[3]]}var d=[];d[0]=((c.end[0]-c.start[0])*c.pos)+c.start[0]+c.unit[0];d[1]=((c.end[1]-c.start[1])*c.pos)+c.start[1]+c.unit[1];c.elem.style.backgroundPosition=d[0]+" "+d[1];function f(h){h=h.replace(/left|top/g,"0px");h=h.replace(/right|bottom/g,"100%");h=h.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var g=h.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(g[1],10),g[2],parseFloat(g[3],10),g[4]]}}})})(jQuery);(function(a){a.fn.jqm=function(e){var f={overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:g,ajaxText:"",target:g,modal:g,toTop:g,onShow:g,onHide:g,onLoad:g};return this.each(function(){if(this._jqm){return h[this._jqm].c=a.extend({},h[this._jqm].c,e)}p++;this._jqm=p;h[p]={c:a.extend(f,a.jqm.params,e),a:g,w:a(this).addClass("jqmID"+p),s:p};if(f.trigger){a(this).jqmAddTrigger(f.trigger)}})};a.fn.jqmAddClose=function(f){return j(this,f,"jqmHide")};a.fn.jqmAddTrigger=function(f){return j(this,f,"jqmShow")};a.fn.jqmShow=function(e){return this.each(function(){e=e||window.event;a.jqm.open(this._jqm,e)})};a.fn.jqmHide=function(e){return this.each(function(){e=e||window.event;a.jqm.close(this._jqm,e)})};a.jqm={hash:{},open:function(v,w){var i=h[v],e=i.c,f="."+e.closeClass,B=(parseInt(i.w.css("z-index"))),B=(B>0)?B:3000,m=a("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":B-1,opacity:e.overlay/100});if(i.a){return g}i.t=w;i.a=true;i.w.css("z-index",B);if(e.modal){if(!b[0]){n("bind")}b.push(v)}else{if(e.overlay>0){i.w.jqmAddClose(m)}else{m=g}}i.o=(m)?m.addClass(e.overlayClass).prependTo("body"):g;if(l){a("html,body").css({height:"100%",width:"100%"});if(m){m=m.css({position:"absolute"})[0];for(var A in {Top:1,Left:1}){m.style.setExpression(A.toLowerCase(),"(_=(document.documentElement.scroll"+A+" || document.body.scroll"+A+"))+'px'")}}}if(e.ajax){var q=e.target||i.w,x=e.ajax,q=(typeof q=="string")?a(q,i.w):a(q),x=(x.substr(0,1)=="@")?a(w).attr(x.substring(1)):x;q.html(e.ajaxText).load(x,function(){if(e.onLoad){e.onLoad.call(this,i)}if(f){i.w.jqmAddClose(a(f,i.w))}c(i)})}else{if(f){i.w.jqmAddClose(a(f,i.w))}}if(e.toTop&&i.o){i.w.before('<span id="jqmP'+i.w[0]._jqm+'"></span>').insertAfter(i.o)}(e.onShow)?e.onShow(i):i.w.show();c(i);return g},close:function(f){var e=h[f];if(!e.a){return g}e.a=g;if(b[0]){b.pop();if(!b[0]){n("unbind")}}if(e.c.toTop&&e.o){a("#jqmP"+e.w[0]._jqm).after(e.w).remove()}if(e.c.onHide){e.c.onHide(e)}else{e.w.hide();if(e.o){e.o.remove()}}return g},params:{}};var p=0,h=a.jqm.hash,b=[],l=a.browser.msie&&(a.browser.version=="6.0"),g=false,k=a('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),c=function(e){if(l){if(e.o){e.o.html('<p style="width:100%;height:100%"/>').prepend(k)}else{if(!a("iframe.jqm",e.w)[0]){e.w.prepend(k)}}}d(e)},d=function(f){try{a(":input:visible",f.w)[0].focus()}catch(e){}},n=function(e){a()[e]("keypress",o)[e]("keydown",o)[e]("mousedown",o)},o=function(f){var i=h[b[b.length-1]],m=(!a(f.target).parents(".jqmID"+i.s)[0]);if(m){d(i)}return !m},j=function(i,f,e){return i.each(function(){var m=this._jqm;a(f).each(function(){if(!this[e]){this[e]=[];a(this).click(function(){for(var q in {jqmShow:1,jqmHide:1}){for(var r in this[q]){if(h[this[q][r]]){h[this[q][r]].w[q](this)}}}return g})}this[e].push(m)})})}})(jQuery);(function(){var b=(navigator.appVersion.indexOf("MSIE 6.")==-1)?false:true;var c=(navigator.appVersion.indexOf("MSIE 7.")==-1)?false:true;var d=(navigator.appVersion.indexOf("MSIE 8.")==-1)?false:true;try{document.execCommand("BackgroundImageCache",false,true)}catch(a){}})();window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};(function(a){var b=a.write;a.write=function(c){log("document.write(): ",arguments);if(/docwriteregexwhitelist/.test(c)){b.apply(a,arguments)}}})(document);Resume={};Resume.Setup=function(a){this.init()};Resume.Setup.prototype={init:function(){this.portfolioLoaded=$.Deferred();this.navigation();this.loadPortfolio().done($.proxy(function(){this.configureModals()},this))},navigation:function(){this.navLinks=$("nav ul#primary li a");this.navLinks.css({backgroundPosition:"0 -32px"}).hover(function(){$(this).stop().animate({backgroundPosition:"(0 0)"},{duration:300})},function(){$(this).stop().animate({backgroundPosition:"(0 -32px)"},{duration:200,complete:function(){$(this).css({backgroundPosition:"0 -32px"})}})}).bind("click",$.proxy(function(a){a.preventDefault();this.switchPage(a.target)},this))},switchPage:function(a){this.pageId=$(a).parent("li").attr("id").replace("nav-","");$("nav li").removeClass("selected");$(a).parent("li").addClass("selected");$(".page").hide();$("#"+this.pageId).fadeIn("slow")},configureModals:function(){$("#modal").jqm({trigger:"#portfolio .site a",onShow:function(a){a.w.fadeIn(600)},onHide:function(a){a.w.fadeOut(300);a.o.remove();$("#modal-screenshot").hide()}});$("#portfolio .site a").bind("click",$.proxy(function(a){this.showScreenshotModal(a)},this))},showScreenshotModal:function(a){a.preventDefault();this.screenshot=$(a.target);this.loading=$("#loading");this.modal=$("#modal-screenshot");var c=$("<h2>"+this.screenshot.attr("title")+"</h2>");var b=$('<img src="'+this.screenshot.attr("href")+'" alt="'+this.screenshot.attr("title")+'">');this.loading.show();this.modal.empty().append(c).append(b);b.load($.proxy(function(){this.loading.hide();this.modal.show();return false},this))},loadPortfolio:function(){$.getJSON("/Content/data/json.portfolio.js",$.proxy(function(a){$("#tmpl-portfolio").tmpl(a).appendTo($("#portfolio table"));this.portfolioLoaded.resolve()},this));return this.portfolioLoaded}};$(function(){new Resume.Setup()});
