
(function(){var $n=neo;var c0=new $n.shape.Circle({radius:20,innerColor:"#707070",outerColor:"#303060"});var tr0=new $n.shape.IsoTriangle({baseOnTop:1,width:18,height:12,fillStyle:"#ffffff"});var ffbut=new $n.shape.FFButton({scale:1,oneTriangle:false,circle:c0,rotation:-Math.PI/2,triangle:tr0,bty:-12,tty:0});var tr1=new $n.shape.IsoTriangle({baseOnTop:1,width:24,height:16,fillStyle:"#ffffff"});var fbut=new $n.shape.FFButton({scale:1,oneTriangle:1,rotation:-Math.PI/2,triangle:tr1,bty:-12});var sq0=new $n.shape.Rect({width:18,height:18,fillStyle:"#ffffff",centered:1});var vcr=new $n.shape.VcrButtons({container:$('.c1'),left:50,top:100,scale:0.5,separation:100,ffbutton:ffbut,fbutton:fbut,square:sq0});$n.shapes.vcrbuttons0=vcr;})();(function(){var mark0=new $n.shape.Rect({width:2,height:6,centered:0});var smallMark0=new $n.shape.Rect({width:2,height:3,centered:0});var bar=new $n.shape.Rect({height:1,width:0});var sliding=new $n.shape.IsoTriangle({height:15,width:15,baseOnTop:1});var vcrbuttons0=$n.shapes.vcrbuttons0;var so={mark:mark0,smallMark:smallMark0,bar:bar,sliding:sliding,vertical:0,includeYear:1,vcrbuttons:vcrbuttons0,textColor:"white",barColor:"white",width:450,height:15,paddingTop:10,paddingBottom:0,startYear:1790.3,endYear:2010,subInterval:10,interval:50,bar:bar};var slider=new $n.slider.Slider(so);neo.shapes.slider2=slider;})();$n=neo;(function(){var lib=neo.element;lib.Cabinet=function(options){this.options=options;this.Class=lib.Cabinet;this.rendered={};this.apply();}
lib.Cabinet.prototype.apply=function(options){var rs=neo.apply(this,options);return rs;}
lib.Cabinet.prototype.getContainer=function(root,tag){var e=neo.currentVersion(root,this,tag);var v=e.value;var c=v.container;if(c)return c;var p=v.parent;if(p){return p.value.rendered;}}
lib.Cabinet.prototype.allImages=function(){var ofhs=this.value.officeHolders;var rs=[];$.each(ofhs,function(i,v){var ims=v.allImages();rs=rs.concat(ims);});return rs;}
lib.Cabinet.prototype.computeOfficeHolders=function(){var ohs=[];$.each(this.value.offices,function(i,v){var office=neo.selectTopic(v);ohs.push(new neo.element.OfficeHolder({office:office}));});this.options.officeHolders=ohs;}
lib.Cabinet.prototype.render=function(){var v=this.value;var perRow=3;var officeHolders=v.officeHolders;var offices=v.offices;var ln=offices.length;var numRows=Math.floor((ln+1)/perRow);var cn=this.getContainer();var wd=v.width;var sep=v.separation;var rowWd=(1+perRow)*sep+perRow*wd;var lft=sep;var vsep=v.verticalSeparation;var ht=v.height;var tht=numRows*(ht+vsep);var mDiv=$('<div/>');mDiv.css({position:"absolute",top:10,left:lft,width:rowWd,height:tht,"font-size":"10pt"});cn.append(mDiv);var cDivs={};var ctop=vsep;var cLeft=sep;var n=0;for(var r=0;r<numRows;r++){for(var c=0;c<perRow;c++){var coff=offices[n];var cDiv=$('<div></div>');mDiv.append(cDiv);var stl={position:"absolute",top:ctop,left:cLeft,width:wd,height:ht};cDiv.css(stl);cDivs[coff]=cDiv;cLeft+=sep+wd;var ofh=v.officeHolders[n];ofh.options.container=cDiv;n++;}
ctop=ctop+ht+vsep;cLeft=sep;}}
lib.Cabinet.spliceInSecOfWar=function(){var sd=neo.selectTopic("/en/united_states_secretary_of_defense");var sw=neo.selectTopic("/en/united_states_secretary_of_war");var sdc=neo.cast(sd,neo.data.government.government_office_or_title);var swc=neo.cast(sw,neo.data.government.government_office_or_title);var sws=swc.office_holder;var sds=sdc.office_holder;var ln=sws.length;for(var i=0;i<ln;i++){var cs=sws[i];if(i==2)cs.timeEnd="1800-06-01";cs.topic=sd;sds.push(cs);}}
lib.Cabinet.prototype.analyzeSegments=function(){var offs=this.value.offices;var ln=offs.length;var rs={};for(var i=0;i<ln;i++){var coff=offs[i];var asgs=lib.analyzeOffice(coff);rs[coff]=asgs;}
return rs;}})();var cabinetPage={};(function(){var lib=cabinetPage;var geom=exports.GEOM2D;lib.intro='<p class="heading">Chro`nog´ra`phy</p>'+'<p class="indent">n. 1. A description or record of past time; history.</p>'+'<p class="indentSmall">Webster\'s Revised Unabridged Dictionary, published 1913 by C. & G. Merriam Co.</p>'+'<p class="indent">from chrono- "time" + -graphy, from Gk. graphein "to write."</p>'+'There are new ways to "write".  A chronography in the old sense was a static object, '+'but  the computer allows us to provide different depictions for different moments in time,'+'with user control over the order in which moments are viewed. '+'And each depiction of a moment is potentially active as well, since it may include '+'links,hovers and other forms of interactivity. Here is a simple example: (names and images are clickable, and the time-slider is draggable; data and images from <a style="color:white" href="http://wikipedia.org">Wikipedia</a> and <a style="color:white" href="http://freebase.com">Freebase</a>)';lib.aboutme='<table><tr><td><span style="color:white;font-size:10pt;vertical-align:10%;padding-right:10px">Site by <br/>Chris Goad</span></td><td> <img width=60 src="/images/at_scorcher.jpg"/></td></tr></table>'+'<p>This site collects chronographic work in which I\'ve been involved, but also contains links to related efforts around the web. </p>'+'<hr/>'+'<p>My projects</p>'+'<div id="shipwrecks" style="cursor:pointer;text-decoration:underline;"><p><b>Shipwrecks at the Mouth of the Columbia</b></p><p><img width="140" src="/images/wreckicon2.jpg"/></p></div>'+'<hr/>'+'<div id="1923" style="cursor:pointer;text-decoration:underline;"><p><b>Astoria, Oregon in 1923 and 2010</b></p><p><img width="160" src="/images/1923.jpg"/></p></div>'+'<hr/>'+'<p>Elsewhere on the web</p>'+'<p id="lookingIntoThePast" style="cursor:pointer;text-decoration:underline;"><b>Looking into the Past</b></p>';lib.cabinet=new neo.element.Cabinet({presidentWidth:200,presidentHeight:250,width:160,height:200,separation:10,verticalSeparation:30,offices:["/en/president_of_the_united_states","/en/united_states_secretary_of_state","/en/united_states_secretary_of_defense","/en/vice_president_of_the_united_states","/en/united_states_secretary_of_the_treasury","/en/united_states_attorney_general"]});lib.renderPage=function(){$('.loadingPage').show();var tleft0=new neo.dom.AtomicElement({tag:"div",html:lib.intro});var slider=neo.shapes.slider2;var tleft1=new neo.dom.Elements({tag:"div",css:{position:"relative",width:"300px",left:"0px",height:"500px"},elements:[lib.cabinet]});var tleft2=new neo.dom.Elements({tag:"div",css:{position:"relative",left:"35px",height:"200px",width:"545px"},elements:[slider]});slider.value.delay=100;slider.value.callback=neo.setTheTime;var updateSlider={render:function(){slider.setValue(neo.currentTime,null,1);}};neo.temporalElements.push(updateSlider);var tright=new neo.dom.AtomicElement({tag:"div",html:lib.aboutme});var pg0=neo.pages.main.page.applyParts({"left":{elements:[tleft0,tleft1,tleft2]},right:{elements:[tright]}});lib.lightbox=new neo.dom.Lightbox($('body'),new geom.Rect(new geom.Point(20,20),new geom.Point(680,200)));lib.lightbox.render();hub.lightbox=lib.lightbox;$.get("http://neochronography.com/data/allData.js",function(data){var dataob=JSON.parse(data);neo.internalize(dataob);neo.element.Cabinet.spliceInSecOfWar();lib.cabinet.computeOfficeHolders();var allims=lib.cabinet.allImages();neo.dom.loadImages(allims);var pg=pg0.apply({container:$('#content')});$('.loadingPage').hide();pg.render();slider.setValue(1790.3);$("#shipwrecks").click(function(){location.href="/shipwrecks";});$("#1923").click(function(){location.href="/astoria/1923.html";});$("#lookingIntoThePast").click(function(){location.href="http://www.flickr.com/photos/edrabbit/galleries/72157623103181304";});});}})();