text: (function(){var c=Archmap={};c.log=function(j){try{console.log(j)}catch(k){}};c.components=[];c.uri="";var a=[],b=[];c.initialize=function(j){c.user=new c.User(j.archmap_says.you);var k=new c.DataStore(c.user);c.dataStore=k;k.infuseInline(j.archmap_says,function(){c.mainDataProvider=function(){return k.dataProvider};c.provider=function(){return k.dataProvider.model};new c.VeryBigImageComponent;var h=new c.BigImageComponent;$(function(){h.initialize();d();c.Template.templatize("body");e()})})};c.test=
  function(){c.dataStore=new c.DataStore;c.Template.templatize("body")};c.beforeReady=function(j){b.push(j)};var d=function(){_.each(b,function(j){j()})};c.whenReady=function(j){a.push(j)};var e=function(){_.each(a,function(j){j()})},f=function(){_(c.components).each(function(j){j.destroy()});c.components=[]};c.update=function(j){c.dataStore.infuseInline(j.archmap_says,function(){c.Template.templatize("div#stage")})};c.bindModel=function(j,k){c.EditorialBoard.bindModel(j,k)};c.biggifyThePage=function(){$("div#stage").addClass("bigstage");
  $("div#header").addClass("bigstage")};var g=undefined;$(window).resize(function(){c.resizeWindow()}).unload(function(){f()});c.resizeWindow=function(){clearTimeout(g);g=setTimeout(function(){$("html").trigger("windowResized")},100)};c.imageCache=[];c.preloadImage=function(j){var k=document.createElement("img");k.src=j;c.imageCache.push(k)};c.triggerEvent=function(j,k){$("html").trigger(j,k)};c.require=function(j,k){c.IO.require(j,k)};c.getComponentHtml=function(j,k){c.IO.getComponentHtml(j,k)}})();
  (function(){var c=Archmap,a={},b={},d={},e={},f=[];if("localStorage"in window&&window.localStorage!==null){var g=localStorage,j=parseInt((new Date).getTime(),10);if(g.getItem("__cacheage__")===null)g.setItem("__cacheage__",j);else{var k=parseInt(g.getItem("__cacheage__"),10);j-k>100&&g.clear()}}c.IO={get:function(h){var i=h.url,l=h.urlParams||{},m=h.callback,n=h.dataType||"json";h=h.shouldCache||false;if(i===undefined)return false;if(typeof m==="function"){if(d[i]===undefined)d[i]=[];d[i].push(m)}if(b[i])c.IO.sendGet(i);
  else if(a[i]!==true){a[i]=true;l.linkBase=c.uri;this.remoteGrab(i,{url:c.uri+i,dataType:n,data:l,cache:h,success:function(o){b[i]=o;if(n==="json"||n==="html")c.IO.remember(i,o);a[i]=false;n==="json"?c.dataStore.convertJSONToArchObjects(o.archmap_says,function(q){e[i]=q;c.IO.sendGet(i)}):c.IO.sendGet(i)}})}},remoteGrab:function(h,i){$.ajax(i)},remember:function(){},clearRequireQueue:function(){var h=c.uri,i=f;f=[];for(var l=0;l<i.length;l+=1)h+=i[l]+"+";$.ajax({url:h.slice(0,-1),dataType:"script",
  success:function(){$.each(i,function(m,n){b[n]=true;a[n]=false;c.IO.sendGet(n)})}})},getFresh:function(h,i){b[h]=false;c.IO.get({url:h,callback:i})},sendGet:function(h){var i=d[h],l=i.length;if(i!==undefined){for(var m=0;m<l;m+=1)c.IO.sendGetCallback(h,i[m]);d[h]=[]}},sendGetCallback:function(h,i){try{i(b[h],e[h])}catch(l){setTimeout(function(){i(b[h],e[h])},500)}},put:function(h,i,l,m){$.ajax({type:"POST",url:c.uri+"/api/"+h+".json?read=true&link_base="+c.uri,data:"_method=PUT&"+i+"="+l,dataType:"json",
  success:function(n){var o=c.dataStore.convertJSONToArchObjects(n.archmap_says);m(n,o)}})},post:function(h,i,l){$.ajax({type:"POST",url:c.uri+"/api/"+h+".json?read=true",data:i,dataType:"json",success:function(m){var n=c.dataStore.convertJSONToArchObjects(m.archmap_says);l(m,n)}})},del:function(h,i){$.ajax({type:"POST",url:c.uri+"/api/"+h+".json?read=true",data:{_method:"DELETE"},dataType:"json",success:function(l){i(l)}})},getJSONModel:function(h,i,l,m){h="/api/"+h+".json";if(l===true)b[h]=undefined;
  c.IO.get({url:h,dataType:"json",callback:i,urlParams:m})},loadPartial:function(h){$.ajax({url:h,dataType:"html",data:{mode:"partial"},success:function(i){$("div#stage").empty().html(i)}})},require:function(h,i){if($.isArray(h)){var l=h.length;if(l===1)h=h[0];else{var m=l;_(h).each(function(n){this.require(n,function(){m-=1;m===0&&i()})},this);return}}if(h.indexOf("components")>=0)if(c[h.split("/").pop().replace(".js","")]!==undefined){i();return}c.IO.get({url:"/framework/script/library/"+h+".js",
  dataType:"script",callback:i,shouldCache:h.indexOf("dependencies")>=0})},getComponentHtml:function(h,i){c.IO.get({url:"/framework/script/library/components/html/"+h+".html",callback:i,dataType:"html"})}};c.State={save:function(h){h.type=="Collection"&&c.IO.require("dependencies/Cookies",function(){$.cookie("last_collection",h.key());c.log("last collection set to be "+h.key())})},retrieve:function(){return $.cookie("last_collection")}}})();
  (function(){var c=Archmap;c.Template={templatize:function(a){a=$(a);var b=c.dataStore,d=b.dataProvider.model;a.addClass("model_holder").data("model",d);var e=b.dataProvider;a.find(".component").each(function(){var f=$(this),g=f.attr("id");if(g=="")g=f.attr("class").match(/^[A-Z][\w0-9]+\b/)[0];var j=f.attr("rel"),k=function(){var i={sandbox:f},l=f.attr("options");l&&_.each(l.split(";"),function(n){n=n.split(":");i[n[0]]=n[1]});if(j==="this"||j===""||j===undefined){i.provider=e;new c[g](i)}else{var m=
  function(n){c.dataStore.get(n,function(o){i.provider=o;new c[g](i)})};j.indexOf("cookie")>=0?c.IO.require("dependencies/Cookies",function(){var n=j.split(";");n=$.cookie(n[0].split(":")[1])||n[1].split(":")[1];m(n)}):m(j)}},h=f.attr("loaddefer");if(h=="true")h=1800;h?setTimeout(function(){c.IO.require("components/"+g,k)},h):c.IO.require("components/"+g,k)});a.find(".model_holder").each(function(){$(this).data("model",c.dataStore.get($(this).attr("rel")))});a.find(".pretty").each(function(){$(this).html($(this).text().replace(/\'/g,
  "&rsquo;").replace(/\n/g,"<hr/>"))});a.find(".editable.clickable").each(function(){var f=$(this),g=f.text();if(g==""||g.match(/^[\s]+$/)||!g)f.html("<em>n/a</em>")})}}})();
  (function(){var c=Archmap;c.User=function(a){this.initialize(a)};c.User.prototype={initialize:function(a){this.data=a;if(this.data.auth_level>1)this.editor=new c.Editor(this.data.auth_level);else{var b=function(){$(".hoverable").removeClass("hoverable");$(".clickable").removeClass("clickable");$(".editable").removeClass("editable")};$("html").bind("HTMLUpdated",b);$(function(){b()})}}};c.EditorialBoard={makeEditable:function(a){a.element.addClass("editable").addClass(a.interaction).attr("rel",a.field);
  c.EditorialBoard.bindModel(a.element,a.model)},makeHoverableEditable:function(a){a.interaction="hoverable";c.EditorialBoard.makeEditable(a)},makeClickableEditable:function(a){a.interaction="clickable";c.EditorialBoard.makeEditable(a)},bindModel:function(a,b){a.addClass("model_holder");b instanceof c.Model?a.attr("type",b.key()).data("model",b):c.dataStore.get(b,function(d){a.attr("type",d.key()).data("model",d)})}};c.Editor=function(a){this.initialize(a)};c.Editor.prototype={initialize:function(a){this.known_metas=
  {};this.auth_level=a;this.listen()},listen:function(){var a=this;$("body").find(".editable.clickable").live("click",function(){$(this).attr("contentEditable")=="false"&&a.clickProcess2($(this));return false});$("body").find(".editable.hoverable").live("mouseover",function(){$(this).attr("contentEditable")=="false"&&$(this).find(".edit-hover").length==0&&$(this).append("<a href='#edit' class='edit-hover'>Edit!</a>")});$("body").find(".edit-hover").live("click",function(){var b=$(this).parent();a.clickProcess(b);
  return false})},clickProcess2:function(a,b){var d=a.closest(".model_holder").data("model"),e=a.attr("rel"),f=this;c.dataStore.getMetaForModelAndField(d.type,e,function(g){f.isAuthorized2(g)===true&&f.makeEditable2(d,g,a,b)})},clickProcess:function(a){var b=a.closest(".model_holder").data("model"),d=a.attr("rel"),e=this;c.dataStore.getMetaForModelAndField(b.type,d,function(f){e.isAuthorized2(f)&&e.makeEditable(b,f.data,a)})},mapProcess:function(a,b,d){d.find("strong[rel='lat']");d.find("strong[rel='lng']")},
  mapProcess2:function(a,b,d){var e=d.find("strong[rel='lat']"),f=d.find("strong[rel='lng']");e.text(a);f.text(b);var g=this;this.clickProcess2(e,function(){g.clickProcess2(f);f.blur()});e.blur()},isAuthorized2:function(a){if(a.get("auth_level")>this.auth_level){alert("You are not authorized to edit this");return false}return true},isAuthorized:function(a){if(a.status=="404"){alert("Hmm... I don't know if you can edit this. Ask Rob about it.");return false}else if(a.response.Meta.auth_level>this.auth_level){alert("You are not authorized to edit this.");
  return false}else return true},suggestify:function(){},makeEditable2:function(a,b,d,e){var f=false,g=this,j=$("<div/>",{"class":"editor",html:$("<button/>",{text:"Cancel",click:function(){f=true;d.html(d.data("original"))}})});d.addClass("editing").data("original",d.html()).attr("contentEditable",true).bind("paste",function(){$(this).html();var k=$(this);setTimeout(function(){k.html(g.convertPaste(k))},0)}).blur(function(){d.unbind("blur");setTimeout(function(){d.removeClass("editing").attr("contentEditable",
  false).next("div.editor").remove();if(f===false){j.empty().html("<em>Saving....</em>");g.save2(a,b,d,e);j.remove()}},100)}).find("a.edit-hover").remove();d.focus();b.get("type")=="textarea"&&d.after(j)},makeEditable:function(a,b,d){var e=d.clone();e.find("a.edit-hover").remove();e.find("a.inline").each(function(){var h=$(this).text(),i=$(this).attr("href").replace(c.uri+"/","");$(this).text("["+h+"]["+i+"]")});e.find("em.inline").each(function(){$(this).text("*"+$(this).text()+"*")});var f=e.html().toString();
  f=f.replace(/<br>/g,"\n");f=this.characterConvert(f);e.html(f);f=e.text();if(f=="unavailable...")f="";var g=d.css("display");d.css("display","none").after("<div class='editor'><button rel='save'>Save</button><button rel='cancel'>Cancel</button></div>");b.type=="input"?d.next(".editor").prepend("<input class='put' value='"+f+"' type='text'/>"):d.next(".editor").prepend("<textarea class='put'>"+f+"</textarea>");var j=this,k=$(d).next(".editor");k.find("button[rel='save']").click(function(){var h="";
  h=b.type=="input"||b.type=="textarea"?k.find(".put").attr("value"):k.find(".put").text();j.save(a,b,d,h);$(d).css("display",g);k.remove()});k.find("button[rel='cancel']").click(function(){$(d).css("display",g);k.remove()})},boil:function(a){a=this.characterConvert(a.html().toString());return a=a.replace(/(<br(\/)?>){2}/g,"\n\n").replace(/&nbsp;/g," ").replace(/(<|&lt;)(\/)?[\w]+(>|&gt;)/g,"").replace(/\n[ ]+/g,"\n")},convertPaste:function(a){return this.characterConvert(a.html().toString().replace(/\n/g,
  " ").replace(/<\/(div|p|h(1|2|3|4|5|6))>/g,"{n}").replace(/<[^<>]+(\/)?>/g," ").replace(/\{n\}/g,"<br/><br/>"))},characterConvert:function(a){a=a.replace(/\u201c/g,'"').replace(/\u201d/g,'"');a=a.replace(/\u2018/g,"'").replace(/\u2019/g,"'");return a=a.replace(/\u2014/g," -- ").replace(/\u2013/g,"--")},save2:function(a,b,d,e){var f=b.get("field");b=this.boil(d);a.set(f,b,function(){a.getFresh(f,function(g){d.html(g);typeof e==="function"&&e()})})},save:function(a,b,d,e){var f=b.field;e=this.characterConvert(e);
  a.set(f,e,function(){a.getFresh(f,function(g){d.empty().html(g)})})}};c.PopoverEditor=function(a,b){this.start(a,b)};c.PopoverEditor.prototype={start:function(a,b){this.model=a;this.callback=b;this.dom=$("<div/>",{"class":"popover"});$("body").append(this.dom);var d=this;c.IO.getComponentHtml("PopoverEditor",function(e){d.dom.append(e);d.listen();d.dom.children("div").append("<h3>More Information</h3>");d.loadAllEditableFields(d.model);c.EditorialBoard.bindModel(d.dom.children("div"),a.key());d.dom.height($(document).height());
  d.dom.find(".popover_panel").css("marginTop",$("body").scrollTop()+25)})},listen:function(){var a=this;this.dom.find("button.finish").click(function(){a.dom.remove();c.dataStore.getFresh(a.model.key(),function(b){a.callback(b)})})},loadAllEditableFields:function(a){var b=this;c.dataStore.get("meta/"+a.getType()+"::new",function(d){d.get("requirements",function(e){d.get("nonrequirements",function(f){$.each(e,function(g,j){b.addEditableField(j,a)});$.each(f,function(g,j){b.addEditableField(j,a)})})})})},
  addEditableField:function(a,b){var d=this.dom.children("div"),e=this;b.get(a.get("field"),function(f){if(f==""||f.match(/^[\s]+$/))f="n/a";if(a.get("editbox")!=0){if(a.get("type")=="textarea")d.append("<span>"+a.get("descript")+"</span> <p class='editable hoverable' rel='"+a.get("field")+"'>"+f+"</p>");else if(a.get("type")=="input")d.append("<span>"+a.get("descript")+"</span> <strong class='editable clickable' rel='"+a.get("field")+"'>"+f+"</strong>");else if(a.get("type").indexOf("<")>=0){var g=
  a.get("type").match(/\<([A-Z][\w]+)\>/)[1];b.get(a.get("field"),function(j){e.addEntityChooser(a,j,g)})}a.get("field")==="lng"&&e.addEditableMap(d,b);a.get("field")}})},addEditableMap:function(a,b){var d=this;a.append($("<button/>",{text:"Open a map for editing the place...",click:function(){var e=new c.PopoverMap(b,function(f,g){c.user.editor.mapProcess2(f,g,d.dom);delete e})}}))},addEntityChooser:function(a,b){var d=this;d.dom.children("div").append("<span>"+a.get("descript")+"</span>");c.IO.require("components/ListComponent",
  function(){var e=new c.ListComponent,f=$("<div/>",{"class":"ListComponent verysimple"});e.setSandbox(f);d.dom.children("div").append(f);e.initialize(c.dataStore.auxiliaryDataProvider(b))})}};c.PopoverMap=function(a,b){this.start(a,b)};c.PopoverMap.prototype={start:function(a,b){c.IO.require("components/AMap2",function(){var d=google.maps,e=new d.LatLng(48,-0.3),f=3;if(a.get("lat")&&a.get("lng")){e=new d.LatLng(a.get("lat"),a.get("lng"));f=10}var g=$("<div/>",{"class":"edit_map",css:{height:$(window).height()-
  125}}),j=$("<a/>",{"class":"done",text:"Save new map position",href:"#"}),k=$("<img/>",{"class":"crosshairs",src:"/media/ui/crosshairs.png"}),h=$("<input/>",{"class":"geocode",value:"Search"}),i=$("<div/>",{"class":"popover",html:$("<div/>",{"class":"popover_map_panel",html:g.after($("<div/>",{"class":"done",html:j.after($("<a/>",{href:"#",text:"Cancel",click:function(){i.remove();return false}})).after($("<span/>",{text:"Align the crosshairs over the target..."}))})).after(h).after(k)})});$("body").append(i);
  var l=c.Config.maps.getGoogleMapOptions();l.mapTypeId="hybrid";l.center=e;l.zoom=f;var m=new d.Map(g[0],l),n=[],o=undefined;j.bind("click",function(){b(m.getCenter().lat(),m.getCenter().lng());i.remove();return false});h.bind("keydown",function(){clearTimeout(o)}).bind("keyup",function(){clearTimeout(o);var q=$(this);o=setTimeout(function(){(new d.Geocoder).geocode({address:q.attr("value")},function(r,t){if(t==="OK"){for(var p in n)n[p].setMap(null);var s=new d.LatLngBounds;for(p in r){n.push(new d.Marker({position:r[p].geometry.location,
  map:m,tile:"TD"}));s.extend(r[p].geometry.location)}m.fitBounds(s)}})},700)});e=$(window).height()-i.find(".popover_map_panel").height();i.css("padding-top",$("body").scrollTop()+e/2);k.css("left",g.width()/2-15).css("top",g.height()/2-15)})}}})();
  (function(){var c=Archmap;c.componentBuilder=function(a){var b=new c[a.component];b.setSandbox(a.sandbox);b.initialize(c.dataStore.auxiliaryDataProvider(a.provider));return b};c.defineComponent=function(a){var b=a.name;c[b]=function(d){this.inlineOptions={};if(d!==undefined){var e=d.sandbox,f=d.provider;delete d.sandbox;delete d.provider;this.setOptions(d);if(e&&this.setSandbox){this.setSandbox(e);this.sandbox.addClass(b)}if(f&&this.initialize){f=f instanceof c.DataProvider?f:c.dataStore.auxiliaryDataProvider(f);
  this.initialize(f)}}c.components.push(this)};c[b].prototype=a.extend?new c[a.extend]:{};jQuery.extend(c[b].prototype,a.methods||{})};c.newComponent=function(a){c.defineComponent(a)};c.GenericComponent=function(){};c.GenericComponent.prototype={addGenericListeners:function(){var a=this;$("html").bind("dataProviderReady",function(b,d){a.initialize(d)});$("html").bind("windowResized",function(){a.resize()})},resize:function(){return false},getModel:function(a){return this.dataProvider.dataStore.get(a)},
  selectModel:function(a){this.dataProvider.select(a,this)},multiselectModel:function(a){this.dataProvider.multiselect(a,this)},unselectModel:function(a){this.dataProvider.unselect(a,this)},setSandbox:function(a){this.sandbox=a;return this},setOptions:function(a){this.inlineOptions=a||{}},loadTemplate:function(a,b){var d=this;c.IO.getComponentHtml(a,function(e){d.sandbox.append(e);b()})},destroy:function(){_.each(_.keys(this),function(a){delete this[a]},this)}};c.SingletonComponent=function(){};c.SingletonComponent.prototype=
  new c.GenericComponent;jQuery.extend(c.SingletonComponent.prototype,{initialize:function(){this.addListeners();this.start()},start:function(){return false},boot:function(){},addListeners:function(){this.addGenericListeners()},request_and_wait:function(a,b){b=a.dataProvider.model.key()+"/"+b;var d=this;a.request(b,function(e,f){d.start();d.render(e,f)})},resize:function(){return false},clean:function(){$(this.dom).empty();this.sandbox.empty()}});c.GroupComponent=function(){};c.GroupComponent.prototype=
  new c.GenericComponent;jQuery.extend(c.GroupComponent.prototype,{addListeners:function(){this.addGenericListeners();var a=this;$("html").bind("newDataProvider",function(b,d){a.unrender();a.boot(d);a.render()});$("html").bind("dataProviderRefreshed",function(b,d){if(d.model.key()===a.dataProvider.model.key()){a.unrender();a.boot(d);a.render()}});$.each({modelHoverOn:"hoverOnModel",modelHoverOff:"hoverOffModel",modelSelected:"highlightModel",modelUnselected:"unhighlightModel",modelBlurred:"blurModel",
  modelFocused:"focusModel",modelSubfocused:"subfocusOnModel",modelUnsubfocused:"unsubfocusOnModel"},function(b,d){$("html").bind(b,function(e,f,g){try{a[d](f,g)}catch(j){a[d](f)}})})},initialize:function(a){this.boot(a);this.hangups=[];this.addListeners();this.start()},boot:function(a){this.dataProvider=a},start:function(){return false},prerender:function(){return false},render:function(){this.prerender();var a=this.dataProvider.model;a.key()!="catalog/collection"&&this.renderModel(a);this.finalize()},
  renderModel:function(){return false},unrender:function(){return false},rerender:function(){this.unrender();this.render()},blurFilter:function(a){this.blurChildren(this.dataProvider.model,a)},blurChildren:function(a,b){var d=this;a.iterateChildren(function(e,f){if(f.isExpandable())d.blurChildren(f,b);else b(f)?f.focus():f.blur()})},preventFinalize:function(){this.hangups.push(true)},enableFinalize:function(){this.hangups.pop();return this},canBeFinalized:function(){if(this.hangups.length===0)return true},
  hoverModel:function(a){this.dataProvider.hover(a)},unhoverModel:function(a){this.dataProvider.unhover(a)},subfocusModel:function(a){this.dataProvider.subfocus(a)},unsubfocusModel:function(a){this.dataProvider.unsubfocus(a)},highlightModel:function(){return false},unhighlightModel:function(){return false},focusModel:function(){return false},blurModel:function(){return false},finalize:function(){return false},hoverOnModel:function(){return false},hoverOffModel:function(){return false},subfocusOnModel:function(){return false},
  unsubfocusOnModel:function(){return false}})})();
  (function(){Archmap.Config={markers:{shapes:{arrow:"M 5 10 L 14 10 12 8 12 12 14 10 12 8 14 10",arrowColor:"#89e",arrowHead:"M 14 10 L 12 8 12 12 14 10 12 8"},colors:{defaultIcon:"darkslateblue",iconHover:"yellow",iconHighlight:"firebrick"}},texts:{mapMarkerHoverTipText:"Click the marker to find out more. Double-click to visit the monograph.",mapMultiMarkerHoverTipText:"Shift-click this church to compare it the others in the sidebar."},maps:{getGoogleMapOptions:function(){return{center:new google.maps.LatLng(48,2),
  zoom:6,mapTypeId:google.maps.MapTypeId.TERRAIN,mapTypeControl:false,navigationControl:false}},googleMapStylers:{landscape:[{visibility:"on"},{hue:"#00ff09"},{lightness:-15}],water:[{visibility:"simplified"},{hue:"#7700aa"},{lightness:100}]},historicalMapCollection:"collection/182",zoomInButtonImage:"/media/ui/zoom_in_alt.png",zoomOutButtonImage:"/media/ui/zoom_out_alt.png",zoomInButtonImageSmall:"/media/ui/zoom_in_small.png",zoomOutButtonImageSmall:"/media/ui/zoom_out_small.png"},hints:{}}})();
  (function(){var c=Archmap;c.DataStore=function(a){this.initialize(a)};c.DataStore.prototype={initialize:function(a){this.user=a;this.data={};this.providers={};this.dataProvider=null;this.currentHash=window.location.hash;var b=this;$("html").bind("changeDataProvider",function(d,e){b.changeDataProvider(e)});$("html").bind("refreshDataProvider",function(d,e){if(e)b.getFresh(e,function(g){b.providers[e].model=g;$("html").trigger("dataProviderRefreshed",[b.providers[e]])});else{var f=b.dataProvider.model.key();
  b.getFresh(f,function(g){b.changeDataProvider(g)})}})},get:function(a,b,d){if(a===undefined)return false;a=a.toLowerCase();if(a===undefined||a=="")return false;var e=this.localGet(a);if(d!==true&&e){_.isFunction(b)&&b(e);return e}else{this.remoteGet(a,b,d);return false}},localGet:function(a){return this.data[a]?this.data[a]:false},remoteGet:function(a,b,d){var e=this;c.IO.getJSONModel(a,function(f){f=f.archmap_says.model;if(_.isFunction(b))if(e.data[f])b(e.data[f]);else throw"AskedForItButDidntGetItError";
  },d)},getFresh:function(a,b){this.get(a,b,true)},getMetaForModelAndField:function(a,b,d){this.get("meta/"+a+"::"+b,d)},keyPush:function(a,b){this.data[a.toLowerCase()]=b},push:function(a){this.keyPush(a.key(),a)},infuseInline:function(a,b){var d=this;this.convertJSONToArchObjects(a,function(e,f){f!==undefined?d.setDataProvider(f):d.setDataProvider(e);b()})},convertJSONToArchObjects:function(a,b){if(a.method!=="shortlist"&&a.system_model!=="search"){var d=this;this.get(a.model,function(f){if(typeof b===
  "function"){var g=d.recurseForModels(a.response,a.model,a.method);b(g,f)}})}else{var e=this.recurseForModels(a.response,a.model,a.method);typeof b==="function"&&b(e);return e}},recurseForModels:function(a,b,d){var e=undefined;if(c.Utilities.isArray(a)){for(var f in a)if(typeof a[f]==="object"){var g=this.recurseForModels(a[f],b,d);try{a[f]=g.getReceipt()}catch(j){a[f]=g}}this.get(b).data[d]=a}else if(typeof a==="object")for(var k in a)if(typeof Archmap[k]==="function"){f=a[k].uri;e=g=new Archmap[k](a[k]);
  this.keyPush(f,g);if(f===b)this.recurseForModels(a[k],f,d);else if(b&&this.get(b)){this.get(b).data[d]=g.getReceipt();this.recurseForModels(a[k],g.key(),null)}else throw"NoRecordOfParentError";}else typeof a[k]==="object"&&this.recurseForModels(a[k],b,k);else if(this.get(b))this.get(b).data[d]=a;if(e==undefined)e=a;return e},setDataProvider:function(a){this.dataProvider=new c.DataProvider(this.data[a.key()],this);this.providers[a.key()]=this.dataProvider;this.dataProvider.ready();c.State.save(a)},
  changeDataProvider:function(a){this.dataProvider=new c.DataProvider(a,this);$("html").trigger("newDataProvider",[this.dataProvider]);c.State.save(a)},auxiliaryDataProvider:function(a){if(a.key()in this.providers)return this.providers[a.key()];this.providers[a.key()]=new c.DataProvider(a,this);return this.providers[a.key()]}};c.Receipt=function(a){this.key=a;this.name="Receipt for "+this.key};c.Receipt.prototype={checkout:function(){return c.dataStore.get(this.key)}};c.DataProvider=function(a,b){this.model=
  a;this.id=this.model.get("id");this.dataStore=b;this.selection=[];this.subfocusedModel=undefined};c.DataProvider.prototype={ready:function(){$("html").trigger("dataProviderReady",this)},isDataProvider:function(){return true},key:function(){return this.model.key},get:function(a){return this.model.get(a.toLowerCase())},select:function(a,b){if(this.isThisModelSelected(a))c.shiftOn===false?this.dataStore.get(a).visit():this.unselect(a,b);else{c.provider().isIterable()===false&&this.dataStore.get(a).visit();
  this.subfocusedModel!==undefined&&this.unsubfocus();c.shiftOn===false&&this.clearSelection();this.multiselect(a,b)}},multiselect:function(a,b){this.selection.push(a);buffered_hash="";for(var d in this.selection)buffered_hash+="/"+this.selection[d];this.dataStore.get(a).select(b)},isThisModelSelected:function(a){for(var b in this.selection)if(this.selection[b]==a)return true;return false},clearSelection:function(){for(;this.selection.length>0;)this.dataStore.get(this.selection.pop()).unselect()},unselect:function(a){for(var b in this.selection)this.selection[b]==
  a&&this.selection.splice(b,1);this.dataStore.get(a).unselect()},subfocus:function(a){this.clearSelection();this.subfocusedModel!==undefined&&this.subfocusedModel.unsubfocus();this.dataStore.get(a).subfocus();this.subfocusedModel=this.dataStore.get(a)},getSelectionStack:function(){return this.selection},unsubfocus:function(){this.subfocusedModel.unsubfocus();this.subfocusedModel=undefined},hover:function(a){for(var b in this.selection)if(this.selection[b]==a)return 0;this.dataStore.get(a).hover()},
  unhover:function(a){for(var b in this.selection)if(this.selection[b]==a)return 0;this.dataStore.get(a).unhover()}}})();
  (function(){var c=Archmap;c.Model=function(a){this.data=a};c.Model.prototype={initialize:function(a){this.data=a},key:function(){return this.get("uri")},get:function(a,b){if(this.data[a]!==undefined){var d=this.data[a];if(d instanceof c.Receipt)d=d.checkout();else if(c.Utilities.isArray(d)){var e=this.checkoutReceiptArray(d);if(e.length===0)e=d;d=e}if(typeof b=="function")b(d);else return d}else if(a in this.whitelist){var f=this;c.IO.getJSONModel(this.key()+"/"+a,function(g,j){if(typeof b==="function"){if(f.data[a]!==
  j)f.data[a]=j;f.get(a,b)}})}else return false},getFresh:function(a,b){var d=this;this.data[a]=undefined;c.IO.getJSONModel(this.key()+"/"+a,function(e,f){d.data[a]=f;d.get(a,b)},true)},getOriginalKey:function(){return this.key()},getAuthor:function(a){if(this.get("author_id"))return c.dataStore.get("person/"+this.get("author_id"),function(b){typeof a==="function"&&a(b)});return false},getType:function(){return this.type},getItem:function(){return false},getReceipt:function(){return new c.Receipt(this.get("uri"))},
  checkoutReceiptArray:function(a){var b=[],d=0;for(d=0;d<a.length;d+=1)if(a[d]instanceof c.Receipt)b[d]=a[d].checkout();return b},shout:function(a,b){try{$("html").trigger(a,[this.key(),b])}catch(d){}},select:function(a){this.shout("modelSelected",a)},unselect:function(){this.shout("modelUnselected")},hover:function(){this.shout("modelHoverOn")},unhover:function(){this.shout("modelHoverOff")},focus:function(){this.shout("modelFocused")},blur:function(){this.shout("modelBlurred")},update:function(){this.shout("modelUpdated")},
  subfocus:function(){this.shout("modelSubfocused")},unsubfocus:function(){this.shout("modelUnsubfocused")},visit:function(){window.location.href=c.uri+"/"+this.key()},set:function(a,b,d){this.put(a,b,d)},put:function(a,b,d){c.IO.put(this.key(),a,b,function(e){d!==undefined&&d(e)})},edit:function(a,b){new c.PopoverEditor(this,function(){a()},b)},isExpandable:function(){var a=c.dataStore.dataProvider.id;return this.type=="Collection"&&this.get("id")!==a?true:false},isIterable:function(){if(this instanceof
  c.Collection||this instanceof c.Search)return true;if(this.getItem()&&this.getItem()instanceof c.Collection)return true;return false},isProvider:function(){return this.get("id")===c.dataStore.dataProvider.id?true:false},iterateChildren:function(a){this.get("members",function(b){try{$.each(b,function(e,f){a(e,f)})}catch(d){}})},iterateMembers:function(a,b){var d={};this.get("members",function(e){$.each(e,function(f,g){d[g.key()]=a(f,g)});typeof b==="function"&&b()});return d},toString:function(){return this.type+
  "\t"+this.get("id")},isOfType:function(a){if(this.type.toLowerCase()==a.toLowerCase())return true;return false},whitelist:{descript:true,relations:true}};$.each(["Building","Person","Place","Publication","Catalog","Image","Node","Map","HistoricalEvent","LexiconEntry","SocialEntity","Note","Collection","Search","Slideshow","CollectionItem","Meta","Slide","BuildingModel","Keyword"],function(a,b){c[b]=function(d){this.data=d;this.type=b};c[b].prototype=new c.Model(this.data)});$.each(["Story","Feature",
  "SocialEntity","Chapter"],function(a,b){c[b]=function(d){this.data=d;this.type=b};c[b].prototype=new c.Collection(this.data)});jQuery.extend(c.Building.prototype,{get:function(a){var b={naveHeight:true,naveWidth:true,aisleHeight:true,aisleWidth:true};return this.buildingModel!==undefined&&a in b?this.buildingModel[a]():c.Model.prototype.get.apply(this,arguments)},getBuildingModel:function(a){var b=this;this.get("model",function(d){a(d);b.buildingModel=d})},whitelist:{floorplan:true,frontispiece:true,
  nave:true,plan:true,elevation:true,history:true,chronology:true,significance:true,bibliography:true,model:true,images:true,canonicalSlideshow:true,bibliography_list:true,historical_events:true,relations:true,other_images:true,lat_section:true,exterior_chevet:true}});jQuery.extend(c.HistoricalEvent.prototype,{whitelist:{buildings_involved:true,bibliography_list:true,descript:true,relations:true}});jQuery.extend(c.BuildingModel.prototype,{zones:{nave:1,transept:2,crossing:3,choir:4},positions:{main:1,
  arcade:2,aisle:3,wall:4,aisle2:5},dimensions:{apex:1,springer:2,boss:3,opening:4,wall:5,centerline:6},getDim:function(a,b,d){a=this.zones[a.toLowerCase()];b=this.positions[b.toLowerCase()];d=this.dimensions[d.toLowerCase()];return this.data.dimensions[a+"_"+b+"_"+d]},maxHeight:function(){return this.naveHeight()},naveHeight:function(){return this.getDim("nave","main","apex")},naveWidth:function(){return this.getDim("nave","main","opening")},aisleHeight:function(){return this.getDim("nave","aisle",
  "apex")},aisleWidth:function(){return this.getDim("nave","aisle","opening")}});jQuery.extend(c.Collection.prototype,{add:function(a,b,d,e){var f=this,g=this.last();g=g?g.get("sortval")+1:1;a={item_entity_id:a.type.toLowerCase(),item_id:a.get("id"),sortval:g};$.extend(a,e);c.IO.post(this.key(),a,function(){if(b){c.dataStore.get(f.key());b===true?c.triggerEvent("refreshDataProvider"):c.triggerEvent("refreshDataProvider",[b])}typeof d==="function"&&d()})},whitelist:{members:true,render_style:true},last:function(){var a=
  this.get("members");return a?a[a.length-1]:false}});jQuery.extend(c.CollectionItem.prototype,{key:function(){if(this.getItem()instanceof c.Model)return this.getItem().key();return this.data.uri},get:function(a,b){var d=c.Model.prototype.get.apply(this,arguments);if(d===false||d===undefined)return this.getItem().get(a,b);return d},getOriginalKey:function(){return this.data.uri},getType:function(){return this.getItem().getType()},isOfType:function(a){return this.getItem().isOfType(a)},isExpandable:function(){return this.getItem().isExpandable()},
  getItem:function(){return this.get("item")},savePosition:function(a,b){c.IO.put("CollectionItem/"+this.data.id,"sortval",a,function(){typeof b==="function"&&b()})},del:function(a){c.IO.del(this.data.uri,function(){typeof a==="function"&&a()})}});jQuery.extend(c.Meta.prototype,{whitelist:{requirements:true,nonrequirements:true}});jQuery.extend(c.Slide.prototype,{getImage:function(){return this.get("image")}});jQuery.extend(c.Person.prototype,{whitelist:{descript:true,relations:true,authored_books:true,
  edited_books:true,images:true,my_collections:true}});jQuery.extend(c.Publication.prototype,{whitelist:{descript:true,relations:true,authors:true,editors:true,buildings_referenced:true,events_referenced:true}});jQuery.extend(c.Image.prototype,{whitelist:{plot:true,zeroethTile:true},get:function(a,b){if(a==="building")c.dataStore.get("building/"+this.get("building_id"),function(d){b(d)});else return c.Model.prototype.get.apply(this,arguments)},getImageArea:function(a,b){var d=this.maximizeForTile(a,
  b);return d.height*d.width},fitToSpace:function(a,b,d){a=this.maximizeForTile(a,b);b=a.width>a.height?this.maximizeForDimension(a.width):this.maximizeForDimension(a.height);b=this.get("medium").replace("/700/","/"+b+"/");d.height(a.height).width(a.width).attr("src",b);return a},maximizeForTile:function(a,b){var d=a/b;return this.get("height")/this.get("width")>d?{height:a,width:this.get("width")*(a/this.get("height"))}:{width:b,height:this.get("height")*(b/this.get("width"))}},maximizeImg:function(a,
  b,d){a=this.maxSizeFor(a,b);d.attr("src",a[0]).width(a[1]).height(a[2])},isWidthwise:function(){if(this.get("width")>this.get("height"))return true;return false},centerAndFit:function(a,b,d,e,f){if(e!==undefined){e=this.fitToSpace(a-e.y,b-e.x,d);a=(a-e.height)/2}else{e=this.fitToSpace(a,b,d);a=(a-e.height)/2}if(f===true){b=(b-e.width)/2;d.css("top",a).css("left",b)}else d.attr("image_id",this.get("id")).css("margin-top",a).css("margin-bottom",a)},centerAndScaleAndFit:function(a,b,d,e,f){f!==undefined?
  this.fitToSpace(a-f.y,b-f.x,d):this.fitToSpace(a,b,d);b=e/parseFloat(this.get("scale"));if(!isNaN(b)){d.width(d.width()*b).height(d.height()*b);d.attr("image_id",this.get("id")).css("margin-top",(a-d.height())/2)}},maximizeForDimension:function(a){return a>1700?2E3:a>1300?1700:a>700?1300:a>300?700:a>100?300:a>50?100:50},urlForSize:function(a){return this.get("medium").replace("/700/","/"+a+"/")},scale:function(a,b){var d=b/parseFloat(this.get("scale"));isNaN(d)||a.width(a.width()*d).height(a.height()*
  d)}});jQuery.extend(c.Map.prototype,{whitelist:{shape_collection:true}});jQuery.extend(c.Search.prototype,{iterateMembers:function(a,b){this.get("quicksearch",function(d){$.each(d,function(e,f){a(e,f)});typeof b==="function"&&b()})},whitelist:{nonrequirements:true}})})();
  (function(){var c=Archmap;c.Elements={};c.Elements.UIStuff={closeButton:function(){return $("<img/>",{src:"/assets/images/close.png"})},arrow:function(a){return $("<img/>",{src:"/media/ui/"+a+"_arrow.png"})},upArrow:function(){return this.arrow("up")},downArrow:function(){return this.arrow("down")},helpPopoverLink:function(a){return $("<div/>",{"class":"helpPopoverLink",html:$("<img/>",{src:"/media/ui/helpPopover.png"}),click:function(b){$("div#container").append(c.Elements.UIStuff.helpPopover({html:a.html,
  css:{right:$(window).width()-b.pageX-15,top:b.pageY-15},highlight:a.highlight}))}})},helpPopover:function(a){a.highlight!==undefined&&a.highlight.addClass("helpHighlight");var b=$("<div/>",{"class":"helpPopoverClose",html:$("<img/>",{src:"/media/ui/close.png"}),click:function(){a.highlight!==undefined&&a.highlight.removeClass("helpHighlight");$(this).parent().remove()}});return $("<div/>",{"class":"helpPopover "+a.extraClasses,css:a.css,html:$("<div/>",{"class":"padding",html:a.html})}).prepend(b)},
  expandButton:function(a){var b=$("<img/>",{"class":"expand",src:"/framework/script/assets/closed_arrow.png"});b.toggle(function(){$(this).attr("src","/framework/script/assets/open_arrow.png");a.open()},function(){$(this).attr("src","/framework/script/assets/closed_arrow.png");a.close()});a.trigger!==undefined&&a.trigger.click(function(){b.trigger("click")});return $("<strong/>",{"class":"expand",html:b})},expandableListItem:function(a){var b=$("<div/>",{"class":"visible"}).append(a.visible),d=$("<div/>",
  {"class":"hidden",css:{display:"none"}}).append(a.hidden),e=$("<li/>",{"class":"expandable"}).append(b).append(d);b.prepend(c.Elements.UIStuff.expandButton({open:function(){e.find(".hidden").slideDown("fast");typeof a.open==="function"&&a.open()},close:function(){e.find(".hidden").slideUp("fast");typeof a.close==="function"&&a.close()},trigger:a.trigger}));return e},standardListItem:function(a){if(a.classes===undefined)a.classes="";if(a.linkClasses===undefined)a.linkClasses="";var b=$("<li/>",{data:{originalKey:a.originalKey,
  key:a.key},"class":"standard-list-item "+a.classes,html:$("<a/>",{href:"/"+a.key,html:"<em>"+a.type+"</em> <span>"+a.name+"</span>","class":"standard-list-item-link "+a.linkClasses}),mouseover:function(){typeof a.mouseover==="function"&&a.mouseover()},mouseout:function(){typeof a.mouseout==="function"&&a.mouseout()}});a.click!==undefined&&b.find("a").click(function(){a.click(a.key);return false});return b},slideUpArrow:"",slideDownArrow:""};c.Elements.ScrollableDiv=function(a){this.initialize(a)};
  c.Elements.ScrollableDiv.prototype={initialize:function(a){var b=a.appendTo;this.parent=b;var d=a.height||200,e=$("<div/>",{"class":"scrollable-nubbin"}),f=$("<div/>",{"class":"scrollable-scrollbar",css:{height:d},html:e}),g=$("<div/>",{"class":"scrollable-inside",css:{height:d},html:$("<div/>",{"class":"scrollable-contents",html:a.contents})}),j=$("<div/>",{"class":"scrollable-outside",css:{height:d},html:g});b.append(j).append(f);var k=undefined;g.mouseover(function(){e.addClass("hovering");k=setInterval(function(){var h=
  g.find(".scrollable-contents").height()/j.height(),i=parseFloat(g.scrollTop());e.css("top",i/h)},10)}).mouseout(function(){e.removeClass("hovering");clearInterval(k)});c.IO.require("dependencies/DisableTextSelect",function(){var h=undefined,i=false;e.mousedown(function(l){if(i===false){b.disableTextSelect();h=l.pageY}i=true});$("html").mousemove(function(l){if(i){var m=l.pageY-h;if(m>=0){if(m>d-e.height())m=d-e.height();e.css("top",m);l=g.find(".scrollable-contents").height()/j.height();g.scrollTop(m*
  l)}else{c.log("---");c.log(d-e.height());c.log(l.pageY);c.log(h)}}}).mouseup(function(){i=false;b.enableTextSelect()})});this.nubbin=e;this.scrollable=g;this.container=j;this.calculateNubbinHeight()},replaceHtmlWith:function(a){this.parent.find(".scrollable-contents").html(a);this.calculateNubbinHeight()},calculateNubbinHeight:function(){this.nubbin.css("display","block");var a=this.scrollable.find(".scrollable-contents").height(),b=this.container.height();this.nubbin.height(b/a*b-3);a<=b&&this.nubbin.css("display",
  "none")}};c.Elements.DarkroomOverlay=function(a){this.initialize(a)};c.Elements.DarkroomOverlay.prototype={};c.Elements.BiggableImage=function(a){this.initialize(a)};c.Elements.BiggableImage.prototype={initialize:function(a){this.image=a.image;this.attachTo=a.attachTo===undefined?$("body"):a.attachTo;this.build();this.listen()},build:function(){this.img=$("<img/>",{src:this.image.get("thumbnail")});this.img.data(this.image);this.link=$("<a/>",{html:this.img})},listen:function(){var a=this;this.link.click(function(){a.makeBig()})},
  getElement:function(){return this.link},makeBig:function(){this.attachTo.append((new c.Elements.DarkroomOverlay({})).getElement())}};c.Elements.Dragger=function(a){this.initialize(a)};c.Elements.Dragger.prototype={initialize:function(a){this.dragBar=a.dragBar;this.dragFunction=a.dragFunction;this.dragging=false;this.listen()},listen:function(){var a=this;this.dragBar.mousedown(function(){a.dragging=true});$("html").mousemove(function(b){a.dragging===true&&a.dragFunction(b,a.dragBar)}).mouseup(function(){a.dragging=
  false})}}})();(function(){Archmap.Utilities={isArray:function(c){return Object.prototype.toString.call(c)==="[object Array]"},deaccent:function(c){_.each([["\u00c9","E"]],function(a){c=c.replace(a[0],a[1])});return c}}})();
  (function(){var c=Archmap;c.shiftOn=false;c.rightClicking=false;c.overlays=[];c.overlay_stack_size=0;c.current_hash=window.location.hash.toString().replace("#","");$("html").keydown(function(a){if(a.shiftKey)c.shiftOn=true});$("html").bind("contextmenu",function(){c.rightClicking=true});$("html").keyup(function(a){if(!a.shiftKey)c.shiftOn=false;c.rightClicking=false});c.top=function(){$("body").animate({scrollTop:"0px"})};c.checkHistory=function(){};setInterval(function(){var a=window.location.hash.toString().replace("#",
  "");if(c.current_hash!==a)try{c.overlays.pop().clean()}catch(b){}c.current_hash=a},200);$("html").bind("overlayCleaned",function(){c.overlays.pop();window.location.hash="/";c.current_hash=window.location.hash.toString().replace("#","")});c.VeryBigImageComponent=function(){this.start()};c.VeryBigImageComponent.prototype={start:function(){$("a.fullscreen").live("click",function(){var a="http://mappinggothicfrance.org/swf/ArchmapZoomify.swf?filepath="+$(this).attr("rel"),b=$(window).height(),d=$(window).width()*
  0.85;window.open(a,"node","menubar=1,resizable=1,width="+d+",height="+b+"");return false})}};c.ImageUtilities={openStereoViewerWith:function(a){var b=$(window).height(),d=$(window).width();a=a.replace("zoomify","stereo_zoomify");window.open("http://mappinggothicfrance.org/swf/ArchmapZoomify.swf?filepath="+a,"node","menubar=1,resizable=1,width="+d+",height="+b+"")},openNodeViewerWith:function(a){var b=$(window).height()*0.85,d=$(window).width()*0.85;window.open("http://mappinggothicfrance.org/"+a,
  "node","menubar=1,resizable=1,width="+d+",height="+b+"")}};c.BigImageComponent=function(){};c.BigImageComponent.prototype=new c.SingletonComponent;jQuery.extend(c.BigImageComponent.prototype,{start:function(){this.open=false;$("body").append("<div id='big_image_container'><a href='#' class='image_close'><img src='/archmap/js/assets/images/close.png'/></a><div id='big_image' class='full-holder'></div><div id='befores'></div><div id='afters'></div></div>");this.dom="div#big_image_container";this.stage=
  "div#big_image";this.addUpDownListeners();var a=this;$("a.biggable").live("mouseover",function(){$("html").trigger("imageHoverOn",this)});$("a.biggable").live("mouseout",function(){$("html").trigger("imageHoverOff",this)});$("a.biggable").live("click",function(){var b=$(this).attr("href"),d=b.match(/\d{4,7}/)[0];if(b.indexOf("node")>=0){b="node";var e=c.dataStore.get("node/"+d)}else{b="image";e=c.dataStore.get("image/"+d)}if($(this).closest(".slideshow-holder").length>0){window.location.hash="slideshow";
  c.current_hash="slideshow";var f=$(this).closest(".slideshow-holder").attr("rel");c.IO.require("components/SlideshowViewer",function(){var g=new c.SlideshowViewer;c.overlays.push(g);g.boot(f,d)})}else{window.location.hash="image";if(e){if(b==="image"){window.location.hash="image";c.current_hash="image";a.biggifyImage(e)}else if(b==="node"){window.location.hash="node";c.current_hash="node";a.biggifyNode(e.data)}else alert("these cannot be anything else!");c.overlays.push(a)}else alert("not in the data store... that should not be possible...")}return false});
  $(this.dom).find("a.image_close").click(function(){a.clean();return false})},resize:function(){this.open!==false&&this.biggifyImage(this.open)},clean:function(){this.open=false;var a=this;$("div.PlanComponentM").removeClass("foreground");$(this.dom).fadeOut("fast",function(){$(a.stage).empty();$("html").trigger("overlayCleaned",this)})},biggifyNode:function(a){$(this.dom).find("a.image_close").trigger("click");var b=$(window).height()*0.85,d=$(window).width()*0.85;window.open("http://mappinggothicfrance.org/"+
  a.swf,"node","menubar=1,resizable=1,width="+d+",height="+b+"")},biggifyImage:function(a){try{this.open=a;$("div.PlanComponentM").addClass("foreground");$(this.dom).fadeIn("fast");var b=$("<a/>",{"class":"fullscreen",href:a.key(),rel:a.get("zoomify"),html:$("<img/>",{src:a.get("thumbnail")})});a.centerAndFit($(window).height(),$(window).width()-100,b.find("img"));$(this.stage).empty().append(b).append($("<a/>",{"class":"more-information",href:"/"+a.key(),text:"More Information"}))}catch(d){alert(d)}},
  addUpDownListeners:function(){var a=this;$("html").keydown(function(b){if(a.open!==false&&a.open!==undefined)if(37<=b.which&&b.which<=40){c.triggerEvent("closestImagePlease",[b.which-37,a.open.get("id")]);return false}})},addBackAndForth:function(a){c.get("image/"+a.id+"/foreandaft",function(b){b=b.archmap_says.response;$("div#befores").empty();$("div#afters").empty();for(var d in b){if(b[d].before){var e=b[d].before.Image;$("div#befores").append("<a href='image/"+e.id+"' class='biggable'><img src='"+
  e.thumbnail+"'/></a>")}if(b[d].after){e=b[d].after.Image;$("div#afters").append("<a href='image/"+e.id+"' class='biggable'><img src='"+e.thumbnail+"'/></a>")}}})}})})();
  (function(){Archmap.LayoutManager={fullscreen:function(c,a){var b=function(){$("#container").height($(window).height()).width($(window).width());var d=$("#container").height();if($("#header").length>0)d=d-$("#header").height()-27;if($.isArray(c)===false)c=[c];$.each(c,function(e,f){$(f).height(d)});typeof a==="function"&&a(d)};b();$(window).resize(function(){b()});return this},fullscreenLogo:function(){$("div#logo").css("left",12);return this},searchAdjustment:function(){if($(".overflap").length!==
  0){var c=99-parseInt($(".overflap").width()/$(window).width()*100,10),a=parseInt(185/$(window).width()*100,10);if(a>c)c=a;$("#navigation").css("right",c+"%")}return this},hoverListeners:function(){$("#header a").each(function(){var c=$(this);c.attr("href")!=="/"&&location.pathname==c.attr("href")&&c.addClass("currentpage")});Archmap.IO.require("dependencies/HoverIntent",function(){$("a.top").hoverIntent({over:function(){var c=$(this).parent().find("div.popover-panel");if(c.length>0){c=c.clone();var a=
  $(this).offset().left;c.removeClass("popover-panel").addClass("poppedover-panel").css("display","none").css("top",45).css("left",a).fadeIn("fast");$("body").append(c);$(this).data("pop",c);c.hoverIntent({over:function(){$(this).addClass("beinghovered")},out:function(){$(this).fadeOut("fast",function(){$(this).remove()})},timeout:300,interval:1})}},out:function(){var c=$(this).data("pop");c&&!c.hasClass("beinghovered")&&c.fadeOut("fast",function(){$(this).remove()})},timeout:300});$("#logo a").hoverIntent({over:function(){var c=
  $("<div/>",{"class":"buttontip",text:$(this).attr("tip"),css:{left:$(this).offset().left}});$(this).data("tip",c);$("div#container").append(c);c.fadeIn()},out:function(){$(this).data("tip").fadeOut(function(){$(this).remove()})},interval:200,timeout:150})});return this}}})();
  