
(function($){var controls={hide:function(event){!!event&&event.preventDefault();white.fadeOut();paper.fadeOut(function(){$(this).empty();});},show:function(content,caption){white.appendTo("body").fadeIn();paper.appendTo("body").css({"top":30+$("html").scrollTop()}).append(title.clone().html(caption||"Project Detail").append(close())).append(content).slideDown(800);}},close=function(){return $("<a/>",{click:controls.hide,href:"#",text:"X"});},paper=$("<div/>",{id:"Whitepaper_content"}),title=$("<div/>",{id:"Whitepaper_title"}),white=$("<div/>",{click:controls.hide,id:"Whitepaper_modal"});$.fn.Whitepaper=function(parent){return this.click(function(event){event.preventDefault();var content=$(this).parents(parent+":first").clone().find("figure").remove().end().html();controls.show($("<article />").addClass("whitepaper").append("<h1>Whitepaper</h1>").append(content));});};}(jQuery));
(function($){var Imagezoom_kill=function(elms){elms.fadeOut(function(){$(this).remove();});};$.fn.Imagezoom=function(options){this.live("click",function(event){event.preventDefault();var blind=$("<div/>",{id:"Imagezoom_blind"}),image=$("<img/>",{src:$(this).attr("href")});blind.click(function(){Imagezoom_kill(blind.add(image));}).appendTo("body").fadeIn();image.hide().css({left:"50%",position:"absolute",top:"50%",zIndex:"99999"}).click(function(){Imagezoom_kill(blind.add(image));}).load(function(){var orig={};orig.height=this.height;orig.marginTop=orig.height<=document.height?orig.height:document.height;orig.width=this.width;$(this).css({marginLeft:"-50px",marginTop:-(Math.floor(orig.height*100/orig.width)),width:"100px"}).appendTo("body").show().animate({marginLeft:-Math.floor(orig.width/2),marginTop:-Math.floor(orig.marginTop/2),width:orig.width},700);});});};}(jQuery));
(function($){$(function(){(function(regexEval){$(".RegExp form#regex").submit(function(event){event.preventDefault();});$(".RegExp form#regex #haystack, .RegExp form#regex input[type=checkbox]").change(regexEval);$(".RegExp form#regex #pattern").keyup(regexEval);}(function(event){try{var haystack=$("#haystack").val(),pattern=new RegExp($("#pattern").val(),($("#global")[0].checked?"g":"")+
($("#insensitive")[0].checked?"i":"")+
($("#multiline")[0].checked?"m":"")),matches=pattern.exec(haystack);if(haystack&&pattern){$(matches).each(function(indx,ele){haystack=haystack.replace(RegExp("("+ele+")","g"),"<span>$1</span>");});$("#results").html("<pre>"+haystack+"</pre>");}}
catch(err){}}));});}(jQuery));
var Smugmug=function(apiKey){Smugmug={EndPoint:{"1.2.0":"/hack/json/1.2.0/","1.2.1":"/services/api/json/1.2.1/","1.2.2":"/services/api/json/1.2.2/"},Key:apiKey,SessionID:"",Version:"1.2.0"};Smugmug.apiCall=function(method,params,callback,use_https){params.method=method;params.APIKey=Smugmug.Key;if(Smugmug.SessionID){params.SessionID=Smugmug.SessionID;}
var url="http"+(use_https?"s":"")+"://api.smugmug.com"+
Smugmug.EndPoint[Smugmug.Version]+"?"+$.param(params)+
(Smugmug.Version>"1.2.1"?"&Callback=?":"&JSONCallback=?");$.ajax({"data":null,"dataType":"jsonp","success":callback,"url":url});};Smugmug.login=function(options,callback){options=options||{};var login_method="withPassword",options_type=Object.prototype.toString.call(options);if(!callback||!/Object/.test(options_type)){if(/Function/.test(options_type)){callback=options;}
options={};login_method="anonymously";}
Smugmug.apiCall("smugmug.login."+login_method,options,function(data){Smugmug.SessionID=data.Login.Session.id;!!callback&&callback();},true);};(function(list){var api,method,node,obj,signature;while(list.length){api=list.shift();obj=Smugmug;signature="smugmug."+api;api=api.split(".");method=api.pop();while(!!(node=api.shift())){obj=obj[node]=obj[node]||{};}
obj[method]=(function(signature){return function(params,callback){return Smugmug.apiCall(signature,params||{},callback);};}(signature));}}(["albums.applyWatermark","albums.changeSettings","albums.create","albums.delete","albums.get","albums.getInfo","albums.removeWatermark","albums.reSort","albumtemplates.changeSettings","albumtemplates.create","albumtemplates.delete","albumtemplates.get","auth.checkAccessToken","auth.getAccessToken","auth.getRequestToken","categories.create","categories.delete","categories.get","categories.rename","communities.get","family.add","family.get","family.remove","family.removeAll","friends.add","friends.get","friends.remove","friends.removeAll","images.applyWatermark","images.changePosition","images.changeSettings","images.crop","images.delete","images.get","images.getEXIF","images.getInfo","images.getURLs","images.removeWatermark","images.rotate","images.upload","images.uploadFromURL","images.zoomThumbnail","login.anonymously","login.withHash","login.withPassword","logout","products.get","sharegroups.albums.add","sharegroups.albums.get","sharegroups.albums.remove","sharegroups.create","sharegroups.delete","sharegroups.get","sharegroups.getInfo","styles.getTemplates","subcategories.create","subcategories.delete","subcategories.get","subcategories.getAll","subcategories.rename","themes.get","users.getDisplayName","users.getTree","watermarks.changeSettings","watermarks.create","watermarks.delete","watermarks.get","watermarks.getInfo"]));};!!window.jQuery&&(function($){$.fn.slideShow=function(options){options=$.extend({},{delay:10000,size:"Medium",transition:1000},options);var wrapper=this,gallery=[],rotate=function(){$.when($("<img/>",{"src":gallery[0]})).done(function(element){element.appendTo(wrapper).hide().fadeIn(options.transition);gallery.push(gallery.shift());setTimeout(rotate,options.delay);});};Smugmug.login(function(){Smugmug.images.get({AlbumID:options.AlbumID,Heavy:1},function(response,len,rand){$.each(response.Images,function(){gallery.push(this[(options.size||"Medium")+"URL"]);});len=gallery.length;while(len--){rand=parseInt(Math.random()*gallery.length,10);gallery=gallery.slice(0,rand).concat(gallery[len],gallery.slice(rand+1));}
$.when($("<img/>",{"src":gallery[0]})).done(function(element){wrapper.slideDown(rotate);});});});return wrapper.empty();};})(jQuery);
Smugmug("6C3JkTZdWzQjswrYpAMOUgBAhIkpJtTx");$.fn.ready(function(){$("span.email").replaceWith(function(){var email;if(this!==window){email=$(this).text().replace(/~/g,"");return $("<a></a>").attr("href","mailto:"+email).text(email);}});$("body").fadeOut(0).css("visibility","visible").fadeIn(1000);$("a").filter(function(){return this.hostname&&window.location.hostname!==this.hostname&&!$(this).find("img").length;}).append($("<img>",{"alt":"external link icon","class":"external","height":14,"src":"framework/theme/images/external.gif","width":"14px"}));$("figure.slideshow").slideShow({AlbumID:"17358575"});$("article.whitepaper figure").Whitepaper("article");$("a[rel=Imagezoom]").Imagezoom();$(".Resume article h2").on("click",function(){$(this).toggleClass("open").nextUntil("h2").not("h2 + div, h2 + div + div").stop().delay(200).slideToggle(700);}).filter(function(){return $(this).nextUntil("h2").length>2;}).addClass("accordion").trigger("click");});
