',HTMLEmploymentDates='
%data%
',HTMLWorkLocation='
%data%
',HTMLWorkHighlightsTitle='
',HTMLWorkHighlightsList='
',HTMLWorkHighlightsListItem="
%data%",HTMLEducationStart='
',HTMLDegree='
%data%
',HTMLGpa='
',HTMLSocialStart='
',HTMLSocialItem='
',HTMLSocialEnd="",HTMLAwardsStart='
',HTMLAwardTitle='
',HTMLAwarderAndDate='
',HTMLAwardDetails='
',HTMLAwardDetailsTitle='
',HTMLVolunteerStart='
';window.onblur=function(){document.title=titleOnBlur},window.onfocus=function(){document.title=titleOnActive};var defaultOrder="shortBio projects work education awards volunteer social".split(" "),functions=[];functions.shortBio=addShortBio,functions.work=addWork,functions.projects=addProjectSections,functions.awards=addAwards,functions.education=addEducation,functions.volunteer=addVolunteer,functions.social=addSocialLinks;var DOMMain=null;function setData(e){DOMMain=document.getElementById("main"),document.title=e.personal.name+","+e.personal.title,titleOnActive=e.personal.name+","+e.personal.title,document.getElementById("name").innerHTML=e.personal.name,document.getElementById("title").innerHTML=e.personal.title,addContacts(e.personal);var t=defaultOrder;for(var i in null!=e.displayOrder&&0!=e.displayOrder.length&&(t=e.displayOrder),t)functions[t[i]](e);$(".tooltip-image").tooltip(),$(".tooltip-image").first().tooltip("show"),addProjectThumbnailListener(),addCollapseListeners()}function addShortBio(e){null!=(e=e.personal).shortBio&&""!=e.shortBio&&append(DOMMain,HTMLShortBio.replace("%data%",e.shortBio))}function addContacts(e){null!=e.email&&""!=e.email&&append(document.getElementById("contacts"),HTMLEmail.replace("%data%",e.email)),null!=e.phone&&""!=e.phone&&append(document.getElementById("contacts"),HTMLPhone.replace("%data%",e.phone)),null!=e.location&&""!=e.location&&append(document.getElementById("contacts"),HTMLLocation.replace("%data%",e.location)),null!=e.website&&""!=e.website&&append(document.getElementById("contacts"),replaceAll(HTMLPersonalWebsite,"%data%",e.website))}function addProjectSections(e){if(null!=e.projectSections&&0!=e.projectSections.length)for(var t in e=e.projectSections){var i=(i=HTMLProjectsStart.replace("%sectionTitle%",e[t].title)).replace("%id%",t);append(DOMMain,i),i=document.getElementById("projects"+t),addProjects(e[t].projects,i)}}function addProjects(e,t){var i,a,l=0,o="";for(a in e){var n=a+"-"+(new Date).getMilliseconds();1==++l&&(append(t,HTMLProjectRow),i=(i=document.getElementsByClassName("project-row"))[i.length-1]),o=(o=replaceAll(o=(o=null!=e[a].gallery&&0!=e[a].gallery.length?(addProjectImagesToRepo(e[a].gallery,n),HTMLProjectWithGallery):null!=e[a].description&&""!=e[a].description?HTMLProjectWithModal:HTMLProjectSimple).replace("%image%",e[a].thumbnail),"%title%",e[a].title)).replace("%id%",n),null!=e[a].link&&""!=e[a].link&&(o+=HTMLProjectLink.replace("%link%",e[a].link)),null!=e[a].description&&0!=e[a].description.length&&(o=e[a].description instanceof Array?addProjectBulletDescription(o,e[a].description):o.replace("%projectDesc%",e[a].description)),append(i,o),3==l&&(l=0)}}function addProjectBulletDescription(e,t){var i,a=HTMLProjectBulletDescriptionStart;for(i in t)a+=HTMLProjectBulletDescriptionItem.replace("%data%",t[i]);return a+=HTMLProjectBulletDescriptionEnd,e.replace("%projectDesc%",a)}function addProjectImagesToRepo(e,t){var i,a=document.getElementById("image-repo");for(i in e){append(a,HTMLProjectGalleryItem.replace("%src%",e[i]).replace("%id%",t))}}function replaceAll(e,t,i){return e.replace(new RegExp(t,"g"),i)}function addAwards(e){if(null!=e.awards&&0!=e.awards.length){e=e.awards,append(DOMMain,HTMLAwardsStart);var t,i=document.getElementById("awards");for(t in e){var a=HTMLAwardTitle.replace("%data%",e[t].title),l=(l=HTMLAwarderAndDate.replace("%awarder%",e[t].awarder)).replace("%date%",e[t].date);append(i,a),append(i,l),null!=e[t].description&&""!=e[t].description&&(l="detailsDiv"+(a="awardDetails"+t+"-"+(l=(new Date).getMilliseconds()))+"-"+l,append(i,a=(a=HTMLAwardDetailsTitle.replace("%id%",a)).replace("%targetId%",l)),append(i,HTMLAwardDetails.replace("%id%",l).replace("%data%",e[t].description)))}}}function addVolunteer(e){if(null!=e.volunteer&&0!=e.volunteer.length){e=e.volunteer,DOMMain.innerHTML+=HTMLVolunteerStart;var t,i=document.getElementById("volunteer");for(t in e){var a=HTMLJobTitle.replace("%data%",e[t].title),l=(l=HTMLEmploymentDateAndLocation.replace("%date%",void 0===e[t].dates?"":e[t].dates)).replace("%location%",void 0===e[t].location?"":e[t].location);if(append(i,null!=e[t].website&&""!=e[t].website?HTMLEmployer.replace("%employer%",e[t].organization).replace("%url%",e[t].website):HTMLEmployerWithoutUrl.replace("%employer%",e[t].organization)),append(i,a),append(i,l),null!=e[t].highlights&&e[t].highlights instanceof Array&&0!=e[t].highlights.length){l="highlightDiv-"+(a="volunteerHighlights"+t+"-"+(a=(new Date).getMilliseconds())),append(i,HTMLWorkHighlightsTitle.replace("%targetId%",a).replace("%id%",l)),append(l=document.getElementById(l),HTMLWorkHighlightsList.replace("%data%",a));var o;a=document.getElementById(a);for(o in e[t].highlights)append(a,HTMLWorkHighlightsListItem.replace("%data%",e[t].highlights[o]))}}}}function addWork(e){if(void 0!==e.work&&0!==e.work.length){e=e.work,DOMMain.innerHTML+=HTMLWorkExperienceStart;var t,i=document.getElementById("work");for(t in e){var a=HTMLJobTitle.replace("%data%",e[t].title),l=(l=HTMLEmploymentDateAndLocation.replace("%date%",void 0===e[t].dates?"":e[t].dates)).replace("%location%",void 0===e[t].location?"":e[t].location);if(append(i,null!=e[t].website&&""!=e[t].website?HTMLEmployer.replace("%employer%",e[t].employer).replace("%url%",e[t].website):HTMLEmployerWithoutUrl.replace("%employer%",e[t].employer)),append(i,a),append(i,l),null!=e[t].highlights&&0!=e[t].highlights.length){a="highlightDiv-"+(l="workHighlights"+t+(a=(new Date).getMilliseconds())),append(i,HTMLWorkHighlightsTitle.replace("%targetId%",a).replace("%id%",l)),append(l=document.getElementById(l),HTMLWorkHighlightsList.replace("%data%",a));var o;a=document.getElementById(a);for(o in e[t].highlights)append(a,HTMLWorkHighlightsListItem.replace("%data%",e[t].highlights[o]))}}}}function addEducation(e){if(void 0!==e.education&&0!==e.education.length){e=e.education,append(DOMMain,HTMLEducationStart);var t,i=document.getElementById("education");for(t in e){var a=HTMLInstitutionName.replace("%data%",e[t].institution),l=e[t].degree+", "+e[t].major,o=(o=HTMLEmploymentDateAndLocation.replace("%date%",e[t].graduationDate)).replace("%location%",l);i.innerHTML+=a,i.innerHTML+=o,null!=e[t].gpa&&""!=e[t].gpa&&(a=HTMLGpa.replace("%data%",e[t].gpa),i.innerHTML+=a)}}}function addSocialLinks(e){if(void 0!==e.personal.profiles&&0!==e.personal.profiles.length){e=e.personal.profiles,DOMMain.innerHTML+=HTMLSocialStart;var t,i=document.getElementById("social");for(t in e){var a=(a=HTMLSocialItem.replace("%network%",e[t].network.toLowerCase())).replace("%link%",e[t].url);i.innerHTML+=a}}}function append(e,t){e.innerHTML+=t}function addProjectThumbnailListener(){addListenerForGallery(),addListenerForModal()}function addListenerForGallery(){$(".gallery-thumbnail-image").click(function(){var e=$(".carousel-inner"),t=$("#gallery-title"),i=this.getAttribute("project-desc"),a=this.getAttribute("project-title"),l=document.getElementById("modal-project-desc");e.empty(),t.empty();var o=this.id;(o=$("#image-repo .item").filter("#"+o).clone()).first().addClass("active"),t.html(a),l.innerHTML=i,e.append(o),$("#modal-gallery").modal("show")})}function addListenerForModal(){$(".modal-thumbnail-image").click(function(){var e=document.getElementById("modal-desc-body"),t=document.getElementById("modal-title"),i=this.getAttribute("project-desc"),a=this.getAttribute("project-title");t.innerHTML=a,e.innerHTML=i,$("#modal-desc").modal("show")})}function addCollapseListeners(){$(".collapse").on("shown.bs.collapse",function(){$(this).parent().find(".glyphicon").removeClass("glyphicon-triangle-right").addClass("glyphicon-triangle-bottom")}),$(".collapse").on("hidden.bs.collapse",function(){$(this).parent().find(".glyphicon").removeClass("glyphicon-triangle-bottom").addClass("glyphicon-triangle-right")})}$("#modal-carousel").carousel({interval:!1}),$.getJSON(RESUME_LOCATION,function(e){setData(e)})