diff --git a/build/app/dataset.json b/build/app/dataset.json index 90cb928..29ed193 100644 --- a/build/app/dataset.json +++ b/build/app/dataset.json @@ -122,6 +122,13 @@ "iconFileName": "pelagios.png", "strapline": "Pleiades URIs appearing in ISAW Papers articles" } +, +{ + "id": "e9e161a08db2906d135d7abefb145636", + "title": "OCRE", + "iconFileName": "pelagios.png", + "strapline": "Online Coins of the Roman Empire" +} ] diff --git a/build/app/dataset.json.js b/build/app/dataset.json.js index f9e5576..d36f8e5 100644 --- a/build/app/dataset.json.js +++ b/build/app/dataset.json.js @@ -1 +1 @@ -define('lib/text!app/dataset.json',[],function () { return '[{\r\n "id": "b47df24737cd647789c7d61ede9fed09",\r\n "iconFileName": "arachne.png",\r\n "title": "Arachne",\r\n "strapline": "A web research tool of the German Archaeological Institute for searching mass archaeological records"\r\n},\r\n{\r\n "id": "6a39d0bc3c0fd4ef7d2a837b42cf46a1",\r\n "title": "Google Ancient Places",\r\n "iconFileName": "gap_logo.png",\r\n "strapline": "A Geographic Annotation Platform for reading texts spatially"\r\n}\r\n,\r\n{\r\n "id": "2db51c1dd976f01bf993a02f959e18f8",\r\n "title": "nomisma",\r\n "iconFileName": "Greek.jpeg",\r\n "strapline": "Representing ancient coins online"\r\n}\r\n,\r\n{\r\n "id": "298fafd65586643149e8a8ba47b57052",\r\n "title": "SPQR",\r\n "iconFileName": "SPQR.png",\r\n "strapline": "From Roman inscriptions to resource descriptions"\r\n}\r\n,\r\n{\r\n "id": "",\r\n "title": "Regnum Francorum Online",\r\n "iconFileName": "Regnum.png",\r\n "strapline": "Interactive Maps and Sources of Late Antique and Early Medieval Europe"\r\n}\r\n,\r\n{\r\n "id": "21e48d8ca46f666467b81a551fbb1cb",\r\n "title": "Perseus",\r\n "iconFileName": "Perseus.png",\r\n "strapline": "Annotated occurrences of place entities in texts from the Perseus Digital Library"\r\n}\r\n,\r\n{\r\n "id": "c4c2ed780a8f4f2b698a5c2505ac34ca",\r\n "title": "CLAROS",\r\n "iconFileName": "CLAROS.png",\r\n "strapline": "Aggregated search of art and archaeology data from the classical world and the far east across four millennia"\r\n}\r\n,\r\n{\r\n "id": "739128af1e9613de03706a57cef46976",\r\n "title": "Open Context",\r\n "iconFileName": "open-context.png",\r\n "strapline": "Publications of research data in archaeology and related fields"\r\n}\r\n,\r\n{\r\n "id": "467b9097b55b6e0831fe6760df93e7f2",\r\n "title": "FASTI Online",\r\n "iconFileName": "FASTI.png",\r\n "strapline": "A database of archaeological excavations since the year 2000"\r\n}\r\n,\r\n{\r\n "id": "a306666ae581e8d611d56a1dfdaea256",\r\n "title": "Ure Museum",\r\n "iconFileName": "URE.png",\r\n "strapline": "University Museum of ancient Greek, Egyptian & a little Roman stuff"\r\n}\r\n,\r\n{\r\n "id": "5555ffd0e36e088c25f76b980139851a",\r\n "title": "ORBIS",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The Stanford Geospatial Network Model of the Roman World"\r\n}\r\n,\r\n{\r\n"id": "4f9bb4e7c0b0c329db0d2696814ffd2d",\r\n "title": "SquinchPix",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "An archive of European imagery"\r\n}\r\n,\r\n{\r\n "id": "77b38b7fc7d81fb278d1c3634638f8ee",\r\n "title": "Sharing Ancient Wisdoms ",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Medieval gnomologia (collections of wise sayings)"\r\n}\r\n,\r\n{\r\n "id": "434fc5aea15f6d39040c1282c4a2df63",\r\n "title": "Portable Antiquities Scheme",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing within the Portable Antiquities Scheme database"\r\n}\r\n,\r\n{\r\n "id": "9fdb2911bcfc625c87cfce10d97b3de7",\r\n "title": "ORACC",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Open Richly Annotated Cuneiform Corpus"\r\n}\r\n,\r\n{\r\n "id": "7bb4b28758a3607f9b1eea3b48df90a",\r\n "title": "Meketre",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Reliefs and paintings of Middle Kingdom tombs of Ancient Egypt"\r\n}\r\n,\r\n{\r\n "id": "71fd46410b14843985db023501f2f76f",\r\n "title": "The Book of the Dead Project",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The evolution of the ancient egyptian Book of the Dead"\r\n}\r\n,\r\n{\r\n "id": "e2e0b0b2199b875ff3acdce3f962c128",\r\n "title": "ISAW Papers",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing in ISAW Papers articles"\r\n}\r\n]\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n';}); +define('lib/text!app/dataset.json',[],function () { return '[{\r\n "id": "b47df24737cd647789c7d61ede9fed09",\r\n "iconFileName": "arachne.png",\r\n "title": "Arachne",\r\n "strapline": "A web research tool of the German Archaeological Institute for searching mass archaeological records"\r\n},\r\n{\r\n "id": "6a39d0bc3c0fd4ef7d2a837b42cf46a1",\r\n "title": "Google Ancient Places",\r\n "iconFileName": "gap_logo.png",\r\n "strapline": "A Geographic Annotation Platform for reading texts spatially"\r\n}\r\n,\r\n{\r\n "id": "2db51c1dd976f01bf993a02f959e18f8",\r\n "title": "nomisma",\r\n "iconFileName": "Greek.jpeg",\r\n "strapline": "Representing ancient coins online"\r\n}\r\n,\r\n{\r\n "id": "298fafd65586643149e8a8ba47b57052",\r\n "title": "SPQR",\r\n "iconFileName": "SPQR.png",\r\n "strapline": "From Roman inscriptions to resource descriptions"\r\n}\r\n,\r\n{\r\n "id": "",\r\n "title": "Regnum Francorum Online",\r\n "iconFileName": "Regnum.png",\r\n "strapline": "Interactive Maps and Sources of Late Antique and Early Medieval Europe"\r\n}\r\n,\r\n{\r\n "id": "21e48d8ca46f666467b81a551fbb1cb",\r\n "title": "Perseus",\r\n "iconFileName": "Perseus.png",\r\n "strapline": "Annotated occurrences of place entities in texts from the Perseus Digital Library"\r\n}\r\n,\r\n{\r\n "id": "c4c2ed780a8f4f2b698a5c2505ac34ca",\r\n "title": "CLAROS",\r\n "iconFileName": "CLAROS.png",\r\n "strapline": "Aggregated search of art and archaeology data from the classical world and the far east across four millennia"\r\n}\r\n,\r\n{\r\n "id": "739128af1e9613de03706a57cef46976",\r\n "title": "Open Context",\r\n "iconFileName": "open-context.png",\r\n "strapline": "Publications of research data in archaeology and related fields"\r\n}\r\n,\r\n{\r\n "id": "467b9097b55b6e0831fe6760df93e7f2",\r\n "title": "FASTI Online",\r\n "iconFileName": "FASTI.png",\r\n "strapline": "A database of archaeological excavations since the year 2000"\r\n}\r\n,\r\n{\r\n "id": "a306666ae581e8d611d56a1dfdaea256",\r\n "title": "Ure Museum",\r\n "iconFileName": "URE.png",\r\n "strapline": "University Museum of ancient Greek, Egyptian & a little Roman stuff"\r\n}\r\n,\r\n{\r\n "id": "5555ffd0e36e088c25f76b980139851a",\r\n "title": "ORBIS",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The Stanford Geospatial Network Model of the Roman World"\r\n}\r\n,\r\n{\r\n"id": "4f9bb4e7c0b0c329db0d2696814ffd2d",\r\n "title": "SquinchPix",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "An archive of European imagery"\r\n}\r\n,\r\n{\r\n "id": "77b38b7fc7d81fb278d1c3634638f8ee",\r\n "title": "Sharing Ancient Wisdoms ",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Medieval gnomologia (collections of wise sayings)"\r\n}\r\n,\r\n{\r\n "id": "434fc5aea15f6d39040c1282c4a2df63",\r\n "title": "Portable Antiquities Scheme",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing within the Portable Antiquities Scheme database"\r\n}\r\n,\r\n{\r\n "id": "9fdb2911bcfc625c87cfce10d97b3de7",\r\n "title": "ORACC",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Open Richly Annotated Cuneiform Corpus"\r\n}\r\n,\r\n{\r\n "id": "7bb4b28758a3607f9b1eea3b48df90a",\r\n "title": "Meketre",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Reliefs and paintings of Middle Kingdom tombs of Ancient Egypt"\r\n}\r\n,\r\n{\r\n "id": "71fd46410b14843985db023501f2f76f",\r\n "title": "The Book of the Dead Project",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The evolution of the ancient egyptian Book of the Dead"\r\n}\r\n,\r\n{\r\n "id": "e2e0b0b2199b875ff3acdce3f962c128",\r\n "title": "ISAW Papers",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing in ISAW Papers articles"\r\n}\r\n,\r\n{\r\n "id": "e9e161a08db2906d135d7abefb145636",\r\n "title": "OCRE",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Online Coins of the Roman Empire"\r\n}\r\n]\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n';}); diff --git a/build/demo/search/iframe_demo.html b/build/demo/search/iframe_demo.html new file mode 100644 index 0000000..9feadaa --- /dev/null +++ b/build/demo/search/iframe_demo.html @@ -0,0 +1,22 @@ + + + + + + + Pelagios Search Widget Demo + + + +

Pelagios iframe demo

+ + + + + + diff --git a/build/place.js b/build/place.js index a10adb4..b3be837 100644 --- a/build/place.js +++ b/build/place.js @@ -35,4 +35,4 @@ * @license GPL v3(see LICENSE.txt) */ -var requirejs,require,define;(function(global){function isFunction(e){return ostring.call(e)==="[object Function]"}function isArray(e){return ostring.call(e)==="[object Array]"}function each(e,t){if(e){var n;for(n=0;n-1;n-=1)if(e[n]&&t(e[n],n,e))break}}function hasProp(e,t){return e.hasOwnProperty(t)}function eachProp(e,t){var n;for(n in e)if(e.hasOwnProperty(n)&&t(e[n],n))break}function mixin(e,t,n,r){return t&&eachProp(t,function(t,i){if(n||!hasProp(e,i))r&&typeof t!="string"?(e[i]||(e[i]={}),mixin(e[i],t,n,r)):e[i]=t}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeContextModuleFunc(e,t,n){return function(){var r=aps.call(arguments,0),i;return n&&isFunction(i=r[r.length-1])&&(i.__requireJsBuild=!0),r.push(t),e.apply(null,r)}}function addRequireMethods(e,t,n){each([["toUrl"],["undef"],["defined","requireDefined"],["specified","requireSpecified"]],function(r){var i=r[1]||r[0];e[r[0]]=t?makeContextModuleFunc(t[i],n):function(){var e=contexts[defContextName];return e[i].apply(e,arguments)}})}function makeError(e,t,n,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=r,n&&(i.originalError=n),i}function newContext(e){function v(e){var t,n;for(t=0;e[t];t+=1){n=e[t];if(n===".")e.splice(t,1),t-=1;else if(n===".."){if(t===1&&(e[2]===".."||e[0]===".."))break;t>0&&(e.splice(t-1,2),t-=2)}}}function m(e,n,r){var i=n&&n.split("/"),s=i,o=t.map,u=o&&o["*"],a,f,l,c,h,p,d,m;e&&e.charAt(0)==="."&&(n?(t.pkgs[n]?s=i=[n]:s=i.slice(0,i.length-1),e=s.concat(e.split("/")),v(e),f=t.pkgs[a=e[0]],e=e.join("/"),f&&e===a+"/"+f.main&&(e=a)):e.indexOf("./")===0&&(e=e.substring(2)));if(r&&(i||u)&&o){c=e.split("/");for(h=c.length;h>0;h-=1){d=c.slice(0,h).join("/");if(i)for(p=i.length;p>0;p-=1){l=o[i.slice(0,p).join("/")];if(l){l=l[d];if(l){m=l;break}}}!m&&u&&u[d]&&(m=u[d]);if(m){c.splice(0,h,m),e=c.join("/");break}}}return e}function g(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===h.contextName)return t.parentNode.removeChild(t),!0})}function y(e){var n=t.paths[e];if(n&&isArray(n)&&n.length>1)return g(e),n.shift(),h.undef(e),h.require([e]),!0}function b(e,t,n,r){var i=e?e.indexOf("!"):-1,o=null,f=t?t.name:null,l=e,c=!0,p="",d,v,g;return e||(c=!1,e="_@r"+(u+=1)),i!==-1&&(o=e.substring(0,i),e=e.substring(i+1,e.length)),o&&(o=m(o,f,r),v=s[o]),e&&(o?v&&v.normalize?p=v.normalize(e,function(e){return m(e,f,r)}):p=m(e,f,r):(p=m(e,f,r),d=h.nameToUrl(p))),g=o&&!v&&!n?"_unnormalized"+(a+=1):"",{prefix:o,name:p,parentMap:t,unnormalized:!!g,url:d,originalName:l,isDefine:c,id:(o?o+"!"+p:p)+g}}function w(e){var t=e.id,r=n[t];return r||(r=n[t]=new h.Module(e)),r}function E(e,t,r){var i=e.id,o=n[i];hasProp(s,i)&&(!o||o.defineEmitComplete)?t==="defined"&&r(s[i]):w(e).on(t,r)}function S(e,t){var r=e.requireModules,i=!1;t?t(e):(each(r,function(t){var r=n[t];r&&(r.error=e,r.events.error&&(i=!0,r.emit("error",e)))}),i||req.onError(e))}function x(){globalDefQueue.length&&(apsp.apply(i,[i.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function T(e,t,n){var r=e&&e.map,i=makeContextModuleFunc(n||h.require,r,t);return addRequireMethods(i,h,r),i.isBrowser=isBrowser,i}function N(e){delete n[e],each(f,function(t,n){if(t.map.id===e)return f.splice(n,1),t.defined||(h.waitCount-=1),!0})}function C(e,t){var r=e.map.id,i=e.depMaps,s;if(!e.inited)return;return t[r]?e:(t[r]=!0,each(i,function(e){var i=e.id,o=n[i];if(!o)return;return!o.inited||!o.enabled?(s=null,delete t[r],!0):s=C(o,mixin({},t))}),s)}function k(e,t,r){var i=e.map.id,o=e.depMaps;if(!e.inited||!e.map.isDefine)return;return t[i]?s[i]:(t[i]=e,each(o,function(s){var o=s.id,u=n[o],a;if(p[o])return;if(u){if(!u.inited||!u.enabled){r[i]=!0;return}a=k(u,t,r),r[o]||e.defineDepById(o,a)}}),e.check(!0),s[i])}function L(e){e.check()}function A(){var e=t.waitSeconds*1e3,r=e&&h.startTime+e<(new Date).getTime(),i=[],s=!1,o=!0,u,a,c,p;if(l)return;l=!0,eachProp(n,function(e){u=e.map,a=u.id;if(!e.enabled)return;if(!e.error)if(!e.inited&&r)y(a)?(p=!0,s=!0):(i.push(a),g(a));else if(!e.inited&&e.fetched&&u.isDefine){s=!0;if(!u.prefix)return o=!1}});if(r&&i.length)return c=makeError("timeout","Load timeout for modules: "+i,null,i),c.contextName=h.contextName,S(c);o&&(each(f,function(e){if(e.defined)return;var t=C(e,{}),n={};t&&(k(t,n,{}),eachProp(n,L))}),eachProp(n,L)),(!r||p)&&s&&(isBrowser||isWebWorker)&&!d&&(d=setTimeout(function(){d=0,A()},50)),l=!1}function O(e){w(b(e[0],null,!0)).init(e[1],e[2])}function M(e,t,n,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(n,t,!1)}function _(e){var t=e.currentTarget||e.srcElement;return M(t,h.onScriptLoad,"load","onreadystatechange"),M(t,h.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}var t={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{}},n={},r={},i=[],s={},o={},u=1,a=1,f=[],l,c,h,p,d;return p={require:function(e){return T(e)},exports:function(e){e.usingExports=!0;if(e.map.isDefine)return e.exports=s[e.map.id]={}},module:function(e){return e.module={id:e.map.id,uri:e.map.url,config:function(){return t.config&&t.config[e.map.id]||{}},exports:s[e.map.id]}}},c=function(e){this.events=r[e.id]||{},this.map=e,this.shim=t.shim[e.id],this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},c.prototype={init:function(e,t,n,r){r=r||{};if(this.inited)return;this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.depMaps.rjsSkipMap=e.rjsSkipMap,this.errback=n,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check()},defineDepById:function(e,t){var n;return each(this.depMaps,function(t,r){if(t.id===e)return n=r,!0}),this.defineDep(n,t)},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(this.fetched)return;this.fetched=!0,h.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();T(this,!0)(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))},load:function(){var e=this.map.url;o[e]||(o[e]=!0,h.load(this.map.id,e))},check:function(e){if(!this.enabled||this.enabling)return;var t=this.map.id,r=this.depExports,i=this.exports,o=this.factory,u,a;if(!this.inited)this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error)try{i=h.execCb(t,o,r,i)}catch(l){u=l}else i=h.execCb(t,o,r,i);this.map.isDefine&&(a=this.module,a&&a.exports!==undefined&&a.exports!==this.exports?i=a.exports:i===undefined&&this.usingExports&&(i=this.exports));if(u)return u.requireMap=this.map,u.requireModules=[this.map.id],u.requireType="define",S(this.error=u)}else i=o;this.exports=i,this.map.isDefine&&!this.ignore&&(s[t]=i,req.onResourceLoad&&req.onResourceLoad(h,this.map,this.depMaps)),delete n[t],this.defined=!0,h.waitCount-=1,h.waitCount===0&&(f=[])}this.defining=!1,e||this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}},callPlugin:function(){var e=this.map,r=e.id,i=b(e.prefix,null,!1,!0);E(i,"defined",bind(this,function(i){var s=this.map.name,o=this.map.parentMap?this.map.parentMap.name:null,u,a,f;if(this.map.unnormalized){i.normalize&&(s=i.normalize(s,function(e){return m(e,o,!0)})||""),a=b(e.prefix+"!"+s,this.map.parentMap,!1,!0),E(a,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),f=n[a.id],f&&(this.events.error&&f.on("error",bind(this,function(e){this.emit("error",e)})),f.enable());return}u=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),u.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[r],eachProp(n,function(e){e.map.id.indexOf(r+"_unnormalized")===0&&N(e.map.id)}),S(e)}),u.fromText=function(e,t){var n=useInteractive;n&&(useInteractive=!1),w(b(e)),req.exec(t),n&&(useInteractive=!0),h.completeLoad(e)},i.load(e.name,T(e.parentMap,!0,function(e,t){return e.rjsSkipMap=!0,h.require(e,t)}),u,t)})),h.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){this.enabled=!0,this.waitPushed||(f.push(this),h.waitCount+=1,this.waitPushed=!0),this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var r,i,s;if(typeof e=="string"){e=b(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.depMaps.rjsSkipMap),this.depMaps[t]=e,s=p[e.id];if(s){this.depExports[t]=s(this);return}this.depCount+=1,E(e,"defined",bind(this,function(e){this.defineDep(t,e),this.check()})),this.errback&&E(e,"error",this.errback)}r=e.id,i=n[r],!p[r]&&i&&!i.enabled&&h.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=n[e.id];t&&!t.enabled&&h.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),e==="error"&&delete this.events[e]}},h={config:t,contextName:e,registry:n,defined:s,urlFetched:o,waitCount:0,defQueue:i,Module:c,makeModuleMap:b,configure:function(e){e.baseUrl&&e.baseUrl.charAt(e.baseUrl.length-1)!=="/"&&(e.baseUrl+="/");var r=t.pkgs,i=t.shim,s=t.paths,o=t.map;mixin(t,e,!0),t.paths=mixin(s,e.paths,!0),e.map&&(t.map=mixin(o||{},e.map,!0,!0)),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),e.exports&&!e.exports.__buildReady&&(e.exports=h.makeShimExports(e.exports)),i[t]=e}),t.shim=i),e.packages&&(each(e.packages,function(e){var t;e=typeof e=="string"?{name:e}:e,t=e.location,r[e.name]={name:e.name,location:t||e.name,main:(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),t.pkgs=r),eachProp(n,function(e,t){e.map=b(t)}),(e.deps||e.callback)&&h.require(e.deps||[],e.callback)},makeShimExports:function(e){var t;return typeof e=="string"?(t=function(){return getGlobal(e)},t.exports=e,t):function(){return e.apply(global,arguments)}},requireDefined:function(e,t){return hasProp(s,b(e,t,!1,!0).id)},requireSpecified:function(e,t){return e=b(e,t,!1,!0).id,hasProp(s,e)||hasProp(n,e)},require:function(t,n,r,o){var u,a,f,l,c;if(typeof t=="string")return isFunction(n)?S(makeError("requireargs","Invalid require call"),r):req.get?req.get(h,t,n):(u=t,o=n,f=b(u,o,!1,!0),a=f.id,hasProp(s,a)?s[a]:S(makeError("notloaded",'Module name "'+a+'" has not been loaded yet for context: '+e)));r&&!isFunction(r)&&(o=r,r=undefined),n&&!isFunction(n)&&(o=n,n=undefined),x();while(i.length){c=i.shift();if(c[0]===null)return S(makeError("mismatch","Mismatched anonymous define() module: "+c[c.length-1]));O(c)}return l=w(b(null,o)),l.init(t,n,r,{enabled:!0}),A(),h.require},undef:function(e){var t=b(e,null,!0),i=n[e];delete s[e],delete o[t.url],delete r[e],i&&(i.events.defined&&(r[e]=i.events),N(e))},enable:function(e,t){var r=n[e.id];r&&w(e).enable()},completeLoad:function(e){var r=t.shim[e]||{},o=r.exports&&r.exports.exports,u,a,f;x();while(i.length){a=i.shift();if(a[0]===null){a[0]=e;if(u)break;u=!0}else a[0]===e&&(u=!0);O(a)}f=n[e];if(!u&&!s[e]&&f&&!f.inited){if(t.enforceDefine&&(!o||!getGlobal(o))){if(y(e))return;return S(makeError("nodefine","No define call for "+e,null,[e]))}O([e,r.deps||[],r.exports])}A()},toUrl:function(e,t){var n=e.lastIndexOf("."),r=null;return n!==-1&&(r=e.substring(n,e.length),e=e.substring(0,n)),h.nameToUrl(m(e,t&&t.id,!0),r)},nameToUrl:function(e,n){var r,i,s,o,u,a,f,l,c;if(req.jsExtRegExp.test(e))l=e+(n||"");else{r=t.paths,i=t.pkgs,u=e.split("/");for(a=u.length;a>0;a-=1){f=u.slice(0,a).join("/"),s=i[f],c=r[f];if(c){isArray(c)&&(c=c[0]),u.splice(0,a,c);break}if(s){e===s.name?o=s.location+"/"+s.main:o=s.location,u.splice(0,a,o);break}}l=u.join("/")+(n||".js"),l=(l.charAt(0)==="/"||l.match(/^[\w\+\.\-]+:/)?"":t.baseUrl)+l}return t.urlArgs?l+((l.indexOf("?")===-1?"?":"&")+t.urlArgs):l},load:function(e,t){req.load(h,e,t)},execCb:function(e,t,n,r){return t.apply(r,n)},onScriptLoad:function(e){if(e.type==="load"||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=_(e);h.completeLoad(t.id)}},onScriptError:function(e){var t=_(e);if(!y(t.id))return S(makeError("scripterror","Script error",e,[t.id]))}}}function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"?interactiveScript:(eachReverse(scripts(),function(e){if(e.readyState==="interactive")return interactiveScript=e}),interactiveScript)}var version="2.0.4",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,ostring=Object.prototype.toString,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=typeof window!="undefined"&&!!navigator&&!!document,isWebWorker=!isBrowser&&typeof importScripts!="undefined",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!="undefined"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1,req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath;if(typeof define!="undefined")return;if(typeof requirejs!="undefined"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=undefined}typeof require!="undefined"&&!isFunction(require)&&(cfg=require,require=undefined),req=requirejs=function(e,t,n,r){var i=defContextName,s,o;return!isArray(e)&&typeof e!="string"&&(o=e,isArray(t)?(e=t,t=n,n=r):e=[]),o&&o.context&&(i=o.context),s=contexts[i],s||(s=contexts[i]=req.s.newContext(i)),o&&s.configure(o),s.require(e,t,n)},req.config=function(e){return req(e)},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),addRequireMethods(req),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=function(e){throw e},req.load=function(e,t,n){var r=e&&e.config||{},i;if(isBrowser)return i=r.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),i.type=r.scriptType||"text/javascript",i.charset="utf-8",i.async=!0,i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),i.attachEvent&&!(i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)):(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)),i.src=n,currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;isWebWorker&&(importScripts(n),e.completeLoad(t))},isBrowser&&eachReverse(scripts(),function(e){head||(head=e.parentNode),dataMain=e.getAttribute("data-main");if(dataMain)return cfg.baseUrl||(src=dataMain.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath,dataMain=mainScript),dataMain=dataMain.replace(jsSuffixRegExp,""),cfg.deps=cfg.deps?cfg.deps.concat(dataMain):[dataMain],!0}),define=function(e,t,n){var r,i;typeof e!="string"&&(n=t,t=e,e=null),isArray(t)||(n=t,t=[]),!t.length&&isFunction(n)&&n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(n.length===1?["require"]:["require","exports","module"]).concat(t)),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(e||(e=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")])),(i?i.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)})(this),define("requireLib",function(){}),define("app/util",["jquery"],function(e){function t(e){var t=e.replace(/ /g,"");return t=t.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""),t}function n(){return typeof GMap2!="undefined"}function r(t,n,r,i,s){var o={type:"POST",dataType:"json",timeout:i,success:n,error:r};r||(o.error=function(e,n,r){console.log("ERROR: Call to "+t+" failed: "+n),console.log(e)});if(!s)e.ajax(t,o);else{try{var u=new XMLHttpRequest}catch(r){var u={}}if("withCredentials"in u)e.ajax(t,o);else if(typeof XDomainRequest!="undefined"){var a=new XDomainRequest;a.timeout=i,a.open("get",t),a.onload=function(){n(e.parseJSON(a.responseText),"",a)},a.onerror=r,a.send()}}}return{createID:t,includesGoogleMaps2:n,getAPIData:r}}),define("app/loadGMaps",[],function(){function t(){if(e!=null)return e;e=typeof GMap2=="undefined"}var e;return{load:function(e,n,r,i){i.isBuild||t()?r(null):window.setTimeout(function(){n([e],r)},500)}}}),define("app/search_map",["app/loadGMaps!lib/async!http://maps.google.com/maps/api/js?sensor=false"],function(){function e(e){if(!document.getElementById(e))throw Error("ERROR: Invalid ID for search map");try{var t=new google.maps.Map(document.getElementById(e),{mapTypeId:google.maps.MapTypeId.TERRAIN})}catch(n){console.log("ERROR: Failed to create Google Map for element id "+e+" : "+n)}var r=new google.maps.LatLngBounds,i=new google.maps.InfoWindow;this.refresh=function(){google.maps.event.trigger(t,"resize"),t.fitBounds(r)},this.addMarker=function(e,n,s,o){if(e.hasOwnProperty("geometry")&&e.geometry!=null&&e.geometry.hasOwnProperty("type")&&e.geometry.type=="Point"){var u=new google.maps.LatLng(e.geometry.coordinates[1],e.geometry.coordinates[0]),a=new google.maps.Marker({position:u,map:t,title:n});r.extend(u),google.maps.event.addListener(a,"click",function(){return function(){i.close(),i.setContent(s),i.open(t,a),o()}}())}}}return{SearchMap:e}}),define("app/place_map",["app/loadGMaps!lib/async!http://maps.google.com/maps/api/js?sensor=false"],function(){function e(e){if(!document.getElementById(e))throw Error("ERROR: Invalid ID for place map");try{var t=new google.maps.Map(document.getElementById(e),{zoom:8,mapTypeId:google.maps.MapTypeId.TERRAIN})}catch(n){console.log("ERROR: Failed to crate Google map for element id "+e+" : "+n)}try{var r=new google.maps.Marker({map:t})}catch(n){console.log("ERROR: Failed to create Google Map marker : "+n)}this.refresh=function(){try{google.maps.event.trigger(t,"resize")}catch(e){console.log("ERROR: Failed to resize Google map :"+e)}try{t.setCenter(r.getPosition())}catch(e){console.log("ERROR: Failed to center Google Map : "+e)}},this.setMarker=function(e,n){try{var i=new google.maps.LatLng(e[1],e[0])}catch(s){console.log("ERROR: Failed to create Google Maps location : "+s)}try{r.setPosition(i)}catch(s){console.log("ERROR: Failed to set marker position : "+s)}try{r.setTitle(n)}catch(s){console.log("ERROR: Failed to set marker title : "+s)}try{t.setCenter(i)}catch(s){console.log("ERROR: Failed to center Google Map : "+s)}try{google.maps.event.trigger(t,"resize")}catch(s){console.log("ERROR: Failed to resize Google Map : "+s)}}}return{PlaceMap:e}}),define("lib/text",["module"],function(e){var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],n=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,r=/]*>\s*([\s\S]+)\s*<\/body>/im,i=typeof location!="undefined"&&location.href,s=i&&location.protocol&&location.protocol.replace(/\:/,""),o=i&&location.hostname,u=i&&(location.port||undefined),a=[],f=e.config(),l,c;return l={version:"2.0.0",strip:function(e){if(e){e=e.replace(n,"");var t=e.match(r);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var e,n,r;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(n=0;n<3;n++){r=t[n];try{e=new ActiveXObject(r)}catch(i){}if(e){t=[r];break}}return e},parseName:function(e){var t=!1,n=e.indexOf("."),r=e.substring(0,n),i=e.substring(n+1,e.length);return n=i.indexOf("!"),n!==-1&&(t=i.substring(n+1,i.length),t=t==="strip",i=i.substring(0,n)),{moduleName:r,ext:i,strip:t}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,t,n,r){var i=l.xdRegExp.exec(e),s,o,u;return i?(s=i[2],o=i[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===t)&&(!o||o===n)&&(!u&&!o||u===r)):!0},finishLoad:function(e,t,n,r){n=t?l.strip(n):n,f.isBuild&&(a[e]=n),r(n)},load:function(e,t,n,r){if(r.isBuild&&!r.inlineText){n();return}f.isBuild=r.isBuild;var a=l.parseName(e),c=a.moduleName+"."+a.ext,h=t.toUrl(c),p=f.useXhr||l.useXhr;!i||p(h,s,o,u)?l.get(h,function(t){l.finishLoad(e,a.strip,t,n)},function(e){n.error&&n.error(e)}):t([c],function(e){l.finishLoad(a.moduleName+"."+a.ext,a.strip,e,n)})},write:function(e,t,n,r){if(a.hasOwnProperty(t)){var i=l.jsEscape(a[t]);n.asModule(e+"!"+t,"define(function () { return '"+i+"';});\n")}},writeFile:function(e,t,n,r,i){var s=l.parseName(t),o=s.moduleName+"."+s.ext,u=n.toUrl(s.moduleName+"."+s.ext)+".js";l.load(o,n,function(t){var n=function(e){return r(u,e)};n.asModule=function(e,t){return r.asModule(e,u,t)},l.write(e,o,n,i)},i)}},typeof process!="undefined"&&process.versions&&!!process.versions.node?(c=require.nodeRequire("fs"),l.get=function(e,t){var n=c.readFileSync(e,"utf8");n.indexOf("")===0&&(n=n.substring(1)),t(n)}):l.createXhr()?l.get=function(e,t,n){var r=l.createXhr();r.open("GET",e,!0),f.onXhr&&f.onXhr(r,e),r.onreadystatechange=function(i){var s,o;r.readyState===4&&(s=r.status,s>399&&s<600?(o=new Error(e+" HTTP status: "+s),o.xhr=r,n(o)):t(r.responseText))},r.send(null)}:typeof Packages!="undefined"&&(l.get=function(e,t){var n="utf-8",r=new java.io.File(e),i=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r),n)),o,u,a="";try{o=new java.lang.StringBuffer,u=s.readLine(),u&&u.length()&&u.charAt(0)===65279&&(u=u.substring(1)),o.append(u);while((u=s.readLine())!==null)o.append(i),o.append(u);a=String(o.toString())}finally{s.close()}t(a)}),l}),define("lib/text!template/widget_container.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'widget_container\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n \\r\\n \\"Close\\r\\n \\r\\n ";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\"Information \\r\\n";\n return buffer;}\n\n buffer += "
\\r\\n
\\r\\n \\"View \\r\\n ";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.icon);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.icon);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += " ";\n return buffer;});\n})();'}),define("lib/text!template/place.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'place\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "
\\r\\n
\\r\\n
\\r\\n\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/section.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'section\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "
\\r\\n
\\r\\n\\"\\"\\r\\n

";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

\\r\\n\\"Toggle\\r\\n

";\n foundHelper = helpers.strapline;\n stack1 = foundHelper || depth0.strapline;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "strapline", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

\\r\\n
\\r\\n
\\r\\n
\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/flickr.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'flickr\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\r\\n\\"";\n\\r\\n\\r\\n";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

View all ";\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.length);\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "photo.length", { hash: {} }); }\n buffer += escapeExpression(stack1) + " photos on flickr

\\r\\n";\n return buffer;}\n\nfunction program5(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

View all ";\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.length);\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "photo.length", { hash: {} }); }\n buffer += escapeExpression(stack1) + " photos on flickr

\\r\\n";\n return buffer;}\n\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.pleiadesFlickrGroupOnly);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.pleiadesFlickrGroupOnly);\n stack2 = helpers.unless;\n tmp1 = self.program(5, program5, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n

The flickr photos shown here are those which have been given a Pleiades machine tag specifying this place.

\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/pleiades.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'pleiades\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

Some alternative names: ";\n foundHelper = helpers.altNames;\n stack1 = foundHelper || depth0.altNames;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "altNames", { hash: {} }); }\n buffer += escapeExpression(stack1) + " (the results below are for all alternative names)

\\r\\n ";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += " \\r\\n
\\r\\n
\\r\\n
\\r\\n ";\n return buffer;}\n\n buffer += "

";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

\\r\\n
\\r\\n

";\n foundHelper = helpers.description;\n stack1 = foundHelper || depth0.description;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

\\r\\n ";\n foundHelper = helpers.altNames;\n stack1 = foundHelper || depth0.altNames;\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n ";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.displayMap);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n

\\r\\n Entry in the Pleiades Gazetteer

\\r\\n
";\n return buffer;});\n})();'}),define("lib/text!template/pelagios_partner.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'pelagios_partner\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1, stack2;\n buffer += "\\r\\n\\r\\n
  • \\r\\n\\r\\n ";\n stack1 = depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "\\r\\n \\r\\n ";\n stack1 = depth0.references;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.references", { hash: {} }); }\n buffer += escapeExpression(stack1) + " hit";\n stack1 = depth0.multipleReferences;\n stack2 = helpers[\'if\'];\n tmp1 = self.program(2, program2, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n \\r\\n \\r\\n\\r\\n
    \\r\\n\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
  • \\r\\n\\r\\n";\n return buffer;}\nfunction program2(depth0,data) {\n \n \n return "s";}\n\n buffer += "
      \\r\\n";\n foundHelper = helpers.subdataset;\n stack1 = foundHelper || depth0.subdataset;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += " \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/error.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'error\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n

    ";\n foundHelper = helpers.msg;\n stack1 = foundHelper || depth0.msg;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "msg", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/search.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'search\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "

    Search for places

    \\r\\n
    \\r\\n \\r\\n \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n \\r\\n \\r\\n \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/annotations.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'annotations\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n
  • ";\n stack1 = depth0.label;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.label", { hash: {} }); }\n buffer += escapeExpression(stack1) + "
  • \\r\\n";\n return buffer;}\n\n buffer += "
      \\r\\n";\n foundHelper = helpers.annotation;\n stack1 = foundHelper || depth0.annotation;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/search_results.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'search_results\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += " \\r\\n
    \\r\\n

    Geographic Results for: ";\n foundHelper = helpers.searchString;\n stack1 = foundHelper || depth0.searchString;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "searchString", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n
    \\r\\n";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\r\\n";\n return buffer;}\n\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.displayMap);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n

    List Results for: ";\n foundHelper = helpers.searchString;\n stack1 = foundHelper || depth0.searchString;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "searchString", { hash: {} }); }\n buffer += escapeExpression(stack1) + "\\r\\n

    \\r\\n
      \\r\\n";\n foundHelper = helpers.place;\n stack1 = foundHelper || depth0.place;\n stack2 = helpers.each;\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n
    \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/new_tab.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'new_tab\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "\\r\\n\\r\\n \\r\\n\\r\\n \\r\\n \\r\\n\\r\\n
    \\r\\n\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/about.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'about\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var foundHelper, self=this;\n\n\n return "

    This widget displays data from the Pelagios project partners about the location specified.

    \\r\\n

    View the Pelagios website\\r\\n for more information.\\r\\n ";});\n})();'}),define("lib/text!app/dataset.json",[],function(){return'[{\r\n "id": "b47df24737cd647789c7d61ede9fed09",\r\n "iconFileName": "arachne.png",\r\n "title": "Arachne",\r\n "strapline": "A web research tool of the German Archaeological Institute for searching mass archaeological records"\r\n},\r\n{\r\n "id": "6a39d0bc3c0fd4ef7d2a837b42cf46a1",\r\n "title": "Google Ancient Places",\r\n "iconFileName": "gap_logo.png",\r\n "strapline": "A Geographic Annotation Platform for reading texts spatially"\r\n}\r\n,\r\n{\r\n "id": "2db51c1dd976f01bf993a02f959e18f8",\r\n "title": "nomisma",\r\n "iconFileName": "Greek.jpeg",\r\n "strapline": "Representing ancient coins online"\r\n}\r\n,\r\n{\r\n "id": "298fafd65586643149e8a8ba47b57052",\r\n "title": "SPQR",\r\n "iconFileName": "SPQR.png",\r\n "strapline": "From Roman inscriptions to resource descriptions"\r\n}\r\n,\r\n{\r\n "id": "",\r\n "title": "Regnum Francorum Online",\r\n "iconFileName": "Regnum.png",\r\n "strapline": "Interactive Maps and Sources of Late Antique and Early Medieval Europe"\r\n}\r\n,\r\n{\r\n "id": "21e48d8ca46f666467b81a551fbb1cb",\r\n "title": "Perseus",\r\n "iconFileName": "Perseus.png",\r\n "strapline": "Annotated occurrences of place entities in texts from the Perseus Digital Library"\r\n}\r\n,\r\n{\r\n "id": "c4c2ed780a8f4f2b698a5c2505ac34ca",\r\n "title": "CLAROS",\r\n "iconFileName": "CLAROS.png",\r\n "strapline": "Aggregated search of art and archaeology data from the classical world and the far east across four millennia"\r\n}\r\n,\r\n{\r\n "id": "739128af1e9613de03706a57cef46976",\r\n "title": "Open Context",\r\n "iconFileName": "open-context.png",\r\n "strapline": "Publications of research data in archaeology and related fields"\r\n}\r\n,\r\n{\r\n "id": "467b9097b55b6e0831fe6760df93e7f2",\r\n "title": "FASTI Online",\r\n "iconFileName": "FASTI.png",\r\n "strapline": "A database of archaeological excavations since the year 2000"\r\n}\r\n,\r\n{\r\n "id": "a306666ae581e8d611d56a1dfdaea256",\r\n "title": "Ure Museum",\r\n "iconFileName": "URE.png",\r\n "strapline": "University Museum of ancient Greek, Egyptian & a little Roman stuff"\r\n}\r\n,\r\n{\r\n "id": "5555ffd0e36e088c25f76b980139851a",\r\n "title": "ORBIS",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The Stanford Geospatial Network Model of the Roman World"\r\n}\r\n,\r\n{\r\n"id": "4f9bb4e7c0b0c329db0d2696814ffd2d",\r\n "title": "SquinchPix",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "An archive of European imagery"\r\n}\r\n,\r\n{\r\n "id": "77b38b7fc7d81fb278d1c3634638f8ee",\r\n "title": "Sharing Ancient Wisdoms ",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Medieval gnomologia (collections of wise sayings)"\r\n}\r\n,\r\n{\r\n "id": "434fc5aea15f6d39040c1282c4a2df63",\r\n "title": "Portable Antiquities Scheme",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing within the Portable Antiquities Scheme database"\r\n}\r\n,\r\n{\r\n "id": "9fdb2911bcfc625c87cfce10d97b3de7",\r\n "title": "ORACC",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Open Richly Annotated Cuneiform Corpus"\r\n}\r\n,\r\n{\r\n "id": "7bb4b28758a3607f9b1eea3b48df90a",\r\n "title": "Meketre",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Reliefs and paintings of Middle Kingdom tombs of Ancient Egypt"\r\n}\r\n,\r\n{\r\n "id": "71fd46410b14843985db023501f2f76f",\r\n "title": "The Book of the Dead Project",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The evolution of the ancient egyptian Book of the Dead"\r\n}\r\n,\r\n{\r\n "id": "e2e0b0b2199b875ff3acdce3f962c128",\r\n "title": "ISAW Papers",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing in ISAW Papers articles"\r\n}\r\n]\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n'}),define("lib/jquery_pagination",["jquery"],function(e){(function(e){e.PaginationCalculator=function(e,t){this.maxentries=e,this.opts=t},e.extend(e.PaginationCalculator.prototype,{numPages:function(){return Math.ceil(this.maxentries/this.opts.items_per_page)},getInterval:function(e){var t=Math.floor(this.opts.num_display_entries/2),n=this.numPages(),r=n-this.opts.num_display_entries,i=e>t?Math.max(Math.min(e-t,r),0):0,s=e>t?Math.min(e+t+this.opts.num_display_entries%2,n):Math.min(this.opts.num_display_entries,n);return{start:i,end:s}}}),e.PaginationRenderers={},e.PaginationRenderers.defaultRenderer=function(t,n){this.maxentries=t,this.opts=n,this.pc=new e.PaginationCalculator(t,n)},e.extend(e.PaginationRenderers.defaultRenderer.prototype,{createLink:function(t,n,r){var i,s=this.pc.numPages();return t=t<0?0:t"+r.text+""):i=e(""+r.text+"").attr("href",this.opts.link_to.replace(/__id__/,t)),r.classes&&i.addClass(r.classes),i.data("page_id",t),i},appendRange:function(e,t,n,r,i){var s;for(s=n;s

    ");return this.opts.prev_text&&(t>0||this.opts.prev_show_always)&&u.append(this.createLink(t-1,t,{text:this.opts.prev_text,classes:"prev"})),s.start>0&&this.opts.num_edge_entries>0&&(i=Math.min(this.opts.num_edge_entries,s.start),this.appendRange(u,t,0,i,{classes:"sp"}),this.opts.num_edge_entries"+this.opts.ellipse_text+"").appendTo(u)),this.appendRange(u,t,s.start,s.end),s.end0&&(o-this.opts.num_edge_entries>s.end&&this.opts.ellipse_text&&e(""+this.opts.ellipse_text+"").appendTo(u),r=Math.max(o-this.opts.num_edge_entries,s.end),this.appendRange(u,t,r,o,{classes:"ep"})),this.opts.next_text&&(t=0&&t0&&a(n-1),!1}),r.bind("nextPage",{numPages:l},function(t){var n=e(this).data("current_page");return n1||n.show_if_single_page)&&s.appendTo(r),n.load_first_page&&n.callback(o,r)}})(jQuery)}),define("app/pelagios",["jquery","app/util","app/search_map","app/place_map","lib/text!template/widget_container.tmpl","lib/text!template/place.tmpl","lib/text!template/section.tmpl","lib/text!template/flickr.tmpl","lib/text!template/pleiades.tmpl","lib/text!template/pelagios_partner.tmpl","lib/text!template/error.tmpl","lib/text!template/search.tmpl","lib/text!template/annotations.tmpl","lib/text!template/search_results.tmpl","lib/text!template/new_tab.tmpl","lib/text!template/about.tmpl","lib/text!app/dataset.json","jqueryui","lib/jquery_pagination"],function($,util,search_map,place_map,widget_container_tmpl,place_tmpl,section_tmpl,flickr_tmpl,pleiades_tmpl,pelagios_partner_tmpl,error_tmpl,search_tmpl,annotations_tmpl,search_results_tmpl,new_tab_tmpl,about_tmpl,datasetJSON){function Widget(widgetContext){function widgetPopUp(){if(widgetContext.newTab){var e=window.open(),t=Handlebars.templates.new_tab({widgetContext:widgetContext});$(e.document.body).html(t);var n=document.createElement("script");n.type="text/javascript",n.src=widgetContext.baseURL+"lib/require.js",e.document.head.appendChild(n);var r=document.createElement("script");r.type="text/javascript",r.src=widgetContext.baseURL+"place.js",e.document.head.appendChild(r)}else{$(".pelagios .container").hide(),$("#"+widgetContext.widgetID+"-container").show();var i=$("#"+widgetContext.widgetID+"-icon").offset(),s={top:$(window).scrollTop(),left:200};$("#"+widgetContext.widgetID+"-container").offset(s),widgetContext.displayMap&&placeMap.hasOwnProperty("refresh")&&placeMap.refresh()}}function displayPlace(e){debug("DISPLAYING PLACE: pleiadesID: "+e),placeMap={},clearPlace(),showPleiadesData(e),widgetContext.type=="place"&&showAboutInformation(),showPelagiosData(e),showFlickrData(e)}function showAboutInformation(){addSection("about","About Pelagios and this widget",widgetContext.imageDir+"partner_icons/pelagios.png","");var e=Handlebars.templates.about();$("#"+widgetContext.widgetID+"-content-about").append(e)}function clearPlace(){$("#"+widgetContext.widgetID+"-pleiades").empty(),$("#"+widgetContext.widgetID+"-sections").empty()}function showFlickrData(e){function r(t){if(t.hasOwnProperty("photos")&&t.photos.hasOwnProperty("photo")&&t.photos.photo.length>0){addSection("flickr","flickr",widgetContext.imageDir+"icons/flickr-logo.png","Photo sharing website");var n={photo:t.photos.photo.slice(0,config.MAX_PHOTOS_FLICKR-1),pleiadesID:e},r=Handlebars.templates.flickr(n);$("#"+widgetContext.widgetID+"-content-flickr").append(r)}}var t="";widgetContext.pleiadesFlickrGroupOnly&&(t="&group_id=1876758@N22");var n=config.URL_FLICKR_SEARCH+"&machine_tags=pleiades:depicts="+e+t+"&tag_mode=all&api_key="+config.API_KEY_FLICKR+"&jsoncallback=?";util.getAPIData(n,r,!1,config.TIMEOUT_FLICKR,!1)}function showPleiadesData(e){function r(e,t,n){$("#"+widgetContext.widgetID+"-content").empty();if(e.status=="404")var r={title:config.MSG_TITLE_PLACE_NOT_FOUND,msg:config.MSG_PLACE_NOT_FOUND};else var r={title:config.MSG_TITLE_PLEIADES_TIMEOUT,msg:config.MSG_PLEIADES_TIMEOUT};var i=Handlebars.templates.error(r);$("#"+widgetContext.widgetID+"-content").append(i)}function i(e){var t=!1;e.names.length>1&&(t=e.names.join(", "));var n={title:e.names[0]?e.names[0]:"Untitled",description:e.description,altNames:t,pleiadesID:e.id,widgetContext:widgetContext},r=Handlebars.templates.pleiades(n);$("#"+widgetContext.widgetID+"-pleiades").append(r),e.reprPoint!=null&&widgetContext.displayMap&&(placeMap=new place_map.PlaceMap(widgetContext.widgetID+"-map_canvas"),placeMap.setMarker(e.reprPoint,e.names[0])),e.reprPoint==null&&(placeMap=null),showPlace()}var t=config.URL_PLEIADES+e,n=config.URL_PLEIADES+e+"/json";util.getAPIData(n,i,r,config.TIMEOUT_PLEIADES,!0)}function showPelagiosData(e){function n(e){$.each(e,function(n,i){i.hasOwnProperty("root_dataset")&&(i=i.root_dataset);var s;rootDatasetID=i.uri.replace(/http:\/\/pelagios.dme.ait.ac.at\/api\/datasets\//g,""),s=getDatasetInfo(rootDatasetID);if(typeof s!="undefined"){addSection(rootDatasetID,s.title,widgetContext.iconDir+s.iconFileName,s.strapline);var o=new Array;if(typeof i.subsets!="undefined")for(var u=0;u1?!0:!1,o[u].anyReferences=o[u].references>0?!0:!1;else o[0]={},o[0].widgetContext=widgetContext,o[0].title=i.title,o[0].id=rootDatasetID,o[0].references=e[n].annotations_referencing_place,o[0].multipleReferences=o[0].references>1?!0:!1;var a={subdataset:o,rootDatasetID:rootDatasetID,widgetContext:widgetContext},f=Handlebars.templates.pelagios_partner(a);$("#"+widgetContext.widgetID+"-content-"+rootDatasetID).append(f),$("#"+widgetContext.widgetID+"-subdatasets-"+rootDatasetID).css("list-style-image","url("+widgetContext.imageDir+"icons/bullet.png)");for(var u=0;u0&&s(e.annotations,n)};return util.getAPIData(r,i),!1}function s(e,t){var n=new Array;$.each(e,function(e,t){n[e]={},t.hasOwnProperty("target_title")?n[e].label=t.target_title:n[e].label=t.title?t.title:"Item "+(e+1),n[e].uri=t.hasTarget});var r={subdatasetID:t,annotation:n,widgetContext:widgetContext},i=Handlebars.templates.annotations(r);$("#"+widgetContext.widgetID+"-annotations-"+t).empty(),$("#"+widgetContext.widgetID+"-annotations-"+t).append(i),$("#"+widgetContext.widgetID+"-subdataset-"+t).focus()}function o(e){var t=e.data.id;toggleSelectedLink(widgetContext.widgetID+"-subdataset_hits-"+t),$("#"+widgetContext.widgetID+"-subdataset_content-"+t).toggle(),toggleIcon(widgetContext.widgetID+"-toggle-subdataset-"+t)}function u(e){$("#"+widgetID+"-subdataset_content-"+e).hide()}var t=config.URL_PELAGIOS_API_V2+"places/"+encodeURIComponent(config.URL_PLEIADES+e)+"/datasets.json?callback=?";util.getAPIData(t,n,!1,config.TIMEOUT_PELAGIOS,!1)}function displaySearchResults(){var e=config.URL_PELAGIOS_API_V2+"search.json?query="+searchString+"&callback=?";debug("RETRIEVING SEARCH DATA: searchString: "+searchString+" URL:"+e),util.getAPIData(e,displaySearchResultsData,!1,config.TIMEOUT_PELAGIOS,!1)}function displaySearchResultsData(e){$("#"+widgetContext.widgetID+"-search-map").empty(),$("#"+widgetContext.widgetID+"-search-results").empty(),$("#"+widgetContext.widgetID+"-pleiades").empty(),$("#"+widgetContext.widgetID+"-sections").empty();if(e.length>0){var t=new Array;$.each(e,function(e,n){place={},place.label=n.label,place.pleiadesID=n.uri.replace(/.*places.*F/g,""),place.geojson=n,n.feature_type&&(place.feature_type=n.feature_type.replace(/.*place-types\//g,"")),place.content="

    "+place.label+"

    ",place.content+='

    View info

    ',place.widgetID=widgetContext.widgetID,t[e]=place});var n={place:t,widgetContext:widgetContext,searchString:searchString},r=Handlebars.templates.search_results(n);$("#"+widgetContext.widgetID+"-search-results").append(r),$(".pelagios .list-results li").css("background-image","url("+widgetContext.imageDir+"place_type_icons/unknown.png)");var i={temple:"temple.png",santuary:"sanctuary.png",river:"river.png","water-open":"river.png",mountain:"mountain.png",island:"island.png",tribe:"tribe.png",settlement:"settlement.png",urban:"settlement.png",people:"people.png",aqueduct:"aqueduct.png",cape:"cape.png",mine:"mine.png",station:"port.png",road:"road.png",villa:"villa.png",wall:"wall.png",province:"people.png"};$.each(i,function(e,t){$(".pelagios .list-results li."+e).css("background-image","url("+widgetContext.imageDir+"place_type_icons/"+t+")")}),widgetContext.displayMap&&(searchMap=new search_map.SearchMap(widgetContext.widgetID+"-search-map_canvas")),$.each(t,function(e,t){widgetContext.displayMap&&searchMap.addMarker(t.geojson,t.label,t.content,function(){s(t.pleiadesID)}),$("#"+widgetContext.widgetID+"-place-"+t.pleiadesID).click(function(){s(t.pleiadesID)})});function s(e){$(".pelagios-search-result-list li").css("text-decoration","none"),$(".pelagios-search-result-list li").css("font-weight","normal"),$("#"+widgetContext.widgetID+"-place-"+e).css("text-decoration","underline"),$("#"+widgetContext.widgetID+"-place-"+e).css("font-weight","bold"),displayPlace(e)}showSearchResults()}else $("#"+widgetContext.widgetID+"-search-results").append("

    No matches found for '"+searchString+"'

    "),$("#"+widgetContext.widgetID+"-search-results").show()}function hideSearchResults(){$("#"+widgetContext.widgetID+"-search-results-map").hide(),$("#"+widgetContext.widgetID+"-search-results").hide()}function showSearchResults(){widgetContext.displayMap&&($("#"+widgetContext.widgetID+"-search-results-map").show(),searchMap.refresh()),$("#"+widgetContext.widgetID+"-search-results").show()}function hidePlace(){$("#"+widgetContext.widgetID+"-map").hide(),$("#"+widgetContext.widgetID+"-place").hide()}function showPlace(){$("#"+widgetContext.widgetID+"-place").show(),widgetContext.displayMap&&placeMap!=null&&($("#"+widgetContext.widgetID+"-map").show(),placeMap.refresh()),placeMap==null&&$("#"+widgetContext.widgetID+"-map").hide()}function addSection(e,t,n,r){var i={name:e,title:t,iconURL:n,strapline:r,widgetContext:widgetContext},s=Handlebars.templates.section(i);$("#"+widgetContext.widgetID+"-sections").append(s),$("#"+widgetContext.widgetID+"-content-"+e).hide(),$("#"+widgetContext.widgetID+"-header-"+e).click(function(){$("#"+widgetContext.widgetID+"-content-"+e).toggle(),toggleIcon(widgetContext.widgetID+"-toggle-"+e)})}function toggleIcon(e){var t=$("#"+e).attr("src"),n=t==widgetContext.imageDir+"icons/down-arrow.png"?widgetContext.imageDir+"icons/right-arrow.png":widgetContext.imageDir+"icons/down-arrow.png";$("#"+e).attr("src",n)}function toggleSelectedLink(e){var t=$("#"+e),n=t.css("text-decoration"),r=n=="underline"?"none":"underline";t.css("text-decoration",r)}function getDatasetInfo(e){var t;return $.each(dataset,function(e,n){n.id==rootDatasetID&&(t=n)}),t}function debug(e){widgetContext.debug&&console.log(e)}var placeMap={},searchMap={},searchString="";eval(widget_container_tmpl),eval(place_tmpl),eval(section_tmpl),eval(flickr_tmpl),eval(pleiades_tmpl),eval(pelagios_partner_tmpl),eval(error_tmpl),eval(search_tmpl),eval(annotations_tmpl),eval(search_results_tmpl),eval(new_tab_tmpl),eval(about_tmpl);var dataset=$.parseJSON(datasetJSON);typeof $("#"+widgetContext.widgetID)==undefined&&debug("ERROR: $(#"+widgetContext.widgetID+") is undefined"),$("head").append('');var html=Handlebars.templates.widget_container({widgetContext:widgetContext});$("#"+widgetContext.widgetID).append(html),$(".pelagios .container").width(widgetContext.containerWidth);try{$("#"+widgetContext.widgetID+"-container").draggable()}catch(err){debug("ERROR: Could not make widget draggable")}this.setTypePlace=function(){var e=Handlebars.templates.place({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e),hidePlace(),widgetContext.icon==1&&($("#"+widgetContext.widgetID+"-container").hide(),$("#"+widgetContext.widgetID+"-icon").click(widgetPopUp),widgetContext.onMouseOver&&($("#"+widgetContext.widgetID+"-icon").mouseover(widgetPopUp),$(document).click(function(){$("#"+widgetContext.widgetID+"-container").hide()}),$("#"+widgetContext.widgetID).click(function(e){return e.stopPropagation(),!1})),$("#"+widgetContext.widgetID+"-close-widget").click(function(){$("#"+widgetContext.widgetID+"-container").hide()})),displayPlace(widgetContext.pleiadesID)},this.setTypeSearch=function(){var e=Handlebars.templates.search({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e);var e=Handlebars.templates.place({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e),hidePlace(),hideSearchResults(),$("#"+widgetContext.widgetID+"-search-form").submit(function(){return searchString=$("input:first").val(),displaySearchResults(),!1})}}var config={URL_PELAGIOS_API_V2:"http://pelagios.dme.ait.ac.at/api/",API_KEY_FLICKR:"ddf82df2aba035bfcf14c12a4eff3335",TIMEOUT_PLEIADES:6e3,TIMEOUT_PELAGIOS:6e4,TIMEOUT_FLICKR:6e3,URL_PLEIADES:"http://pleiades.stoa.org/places/",URL_FLICKR_SEARCH:"http://api.flickr.com/services/rest/?format=json&method=flickr.photos.search",MAX_PHOTOS_FLICKR:30,MSG_PLACE_NOT_FOUND:"The place specified for this widget does not exist in the Pleiades gazetteer.",MSG_TITLE_PLACE_NOT_FOUND:"Error: Unknown Place",MSG_PLEIADES_TIMEOUT:"We cannot display the place name and map at the moment because the Pleiades website is not responding. Apologies for the inconvenience and please try again later.",MSG_TITLE_PLEIADES_TIMEOUT:"Error: Pleiades not responding",NUM_ANNOTATIONS_TO_DISPLAY:20};return{Widget:Widget}});var Handlebars={};Handlebars.VERSION="1.0.beta.2",Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},Handlebars.registerPartial=function(e,t){this.partials[e]=t},Handlebars.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")}),Handlebars.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse||function(){},r=t.fn,i="",s=Object.prototype.toString.call(e);s==="[object Function]"&&(e=e());if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(s==="[object Array]"){if(e.length>0)for(var o=0,u=e.length;o0)for(var s=0,o=e.length;s":">",'"':""","'":"'","`":"`"},t=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?Handlebars.VM.program(t,n):r?r:(r=this.programs[e]=Handlebars.VM.program(t),r)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(n,r){return r=r||{},e.call(t,Handlebars,n,r.helpers,r.partials,r.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i){if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,{helpers:r,partials:i});if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in vm mode");return i[t]=Handlebars.compile(e),i[t](n,{helpers:r,partials:i})}},Handlebars.template=Handlebars.VM.template,define("lib/handlebars",function(){});if(!PELAGIOS_PLACE_MAIN_JS_RUN){var PELAGIOS_PLACE_MAIN_JS_RUN=!0;(function(){var e=document.getElementsByTagName("script"),t=e[e.length-1].src,n=t.replace(/place.js/g,"");require.config({paths:{jquery:"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min",jqueryui:"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min"},priority:["jquery"],jQuery:"1.7.1",waitSeconds:5,baseUrl:n,shim:{jqueryui:{deps:["jquery"]},"lib/jquery_pagination":{deps:["jquery"]}}}),require(["app/pelagios","app/util","lib/handlebars"],function(e,t){var r=window.jQuery.noConflict(!0);r(document).ready(function(r){var i=!0;if(i){var s="FINDING PLACE WIDGETS ON PAGE: ";r(".pelagios-place").each(function(){s+=" "+r(this).attr("id")}),r(".pelagios-place").length==0&&console.log("No Pelagios widget HTML on this web page. If the HTML is added via Javascript please make sure it has added before the Pelagios javascript is run.")}r(".pelagios-place").length>0&&r(".pelagios-place").each(function(){var i={baseURL:n,widgetID:r(this).attr("id"),pleiadesID:r(this).attr("data-pleiades_id"),displayMap:r(this).attr("data-display_map")?r(this).attr("data-display_map")!=="false":!0,onMouseOver:r(this).attr("data-mouseover")?r(this).attr("data-mouseover")==="true":!1,debug:r(this).attr("data-debug")?r(this).attr("data-debug")==="true":!1,icon:r(this).attr("data-icon")?r(this).attr("data-icon")==="true":!0,newTab:r(this).attr("data-new_tab")?r(this).attr("data-new_tab")==="true":!1,templateDir:n+"template/",imageDir:n+"images/",iconDir:n+"images/partner_icons/",scriptDir:n+"scripts/",cssDir:n+"css/",containerWidth:"550",mapWidth:"425",pleiadesFlickrGroupOnly:!1,type:"place"};t.includesGoogleMaps2()&&(i.displayMap=!1),i.debug&&console.log("CREATING WIDGET pleiadesID:"+i.pleiadesID+" widgetID:"+i.widgetID+" baseURL:"+i.baseURL),widget=new e.Widget(i),widget.setTypePlace()})})})})()}define("place",function(){}) \ No newline at end of file +var requirejs,require,define;(function(global){function isFunction(e){return ostring.call(e)==="[object Function]"}function isArray(e){return ostring.call(e)==="[object Array]"}function each(e,t){if(e){var n;for(n=0;n-1;n-=1)if(e[n]&&t(e[n],n,e))break}}function hasProp(e,t){return e.hasOwnProperty(t)}function eachProp(e,t){var n;for(n in e)if(e.hasOwnProperty(n)&&t(e[n],n))break}function mixin(e,t,n,r){return t&&eachProp(t,function(t,i){if(n||!hasProp(e,i))r&&typeof t!="string"?(e[i]||(e[i]={}),mixin(e[i],t,n,r)):e[i]=t}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeContextModuleFunc(e,t,n){return function(){var r=aps.call(arguments,0),i;return n&&isFunction(i=r[r.length-1])&&(i.__requireJsBuild=!0),r.push(t),e.apply(null,r)}}function addRequireMethods(e,t,n){each([["toUrl"],["undef"],["defined","requireDefined"],["specified","requireSpecified"]],function(r){var i=r[1]||r[0];e[r[0]]=t?makeContextModuleFunc(t[i],n):function(){var e=contexts[defContextName];return e[i].apply(e,arguments)}})}function makeError(e,t,n,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=r,n&&(i.originalError=n),i}function newContext(e){function v(e){var t,n;for(t=0;e[t];t+=1){n=e[t];if(n===".")e.splice(t,1),t-=1;else if(n===".."){if(t===1&&(e[2]===".."||e[0]===".."))break;t>0&&(e.splice(t-1,2),t-=2)}}}function m(e,n,r){var i=n&&n.split("/"),s=i,o=t.map,u=o&&o["*"],a,f,l,c,h,p,d,m;e&&e.charAt(0)==="."&&(n?(t.pkgs[n]?s=i=[n]:s=i.slice(0,i.length-1),e=s.concat(e.split("/")),v(e),f=t.pkgs[a=e[0]],e=e.join("/"),f&&e===a+"/"+f.main&&(e=a)):e.indexOf("./")===0&&(e=e.substring(2)));if(r&&(i||u)&&o){c=e.split("/");for(h=c.length;h>0;h-=1){d=c.slice(0,h).join("/");if(i)for(p=i.length;p>0;p-=1){l=o[i.slice(0,p).join("/")];if(l){l=l[d];if(l){m=l;break}}}!m&&u&&u[d]&&(m=u[d]);if(m){c.splice(0,h,m),e=c.join("/");break}}}return e}function g(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===h.contextName)return t.parentNode.removeChild(t),!0})}function y(e){var n=t.paths[e];if(n&&isArray(n)&&n.length>1)return g(e),n.shift(),h.undef(e),h.require([e]),!0}function b(e,t,n,r){var i=e?e.indexOf("!"):-1,o=null,f=t?t.name:null,l=e,c=!0,p="",d,v,g;return e||(c=!1,e="_@r"+(u+=1)),i!==-1&&(o=e.substring(0,i),e=e.substring(i+1,e.length)),o&&(o=m(o,f,r),v=s[o]),e&&(o?v&&v.normalize?p=v.normalize(e,function(e){return m(e,f,r)}):p=m(e,f,r):(p=m(e,f,r),d=h.nameToUrl(p))),g=o&&!v&&!n?"_unnormalized"+(a+=1):"",{prefix:o,name:p,parentMap:t,unnormalized:!!g,url:d,originalName:l,isDefine:c,id:(o?o+"!"+p:p)+g}}function w(e){var t=e.id,r=n[t];return r||(r=n[t]=new h.Module(e)),r}function E(e,t,r){var i=e.id,o=n[i];hasProp(s,i)&&(!o||o.defineEmitComplete)?t==="defined"&&r(s[i]):w(e).on(t,r)}function S(e,t){var r=e.requireModules,i=!1;t?t(e):(each(r,function(t){var r=n[t];r&&(r.error=e,r.events.error&&(i=!0,r.emit("error",e)))}),i||req.onError(e))}function x(){globalDefQueue.length&&(apsp.apply(i,[i.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function T(e,t,n){var r=e&&e.map,i=makeContextModuleFunc(n||h.require,r,t);return addRequireMethods(i,h,r),i.isBrowser=isBrowser,i}function N(e){delete n[e],each(f,function(t,n){if(t.map.id===e)return f.splice(n,1),t.defined||(h.waitCount-=1),!0})}function C(e,t){var r=e.map.id,i=e.depMaps,s;if(!e.inited)return;return t[r]?e:(t[r]=!0,each(i,function(e){var i=e.id,o=n[i];if(!o)return;return!o.inited||!o.enabled?(s=null,delete t[r],!0):s=C(o,mixin({},t))}),s)}function k(e,t,r){var i=e.map.id,o=e.depMaps;if(!e.inited||!e.map.isDefine)return;return t[i]?s[i]:(t[i]=e,each(o,function(s){var o=s.id,u=n[o],a;if(p[o])return;if(u){if(!u.inited||!u.enabled){r[i]=!0;return}a=k(u,t,r),r[o]||e.defineDepById(o,a)}}),e.check(!0),s[i])}function L(e){e.check()}function A(){var e=t.waitSeconds*1e3,r=e&&h.startTime+e<(new Date).getTime(),i=[],s=!1,o=!0,u,a,c,p;if(l)return;l=!0,eachProp(n,function(e){u=e.map,a=u.id;if(!e.enabled)return;if(!e.error)if(!e.inited&&r)y(a)?(p=!0,s=!0):(i.push(a),g(a));else if(!e.inited&&e.fetched&&u.isDefine){s=!0;if(!u.prefix)return o=!1}});if(r&&i.length)return c=makeError("timeout","Load timeout for modules: "+i,null,i),c.contextName=h.contextName,S(c);o&&(each(f,function(e){if(e.defined)return;var t=C(e,{}),n={};t&&(k(t,n,{}),eachProp(n,L))}),eachProp(n,L)),(!r||p)&&s&&(isBrowser||isWebWorker)&&!d&&(d=setTimeout(function(){d=0,A()},50)),l=!1}function O(e){w(b(e[0],null,!0)).init(e[1],e[2])}function M(e,t,n,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(n,t,!1)}function _(e){var t=e.currentTarget||e.srcElement;return M(t,h.onScriptLoad,"load","onreadystatechange"),M(t,h.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}var t={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{}},n={},r={},i=[],s={},o={},u=1,a=1,f=[],l,c,h,p,d;return p={require:function(e){return T(e)},exports:function(e){e.usingExports=!0;if(e.map.isDefine)return e.exports=s[e.map.id]={}},module:function(e){return e.module={id:e.map.id,uri:e.map.url,config:function(){return t.config&&t.config[e.map.id]||{}},exports:s[e.map.id]}}},c=function(e){this.events=r[e.id]||{},this.map=e,this.shim=t.shim[e.id],this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},c.prototype={init:function(e,t,n,r){r=r||{};if(this.inited)return;this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.depMaps.rjsSkipMap=e.rjsSkipMap,this.errback=n,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check()},defineDepById:function(e,t){var n;return each(this.depMaps,function(t,r){if(t.id===e)return n=r,!0}),this.defineDep(n,t)},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(this.fetched)return;this.fetched=!0,h.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();T(this,!0)(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))},load:function(){var e=this.map.url;o[e]||(o[e]=!0,h.load(this.map.id,e))},check:function(e){if(!this.enabled||this.enabling)return;var t=this.map.id,r=this.depExports,i=this.exports,o=this.factory,u,a;if(!this.inited)this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error)try{i=h.execCb(t,o,r,i)}catch(l){u=l}else i=h.execCb(t,o,r,i);this.map.isDefine&&(a=this.module,a&&a.exports!==undefined&&a.exports!==this.exports?i=a.exports:i===undefined&&this.usingExports&&(i=this.exports));if(u)return u.requireMap=this.map,u.requireModules=[this.map.id],u.requireType="define",S(this.error=u)}else i=o;this.exports=i,this.map.isDefine&&!this.ignore&&(s[t]=i,req.onResourceLoad&&req.onResourceLoad(h,this.map,this.depMaps)),delete n[t],this.defined=!0,h.waitCount-=1,h.waitCount===0&&(f=[])}this.defining=!1,e||this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}},callPlugin:function(){var e=this.map,r=e.id,i=b(e.prefix,null,!1,!0);E(i,"defined",bind(this,function(i){var s=this.map.name,o=this.map.parentMap?this.map.parentMap.name:null,u,a,f;if(this.map.unnormalized){i.normalize&&(s=i.normalize(s,function(e){return m(e,o,!0)})||""),a=b(e.prefix+"!"+s,this.map.parentMap,!1,!0),E(a,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),f=n[a.id],f&&(this.events.error&&f.on("error",bind(this,function(e){this.emit("error",e)})),f.enable());return}u=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),u.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[r],eachProp(n,function(e){e.map.id.indexOf(r+"_unnormalized")===0&&N(e.map.id)}),S(e)}),u.fromText=function(e,t){var n=useInteractive;n&&(useInteractive=!1),w(b(e)),req.exec(t),n&&(useInteractive=!0),h.completeLoad(e)},i.load(e.name,T(e.parentMap,!0,function(e,t){return e.rjsSkipMap=!0,h.require(e,t)}),u,t)})),h.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){this.enabled=!0,this.waitPushed||(f.push(this),h.waitCount+=1,this.waitPushed=!0),this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var r,i,s;if(typeof e=="string"){e=b(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.depMaps.rjsSkipMap),this.depMaps[t]=e,s=p[e.id];if(s){this.depExports[t]=s(this);return}this.depCount+=1,E(e,"defined",bind(this,function(e){this.defineDep(t,e),this.check()})),this.errback&&E(e,"error",this.errback)}r=e.id,i=n[r],!p[r]&&i&&!i.enabled&&h.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=n[e.id];t&&!t.enabled&&h.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),e==="error"&&delete this.events[e]}},h={config:t,contextName:e,registry:n,defined:s,urlFetched:o,waitCount:0,defQueue:i,Module:c,makeModuleMap:b,configure:function(e){e.baseUrl&&e.baseUrl.charAt(e.baseUrl.length-1)!=="/"&&(e.baseUrl+="/");var r=t.pkgs,i=t.shim,s=t.paths,o=t.map;mixin(t,e,!0),t.paths=mixin(s,e.paths,!0),e.map&&(t.map=mixin(o||{},e.map,!0,!0)),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),e.exports&&!e.exports.__buildReady&&(e.exports=h.makeShimExports(e.exports)),i[t]=e}),t.shim=i),e.packages&&(each(e.packages,function(e){var t;e=typeof e=="string"?{name:e}:e,t=e.location,r[e.name]={name:e.name,location:t||e.name,main:(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),t.pkgs=r),eachProp(n,function(e,t){e.map=b(t)}),(e.deps||e.callback)&&h.require(e.deps||[],e.callback)},makeShimExports:function(e){var t;return typeof e=="string"?(t=function(){return getGlobal(e)},t.exports=e,t):function(){return e.apply(global,arguments)}},requireDefined:function(e,t){return hasProp(s,b(e,t,!1,!0).id)},requireSpecified:function(e,t){return e=b(e,t,!1,!0).id,hasProp(s,e)||hasProp(n,e)},require:function(t,n,r,o){var u,a,f,l,c;if(typeof t=="string")return isFunction(n)?S(makeError("requireargs","Invalid require call"),r):req.get?req.get(h,t,n):(u=t,o=n,f=b(u,o,!1,!0),a=f.id,hasProp(s,a)?s[a]:S(makeError("notloaded",'Module name "'+a+'" has not been loaded yet for context: '+e)));r&&!isFunction(r)&&(o=r,r=undefined),n&&!isFunction(n)&&(o=n,n=undefined),x();while(i.length){c=i.shift();if(c[0]===null)return S(makeError("mismatch","Mismatched anonymous define() module: "+c[c.length-1]));O(c)}return l=w(b(null,o)),l.init(t,n,r,{enabled:!0}),A(),h.require},undef:function(e){var t=b(e,null,!0),i=n[e];delete s[e],delete o[t.url],delete r[e],i&&(i.events.defined&&(r[e]=i.events),N(e))},enable:function(e,t){var r=n[e.id];r&&w(e).enable()},completeLoad:function(e){var r=t.shim[e]||{},o=r.exports&&r.exports.exports,u,a,f;x();while(i.length){a=i.shift();if(a[0]===null){a[0]=e;if(u)break;u=!0}else a[0]===e&&(u=!0);O(a)}f=n[e];if(!u&&!s[e]&&f&&!f.inited){if(t.enforceDefine&&(!o||!getGlobal(o))){if(y(e))return;return S(makeError("nodefine","No define call for "+e,null,[e]))}O([e,r.deps||[],r.exports])}A()},toUrl:function(e,t){var n=e.lastIndexOf("."),r=null;return n!==-1&&(r=e.substring(n,e.length),e=e.substring(0,n)),h.nameToUrl(m(e,t&&t.id,!0),r)},nameToUrl:function(e,n){var r,i,s,o,u,a,f,l,c;if(req.jsExtRegExp.test(e))l=e+(n||"");else{r=t.paths,i=t.pkgs,u=e.split("/");for(a=u.length;a>0;a-=1){f=u.slice(0,a).join("/"),s=i[f],c=r[f];if(c){isArray(c)&&(c=c[0]),u.splice(0,a,c);break}if(s){e===s.name?o=s.location+"/"+s.main:o=s.location,u.splice(0,a,o);break}}l=u.join("/")+(n||".js"),l=(l.charAt(0)==="/"||l.match(/^[\w\+\.\-]+:/)?"":t.baseUrl)+l}return t.urlArgs?l+((l.indexOf("?")===-1?"?":"&")+t.urlArgs):l},load:function(e,t){req.load(h,e,t)},execCb:function(e,t,n,r){return t.apply(r,n)},onScriptLoad:function(e){if(e.type==="load"||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=_(e);h.completeLoad(t.id)}},onScriptError:function(e){var t=_(e);if(!y(t.id))return S(makeError("scripterror","Script error",e,[t.id]))}}}function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"?interactiveScript:(eachReverse(scripts(),function(e){if(e.readyState==="interactive")return interactiveScript=e}),interactiveScript)}var version="2.0.4",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,ostring=Object.prototype.toString,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=typeof window!="undefined"&&!!navigator&&!!document,isWebWorker=!isBrowser&&typeof importScripts!="undefined",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!="undefined"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1,req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath;if(typeof define!="undefined")return;if(typeof requirejs!="undefined"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=undefined}typeof require!="undefined"&&!isFunction(require)&&(cfg=require,require=undefined),req=requirejs=function(e,t,n,r){var i=defContextName,s,o;return!isArray(e)&&typeof e!="string"&&(o=e,isArray(t)?(e=t,t=n,n=r):e=[]),o&&o.context&&(i=o.context),s=contexts[i],s||(s=contexts[i]=req.s.newContext(i)),o&&s.configure(o),s.require(e,t,n)},req.config=function(e){return req(e)},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),addRequireMethods(req),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=function(e){throw e},req.load=function(e,t,n){var r=e&&e.config||{},i;if(isBrowser)return i=r.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),i.type=r.scriptType||"text/javascript",i.charset="utf-8",i.async=!0,i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),i.attachEvent&&!(i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)):(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)),i.src=n,currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;isWebWorker&&(importScripts(n),e.completeLoad(t))},isBrowser&&eachReverse(scripts(),function(e){head||(head=e.parentNode),dataMain=e.getAttribute("data-main");if(dataMain)return cfg.baseUrl||(src=dataMain.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath,dataMain=mainScript),dataMain=dataMain.replace(jsSuffixRegExp,""),cfg.deps=cfg.deps?cfg.deps.concat(dataMain):[dataMain],!0}),define=function(e,t,n){var r,i;typeof e!="string"&&(n=t,t=e,e=null),isArray(t)||(n=t,t=[]),!t.length&&isFunction(n)&&n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(n.length===1?["require"]:["require","exports","module"]).concat(t)),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(e||(e=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")])),(i?i.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)})(this),define("requireLib",function(){}),define("app/util",["jquery"],function(e){function t(e){var t=e.replace(/ /g,"");return t=t.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""),t}function n(){return typeof GMap2!="undefined"}function r(t,n,r,i,s){var o={type:"POST",dataType:"json",timeout:i,success:n,error:r};r||(o.error=function(e,n,r){console.log("ERROR: Call to "+t+" failed: "+n),console.log(e)});if(!s)e.ajax(t,o);else{try{var u=new XMLHttpRequest}catch(r){var u={}}if("withCredentials"in u)e.ajax(t,o);else if(typeof XDomainRequest!="undefined"){var a=new XDomainRequest;a.timeout=i,a.open("get",t),a.onload=function(){n(e.parseJSON(a.responseText),"",a)},a.onerror=r,a.send()}}}return{createID:t,includesGoogleMaps2:n,getAPIData:r}}),define("app/loadGMaps",[],function(){function t(){if(e!=null)return e;e=typeof GMap2=="undefined"}var e;return{load:function(e,n,r,i){i.isBuild||t()?r(null):window.setTimeout(function(){n([e],r)},500)}}}),define("app/search_map",["app/loadGMaps!lib/async!http://maps.google.com/maps/api/js?sensor=false"],function(){function e(e){if(!document.getElementById(e))throw Error("ERROR: Invalid ID for search map");try{var t=new google.maps.Map(document.getElementById(e),{mapTypeId:google.maps.MapTypeId.TERRAIN})}catch(n){console.log("ERROR: Failed to create Google Map for element id "+e+" : "+n)}var r=new google.maps.LatLngBounds,i=new google.maps.InfoWindow;this.refresh=function(){google.maps.event.trigger(t,"resize"),t.fitBounds(r)},this.addMarker=function(e,n,s,o){if(e.hasOwnProperty("geometry")&&e.geometry!=null&&e.geometry.hasOwnProperty("type")&&e.geometry.type=="Point"){var u=new google.maps.LatLng(e.geometry.coordinates[1],e.geometry.coordinates[0]),a=new google.maps.Marker({position:u,map:t,title:n});r.extend(u),google.maps.event.addListener(a,"click",function(){return function(){i.close(),i.setContent(s),i.open(t,a),o()}}())}}}return{SearchMap:e}}),define("app/place_map",["app/loadGMaps!lib/async!http://maps.google.com/maps/api/js?sensor=false"],function(){function e(e){if(!document.getElementById(e))throw Error("ERROR: Invalid ID for place map");try{var t=new google.maps.Map(document.getElementById(e),{zoom:8,mapTypeId:google.maps.MapTypeId.TERRAIN})}catch(n){console.log("ERROR: Failed to crate Google map for element id "+e+" : "+n)}try{var r=new google.maps.Marker({map:t})}catch(n){console.log("ERROR: Failed to create Google Map marker : "+n)}this.refresh=function(){try{google.maps.event.trigger(t,"resize")}catch(e){console.log("ERROR: Failed to resize Google map :"+e)}try{t.setCenter(r.getPosition())}catch(e){console.log("ERROR: Failed to center Google Map : "+e)}},this.setMarker=function(e,n){try{var i=new google.maps.LatLng(e[1],e[0])}catch(s){console.log("ERROR: Failed to create Google Maps location : "+s)}try{r.setPosition(i)}catch(s){console.log("ERROR: Failed to set marker position : "+s)}try{r.setTitle(n)}catch(s){console.log("ERROR: Failed to set marker title : "+s)}try{t.setCenter(i)}catch(s){console.log("ERROR: Failed to center Google Map : "+s)}try{google.maps.event.trigger(t,"resize")}catch(s){console.log("ERROR: Failed to resize Google Map : "+s)}}}return{PlaceMap:e}}),define("lib/text",["module"],function(e){var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],n=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,r=/]*>\s*([\s\S]+)\s*<\/body>/im,i=typeof location!="undefined"&&location.href,s=i&&location.protocol&&location.protocol.replace(/\:/,""),o=i&&location.hostname,u=i&&(location.port||undefined),a=[],f=e.config(),l,c;return l={version:"2.0.0",strip:function(e){if(e){e=e.replace(n,"");var t=e.match(r);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var e,n,r;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(n=0;n<3;n++){r=t[n];try{e=new ActiveXObject(r)}catch(i){}if(e){t=[r];break}}return e},parseName:function(e){var t=!1,n=e.indexOf("."),r=e.substring(0,n),i=e.substring(n+1,e.length);return n=i.indexOf("!"),n!==-1&&(t=i.substring(n+1,i.length),t=t==="strip",i=i.substring(0,n)),{moduleName:r,ext:i,strip:t}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,t,n,r){var i=l.xdRegExp.exec(e),s,o,u;return i?(s=i[2],o=i[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===t)&&(!o||o===n)&&(!u&&!o||u===r)):!0},finishLoad:function(e,t,n,r){n=t?l.strip(n):n,f.isBuild&&(a[e]=n),r(n)},load:function(e,t,n,r){if(r.isBuild&&!r.inlineText){n();return}f.isBuild=r.isBuild;var a=l.parseName(e),c=a.moduleName+"."+a.ext,h=t.toUrl(c),p=f.useXhr||l.useXhr;!i||p(h,s,o,u)?l.get(h,function(t){l.finishLoad(e,a.strip,t,n)},function(e){n.error&&n.error(e)}):t([c],function(e){l.finishLoad(a.moduleName+"."+a.ext,a.strip,e,n)})},write:function(e,t,n,r){if(a.hasOwnProperty(t)){var i=l.jsEscape(a[t]);n.asModule(e+"!"+t,"define(function () { return '"+i+"';});\n")}},writeFile:function(e,t,n,r,i){var s=l.parseName(t),o=s.moduleName+"."+s.ext,u=n.toUrl(s.moduleName+"."+s.ext)+".js";l.load(o,n,function(t){var n=function(e){return r(u,e)};n.asModule=function(e,t){return r.asModule(e,u,t)},l.write(e,o,n,i)},i)}},typeof process!="undefined"&&process.versions&&!!process.versions.node?(c=require.nodeRequire("fs"),l.get=function(e,t){var n=c.readFileSync(e,"utf8");n.indexOf("")===0&&(n=n.substring(1)),t(n)}):l.createXhr()?l.get=function(e,t,n){var r=l.createXhr();r.open("GET",e,!0),f.onXhr&&f.onXhr(r,e),r.onreadystatechange=function(i){var s,o;r.readyState===4&&(s=r.status,s>399&&s<600?(o=new Error(e+" HTTP status: "+s),o.xhr=r,n(o)):t(r.responseText))},r.send(null)}:typeof Packages!="undefined"&&(l.get=function(e,t){var n="utf-8",r=new java.io.File(e),i=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r),n)),o,u,a="";try{o=new java.lang.StringBuffer,u=s.readLine(),u&&u.length()&&u.charAt(0)===65279&&(u=u.substring(1)),o.append(u);while((u=s.readLine())!==null)o.append(i),o.append(u);a=String(o.toString())}finally{s.close()}t(a)}),l}),define("lib/text!template/widget_container.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'widget_container\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n \\r\\n \\"Close\\r\\n \\r\\n ";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\"Information \\r\\n";\n return buffer;}\n\n buffer += "
    \\r\\n
    \\r\\n \\"View \\r\\n ";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.icon);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.icon);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += " ";\n return buffer;});\n})();'}),define("lib/text!template/place.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'place\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "
    \\r\\n
    \\r\\n
    \\r\\n\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/section.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'section\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "
    \\r\\n
    \\r\\n\\"\\"\\r\\n

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n\\"Toggle\\r\\n

    ";\n foundHelper = helpers.strapline;\n stack1 = foundHelper || depth0.strapline;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "strapline", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/flickr.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'flickr\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\r\\n\\"";\n\\r\\n\\r\\n";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    View all ";\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.length);\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "photo.length", { hash: {} }); }\n buffer += escapeExpression(stack1) + " photos on flickr

    \\r\\n";\n return buffer;}\n\nfunction program5(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    View all ";\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.length);\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "photo.length", { hash: {} }); }\n buffer += escapeExpression(stack1) + " photos on flickr

    \\r\\n";\n return buffer;}\n\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.pleiadesFlickrGroupOnly);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.pleiadesFlickrGroupOnly);\n stack2 = helpers.unless;\n tmp1 = self.program(5, program5, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n

    The flickr photos shown here are those which have been given a Pleiades machine tag specifying this place.

    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/pleiades.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'pleiades\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    Some alternative names: ";\n foundHelper = helpers.altNames;\n stack1 = foundHelper || depth0.altNames;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "altNames", { hash: {} }); }\n buffer += escapeExpression(stack1) + " (the results below are for all alternative names)

    \\r\\n ";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += " \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n ";\n return buffer;}\n\n buffer += "

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n

    ";\n foundHelper = helpers.description;\n stack1 = foundHelper || depth0.description;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n ";\n foundHelper = helpers.altNames;\n stack1 = foundHelper || depth0.altNames;\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n ";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.displayMap);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n

    \\r\\n Entry in the Pleiades Gazetteer

    \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/pelagios_partner.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'pelagios_partner\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1, stack2;\n buffer += "\\r\\n\\r\\n
  • \\r\\n\\r\\n ";\n stack1 = depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "\\r\\n \\r\\n ";\n stack1 = depth0.references;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.references", { hash: {} }); }\n buffer += escapeExpression(stack1) + " hit";\n stack1 = depth0.multipleReferences;\n stack2 = helpers[\'if\'];\n tmp1 = self.program(2, program2, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n \\r\\n \\r\\n\\r\\n
    \\r\\n\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
  • \\r\\n\\r\\n";\n return buffer;}\nfunction program2(depth0,data) {\n \n \n return "s";}\n\n buffer += "
      \\r\\n";\n foundHelper = helpers.subdataset;\n stack1 = foundHelper || depth0.subdataset;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += " \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/error.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'error\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n

    ";\n foundHelper = helpers.msg;\n stack1 = foundHelper || depth0.msg;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "msg", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/search.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'search\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "

    Search for places

    \\r\\n
    \\r\\n \\r\\n \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n \\r\\n \\r\\n \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/annotations.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'annotations\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n
  • ";\n stack1 = depth0.label;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.label", { hash: {} }); }\n buffer += escapeExpression(stack1) + "
  • \\r\\n";\n return buffer;}\n\n buffer += "
      \\r\\n";\n foundHelper = helpers.annotation;\n stack1 = foundHelper || depth0.annotation;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/search_results.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'search_results\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += " \\r\\n
    \\r\\n

    Geographic Results for: ";\n foundHelper = helpers.searchString;\n stack1 = foundHelper || depth0.searchString;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "searchString", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n
    \\r\\n";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\r\\n";\n return buffer;}\n\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.displayMap);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n

    List Results for: ";\n foundHelper = helpers.searchString;\n stack1 = foundHelper || depth0.searchString;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "searchString", { hash: {} }); }\n buffer += escapeExpression(stack1) + "\\r\\n

    \\r\\n
      \\r\\n";\n foundHelper = helpers.place;\n stack1 = foundHelper || depth0.place;\n stack2 = helpers.each;\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n
    \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/new_tab.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'new_tab\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "\\r\\n\\r\\n \\r\\n\\r\\n \\r\\n \\r\\n\\r\\n
    \\r\\n\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/about.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'about\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var foundHelper, self=this;\n\n\n return "

    This widget displays data from the Pelagios project partners about the location specified.

    \\r\\n

    View the Pelagios website\\r\\n for more information.\\r\\n ";});\n})();'}),define("lib/text!app/dataset.json",[],function(){return'[{\r\n "id": "b47df24737cd647789c7d61ede9fed09",\r\n "iconFileName": "arachne.png",\r\n "title": "Arachne",\r\n "strapline": "A web research tool of the German Archaeological Institute for searching mass archaeological records"\r\n},\r\n{\r\n "id": "6a39d0bc3c0fd4ef7d2a837b42cf46a1",\r\n "title": "Google Ancient Places",\r\n "iconFileName": "gap_logo.png",\r\n "strapline": "A Geographic Annotation Platform for reading texts spatially"\r\n}\r\n,\r\n{\r\n "id": "2db51c1dd976f01bf993a02f959e18f8",\r\n "title": "nomisma",\r\n "iconFileName": "Greek.jpeg",\r\n "strapline": "Representing ancient coins online"\r\n}\r\n,\r\n{\r\n "id": "298fafd65586643149e8a8ba47b57052",\r\n "title": "SPQR",\r\n "iconFileName": "SPQR.png",\r\n "strapline": "From Roman inscriptions to resource descriptions"\r\n}\r\n,\r\n{\r\n "id": "",\r\n "title": "Regnum Francorum Online",\r\n "iconFileName": "Regnum.png",\r\n "strapline": "Interactive Maps and Sources of Late Antique and Early Medieval Europe"\r\n}\r\n,\r\n{\r\n "id": "21e48d8ca46f666467b81a551fbb1cb",\r\n "title": "Perseus",\r\n "iconFileName": "Perseus.png",\r\n "strapline": "Annotated occurrences of place entities in texts from the Perseus Digital Library"\r\n}\r\n,\r\n{\r\n "id": "c4c2ed780a8f4f2b698a5c2505ac34ca",\r\n "title": "CLAROS",\r\n "iconFileName": "CLAROS.png",\r\n "strapline": "Aggregated search of art and archaeology data from the classical world and the far east across four millennia"\r\n}\r\n,\r\n{\r\n "id": "739128af1e9613de03706a57cef46976",\r\n "title": "Open Context",\r\n "iconFileName": "open-context.png",\r\n "strapline": "Publications of research data in archaeology and related fields"\r\n}\r\n,\r\n{\r\n "id": "467b9097b55b6e0831fe6760df93e7f2",\r\n "title": "FASTI Online",\r\n "iconFileName": "FASTI.png",\r\n "strapline": "A database of archaeological excavations since the year 2000"\r\n}\r\n,\r\n{\r\n "id": "a306666ae581e8d611d56a1dfdaea256",\r\n "title": "Ure Museum",\r\n "iconFileName": "URE.png",\r\n "strapline": "University Museum of ancient Greek, Egyptian & a little Roman stuff"\r\n}\r\n,\r\n{\r\n "id": "5555ffd0e36e088c25f76b980139851a",\r\n "title": "ORBIS",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The Stanford Geospatial Network Model of the Roman World"\r\n}\r\n,\r\n{\r\n"id": "4f9bb4e7c0b0c329db0d2696814ffd2d",\r\n "title": "SquinchPix",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "An archive of European imagery"\r\n}\r\n,\r\n{\r\n "id": "77b38b7fc7d81fb278d1c3634638f8ee",\r\n "title": "Sharing Ancient Wisdoms ",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Medieval gnomologia (collections of wise sayings)"\r\n}\r\n,\r\n{\r\n "id": "434fc5aea15f6d39040c1282c4a2df63",\r\n "title": "Portable Antiquities Scheme",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing within the Portable Antiquities Scheme database"\r\n}\r\n,\r\n{\r\n "id": "9fdb2911bcfc625c87cfce10d97b3de7",\r\n "title": "ORACC",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Open Richly Annotated Cuneiform Corpus"\r\n}\r\n,\r\n{\r\n "id": "7bb4b28758a3607f9b1eea3b48df90a",\r\n "title": "Meketre",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Reliefs and paintings of Middle Kingdom tombs of Ancient Egypt"\r\n}\r\n,\r\n{\r\n "id": "71fd46410b14843985db023501f2f76f",\r\n "title": "The Book of the Dead Project",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The evolution of the ancient egyptian Book of the Dead"\r\n}\r\n,\r\n{\r\n "id": "e2e0b0b2199b875ff3acdce3f962c128",\r\n "title": "ISAW Papers",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing in ISAW Papers articles"\r\n}\r\n,\r\n{\r\n "id": "e9e161a08db2906d135d7abefb145636",\r\n "title": "OCRE",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Online Coins of the Roman Empire"\r\n}\r\n]\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n'}),define("lib/jquery_pagination",["jquery"],function(e){(function(e){e.PaginationCalculator=function(e,t){this.maxentries=e,this.opts=t},e.extend(e.PaginationCalculator.prototype,{numPages:function(){return Math.ceil(this.maxentries/this.opts.items_per_page)},getInterval:function(e){var t=Math.floor(this.opts.num_display_entries/2),n=this.numPages(),r=n-this.opts.num_display_entries,i=e>t?Math.max(Math.min(e-t,r),0):0,s=e>t?Math.min(e+t+this.opts.num_display_entries%2,n):Math.min(this.opts.num_display_entries,n);return{start:i,end:s}}}),e.PaginationRenderers={},e.PaginationRenderers.defaultRenderer=function(t,n){this.maxentries=t,this.opts=n,this.pc=new e.PaginationCalculator(t,n)},e.extend(e.PaginationRenderers.defaultRenderer.prototype,{createLink:function(t,n,r){var i,s=this.pc.numPages();return t=t<0?0:t"+r.text+""):i=e(""+r.text+"").attr("href",this.opts.link_to.replace(/__id__/,t)),r.classes&&i.addClass(r.classes),i.data("page_id",t),i},appendRange:function(e,t,n,r,i){var s;for(s=n;s

    ");return this.opts.prev_text&&(t>0||this.opts.prev_show_always)&&u.append(this.createLink(t-1,t,{text:this.opts.prev_text,classes:"prev"})),s.start>0&&this.opts.num_edge_entries>0&&(i=Math.min(this.opts.num_edge_entries,s.start),this.appendRange(u,t,0,i,{classes:"sp"}),this.opts.num_edge_entries"+this.opts.ellipse_text+"").appendTo(u)),this.appendRange(u,t,s.start,s.end),s.end0&&(o-this.opts.num_edge_entries>s.end&&this.opts.ellipse_text&&e(""+this.opts.ellipse_text+"").appendTo(u),r=Math.max(o-this.opts.num_edge_entries,s.end),this.appendRange(u,t,r,o,{classes:"ep"})),this.opts.next_text&&(t=0&&t0&&a(n-1),!1}),r.bind("nextPage",{numPages:l},function(t){var n=e(this).data("current_page");return n1||n.show_if_single_page)&&s.appendTo(r),n.load_first_page&&n.callback(o,r)}})(jQuery)}),define("app/pelagios",["jquery","app/util","app/search_map","app/place_map","lib/text!template/widget_container.tmpl","lib/text!template/place.tmpl","lib/text!template/section.tmpl","lib/text!template/flickr.tmpl","lib/text!template/pleiades.tmpl","lib/text!template/pelagios_partner.tmpl","lib/text!template/error.tmpl","lib/text!template/search.tmpl","lib/text!template/annotations.tmpl","lib/text!template/search_results.tmpl","lib/text!template/new_tab.tmpl","lib/text!template/about.tmpl","lib/text!app/dataset.json","jqueryui","lib/jquery_pagination"],function($,util,search_map,place_map,widget_container_tmpl,place_tmpl,section_tmpl,flickr_tmpl,pleiades_tmpl,pelagios_partner_tmpl,error_tmpl,search_tmpl,annotations_tmpl,search_results_tmpl,new_tab_tmpl,about_tmpl,datasetJSON){function Widget(widgetContext){function widgetPopUp(){if(widgetContext.newTab){var e=window.open(),t=Handlebars.templates.new_tab({widgetContext:widgetContext});$(e.document.body).html(t);var n=document.createElement("script");n.type="text/javascript",n.src=widgetContext.baseURL+"lib/require.js",e.document.head.appendChild(n);var r=document.createElement("script");r.type="text/javascript",r.src=widgetContext.baseURL+"place.js",e.document.head.appendChild(r)}else{$(".pelagios .container").hide(),$("#"+widgetContext.widgetID+"-container").show();var i=$("#"+widgetContext.widgetID+"-icon").offset(),s={top:$(window).scrollTop(),left:200};$("#"+widgetContext.widgetID+"-container").offset(s),widgetContext.displayMap&&placeMap.hasOwnProperty("refresh")&&placeMap.refresh()}}function displayPlace(e){debug("DISPLAYING PLACE: pleiadesID: "+e),placeMap={},clearPlace(),showPleiadesData(e),widgetContext.type=="place"&&showAboutInformation(),showPelagiosData(e),showFlickrData(e)}function showAboutInformation(){addSection("about","About Pelagios and this widget",widgetContext.imageDir+"partner_icons/pelagios.png","");var e=Handlebars.templates.about();$("#"+widgetContext.widgetID+"-content-about").append(e)}function clearPlace(){$("#"+widgetContext.widgetID+"-pleiades").empty(),$("#"+widgetContext.widgetID+"-sections").empty()}function showFlickrData(e){function r(t){if(t.hasOwnProperty("photos")&&t.photos.hasOwnProperty("photo")&&t.photos.photo.length>0){addSection("flickr","flickr",widgetContext.imageDir+"icons/flickr-logo.png","Photo sharing website");var n={photo:t.photos.photo.slice(0,config.MAX_PHOTOS_FLICKR-1),pleiadesID:e},r=Handlebars.templates.flickr(n);$("#"+widgetContext.widgetID+"-content-flickr").append(r)}}var t="";widgetContext.pleiadesFlickrGroupOnly&&(t="&group_id=1876758@N22");var n=config.URL_FLICKR_SEARCH+"&machine_tags=pleiades:depicts="+e+t+"&tag_mode=all&api_key="+config.API_KEY_FLICKR+"&jsoncallback=?";util.getAPIData(n,r,!1,config.TIMEOUT_FLICKR,!1)}function showPleiadesData(e){function r(e,t,n){$("#"+widgetContext.widgetID+"-content").empty();if(e.status=="404")var r={title:config.MSG_TITLE_PLACE_NOT_FOUND,msg:config.MSG_PLACE_NOT_FOUND};else var r={title:config.MSG_TITLE_PLEIADES_TIMEOUT,msg:config.MSG_PLEIADES_TIMEOUT};var i=Handlebars.templates.error(r);$("#"+widgetContext.widgetID+"-content").append(i)}function i(e){var t=!1;e.names.length>1&&(t=e.names.join(", "));var n={title:e.names[0]?e.names[0]:"Untitled",description:e.description,altNames:t,pleiadesID:e.id,widgetContext:widgetContext},r=Handlebars.templates.pleiades(n);$("#"+widgetContext.widgetID+"-pleiades").append(r),e.reprPoint!=null&&widgetContext.displayMap&&(placeMap=new place_map.PlaceMap(widgetContext.widgetID+"-map_canvas"),placeMap.setMarker(e.reprPoint,e.names[0])),e.reprPoint==null&&(placeMap=null),showPlace()}var t=config.URL_PLEIADES+e,n=config.URL_PLEIADES+e+"/json";util.getAPIData(n,i,r,config.TIMEOUT_PLEIADES,!0)}function showPelagiosData(e){function n(e){$.each(e,function(n,i){i.hasOwnProperty("root_dataset")&&(i=i.root_dataset);var s;rootDatasetID=i.uri.replace(/http:\/\/pelagios.dme.ait.ac.at\/api\/datasets\//g,""),s=getDatasetInfo(rootDatasetID);if(typeof s!="undefined"){addSection(rootDatasetID,s.title,widgetContext.iconDir+s.iconFileName,s.strapline);var o=new Array;if(typeof i.subsets!="undefined")for(var u=0;u1?!0:!1,o[u].anyReferences=o[u].references>0?!0:!1;else o[0]={},o[0].widgetContext=widgetContext,o[0].title=i.title,o[0].id=rootDatasetID,o[0].references=e[n].annotations_referencing_place,o[0].multipleReferences=o[0].references>1?!0:!1;var a={subdataset:o,rootDatasetID:rootDatasetID,widgetContext:widgetContext},f=Handlebars.templates.pelagios_partner(a);$("#"+widgetContext.widgetID+"-content-"+rootDatasetID).append(f),$("#"+widgetContext.widgetID+"-subdatasets-"+rootDatasetID).css("list-style-image","url("+widgetContext.imageDir+"icons/bullet.png)");for(var u=0;u0&&s(e.annotations,n)};return util.getAPIData(r,i),!1}function s(e,t){var n=new Array;$.each(e,function(e,t){n[e]={},t.hasOwnProperty("target_title")?n[e].label=t.target_title:n[e].label=t.title?t.title:"Item "+(e+1),n[e].uri=t.hasTarget});var r={subdatasetID:t,annotation:n,widgetContext:widgetContext},i=Handlebars.templates.annotations(r);$("#"+widgetContext.widgetID+"-annotations-"+t).empty(),$("#"+widgetContext.widgetID+"-annotations-"+t).append(i),$("#"+widgetContext.widgetID+"-subdataset-"+t).focus()}function o(e){var t=e.data.id;toggleSelectedLink(widgetContext.widgetID+"-subdataset_hits-"+t),$("#"+widgetContext.widgetID+"-subdataset_content-"+t).toggle(),toggleIcon(widgetContext.widgetID+"-toggle-subdataset-"+t)}function u(e){$("#"+widgetID+"-subdataset_content-"+e).hide()}var t=config.URL_PELAGIOS_API_V2+"places/"+encodeURIComponent(config.URL_PLEIADES+e)+"/datasets.json?callback=?";util.getAPIData(t,n,!1,config.TIMEOUT_PELAGIOS,!1)}function displaySearchResults(){var e=config.URL_PELAGIOS_API_V2+"search.json?query="+searchString+"&callback=?";debug("RETRIEVING SEARCH DATA: searchString: "+searchString+" URL:"+e),util.getAPIData(e,displaySearchResultsData,!1,config.TIMEOUT_PELAGIOS,!1)}function displaySearchResultsData(e){$("#"+widgetContext.widgetID+"-search-map").empty(),$("#"+widgetContext.widgetID+"-search-results").empty(),$("#"+widgetContext.widgetID+"-pleiades").empty(),$("#"+widgetContext.widgetID+"-sections").empty();if(e.length>0){var t=new Array;$.each(e,function(e,n){place={},place.label=n.label,place.pleiadesID=n.uri.replace(/.*places.*F/g,""),place.geojson=n,n.feature_type&&(place.feature_type=n.feature_type.replace(/.*place-types\//g,"")),place.content="

    "+place.label+"

    ",place.content+='

    View info

    ',place.widgetID=widgetContext.widgetID,t[e]=place});var n={place:t,widgetContext:widgetContext,searchString:searchString},r=Handlebars.templates.search_results(n);$("#"+widgetContext.widgetID+"-search-results").append(r),$(".pelagios .list-results li").css("background-image","url("+widgetContext.imageDir+"place_type_icons/unknown.png)");var i={temple:"temple.png",santuary:"sanctuary.png",river:"river.png","water-open":"river.png",mountain:"mountain.png",island:"island.png",tribe:"tribe.png",settlement:"settlement.png",urban:"settlement.png",people:"people.png",aqueduct:"aqueduct.png",cape:"cape.png",mine:"mine.png",station:"port.png",road:"road.png",villa:"villa.png",wall:"wall.png",province:"people.png"};$.each(i,function(e,t){$(".pelagios .list-results li."+e).css("background-image","url("+widgetContext.imageDir+"place_type_icons/"+t+")")}),widgetContext.displayMap&&(searchMap=new search_map.SearchMap(widgetContext.widgetID+"-search-map_canvas")),$.each(t,function(e,t){widgetContext.displayMap&&searchMap.addMarker(t.geojson,t.label,t.content,function(){s(t.pleiadesID)}),$("#"+widgetContext.widgetID+"-place-"+t.pleiadesID).click(function(){s(t.pleiadesID)})});function s(e){$(".pelagios-search-result-list li").css("text-decoration","none"),$(".pelagios-search-result-list li").css("font-weight","normal"),$("#"+widgetContext.widgetID+"-place-"+e).css("text-decoration","underline"),$("#"+widgetContext.widgetID+"-place-"+e).css("font-weight","bold"),displayPlace(e)}showSearchResults()}else $("#"+widgetContext.widgetID+"-search-results").append("

    No matches found for '"+searchString+"'

    "),$("#"+widgetContext.widgetID+"-search-results").show()}function hideSearchResults(){$("#"+widgetContext.widgetID+"-search-results-map").hide(),$("#"+widgetContext.widgetID+"-search-results").hide()}function showSearchResults(){widgetContext.displayMap&&($("#"+widgetContext.widgetID+"-search-results-map").show(),searchMap.refresh()),$("#"+widgetContext.widgetID+"-search-results").show()}function hidePlace(){$("#"+widgetContext.widgetID+"-map").hide(),$("#"+widgetContext.widgetID+"-place").hide()}function showPlace(){$("#"+widgetContext.widgetID+"-place").show(),widgetContext.displayMap&&placeMap!=null&&($("#"+widgetContext.widgetID+"-map").show(),placeMap.refresh()),placeMap==null&&$("#"+widgetContext.widgetID+"-map").hide()}function addSection(e,t,n,r){var i={name:e,title:t,iconURL:n,strapline:r,widgetContext:widgetContext},s=Handlebars.templates.section(i);$("#"+widgetContext.widgetID+"-sections").append(s),$("#"+widgetContext.widgetID+"-content-"+e).hide(),$("#"+widgetContext.widgetID+"-header-"+e).click(function(){$("#"+widgetContext.widgetID+"-content-"+e).toggle(),toggleIcon(widgetContext.widgetID+"-toggle-"+e)})}function toggleIcon(e){var t=$("#"+e).attr("src"),n=t==widgetContext.imageDir+"icons/down-arrow.png"?widgetContext.imageDir+"icons/right-arrow.png":widgetContext.imageDir+"icons/down-arrow.png";$("#"+e).attr("src",n)}function toggleSelectedLink(e){var t=$("#"+e),n=t.css("text-decoration"),r=n=="underline"?"none":"underline";t.css("text-decoration",r)}function getDatasetInfo(e){var t;return $.each(dataset,function(e,n){n.id==rootDatasetID&&(t=n)}),t}function debug(e){widgetContext.debug&&console.log(e)}var placeMap={},searchMap={},searchString="";eval(widget_container_tmpl),eval(place_tmpl),eval(section_tmpl),eval(flickr_tmpl),eval(pleiades_tmpl),eval(pelagios_partner_tmpl),eval(error_tmpl),eval(search_tmpl),eval(annotations_tmpl),eval(search_results_tmpl),eval(new_tab_tmpl),eval(about_tmpl);var dataset=$.parseJSON(datasetJSON);typeof $("#"+widgetContext.widgetID)==undefined&&debug("ERROR: $(#"+widgetContext.widgetID+") is undefined"),$("head").append('');var html=Handlebars.templates.widget_container({widgetContext:widgetContext});$("#"+widgetContext.widgetID).append(html),$(".pelagios .container").width(widgetContext.containerWidth);try{$("#"+widgetContext.widgetID+"-container").draggable()}catch(err){debug("ERROR: Could not make widget draggable")}this.setTypePlace=function(){var e=Handlebars.templates.place({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e),hidePlace(),widgetContext.icon==1&&($("#"+widgetContext.widgetID+"-container").hide(),$("#"+widgetContext.widgetID+"-icon").click(widgetPopUp),widgetContext.onMouseOver&&($("#"+widgetContext.widgetID+"-icon").mouseover(widgetPopUp),$(document).click(function(){$("#"+widgetContext.widgetID+"-container").hide()}),$("#"+widgetContext.widgetID).click(function(e){return e.stopPropagation(),!1})),$("#"+widgetContext.widgetID+"-close-widget").click(function(){$("#"+widgetContext.widgetID+"-container").hide()})),displayPlace(widgetContext.pleiadesID)},this.setTypeSearch=function(){var e=Handlebars.templates.search({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e);var e=Handlebars.templates.place({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e),hidePlace(),hideSearchResults(),$("#"+widgetContext.widgetID+"-search-form").submit(function(){return searchString=$("input:first").val(),displaySearchResults(),!1})}}var config={URL_PELAGIOS_API_V2:"http://pelagios.dme.ait.ac.at/api/",API_KEY_FLICKR:"ddf82df2aba035bfcf14c12a4eff3335",TIMEOUT_PLEIADES:6e3,TIMEOUT_PELAGIOS:6e4,TIMEOUT_FLICKR:6e3,URL_PLEIADES:"http://pleiades.stoa.org/places/",URL_FLICKR_SEARCH:"http://api.flickr.com/services/rest/?format=json&method=flickr.photos.search",MAX_PHOTOS_FLICKR:30,MSG_PLACE_NOT_FOUND:"The place specified for this widget does not exist in the Pleiades gazetteer.",MSG_TITLE_PLACE_NOT_FOUND:"Error: Unknown Place",MSG_PLEIADES_TIMEOUT:"We cannot display the place name and map at the moment because the Pleiades website is not responding. Apologies for the inconvenience and please try again later.",MSG_TITLE_PLEIADES_TIMEOUT:"Error: Pleiades not responding",NUM_ANNOTATIONS_TO_DISPLAY:20};return{Widget:Widget}});var Handlebars={};Handlebars.VERSION="1.0.beta.2",Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},Handlebars.registerPartial=function(e,t){this.partials[e]=t},Handlebars.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")}),Handlebars.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse||function(){},r=t.fn,i="",s=Object.prototype.toString.call(e);s==="[object Function]"&&(e=e());if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(s==="[object Array]"){if(e.length>0)for(var o=0,u=e.length;o0)for(var s=0,o=e.length;s":">",'"':""","'":"'","`":"`"},t=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?Handlebars.VM.program(t,n):r?r:(r=this.programs[e]=Handlebars.VM.program(t),r)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(n,r){return r=r||{},e.call(t,Handlebars,n,r.helpers,r.partials,r.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i){if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,{helpers:r,partials:i});if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in vm mode");return i[t]=Handlebars.compile(e),i[t](n,{helpers:r,partials:i})}},Handlebars.template=Handlebars.VM.template,define("lib/handlebars",function(){});if(!PELAGIOS_PLACE_MAIN_JS_RUN){var PELAGIOS_PLACE_MAIN_JS_RUN=!0;(function(){var e=document.getElementsByTagName("script"),t=e[e.length-1].src,n=t.replace(/place.js/g,"");require.config({paths:{jquery:"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min",jqueryui:"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min"},priority:["jquery"],jQuery:"1.7.1",waitSeconds:5,baseUrl:n,shim:{jqueryui:{deps:["jquery"]},"lib/jquery_pagination":{deps:["jquery"]}}}),require(["app/pelagios","app/util","lib/handlebars"],function(e,t){var r=window.jQuery.noConflict(!0);r(document).ready(function(r){var i=!0;if(i){var s="FINDING PLACE WIDGETS ON PAGE: ";r(".pelagios-place").each(function(){s+=" "+r(this).attr("id")}),r(".pelagios-place").length==0&&console.log("No Pelagios widget HTML on this web page. If the HTML is added via Javascript please make sure it has added before the Pelagios javascript is run.")}r(".pelagios-place").length>0&&r(".pelagios-place").each(function(){var i={baseURL:n,widgetID:r(this).attr("id"),pleiadesID:r(this).attr("data-pleiades_id"),displayMap:r(this).attr("data-display_map")?r(this).attr("data-display_map")!=="false":!0,onMouseOver:r(this).attr("data-mouseover")?r(this).attr("data-mouseover")==="true":!1,debug:r(this).attr("data-debug")?r(this).attr("data-debug")==="true":!1,icon:r(this).attr("data-icon")?r(this).attr("data-icon")==="true":!0,newTab:r(this).attr("data-new_tab")?r(this).attr("data-new_tab")==="true":!1,templateDir:n+"template/",imageDir:n+"images/",iconDir:n+"images/partner_icons/",scriptDir:n+"scripts/",cssDir:n+"css/",containerWidth:"550",mapWidth:"425",pleiadesFlickrGroupOnly:!1,type:"place"};t.includesGoogleMaps2()&&(i.displayMap=!1),i.debug&&console.log("CREATING WIDGET pleiadesID:"+i.pleiadesID+" widgetID:"+i.widgetID+" baseURL:"+i.baseURL),widget=new e.Widget(i),widget.setTypePlace()})})})})()}define("place",function(){}) \ No newline at end of file diff --git a/build/search.js b/build/search.js index 93352f0..ba8bee0 100644 --- a/build/search.js +++ b/build/search.js @@ -35,4 +35,4 @@ * see: http://github.com/jrburke/requirejs for details */ -define("app/util",["jquery"],function(e){function t(e){var t=e.replace(/ /g,"");return t=t.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""),t}function n(){return typeof GMap2!="undefined"}function r(t,n,r,i,s){var o={type:"POST",dataType:"json",timeout:i,success:n,error:r};r||(o.error=function(e,n,r){console.log("ERROR: Call to "+t+" failed: "+n),console.log(e)});if(!s)e.ajax(t,o);else{try{var u=new XMLHttpRequest}catch(r){var u={}}if("withCredentials"in u)e.ajax(t,o);else if(typeof XDomainRequest!="undefined"){var a=new XDomainRequest;a.timeout=i,a.open("get",t),a.onload=function(){n(e.parseJSON(a.responseText),"",a)},a.onerror=r,a.send()}}}return{createID:t,includesGoogleMaps2:n,getAPIData:r}}),define("app/loadGMaps",[],function(){function t(){if(e!=null)return e;e=typeof GMap2=="undefined"}var e;return{load:function(e,n,r,i){i.isBuild||t()?r(null):window.setTimeout(function(){n([e],r)},500)}}}),define("app/search_map",["app/loadGMaps!lib/async!http://maps.google.com/maps/api/js?sensor=false"],function(){function e(e){if(!document.getElementById(e))throw Error("ERROR: Invalid ID for search map");try{var t=new google.maps.Map(document.getElementById(e),{mapTypeId:google.maps.MapTypeId.TERRAIN})}catch(n){console.log("ERROR: Failed to create Google Map for element id "+e+" : "+n)}var r=new google.maps.LatLngBounds,i=new google.maps.InfoWindow;this.refresh=function(){google.maps.event.trigger(t,"resize"),t.fitBounds(r)},this.addMarker=function(e,n,s,o){if(e.hasOwnProperty("geometry")&&e.geometry!=null&&e.geometry.hasOwnProperty("type")&&e.geometry.type=="Point"){var u=new google.maps.LatLng(e.geometry.coordinates[1],e.geometry.coordinates[0]),a=new google.maps.Marker({position:u,map:t,title:n});r.extend(u),google.maps.event.addListener(a,"click",function(){return function(){i.close(),i.setContent(s),i.open(t,a),o()}}())}}}return{SearchMap:e}}),define("app/place_map",["app/loadGMaps!lib/async!http://maps.google.com/maps/api/js?sensor=false"],function(){function e(e){if(!document.getElementById(e))throw Error("ERROR: Invalid ID for place map");try{var t=new google.maps.Map(document.getElementById(e),{zoom:8,mapTypeId:google.maps.MapTypeId.TERRAIN})}catch(n){console.log("ERROR: Failed to crate Google map for element id "+e+" : "+n)}try{var r=new google.maps.Marker({map:t})}catch(n){console.log("ERROR: Failed to create Google Map marker : "+n)}this.refresh=function(){try{google.maps.event.trigger(t,"resize")}catch(e){console.log("ERROR: Failed to resize Google map :"+e)}try{t.setCenter(r.getPosition())}catch(e){console.log("ERROR: Failed to center Google Map : "+e)}},this.setMarker=function(e,n){try{var i=new google.maps.LatLng(e[1],e[0])}catch(s){console.log("ERROR: Failed to create Google Maps location : "+s)}try{r.setPosition(i)}catch(s){console.log("ERROR: Failed to set marker position : "+s)}try{r.setTitle(n)}catch(s){console.log("ERROR: Failed to set marker title : "+s)}try{t.setCenter(i)}catch(s){console.log("ERROR: Failed to center Google Map : "+s)}try{google.maps.event.trigger(t,"resize")}catch(s){console.log("ERROR: Failed to resize Google Map : "+s)}}}return{PlaceMap:e}}),define("lib/text",["module"],function(e){var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],n=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,r=/]*>\s*([\s\S]+)\s*<\/body>/im,i=typeof location!="undefined"&&location.href,s=i&&location.protocol&&location.protocol.replace(/\:/,""),o=i&&location.hostname,u=i&&(location.port||undefined),a=[],f=e.config(),l,c;return l={version:"2.0.0",strip:function(e){if(e){e=e.replace(n,"");var t=e.match(r);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var e,n,r;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(n=0;n<3;n++){r=t[n];try{e=new ActiveXObject(r)}catch(i){}if(e){t=[r];break}}return e},parseName:function(e){var t=!1,n=e.indexOf("."),r=e.substring(0,n),i=e.substring(n+1,e.length);return n=i.indexOf("!"),n!==-1&&(t=i.substring(n+1,i.length),t=t==="strip",i=i.substring(0,n)),{moduleName:r,ext:i,strip:t}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,t,n,r){var i=l.xdRegExp.exec(e),s,o,u;return i?(s=i[2],o=i[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===t)&&(!o||o===n)&&(!u&&!o||u===r)):!0},finishLoad:function(e,t,n,r){n=t?l.strip(n):n,f.isBuild&&(a[e]=n),r(n)},load:function(e,t,n,r){if(r.isBuild&&!r.inlineText){n();return}f.isBuild=r.isBuild;var a=l.parseName(e),c=a.moduleName+"."+a.ext,h=t.toUrl(c),p=f.useXhr||l.useXhr;!i||p(h,s,o,u)?l.get(h,function(t){l.finishLoad(e,a.strip,t,n)},function(e){n.error&&n.error(e)}):t([c],function(e){l.finishLoad(a.moduleName+"."+a.ext,a.strip,e,n)})},write:function(e,t,n,r){if(a.hasOwnProperty(t)){var i=l.jsEscape(a[t]);n.asModule(e+"!"+t,"define(function () { return '"+i+"';});\n")}},writeFile:function(e,t,n,r,i){var s=l.parseName(t),o=s.moduleName+"."+s.ext,u=n.toUrl(s.moduleName+"."+s.ext)+".js";l.load(o,n,function(t){var n=function(e){return r(u,e)};n.asModule=function(e,t){return r.asModule(e,u,t)},l.write(e,o,n,i)},i)}},typeof process!="undefined"&&process.versions&&!!process.versions.node?(c=require.nodeRequire("fs"),l.get=function(e,t){var n=c.readFileSync(e,"utf8");n.indexOf("")===0&&(n=n.substring(1)),t(n)}):l.createXhr()?l.get=function(e,t,n){var r=l.createXhr();r.open("GET",e,!0),f.onXhr&&f.onXhr(r,e),r.onreadystatechange=function(i){var s,o;r.readyState===4&&(s=r.status,s>399&&s<600?(o=new Error(e+" HTTP status: "+s),o.xhr=r,n(o)):t(r.responseText))},r.send(null)}:typeof Packages!="undefined"&&(l.get=function(e,t){var n="utf-8",r=new java.io.File(e),i=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r),n)),o,u,a="";try{o=new java.lang.StringBuffer,u=s.readLine(),u&&u.length()&&u.charAt(0)===65279&&(u=u.substring(1)),o.append(u);while((u=s.readLine())!==null)o.append(i),o.append(u);a=String(o.toString())}finally{s.close()}t(a)}),l}),define("lib/text!template/widget_container.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'widget_container\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n \\r\\n \\"Close\\r\\n \\r\\n ";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\"Information \\r\\n";\n return buffer;}\n\n buffer += "
    \\r\\n
    \\r\\n \\"View \\r\\n ";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.icon);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.icon);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += " ";\n return buffer;});\n})();'}),define("lib/text!template/place.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'place\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "
    \\r\\n
    \\r\\n
    \\r\\n\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/section.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'section\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "
    \\r\\n
    \\r\\n\\"\\"\\r\\n

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n\\"Toggle\\r\\n

    ";\n foundHelper = helpers.strapline;\n stack1 = foundHelper || depth0.strapline;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "strapline", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/flickr.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'flickr\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\r\\n\\"";\n\\r\\n\\r\\n";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    View all ";\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.length);\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "photo.length", { hash: {} }); }\n buffer += escapeExpression(stack1) + " photos on flickr

    \\r\\n";\n return buffer;}\n\nfunction program5(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    View all ";\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.length);\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "photo.length", { hash: {} }); }\n buffer += escapeExpression(stack1) + " photos on flickr

    \\r\\n";\n return buffer;}\n\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.pleiadesFlickrGroupOnly);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.pleiadesFlickrGroupOnly);\n stack2 = helpers.unless;\n tmp1 = self.program(5, program5, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n

    The flickr photos shown here are those which have been given a Pleiades machine tag specifying this place.

    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/pleiades.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'pleiades\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    Some alternative names: ";\n foundHelper = helpers.altNames;\n stack1 = foundHelper || depth0.altNames;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "altNames", { hash: {} }); }\n buffer += escapeExpression(stack1) + " (the results below are for all alternative names)

    \\r\\n ";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += " \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n ";\n return buffer;}\n\n buffer += "

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n

    ";\n foundHelper = helpers.description;\n stack1 = foundHelper || depth0.description;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n ";\n foundHelper = helpers.altNames;\n stack1 = foundHelper || depth0.altNames;\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n ";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.displayMap);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n

    \\r\\n Entry in the Pleiades Gazetteer

    \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/pelagios_partner.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'pelagios_partner\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1, stack2;\n buffer += "\\r\\n\\r\\n
  • \\r\\n\\r\\n ";\n stack1 = depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "\\r\\n \\r\\n ";\n stack1 = depth0.references;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.references", { hash: {} }); }\n buffer += escapeExpression(stack1) + " hit";\n stack1 = depth0.multipleReferences;\n stack2 = helpers[\'if\'];\n tmp1 = self.program(2, program2, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n \\r\\n \\r\\n\\r\\n
    \\r\\n\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
  • \\r\\n\\r\\n";\n return buffer;}\nfunction program2(depth0,data) {\n \n \n return "s";}\n\n buffer += "
      \\r\\n";\n foundHelper = helpers.subdataset;\n stack1 = foundHelper || depth0.subdataset;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += " \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/error.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'error\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n

    ";\n foundHelper = helpers.msg;\n stack1 = foundHelper || depth0.msg;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "msg", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/search.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'search\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "

    Search for places

    \\r\\n
    \\r\\n \\r\\n \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n \\r\\n \\r\\n \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/annotations.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'annotations\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n
  • ";\n stack1 = depth0.label;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.label", { hash: {} }); }\n buffer += escapeExpression(stack1) + "
  • \\r\\n";\n return buffer;}\n\n buffer += "
      \\r\\n";\n foundHelper = helpers.annotation;\n stack1 = foundHelper || depth0.annotation;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/search_results.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'search_results\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += " \\r\\n
    \\r\\n

    Geographic Results for: ";\n foundHelper = helpers.searchString;\n stack1 = foundHelper || depth0.searchString;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "searchString", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n
    \\r\\n";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\r\\n";\n return buffer;}\n\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.displayMap);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n

    List Results for: ";\n foundHelper = helpers.searchString;\n stack1 = foundHelper || depth0.searchString;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "searchString", { hash: {} }); }\n buffer += escapeExpression(stack1) + "\\r\\n

    \\r\\n
      \\r\\n";\n foundHelper = helpers.place;\n stack1 = foundHelper || depth0.place;\n stack2 = helpers.each;\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n
    \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/new_tab.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'new_tab\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "\\r\\n\\r\\n \\r\\n\\r\\n \\r\\n \\r\\n\\r\\n
    \\r\\n\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/about.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'about\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var foundHelper, self=this;\n\n\n return "

    This widget displays data from the Pelagios project partners about the location specified.

    \\r\\n

    View the Pelagios website\\r\\n for more information.\\r\\n ";});\n})();'}),define("lib/text!app/dataset.json",[],function(){return'[{\r\n "id": "b47df24737cd647789c7d61ede9fed09",\r\n "iconFileName": "arachne.png",\r\n "title": "Arachne",\r\n "strapline": "A web research tool of the German Archaeological Institute for searching mass archaeological records"\r\n},\r\n{\r\n "id": "6a39d0bc3c0fd4ef7d2a837b42cf46a1",\r\n "title": "Google Ancient Places",\r\n "iconFileName": "gap_logo.png",\r\n "strapline": "A Geographic Annotation Platform for reading texts spatially"\r\n}\r\n,\r\n{\r\n "id": "2db51c1dd976f01bf993a02f959e18f8",\r\n "title": "nomisma",\r\n "iconFileName": "Greek.jpeg",\r\n "strapline": "Representing ancient coins online"\r\n}\r\n,\r\n{\r\n "id": "298fafd65586643149e8a8ba47b57052",\r\n "title": "SPQR",\r\n "iconFileName": "SPQR.png",\r\n "strapline": "From Roman inscriptions to resource descriptions"\r\n}\r\n,\r\n{\r\n "id": "",\r\n "title": "Regnum Francorum Online",\r\n "iconFileName": "Regnum.png",\r\n "strapline": "Interactive Maps and Sources of Late Antique and Early Medieval Europe"\r\n}\r\n,\r\n{\r\n "id": "21e48d8ca46f666467b81a551fbb1cb",\r\n "title": "Perseus",\r\n "iconFileName": "Perseus.png",\r\n "strapline": "Annotated occurrences of place entities in texts from the Perseus Digital Library"\r\n}\r\n,\r\n{\r\n "id": "c4c2ed780a8f4f2b698a5c2505ac34ca",\r\n "title": "CLAROS",\r\n "iconFileName": "CLAROS.png",\r\n "strapline": "Aggregated search of art and archaeology data from the classical world and the far east across four millennia"\r\n}\r\n,\r\n{\r\n "id": "739128af1e9613de03706a57cef46976",\r\n "title": "Open Context",\r\n "iconFileName": "open-context.png",\r\n "strapline": "Publications of research data in archaeology and related fields"\r\n}\r\n,\r\n{\r\n "id": "467b9097b55b6e0831fe6760df93e7f2",\r\n "title": "FASTI Online",\r\n "iconFileName": "FASTI.png",\r\n "strapline": "A database of archaeological excavations since the year 2000"\r\n}\r\n,\r\n{\r\n "id": "a306666ae581e8d611d56a1dfdaea256",\r\n "title": "Ure Museum",\r\n "iconFileName": "URE.png",\r\n "strapline": "University Museum of ancient Greek, Egyptian & a little Roman stuff"\r\n}\r\n,\r\n{\r\n "id": "5555ffd0e36e088c25f76b980139851a",\r\n "title": "ORBIS",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The Stanford Geospatial Network Model of the Roman World"\r\n}\r\n,\r\n{\r\n"id": "4f9bb4e7c0b0c329db0d2696814ffd2d",\r\n "title": "SquinchPix",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "An archive of European imagery"\r\n}\r\n,\r\n{\r\n "id": "77b38b7fc7d81fb278d1c3634638f8ee",\r\n "title": "Sharing Ancient Wisdoms ",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Medieval gnomologia (collections of wise sayings)"\r\n}\r\n,\r\n{\r\n "id": "434fc5aea15f6d39040c1282c4a2df63",\r\n "title": "Portable Antiquities Scheme",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing within the Portable Antiquities Scheme database"\r\n}\r\n,\r\n{\r\n "id": "9fdb2911bcfc625c87cfce10d97b3de7",\r\n "title": "ORACC",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Open Richly Annotated Cuneiform Corpus"\r\n}\r\n,\r\n{\r\n "id": "7bb4b28758a3607f9b1eea3b48df90a",\r\n "title": "Meketre",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Reliefs and paintings of Middle Kingdom tombs of Ancient Egypt"\r\n}\r\n,\r\n{\r\n "id": "71fd46410b14843985db023501f2f76f",\r\n "title": "The Book of the Dead Project",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The evolution of the ancient egyptian Book of the Dead"\r\n}\r\n,\r\n{\r\n "id": "e2e0b0b2199b875ff3acdce3f962c128",\r\n "title": "ISAW Papers",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing in ISAW Papers articles"\r\n}\r\n]\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n'}),define("lib/jquery_pagination",["jquery"],function(e){(function(e){e.PaginationCalculator=function(e,t){this.maxentries=e,this.opts=t},e.extend(e.PaginationCalculator.prototype,{numPages:function(){return Math.ceil(this.maxentries/this.opts.items_per_page)},getInterval:function(e){var t=Math.floor(this.opts.num_display_entries/2),n=this.numPages(),r=n-this.opts.num_display_entries,i=e>t?Math.max(Math.min(e-t,r),0):0,s=e>t?Math.min(e+t+this.opts.num_display_entries%2,n):Math.min(this.opts.num_display_entries,n);return{start:i,end:s}}}),e.PaginationRenderers={},e.PaginationRenderers.defaultRenderer=function(t,n){this.maxentries=t,this.opts=n,this.pc=new e.PaginationCalculator(t,n)},e.extend(e.PaginationRenderers.defaultRenderer.prototype,{createLink:function(t,n,r){var i,s=this.pc.numPages();return t=t<0?0:t"+r.text+""):i=e(""+r.text+"").attr("href",this.opts.link_to.replace(/__id__/,t)),r.classes&&i.addClass(r.classes),i.data("page_id",t),i},appendRange:function(e,t,n,r,i){var s;for(s=n;s

    ");return this.opts.prev_text&&(t>0||this.opts.prev_show_always)&&u.append(this.createLink(t-1,t,{text:this.opts.prev_text,classes:"prev"})),s.start>0&&this.opts.num_edge_entries>0&&(i=Math.min(this.opts.num_edge_entries,s.start),this.appendRange(u,t,0,i,{classes:"sp"}),this.opts.num_edge_entries"+this.opts.ellipse_text+"").appendTo(u)),this.appendRange(u,t,s.start,s.end),s.end0&&(o-this.opts.num_edge_entries>s.end&&this.opts.ellipse_text&&e(""+this.opts.ellipse_text+"").appendTo(u),r=Math.max(o-this.opts.num_edge_entries,s.end),this.appendRange(u,t,r,o,{classes:"ep"})),this.opts.next_text&&(t=0&&t0&&a(n-1),!1}),r.bind("nextPage",{numPages:l},function(t){var n=e(this).data("current_page");return n1||n.show_if_single_page)&&s.appendTo(r),n.load_first_page&&n.callback(o,r)}})(jQuery)}),define("app/pelagios",["jquery","app/util","app/search_map","app/place_map","lib/text!template/widget_container.tmpl","lib/text!template/place.tmpl","lib/text!template/section.tmpl","lib/text!template/flickr.tmpl","lib/text!template/pleiades.tmpl","lib/text!template/pelagios_partner.tmpl","lib/text!template/error.tmpl","lib/text!template/search.tmpl","lib/text!template/annotations.tmpl","lib/text!template/search_results.tmpl","lib/text!template/new_tab.tmpl","lib/text!template/about.tmpl","lib/text!app/dataset.json","jqueryui","lib/jquery_pagination"],function($,util,search_map,place_map,widget_container_tmpl,place_tmpl,section_tmpl,flickr_tmpl,pleiades_tmpl,pelagios_partner_tmpl,error_tmpl,search_tmpl,annotations_tmpl,search_results_tmpl,new_tab_tmpl,about_tmpl,datasetJSON){function Widget(widgetContext){function widgetPopUp(){if(widgetContext.newTab){var e=window.open(),t=Handlebars.templates.new_tab({widgetContext:widgetContext});$(e.document.body).html(t);var n=document.createElement("script");n.type="text/javascript",n.src=widgetContext.baseURL+"lib/require.js",e.document.head.appendChild(n);var r=document.createElement("script");r.type="text/javascript",r.src=widgetContext.baseURL+"place.js",e.document.head.appendChild(r)}else{$(".pelagios .container").hide(),$("#"+widgetContext.widgetID+"-container").show();var i=$("#"+widgetContext.widgetID+"-icon").offset(),s={top:$(window).scrollTop(),left:200};$("#"+widgetContext.widgetID+"-container").offset(s),widgetContext.displayMap&&placeMap.hasOwnProperty("refresh")&&placeMap.refresh()}}function displayPlace(e){debug("DISPLAYING PLACE: pleiadesID: "+e),placeMap={},clearPlace(),showPleiadesData(e),widgetContext.type=="place"&&showAboutInformation(),showPelagiosData(e),showFlickrData(e)}function showAboutInformation(){addSection("about","About Pelagios and this widget",widgetContext.imageDir+"partner_icons/pelagios.png","");var e=Handlebars.templates.about();$("#"+widgetContext.widgetID+"-content-about").append(e)}function clearPlace(){$("#"+widgetContext.widgetID+"-pleiades").empty(),$("#"+widgetContext.widgetID+"-sections").empty()}function showFlickrData(e){function r(t){if(t.hasOwnProperty("photos")&&t.photos.hasOwnProperty("photo")&&t.photos.photo.length>0){addSection("flickr","flickr",widgetContext.imageDir+"icons/flickr-logo.png","Photo sharing website");var n={photo:t.photos.photo.slice(0,config.MAX_PHOTOS_FLICKR-1),pleiadesID:e},r=Handlebars.templates.flickr(n);$("#"+widgetContext.widgetID+"-content-flickr").append(r)}}var t="";widgetContext.pleiadesFlickrGroupOnly&&(t="&group_id=1876758@N22");var n=config.URL_FLICKR_SEARCH+"&machine_tags=pleiades:depicts="+e+t+"&tag_mode=all&api_key="+config.API_KEY_FLICKR+"&jsoncallback=?";util.getAPIData(n,r,!1,config.TIMEOUT_FLICKR,!1)}function showPleiadesData(e){function r(e,t,n){$("#"+widgetContext.widgetID+"-content").empty();if(e.status=="404")var r={title:config.MSG_TITLE_PLACE_NOT_FOUND,msg:config.MSG_PLACE_NOT_FOUND};else var r={title:config.MSG_TITLE_PLEIADES_TIMEOUT,msg:config.MSG_PLEIADES_TIMEOUT};var i=Handlebars.templates.error(r);$("#"+widgetContext.widgetID+"-content").append(i)}function i(e){var t=!1;e.names.length>1&&(t=e.names.join(", "));var n={title:e.names[0]?e.names[0]:"Untitled",description:e.description,altNames:t,pleiadesID:e.id,widgetContext:widgetContext},r=Handlebars.templates.pleiades(n);$("#"+widgetContext.widgetID+"-pleiades").append(r),e.reprPoint!=null&&widgetContext.displayMap&&(placeMap=new place_map.PlaceMap(widgetContext.widgetID+"-map_canvas"),placeMap.setMarker(e.reprPoint,e.names[0])),e.reprPoint==null&&(placeMap=null),showPlace()}var t=config.URL_PLEIADES+e,n=config.URL_PLEIADES+e+"/json";util.getAPIData(n,i,r,config.TIMEOUT_PLEIADES,!0)}function showPelagiosData(e){function n(e){$.each(e,function(n,i){i.hasOwnProperty("root_dataset")&&(i=i.root_dataset);var s;rootDatasetID=i.uri.replace(/http:\/\/pelagios.dme.ait.ac.at\/api\/datasets\//g,""),s=getDatasetInfo(rootDatasetID);if(typeof s!="undefined"){addSection(rootDatasetID,s.title,widgetContext.iconDir+s.iconFileName,s.strapline);var o=new Array;if(typeof i.subsets!="undefined")for(var u=0;u1?!0:!1,o[u].anyReferences=o[u].references>0?!0:!1;else o[0]={},o[0].widgetContext=widgetContext,o[0].title=i.title,o[0].id=rootDatasetID,o[0].references=e[n].annotations_referencing_place,o[0].multipleReferences=o[0].references>1?!0:!1;var a={subdataset:o,rootDatasetID:rootDatasetID,widgetContext:widgetContext},f=Handlebars.templates.pelagios_partner(a);$("#"+widgetContext.widgetID+"-content-"+rootDatasetID).append(f),$("#"+widgetContext.widgetID+"-subdatasets-"+rootDatasetID).css("list-style-image","url("+widgetContext.imageDir+"icons/bullet.png)");for(var u=0;u0&&s(e.annotations,n)};return util.getAPIData(r,i),!1}function s(e,t){var n=new Array;$.each(e,function(e,t){n[e]={},t.hasOwnProperty("target_title")?n[e].label=t.target_title:n[e].label=t.title?t.title:"Item "+(e+1),n[e].uri=t.hasTarget});var r={subdatasetID:t,annotation:n,widgetContext:widgetContext},i=Handlebars.templates.annotations(r);$("#"+widgetContext.widgetID+"-annotations-"+t).empty(),$("#"+widgetContext.widgetID+"-annotations-"+t).append(i),$("#"+widgetContext.widgetID+"-subdataset-"+t).focus()}function o(e){var t=e.data.id;toggleSelectedLink(widgetContext.widgetID+"-subdataset_hits-"+t),$("#"+widgetContext.widgetID+"-subdataset_content-"+t).toggle(),toggleIcon(widgetContext.widgetID+"-toggle-subdataset-"+t)}function u(e){$("#"+widgetID+"-subdataset_content-"+e).hide()}var t=config.URL_PELAGIOS_API_V2+"places/"+encodeURIComponent(config.URL_PLEIADES+e)+"/datasets.json?callback=?";util.getAPIData(t,n,!1,config.TIMEOUT_PELAGIOS,!1)}function displaySearchResults(){var e=config.URL_PELAGIOS_API_V2+"search.json?query="+searchString+"&callback=?";debug("RETRIEVING SEARCH DATA: searchString: "+searchString+" URL:"+e),util.getAPIData(e,displaySearchResultsData,!1,config.TIMEOUT_PELAGIOS,!1)}function displaySearchResultsData(e){$("#"+widgetContext.widgetID+"-search-map").empty(),$("#"+widgetContext.widgetID+"-search-results").empty(),$("#"+widgetContext.widgetID+"-pleiades").empty(),$("#"+widgetContext.widgetID+"-sections").empty();if(e.length>0){var t=new Array;$.each(e,function(e,n){place={},place.label=n.label,place.pleiadesID=n.uri.replace(/.*places.*F/g,""),place.geojson=n,n.feature_type&&(place.feature_type=n.feature_type.replace(/.*place-types\//g,"")),place.content="

    "+place.label+"

    ",place.content+='

    View info

    ',place.widgetID=widgetContext.widgetID,t[e]=place});var n={place:t,widgetContext:widgetContext,searchString:searchString},r=Handlebars.templates.search_results(n);$("#"+widgetContext.widgetID+"-search-results").append(r),$(".pelagios .list-results li").css("background-image","url("+widgetContext.imageDir+"place_type_icons/unknown.png)");var i={temple:"temple.png",santuary:"sanctuary.png",river:"river.png","water-open":"river.png",mountain:"mountain.png",island:"island.png",tribe:"tribe.png",settlement:"settlement.png",urban:"settlement.png",people:"people.png",aqueduct:"aqueduct.png",cape:"cape.png",mine:"mine.png",station:"port.png",road:"road.png",villa:"villa.png",wall:"wall.png",province:"people.png"};$.each(i,function(e,t){$(".pelagios .list-results li."+e).css("background-image","url("+widgetContext.imageDir+"place_type_icons/"+t+")")}),widgetContext.displayMap&&(searchMap=new search_map.SearchMap(widgetContext.widgetID+"-search-map_canvas")),$.each(t,function(e,t){widgetContext.displayMap&&searchMap.addMarker(t.geojson,t.label,t.content,function(){s(t.pleiadesID)}),$("#"+widgetContext.widgetID+"-place-"+t.pleiadesID).click(function(){s(t.pleiadesID)})});function s(e){$(".pelagios-search-result-list li").css("text-decoration","none"),$(".pelagios-search-result-list li").css("font-weight","normal"),$("#"+widgetContext.widgetID+"-place-"+e).css("text-decoration","underline"),$("#"+widgetContext.widgetID+"-place-"+e).css("font-weight","bold"),displayPlace(e)}showSearchResults()}else $("#"+widgetContext.widgetID+"-search-results").append("

    No matches found for '"+searchString+"'

    "),$("#"+widgetContext.widgetID+"-search-results").show()}function hideSearchResults(){$("#"+widgetContext.widgetID+"-search-results-map").hide(),$("#"+widgetContext.widgetID+"-search-results").hide()}function showSearchResults(){widgetContext.displayMap&&($("#"+widgetContext.widgetID+"-search-results-map").show(),searchMap.refresh()),$("#"+widgetContext.widgetID+"-search-results").show()}function hidePlace(){$("#"+widgetContext.widgetID+"-map").hide(),$("#"+widgetContext.widgetID+"-place").hide()}function showPlace(){$("#"+widgetContext.widgetID+"-place").show(),widgetContext.displayMap&&placeMap!=null&&($("#"+widgetContext.widgetID+"-map").show(),placeMap.refresh()),placeMap==null&&$("#"+widgetContext.widgetID+"-map").hide()}function addSection(e,t,n,r){var i={name:e,title:t,iconURL:n,strapline:r,widgetContext:widgetContext},s=Handlebars.templates.section(i);$("#"+widgetContext.widgetID+"-sections").append(s),$("#"+widgetContext.widgetID+"-content-"+e).hide(),$("#"+widgetContext.widgetID+"-header-"+e).click(function(){$("#"+widgetContext.widgetID+"-content-"+e).toggle(),toggleIcon(widgetContext.widgetID+"-toggle-"+e)})}function toggleIcon(e){var t=$("#"+e).attr("src"),n=t==widgetContext.imageDir+"icons/down-arrow.png"?widgetContext.imageDir+"icons/right-arrow.png":widgetContext.imageDir+"icons/down-arrow.png";$("#"+e).attr("src",n)}function toggleSelectedLink(e){var t=$("#"+e),n=t.css("text-decoration"),r=n=="underline"?"none":"underline";t.css("text-decoration",r)}function getDatasetInfo(e){var t;return $.each(dataset,function(e,n){n.id==rootDatasetID&&(t=n)}),t}function debug(e){widgetContext.debug&&console.log(e)}var placeMap={},searchMap={},searchString="";eval(widget_container_tmpl),eval(place_tmpl),eval(section_tmpl),eval(flickr_tmpl),eval(pleiades_tmpl),eval(pelagios_partner_tmpl),eval(error_tmpl),eval(search_tmpl),eval(annotations_tmpl),eval(search_results_tmpl),eval(new_tab_tmpl),eval(about_tmpl);var dataset=$.parseJSON(datasetJSON);typeof $("#"+widgetContext.widgetID)==undefined&&debug("ERROR: $(#"+widgetContext.widgetID+") is undefined"),$("head").append('');var html=Handlebars.templates.widget_container({widgetContext:widgetContext});$("#"+widgetContext.widgetID).append(html),$(".pelagios .container").width(widgetContext.containerWidth);try{$("#"+widgetContext.widgetID+"-container").draggable()}catch(err){debug("ERROR: Could not make widget draggable")}this.setTypePlace=function(){var e=Handlebars.templates.place({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e),hidePlace(),widgetContext.icon==1&&($("#"+widgetContext.widgetID+"-container").hide(),$("#"+widgetContext.widgetID+"-icon").click(widgetPopUp),widgetContext.onMouseOver&&($("#"+widgetContext.widgetID+"-icon").mouseover(widgetPopUp),$(document).click(function(){$("#"+widgetContext.widgetID+"-container").hide()}),$("#"+widgetContext.widgetID).click(function(e){return e.stopPropagation(),!1})),$("#"+widgetContext.widgetID+"-close-widget").click(function(){$("#"+widgetContext.widgetID+"-container").hide()})),displayPlace(widgetContext.pleiadesID)},this.setTypeSearch=function(){var e=Handlebars.templates.search({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e);var e=Handlebars.templates.place({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e),hidePlace(),hideSearchResults(),$("#"+widgetContext.widgetID+"-search-form").submit(function(){return searchString=$("input:first").val(),displaySearchResults(),!1})}}var config={URL_PELAGIOS_API_V2:"http://pelagios.dme.ait.ac.at/api/",API_KEY_FLICKR:"ddf82df2aba035bfcf14c12a4eff3335",TIMEOUT_PLEIADES:6e3,TIMEOUT_PELAGIOS:6e4,TIMEOUT_FLICKR:6e3,URL_PLEIADES:"http://pleiades.stoa.org/places/",URL_FLICKR_SEARCH:"http://api.flickr.com/services/rest/?format=json&method=flickr.photos.search",MAX_PHOTOS_FLICKR:30,MSG_PLACE_NOT_FOUND:"The place specified for this widget does not exist in the Pleiades gazetteer.",MSG_TITLE_PLACE_NOT_FOUND:"Error: Unknown Place",MSG_PLEIADES_TIMEOUT:"We cannot display the place name and map at the moment because the Pleiades website is not responding. Apologies for the inconvenience and please try again later.",MSG_TITLE_PLEIADES_TIMEOUT:"Error: Pleiades not responding",NUM_ANNOTATIONS_TO_DISPLAY:20};return{Widget:Widget}});var Handlebars={};Handlebars.VERSION="1.0.beta.2",Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},Handlebars.registerPartial=function(e,t){this.partials[e]=t},Handlebars.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")}),Handlebars.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse||function(){},r=t.fn,i="",s=Object.prototype.toString.call(e);s==="[object Function]"&&(e=e());if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(s==="[object Array]"){if(e.length>0)for(var o=0,u=e.length;o0)for(var s=0,o=e.length;s":">",'"':""","'":"'","`":"`"},t=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?Handlebars.VM.program(t,n):r?r:(r=this.programs[e]=Handlebars.VM.program(t),r)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(n,r){return r=r||{},e.call(t,Handlebars,n,r.helpers,r.partials,r.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i){if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,{helpers:r,partials:i});if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in vm mode");return i[t]=Handlebars.compile(e),i[t](n,{helpers:r,partials:i})}},Handlebars.template=Handlebars.VM.template,define("lib/handlebars",function(){});if(!PELAGIOS_SEARCH_MAIN_JS_RUN){var PELAGIOS_SEARCH_MAIN_JS_RUN=!0;(function(){var e=document.getElementsByTagName("script"),t=e[e.length-1].src,n=t.replace(/search.js/g,"");require.config({paths:{jquery:"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min",jqueryui:"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min"},priority:["jquery"],jQuery:"1.7.1",waitSeconds:5,baseUrl:n,shim:{jqueryui:{deps:["jquery"]},"lib/jquery_pagination":{deps:["jquery"]}}}),require(["app/pelagios","app/util","lib/handlebars"],function(e,t){var r=window.jQuery.noConflict(!0);r(document).ready(function(r){r(".pelagios-search").each(function(){var i={baseURL:n,widgetID:r(this).attr("id"),displayMap:r(this).attr("data-display_map")?r(this).attr("data-display_map")!=="false":!0,debug:r(this).attr("data-debug")?r(this).attr("data-debug")==="true":!1,overlay:!1,templateDir:n+"template/",imageDir:n+"images/",iconDir:n+"images/partner_icons/",scriptDir:n+"scripts/",cssDir:n+"css/",containerWidth:r(this).attr("data-container_width")?r(this).attr("data-container_width"):"550",mapWidth:r(this).attr("data-container_width")?r(this).attr("data-container_width")-125:"425",pleiadesFlickrGroupOnly:!1,type:"search"};t.includesGoogleMaps2()&&(i.displayMap=!1),i.debug&&console.log("CREATING WIDGET widgetID:"+i.widgetID+" baseURL:"+i.baseURL),widget=new e.Widget(i),widget.setTypeSearch()})})})})()}define("search",function(){});var requirejs,require,define;(function(global){function isFunction(e){return ostring.call(e)==="[object Function]"}function isArray(e){return ostring.call(e)==="[object Array]"}function each(e,t){if(e){var n;for(n=0;n-1;n-=1)if(e[n]&&t(e[n],n,e))break}}function hasProp(e,t){return e.hasOwnProperty(t)}function eachProp(e,t){var n;for(n in e)if(e.hasOwnProperty(n)&&t(e[n],n))break}function mixin(e,t,n,r){return t&&eachProp(t,function(t,i){if(n||!hasProp(e,i))r&&typeof t!="string"?(e[i]||(e[i]={}),mixin(e[i],t,n,r)):e[i]=t}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeContextModuleFunc(e,t,n){return function(){var r=aps.call(arguments,0),i;return n&&isFunction(i=r[r.length-1])&&(i.__requireJsBuild=!0),r.push(t),e.apply(null,r)}}function addRequireMethods(e,t,n){each([["toUrl"],["undef"],["defined","requireDefined"],["specified","requireSpecified"]],function(r){var i=r[1]||r[0];e[r[0]]=t?makeContextModuleFunc(t[i],n):function(){var e=contexts[defContextName];return e[i].apply(e,arguments)}})}function makeError(e,t,n,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=r,n&&(i.originalError=n),i}function newContext(e){function v(e){var t,n;for(t=0;e[t];t+=1){n=e[t];if(n===".")e.splice(t,1),t-=1;else if(n===".."){if(t===1&&(e[2]===".."||e[0]===".."))break;t>0&&(e.splice(t-1,2),t-=2)}}}function m(e,n,r){var i=n&&n.split("/"),s=i,o=t.map,u=o&&o["*"],a,f,l,c,h,p,d,m;e&&e.charAt(0)==="."&&(n?(t.pkgs[n]?s=i=[n]:s=i.slice(0,i.length-1),e=s.concat(e.split("/")),v(e),f=t.pkgs[a=e[0]],e=e.join("/"),f&&e===a+"/"+f.main&&(e=a)):e.indexOf("./")===0&&(e=e.substring(2)));if(r&&(i||u)&&o){c=e.split("/");for(h=c.length;h>0;h-=1){d=c.slice(0,h).join("/");if(i)for(p=i.length;p>0;p-=1){l=o[i.slice(0,p).join("/")];if(l){l=l[d];if(l){m=l;break}}}!m&&u&&u[d]&&(m=u[d]);if(m){c.splice(0,h,m),e=c.join("/");break}}}return e}function g(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===h.contextName)return t.parentNode.removeChild(t),!0})}function y(e){var n=t.paths[e];if(n&&isArray(n)&&n.length>1)return g(e),n.shift(),h.undef(e),h.require([e]),!0}function b(e,t,n,r){var i=e?e.indexOf("!"):-1,o=null,f=t?t.name:null,l=e,c=!0,p="",d,v,g;return e||(c=!1,e="_@r"+(u+=1)),i!==-1&&(o=e.substring(0,i),e=e.substring(i+1,e.length)),o&&(o=m(o,f,r),v=s[o]),e&&(o?v&&v.normalize?p=v.normalize(e,function(e){return m(e,f,r)}):p=m(e,f,r):(p=m(e,f,r),d=h.nameToUrl(p))),g=o&&!v&&!n?"_unnormalized"+(a+=1):"",{prefix:o,name:p,parentMap:t,unnormalized:!!g,url:d,originalName:l,isDefine:c,id:(o?o+"!"+p:p)+g}}function w(e){var t=e.id,r=n[t];return r||(r=n[t]=new h.Module(e)),r}function E(e,t,r){var i=e.id,o=n[i];hasProp(s,i)&&(!o||o.defineEmitComplete)?t==="defined"&&r(s[i]):w(e).on(t,r)}function S(e,t){var r=e.requireModules,i=!1;t?t(e):(each(r,function(t){var r=n[t];r&&(r.error=e,r.events.error&&(i=!0,r.emit("error",e)))}),i||req.onError(e))}function x(){globalDefQueue.length&&(apsp.apply(i,[i.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function T(e,t,n){var r=e&&e.map,i=makeContextModuleFunc(n||h.require,r,t);return addRequireMethods(i,h,r),i.isBrowser=isBrowser,i}function N(e){delete n[e],each(f,function(t,n){if(t.map.id===e)return f.splice(n,1),t.defined||(h.waitCount-=1),!0})}function C(e,t){var r=e.map.id,i=e.depMaps,s;if(!e.inited)return;return t[r]?e:(t[r]=!0,each(i,function(e){var i=e.id,o=n[i];if(!o)return;return!o.inited||!o.enabled?(s=null,delete t[r],!0):s=C(o,mixin({},t))}),s)}function k(e,t,r){var i=e.map.id,o=e.depMaps;if(!e.inited||!e.map.isDefine)return;return t[i]?s[i]:(t[i]=e,each(o,function(s){var o=s.id,u=n[o],a;if(p[o])return;if(u){if(!u.inited||!u.enabled){r[i]=!0;return}a=k(u,t,r),r[o]||e.defineDepById(o,a)}}),e.check(!0),s[i])}function L(e){e.check()}function A(){var e=t.waitSeconds*1e3,r=e&&h.startTime+e<(new Date).getTime(),i=[],s=!1,o=!0,u,a,c,p;if(l)return;l=!0,eachProp(n,function(e){u=e.map,a=u.id;if(!e.enabled)return;if(!e.error)if(!e.inited&&r)y(a)?(p=!0,s=!0):(i.push(a),g(a));else if(!e.inited&&e.fetched&&u.isDefine){s=!0;if(!u.prefix)return o=!1}});if(r&&i.length)return c=makeError("timeout","Load timeout for modules: "+i,null,i),c.contextName=h.contextName,S(c);o&&(each(f,function(e){if(e.defined)return;var t=C(e,{}),n={};t&&(k(t,n,{}),eachProp(n,L))}),eachProp(n,L)),(!r||p)&&s&&(isBrowser||isWebWorker)&&!d&&(d=setTimeout(function(){d=0,A()},50)),l=!1}function O(e){w(b(e[0],null,!0)).init(e[1],e[2])}function M(e,t,n,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(n,t,!1)}function _(e){var t=e.currentTarget||e.srcElement;return M(t,h.onScriptLoad,"load","onreadystatechange"),M(t,h.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}var t={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{}},n={},r={},i=[],s={},o={},u=1,a=1,f=[],l,c,h,p,d;return p={require:function(e){return T(e)},exports:function(e){e.usingExports=!0;if(e.map.isDefine)return e.exports=s[e.map.id]={}},module:function(e){return e.module={id:e.map.id,uri:e.map.url,config:function(){return t.config&&t.config[e.map.id]||{}},exports:s[e.map.id]}}},c=function(e){this.events=r[e.id]||{},this.map=e,this.shim=t.shim[e.id],this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},c.prototype={init:function(e,t,n,r){r=r||{};if(this.inited)return;this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.depMaps.rjsSkipMap=e.rjsSkipMap,this.errback=n,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check()},defineDepById:function(e,t){var n;return each(this.depMaps,function(t,r){if(t.id===e)return n=r,!0}),this.defineDep(n,t)},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(this.fetched)return;this.fetched=!0,h.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();T(this,!0)(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))},load:function(){var e=this.map.url;o[e]||(o[e]=!0,h.load(this.map.id,e))},check:function(e){if(!this.enabled||this.enabling)return;var t=this.map.id,r=this.depExports,i=this.exports,o=this.factory,u,a;if(!this.inited)this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error)try{i=h.execCb(t,o,r,i)}catch(l){u=l}else i=h.execCb(t,o,r,i);this.map.isDefine&&(a=this.module,a&&a.exports!==undefined&&a.exports!==this.exports?i=a.exports:i===undefined&&this.usingExports&&(i=this.exports));if(u)return u.requireMap=this.map,u.requireModules=[this.map.id],u.requireType="define",S(this.error=u)}else i=o;this.exports=i,this.map.isDefine&&!this.ignore&&(s[t]=i,req.onResourceLoad&&req.onResourceLoad(h,this.map,this.depMaps)),delete n[t],this.defined=!0,h.waitCount-=1,h.waitCount===0&&(f=[])}this.defining=!1,e||this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}},callPlugin:function(){var e=this.map,r=e.id,i=b(e.prefix,null,!1,!0);E(i,"defined",bind(this,function(i){var s=this.map.name,o=this.map.parentMap?this.map.parentMap.name:null,u,a,f;if(this.map.unnormalized){i.normalize&&(s=i.normalize(s,function(e){return m(e,o,!0)})||""),a=b(e.prefix+"!"+s,this.map.parentMap,!1,!0),E(a,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),f=n[a.id],f&&(this.events.error&&f.on("error",bind(this,function(e){this.emit("error",e)})),f.enable());return}u=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),u.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[r],eachProp(n,function(e){e.map.id.indexOf(r+"_unnormalized")===0&&N(e.map.id)}),S(e)}),u.fromText=function(e,t){var n=useInteractive;n&&(useInteractive=!1),w(b(e)),req.exec(t),n&&(useInteractive=!0),h.completeLoad(e)},i.load(e.name,T(e.parentMap,!0,function(e,t){return e.rjsSkipMap=!0,h.require(e,t)}),u,t)})),h.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){this.enabled=!0,this.waitPushed||(f.push(this),h.waitCount+=1,this.waitPushed=!0),this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var r,i,s;if(typeof e=="string"){e=b(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.depMaps.rjsSkipMap),this.depMaps[t]=e,s=p[e.id];if(s){this.depExports[t]=s(this);return}this.depCount+=1,E(e,"defined",bind(this,function(e){this.defineDep(t,e),this.check()})),this.errback&&E(e,"error",this.errback)}r=e.id,i=n[r],!p[r]&&i&&!i.enabled&&h.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=n[e.id];t&&!t.enabled&&h.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),e==="error"&&delete this.events[e]}},h={config:t,contextName:e,registry:n,defined:s,urlFetched:o,waitCount:0,defQueue:i,Module:c,makeModuleMap:b,configure:function(e){e.baseUrl&&e.baseUrl.charAt(e.baseUrl.length-1)!=="/"&&(e.baseUrl+="/");var r=t.pkgs,i=t.shim,s=t.paths,o=t.map;mixin(t,e,!0),t.paths=mixin(s,e.paths,!0),e.map&&(t.map=mixin(o||{},e.map,!0,!0)),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),e.exports&&!e.exports.__buildReady&&(e.exports=h.makeShimExports(e.exports)),i[t]=e}),t.shim=i),e.packages&&(each(e.packages,function(e){var t;e=typeof e=="string"?{name:e}:e,t=e.location,r[e.name]={name:e.name,location:t||e.name,main:(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),t.pkgs=r),eachProp(n,function(e,t){e.map=b(t)}),(e.deps||e.callback)&&h.require(e.deps||[],e.callback)},makeShimExports:function(e){var t;return typeof e=="string"?(t=function(){return getGlobal(e)},t.exports=e,t):function(){return e.apply(global,arguments)}},requireDefined:function(e,t){return hasProp(s,b(e,t,!1,!0).id)},requireSpecified:function(e,t){return e=b(e,t,!1,!0).id,hasProp(s,e)||hasProp(n,e)},require:function(t,n,r,o){var u,a,f,l,c;if(typeof t=="string")return isFunction(n)?S(makeError("requireargs","Invalid require call"),r):req.get?req.get(h,t,n):(u=t,o=n,f=b(u,o,!1,!0),a=f.id,hasProp(s,a)?s[a]:S(makeError("notloaded",'Module name "'+a+'" has not been loaded yet for context: '+e)));r&&!isFunction(r)&&(o=r,r=undefined),n&&!isFunction(n)&&(o=n,n=undefined),x();while(i.length){c=i.shift();if(c[0]===null)return S(makeError("mismatch","Mismatched anonymous define() module: "+c[c.length-1]));O(c)}return l=w(b(null,o)),l.init(t,n,r,{enabled:!0}),A(),h.require},undef:function(e){var t=b(e,null,!0),i=n[e];delete s[e],delete o[t.url],delete r[e],i&&(i.events.defined&&(r[e]=i.events),N(e))},enable:function(e,t){var r=n[e.id];r&&w(e).enable()},completeLoad:function(e){var r=t.shim[e]||{},o=r.exports&&r.exports.exports,u,a,f;x();while(i.length){a=i.shift();if(a[0]===null){a[0]=e;if(u)break;u=!0}else a[0]===e&&(u=!0);O(a)}f=n[e];if(!u&&!s[e]&&f&&!f.inited){if(t.enforceDefine&&(!o||!getGlobal(o))){if(y(e))return;return S(makeError("nodefine","No define call for "+e,null,[e]))}O([e,r.deps||[],r.exports])}A()},toUrl:function(e,t){var n=e.lastIndexOf("."),r=null;return n!==-1&&(r=e.substring(n,e.length),e=e.substring(0,n)),h.nameToUrl(m(e,t&&t.id,!0),r)},nameToUrl:function(e,n){var r,i,s,o,u,a,f,l,c;if(req.jsExtRegExp.test(e))l=e+(n||"");else{r=t.paths,i=t.pkgs,u=e.split("/");for(a=u.length;a>0;a-=1){f=u.slice(0,a).join("/"),s=i[f],c=r[f];if(c){isArray(c)&&(c=c[0]),u.splice(0,a,c);break}if(s){e===s.name?o=s.location+"/"+s.main:o=s.location,u.splice(0,a,o);break}}l=u.join("/")+(n||".js"),l=(l.charAt(0)==="/"||l.match(/^[\w\+\.\-]+:/)?"":t.baseUrl)+l}return t.urlArgs?l+((l.indexOf("?")===-1?"?":"&")+t.urlArgs):l},load:function(e,t){req.load(h,e,t)},execCb:function(e,t,n,r){return t.apply(r,n)},onScriptLoad:function(e){if(e.type==="load"||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=_(e);h.completeLoad(t.id)}},onScriptError:function(e){var t=_(e);if(!y(t.id))return S(makeError("scripterror","Script error",e,[t.id]))}}}function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"?interactiveScript:(eachReverse(scripts(),function(e){if(e.readyState==="interactive")return interactiveScript=e}),interactiveScript)}var version="2.0.4",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,ostring=Object.prototype.toString,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=typeof window!="undefined"&&!!navigator&&!!document,isWebWorker=!isBrowser&&typeof importScripts!="undefined",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!="undefined"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1,req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath;if(typeof define!="undefined")return;if(typeof requirejs!="undefined"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=undefined}typeof require!="undefined"&&!isFunction(require)&&(cfg=require,require=undefined),req=requirejs=function(e,t,n,r){var i=defContextName,s,o;return!isArray(e)&&typeof e!="string"&&(o=e,isArray(t)?(e=t,t=n,n=r):e=[]),o&&o.context&&(i=o.context),s=contexts[i],s||(s=contexts[i]=req.s.newContext(i)),o&&s.configure(o),s.require(e,t,n)},req.config=function(e){return req(e)},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),addRequireMethods(req),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=function(e){throw e},req.load=function(e,t,n){var r=e&&e.config||{},i;if(isBrowser)return i=r.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),i.type=r.scriptType||"text/javascript",i.charset="utf-8",i.async=!0,i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),i.attachEvent&&!(i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)):(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)),i.src=n,currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;isWebWorker&&(importScripts(n),e.completeLoad(t))},isBrowser&&eachReverse(scripts(),function(e){head||(head=e.parentNode),dataMain=e.getAttribute("data-main");if(dataMain)return cfg.baseUrl||(src=dataMain.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath,dataMain=mainScript),dataMain=dataMain.replace(jsSuffixRegExp,""),cfg.deps=cfg.deps?cfg.deps.concat(dataMain):[dataMain],!0}),define=function(e,t,n){var r,i;typeof e!="string"&&(n=t,t=e,e=null),isArray(t)||(n=t,t=[]),!t.length&&isFunction(n)&&n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(n.length===1?["require"]:["require","exports","module"]).concat(t)),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(e||(e=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")])),(i?i.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)})(this),define("requireLib",function(){}) \ No newline at end of file +define("app/util",["jquery"],function(e){function t(e){var t=e.replace(/ /g,"");return t=t.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""),t}function n(){return typeof GMap2!="undefined"}function r(t,n,r,i,s){var o={type:"POST",dataType:"json",timeout:i,success:n,error:r};r||(o.error=function(e,n,r){console.log("ERROR: Call to "+t+" failed: "+n),console.log(e)});if(!s)e.ajax(t,o);else{try{var u=new XMLHttpRequest}catch(r){var u={}}if("withCredentials"in u)e.ajax(t,o);else if(typeof XDomainRequest!="undefined"){var a=new XDomainRequest;a.timeout=i,a.open("get",t),a.onload=function(){n(e.parseJSON(a.responseText),"",a)},a.onerror=r,a.send()}}}return{createID:t,includesGoogleMaps2:n,getAPIData:r}}),define("app/loadGMaps",[],function(){function t(){if(e!=null)return e;e=typeof GMap2=="undefined"}var e;return{load:function(e,n,r,i){i.isBuild||t()?r(null):window.setTimeout(function(){n([e],r)},500)}}}),define("app/search_map",["app/loadGMaps!lib/async!http://maps.google.com/maps/api/js?sensor=false"],function(){function e(e){if(!document.getElementById(e))throw Error("ERROR: Invalid ID for search map");try{var t=new google.maps.Map(document.getElementById(e),{mapTypeId:google.maps.MapTypeId.TERRAIN})}catch(n){console.log("ERROR: Failed to create Google Map for element id "+e+" : "+n)}var r=new google.maps.LatLngBounds,i=new google.maps.InfoWindow;this.refresh=function(){google.maps.event.trigger(t,"resize"),t.fitBounds(r)},this.addMarker=function(e,n,s,o){if(e.hasOwnProperty("geometry")&&e.geometry!=null&&e.geometry.hasOwnProperty("type")&&e.geometry.type=="Point"){var u=new google.maps.LatLng(e.geometry.coordinates[1],e.geometry.coordinates[0]),a=new google.maps.Marker({position:u,map:t,title:n});r.extend(u),google.maps.event.addListener(a,"click",function(){return function(){i.close(),i.setContent(s),i.open(t,a),o()}}())}}}return{SearchMap:e}}),define("app/place_map",["app/loadGMaps!lib/async!http://maps.google.com/maps/api/js?sensor=false"],function(){function e(e){if(!document.getElementById(e))throw Error("ERROR: Invalid ID for place map");try{var t=new google.maps.Map(document.getElementById(e),{zoom:8,mapTypeId:google.maps.MapTypeId.TERRAIN})}catch(n){console.log("ERROR: Failed to crate Google map for element id "+e+" : "+n)}try{var r=new google.maps.Marker({map:t})}catch(n){console.log("ERROR: Failed to create Google Map marker : "+n)}this.refresh=function(){try{google.maps.event.trigger(t,"resize")}catch(e){console.log("ERROR: Failed to resize Google map :"+e)}try{t.setCenter(r.getPosition())}catch(e){console.log("ERROR: Failed to center Google Map : "+e)}},this.setMarker=function(e,n){try{var i=new google.maps.LatLng(e[1],e[0])}catch(s){console.log("ERROR: Failed to create Google Maps location : "+s)}try{r.setPosition(i)}catch(s){console.log("ERROR: Failed to set marker position : "+s)}try{r.setTitle(n)}catch(s){console.log("ERROR: Failed to set marker title : "+s)}try{t.setCenter(i)}catch(s){console.log("ERROR: Failed to center Google Map : "+s)}try{google.maps.event.trigger(t,"resize")}catch(s){console.log("ERROR: Failed to resize Google Map : "+s)}}}return{PlaceMap:e}}),define("lib/text",["module"],function(e){var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],n=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,r=/]*>\s*([\s\S]+)\s*<\/body>/im,i=typeof location!="undefined"&&location.href,s=i&&location.protocol&&location.protocol.replace(/\:/,""),o=i&&location.hostname,u=i&&(location.port||undefined),a=[],f=e.config(),l,c;return l={version:"2.0.0",strip:function(e){if(e){e=e.replace(n,"");var t=e.match(r);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var e,n,r;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(n=0;n<3;n++){r=t[n];try{e=new ActiveXObject(r)}catch(i){}if(e){t=[r];break}}return e},parseName:function(e){var t=!1,n=e.indexOf("."),r=e.substring(0,n),i=e.substring(n+1,e.length);return n=i.indexOf("!"),n!==-1&&(t=i.substring(n+1,i.length),t=t==="strip",i=i.substring(0,n)),{moduleName:r,ext:i,strip:t}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,t,n,r){var i=l.xdRegExp.exec(e),s,o,u;return i?(s=i[2],o=i[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===t)&&(!o||o===n)&&(!u&&!o||u===r)):!0},finishLoad:function(e,t,n,r){n=t?l.strip(n):n,f.isBuild&&(a[e]=n),r(n)},load:function(e,t,n,r){if(r.isBuild&&!r.inlineText){n();return}f.isBuild=r.isBuild;var a=l.parseName(e),c=a.moduleName+"."+a.ext,h=t.toUrl(c),p=f.useXhr||l.useXhr;!i||p(h,s,o,u)?l.get(h,function(t){l.finishLoad(e,a.strip,t,n)},function(e){n.error&&n.error(e)}):t([c],function(e){l.finishLoad(a.moduleName+"."+a.ext,a.strip,e,n)})},write:function(e,t,n,r){if(a.hasOwnProperty(t)){var i=l.jsEscape(a[t]);n.asModule(e+"!"+t,"define(function () { return '"+i+"';});\n")}},writeFile:function(e,t,n,r,i){var s=l.parseName(t),o=s.moduleName+"."+s.ext,u=n.toUrl(s.moduleName+"."+s.ext)+".js";l.load(o,n,function(t){var n=function(e){return r(u,e)};n.asModule=function(e,t){return r.asModule(e,u,t)},l.write(e,o,n,i)},i)}},typeof process!="undefined"&&process.versions&&!!process.versions.node?(c=require.nodeRequire("fs"),l.get=function(e,t){var n=c.readFileSync(e,"utf8");n.indexOf("")===0&&(n=n.substring(1)),t(n)}):l.createXhr()?l.get=function(e,t,n){var r=l.createXhr();r.open("GET",e,!0),f.onXhr&&f.onXhr(r,e),r.onreadystatechange=function(i){var s,o;r.readyState===4&&(s=r.status,s>399&&s<600?(o=new Error(e+" HTTP status: "+s),o.xhr=r,n(o)):t(r.responseText))},r.send(null)}:typeof Packages!="undefined"&&(l.get=function(e,t){var n="utf-8",r=new java.io.File(e),i=java.lang.System.getProperty("line.separator"),s=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r),n)),o,u,a="";try{o=new java.lang.StringBuffer,u=s.readLine(),u&&u.length()&&u.charAt(0)===65279&&(u=u.substring(1)),o.append(u);while((u=s.readLine())!==null)o.append(i),o.append(u);a=String(o.toString())}finally{s.close()}t(a)}),l}),define("lib/text!template/widget_container.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'widget_container\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n \\r\\n \\"Close\\r\\n \\r\\n ";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\"Information \\r\\n";\n return buffer;}\n\n buffer += "
    \\r\\n
    \\r\\n \\"View \\r\\n ";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.icon);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.icon);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += " ";\n return buffer;});\n})();'}),define("lib/text!template/place.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'place\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "
    \\r\\n
    \\r\\n
    \\r\\n\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/section.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'section\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "
    \\r\\n
    \\r\\n\\"\\"\\r\\n

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n\\"Toggle\\r\\n

    ";\n foundHelper = helpers.strapline;\n stack1 = foundHelper || depth0.strapline;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "strapline", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/flickr.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'flickr\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\r\\n\\"";\n\\r\\n\\r\\n";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    View all ";\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.length);\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "photo.length", { hash: {} }); }\n buffer += escapeExpression(stack1) + " photos on flickr

    \\r\\n";\n return buffer;}\n\nfunction program5(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    View all ";\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.length);\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "photo.length", { hash: {} }); }\n buffer += escapeExpression(stack1) + " photos on flickr

    \\r\\n";\n return buffer;}\n\n foundHelper = helpers.photo;\n stack1 = foundHelper || depth0.photo;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.pleiadesFlickrGroupOnly);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.pleiadesFlickrGroupOnly);\n stack2 = helpers.unless;\n tmp1 = self.program(5, program5, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n

    The flickr photos shown here are those which have been given a Pleiades machine tag specifying this place.

    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/pleiades.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'pleiades\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n

    Some alternative names: ";\n foundHelper = helpers.altNames;\n stack1 = foundHelper || depth0.altNames;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "altNames", { hash: {} }); }\n buffer += escapeExpression(stack1) + " (the results below are for all alternative names)

    \\r\\n ";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += " \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n ";\n return buffer;}\n\n buffer += "

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n

    ";\n foundHelper = helpers.description;\n stack1 = foundHelper || depth0.description;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "description", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n ";\n foundHelper = helpers.altNames;\n stack1 = foundHelper || depth0.altNames;\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n ";\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.displayMap);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n

    \\r\\n Entry in the Pleiades Gazetteer

    \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/pelagios_partner.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'pelagios_partner\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1, stack2;\n buffer += "\\r\\n\\r\\n
  • \\r\\n\\r\\n ";\n stack1 = depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "\\r\\n \\r\\n ";\n stack1 = depth0.references;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.references", { hash: {} }); }\n buffer += escapeExpression(stack1) + " hit";\n stack1 = depth0.multipleReferences;\n stack2 = helpers[\'if\'];\n tmp1 = self.program(2, program2, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n \\r\\n \\r\\n\\r\\n
    \\r\\n\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
  • \\r\\n\\r\\n";\n return buffer;}\nfunction program2(depth0,data) {\n \n \n return "s";}\n\n buffer += "
      \\r\\n";\n foundHelper = helpers.subdataset;\n stack1 = foundHelper || depth0.subdataset;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += " \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/error.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'error\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "

    ";\n foundHelper = helpers.title;\n stack1 = foundHelper || depth0.title;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "title", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n

    ";\n foundHelper = helpers.msg;\n stack1 = foundHelper || depth0.msg;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "msg", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/search.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'search\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "

    Search for places

    \\r\\n
    \\r\\n \\r\\n \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n \\r\\n \\r\\n \\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/annotations.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'annotations\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n
  • ";\n stack1 = depth0.label;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "this.label", { hash: {} }); }\n buffer += escapeExpression(stack1) + "
  • \\r\\n";\n return buffer;}\n\n buffer += "
      \\r\\n";\n foundHelper = helpers.annotation;\n stack1 = foundHelper || depth0.annotation;\n stack2 = helpers.each;\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/search_results.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'search_results\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, stack2, foundHelper, tmp1, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n var buffer = "", stack1;\n buffer += " \\r\\n
    \\r\\n

    Geographic Results for: ";\n foundHelper = helpers.searchString;\n stack1 = foundHelper || depth0.searchString;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "searchString", { hash: {} }); }\n buffer += escapeExpression(stack1) + "

    \\r\\n
    \\r\\n
    \\r\\n";\n return buffer;}\n\nfunction program3(depth0,data) {\n \n var buffer = "", stack1;\n buffer += "\\r\\n\\r\\n";\n return buffer;}\n\n foundHelper = helpers.widgetContext;\n stack1 = foundHelper || depth0.widgetContext;\n stack1 = (stack1 === null || stack1 === undefined || stack1 === false ? stack1 : stack1.displayMap);\n stack2 = helpers[\'if\'];\n tmp1 = self.program(1, program1, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n

    List Results for: ";\n foundHelper = helpers.searchString;\n stack1 = foundHelper || depth0.searchString;\n if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }\n else if(stack1=== undef) { stack1 = helperMissing.call(depth0, "searchString", { hash: {} }); }\n buffer += escapeExpression(stack1) + "\\r\\n

    \\r\\n
      \\r\\n";\n foundHelper = helpers.place;\n stack1 = foundHelper || depth0.place;\n stack2 = helpers.each;\n tmp1 = self.program(3, program3, data);\n tmp1.hash = {};\n tmp1.fn = tmp1;\n tmp1.inverse = self.noop;\n stack1 = stack2.call(depth0, stack1, tmp1);\n if(stack1 || stack1 === 0) { buffer += stack1; }\n buffer += "\\r\\n
    \\r\\n
    \\r\\n
    ";\n return buffer;});\n})();'}),define("lib/text!template/new_tab.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'new_tab\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var buffer = "", stack1, foundHelper, self=this, functionType="function", helperMissing=helpers.helperMissing, undef=void 0, escapeExpression=this.escapeExpression;\n\n\n buffer += "\\r\\n\\r\\n \\r\\n\\r\\n \\r\\n \\r\\n\\r\\n
    \\r\\n\\r\\n";\n return buffer;});\n})();'}),define("lib/text!template/about.tmpl",[],function(){return'(function() {\n var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\ntemplates[\'about\'] = template(function (Handlebars,depth0,helpers,partials,data) {\n helpers = helpers || Handlebars.helpers;\n var foundHelper, self=this;\n\n\n return "

    This widget displays data from the Pelagios project partners about the location specified.

    \\r\\n

    View the Pelagios website\\r\\n for more information.\\r\\n ";});\n})();'}),define("lib/text!app/dataset.json",[],function(){return'[{\r\n "id": "b47df24737cd647789c7d61ede9fed09",\r\n "iconFileName": "arachne.png",\r\n "title": "Arachne",\r\n "strapline": "A web research tool of the German Archaeological Institute for searching mass archaeological records"\r\n},\r\n{\r\n "id": "6a39d0bc3c0fd4ef7d2a837b42cf46a1",\r\n "title": "Google Ancient Places",\r\n "iconFileName": "gap_logo.png",\r\n "strapline": "A Geographic Annotation Platform for reading texts spatially"\r\n}\r\n,\r\n{\r\n "id": "2db51c1dd976f01bf993a02f959e18f8",\r\n "title": "nomisma",\r\n "iconFileName": "Greek.jpeg",\r\n "strapline": "Representing ancient coins online"\r\n}\r\n,\r\n{\r\n "id": "298fafd65586643149e8a8ba47b57052",\r\n "title": "SPQR",\r\n "iconFileName": "SPQR.png",\r\n "strapline": "From Roman inscriptions to resource descriptions"\r\n}\r\n,\r\n{\r\n "id": "",\r\n "title": "Regnum Francorum Online",\r\n "iconFileName": "Regnum.png",\r\n "strapline": "Interactive Maps and Sources of Late Antique and Early Medieval Europe"\r\n}\r\n,\r\n{\r\n "id": "21e48d8ca46f666467b81a551fbb1cb",\r\n "title": "Perseus",\r\n "iconFileName": "Perseus.png",\r\n "strapline": "Annotated occurrences of place entities in texts from the Perseus Digital Library"\r\n}\r\n,\r\n{\r\n "id": "c4c2ed780a8f4f2b698a5c2505ac34ca",\r\n "title": "CLAROS",\r\n "iconFileName": "CLAROS.png",\r\n "strapline": "Aggregated search of art and archaeology data from the classical world and the far east across four millennia"\r\n}\r\n,\r\n{\r\n "id": "739128af1e9613de03706a57cef46976",\r\n "title": "Open Context",\r\n "iconFileName": "open-context.png",\r\n "strapline": "Publications of research data in archaeology and related fields"\r\n}\r\n,\r\n{\r\n "id": "467b9097b55b6e0831fe6760df93e7f2",\r\n "title": "FASTI Online",\r\n "iconFileName": "FASTI.png",\r\n "strapline": "A database of archaeological excavations since the year 2000"\r\n}\r\n,\r\n{\r\n "id": "a306666ae581e8d611d56a1dfdaea256",\r\n "title": "Ure Museum",\r\n "iconFileName": "URE.png",\r\n "strapline": "University Museum of ancient Greek, Egyptian & a little Roman stuff"\r\n}\r\n,\r\n{\r\n "id": "5555ffd0e36e088c25f76b980139851a",\r\n "title": "ORBIS",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The Stanford Geospatial Network Model of the Roman World"\r\n}\r\n,\r\n{\r\n"id": "4f9bb4e7c0b0c329db0d2696814ffd2d",\r\n "title": "SquinchPix",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "An archive of European imagery"\r\n}\r\n,\r\n{\r\n "id": "77b38b7fc7d81fb278d1c3634638f8ee",\r\n "title": "Sharing Ancient Wisdoms ",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Medieval gnomologia (collections of wise sayings)"\r\n}\r\n,\r\n{\r\n "id": "434fc5aea15f6d39040c1282c4a2df63",\r\n "title": "Portable Antiquities Scheme",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing within the Portable Antiquities Scheme database"\r\n}\r\n,\r\n{\r\n "id": "9fdb2911bcfc625c87cfce10d97b3de7",\r\n "title": "ORACC",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Open Richly Annotated Cuneiform Corpus"\r\n}\r\n,\r\n{\r\n "id": "7bb4b28758a3607f9b1eea3b48df90a",\r\n "title": "Meketre",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Reliefs and paintings of Middle Kingdom tombs of Ancient Egypt"\r\n}\r\n,\r\n{\r\n "id": "71fd46410b14843985db023501f2f76f",\r\n "title": "The Book of the Dead Project",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "The evolution of the ancient egyptian Book of the Dead"\r\n}\r\n,\r\n{\r\n "id": "e2e0b0b2199b875ff3acdce3f962c128",\r\n "title": "ISAW Papers",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Pleiades URIs appearing in ISAW Papers articles"\r\n}\r\n,\r\n{\r\n "id": "e9e161a08db2906d135d7abefb145636",\r\n "title": "OCRE",\r\n "iconFileName": "pelagios.png",\r\n "strapline": "Online Coins of the Roman Empire"\r\n}\r\n]\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n'}),define("lib/jquery_pagination",["jquery"],function(e){(function(e){e.PaginationCalculator=function(e,t){this.maxentries=e,this.opts=t},e.extend(e.PaginationCalculator.prototype,{numPages:function(){return Math.ceil(this.maxentries/this.opts.items_per_page)},getInterval:function(e){var t=Math.floor(this.opts.num_display_entries/2),n=this.numPages(),r=n-this.opts.num_display_entries,i=e>t?Math.max(Math.min(e-t,r),0):0,s=e>t?Math.min(e+t+this.opts.num_display_entries%2,n):Math.min(this.opts.num_display_entries,n);return{start:i,end:s}}}),e.PaginationRenderers={},e.PaginationRenderers.defaultRenderer=function(t,n){this.maxentries=t,this.opts=n,this.pc=new e.PaginationCalculator(t,n)},e.extend(e.PaginationRenderers.defaultRenderer.prototype,{createLink:function(t,n,r){var i,s=this.pc.numPages();return t=t<0?0:t"+r.text+""):i=e(""+r.text+"").attr("href",this.opts.link_to.replace(/__id__/,t)),r.classes&&i.addClass(r.classes),i.data("page_id",t),i},appendRange:function(e,t,n,r,i){var s;for(s=n;s

    ");return this.opts.prev_text&&(t>0||this.opts.prev_show_always)&&u.append(this.createLink(t-1,t,{text:this.opts.prev_text,classes:"prev"})),s.start>0&&this.opts.num_edge_entries>0&&(i=Math.min(this.opts.num_edge_entries,s.start),this.appendRange(u,t,0,i,{classes:"sp"}),this.opts.num_edge_entries"+this.opts.ellipse_text+"").appendTo(u)),this.appendRange(u,t,s.start,s.end),s.end0&&(o-this.opts.num_edge_entries>s.end&&this.opts.ellipse_text&&e(""+this.opts.ellipse_text+"").appendTo(u),r=Math.max(o-this.opts.num_edge_entries,s.end),this.appendRange(u,t,r,o,{classes:"ep"})),this.opts.next_text&&(t=0&&t0&&a(n-1),!1}),r.bind("nextPage",{numPages:l},function(t){var n=e(this).data("current_page");return n1||n.show_if_single_page)&&s.appendTo(r),n.load_first_page&&n.callback(o,r)}})(jQuery)}),define("app/pelagios",["jquery","app/util","app/search_map","app/place_map","lib/text!template/widget_container.tmpl","lib/text!template/place.tmpl","lib/text!template/section.tmpl","lib/text!template/flickr.tmpl","lib/text!template/pleiades.tmpl","lib/text!template/pelagios_partner.tmpl","lib/text!template/error.tmpl","lib/text!template/search.tmpl","lib/text!template/annotations.tmpl","lib/text!template/search_results.tmpl","lib/text!template/new_tab.tmpl","lib/text!template/about.tmpl","lib/text!app/dataset.json","jqueryui","lib/jquery_pagination"],function($,util,search_map,place_map,widget_container_tmpl,place_tmpl,section_tmpl,flickr_tmpl,pleiades_tmpl,pelagios_partner_tmpl,error_tmpl,search_tmpl,annotations_tmpl,search_results_tmpl,new_tab_tmpl,about_tmpl,datasetJSON){function Widget(widgetContext){function widgetPopUp(){if(widgetContext.newTab){var e=window.open(),t=Handlebars.templates.new_tab({widgetContext:widgetContext});$(e.document.body).html(t);var n=document.createElement("script");n.type="text/javascript",n.src=widgetContext.baseURL+"lib/require.js",e.document.head.appendChild(n);var r=document.createElement("script");r.type="text/javascript",r.src=widgetContext.baseURL+"place.js",e.document.head.appendChild(r)}else{$(".pelagios .container").hide(),$("#"+widgetContext.widgetID+"-container").show();var i=$("#"+widgetContext.widgetID+"-icon").offset(),s={top:$(window).scrollTop(),left:200};$("#"+widgetContext.widgetID+"-container").offset(s),widgetContext.displayMap&&placeMap.hasOwnProperty("refresh")&&placeMap.refresh()}}function displayPlace(e){debug("DISPLAYING PLACE: pleiadesID: "+e),placeMap={},clearPlace(),showPleiadesData(e),widgetContext.type=="place"&&showAboutInformation(),showPelagiosData(e),showFlickrData(e)}function showAboutInformation(){addSection("about","About Pelagios and this widget",widgetContext.imageDir+"partner_icons/pelagios.png","");var e=Handlebars.templates.about();$("#"+widgetContext.widgetID+"-content-about").append(e)}function clearPlace(){$("#"+widgetContext.widgetID+"-pleiades").empty(),$("#"+widgetContext.widgetID+"-sections").empty()}function showFlickrData(e){function r(t){if(t.hasOwnProperty("photos")&&t.photos.hasOwnProperty("photo")&&t.photos.photo.length>0){addSection("flickr","flickr",widgetContext.imageDir+"icons/flickr-logo.png","Photo sharing website");var n={photo:t.photos.photo.slice(0,config.MAX_PHOTOS_FLICKR-1),pleiadesID:e},r=Handlebars.templates.flickr(n);$("#"+widgetContext.widgetID+"-content-flickr").append(r)}}var t="";widgetContext.pleiadesFlickrGroupOnly&&(t="&group_id=1876758@N22");var n=config.URL_FLICKR_SEARCH+"&machine_tags=pleiades:depicts="+e+t+"&tag_mode=all&api_key="+config.API_KEY_FLICKR+"&jsoncallback=?";util.getAPIData(n,r,!1,config.TIMEOUT_FLICKR,!1)}function showPleiadesData(e){function r(e,t,n){$("#"+widgetContext.widgetID+"-content").empty();if(e.status=="404")var r={title:config.MSG_TITLE_PLACE_NOT_FOUND,msg:config.MSG_PLACE_NOT_FOUND};else var r={title:config.MSG_TITLE_PLEIADES_TIMEOUT,msg:config.MSG_PLEIADES_TIMEOUT};var i=Handlebars.templates.error(r);$("#"+widgetContext.widgetID+"-content").append(i)}function i(e){var t=!1;e.names.length>1&&(t=e.names.join(", "));var n={title:e.names[0]?e.names[0]:"Untitled",description:e.description,altNames:t,pleiadesID:e.id,widgetContext:widgetContext},r=Handlebars.templates.pleiades(n);$("#"+widgetContext.widgetID+"-pleiades").append(r),e.reprPoint!=null&&widgetContext.displayMap&&(placeMap=new place_map.PlaceMap(widgetContext.widgetID+"-map_canvas"),placeMap.setMarker(e.reprPoint,e.names[0])),e.reprPoint==null&&(placeMap=null),showPlace()}var t=config.URL_PLEIADES+e,n=config.URL_PLEIADES+e+"/json";util.getAPIData(n,i,r,config.TIMEOUT_PLEIADES,!0)}function showPelagiosData(e){function n(e){$.each(e,function(n,i){i.hasOwnProperty("root_dataset")&&(i=i.root_dataset);var s;rootDatasetID=i.uri.replace(/http:\/\/pelagios.dme.ait.ac.at\/api\/datasets\//g,""),s=getDatasetInfo(rootDatasetID);if(typeof s!="undefined"){addSection(rootDatasetID,s.title,widgetContext.iconDir+s.iconFileName,s.strapline);var o=new Array;if(typeof i.subsets!="undefined")for(var u=0;u1?!0:!1,o[u].anyReferences=o[u].references>0?!0:!1;else o[0]={},o[0].widgetContext=widgetContext,o[0].title=i.title,o[0].id=rootDatasetID,o[0].references=e[n].annotations_referencing_place,o[0].multipleReferences=o[0].references>1?!0:!1;var a={subdataset:o,rootDatasetID:rootDatasetID,widgetContext:widgetContext},f=Handlebars.templates.pelagios_partner(a);$("#"+widgetContext.widgetID+"-content-"+rootDatasetID).append(f),$("#"+widgetContext.widgetID+"-subdatasets-"+rootDatasetID).css("list-style-image","url("+widgetContext.imageDir+"icons/bullet.png)");for(var u=0;u0&&s(e.annotations,n)};return util.getAPIData(r,i),!1}function s(e,t){var n=new Array;$.each(e,function(e,t){n[e]={},t.hasOwnProperty("target_title")?n[e].label=t.target_title:n[e].label=t.title?t.title:"Item "+(e+1),n[e].uri=t.hasTarget});var r={subdatasetID:t,annotation:n,widgetContext:widgetContext},i=Handlebars.templates.annotations(r);$("#"+widgetContext.widgetID+"-annotations-"+t).empty(),$("#"+widgetContext.widgetID+"-annotations-"+t).append(i),$("#"+widgetContext.widgetID+"-subdataset-"+t).focus()}function o(e){var t=e.data.id;toggleSelectedLink(widgetContext.widgetID+"-subdataset_hits-"+t),$("#"+widgetContext.widgetID+"-subdataset_content-"+t).toggle(),toggleIcon(widgetContext.widgetID+"-toggle-subdataset-"+t)}function u(e){$("#"+widgetID+"-subdataset_content-"+e).hide()}var t=config.URL_PELAGIOS_API_V2+"places/"+encodeURIComponent(config.URL_PLEIADES+e)+"/datasets.json?callback=?";util.getAPIData(t,n,!1,config.TIMEOUT_PELAGIOS,!1)}function displaySearchResults(){var e=config.URL_PELAGIOS_API_V2+"search.json?query="+searchString+"&callback=?";debug("RETRIEVING SEARCH DATA: searchString: "+searchString+" URL:"+e),util.getAPIData(e,displaySearchResultsData,!1,config.TIMEOUT_PELAGIOS,!1)}function displaySearchResultsData(e){$("#"+widgetContext.widgetID+"-search-map").empty(),$("#"+widgetContext.widgetID+"-search-results").empty(),$("#"+widgetContext.widgetID+"-pleiades").empty(),$("#"+widgetContext.widgetID+"-sections").empty();if(e.length>0){var t=new Array;$.each(e,function(e,n){place={},place.label=n.label,place.pleiadesID=n.uri.replace(/.*places.*F/g,""),place.geojson=n,n.feature_type&&(place.feature_type=n.feature_type.replace(/.*place-types\//g,"")),place.content="

    "+place.label+"

    ",place.content+='

    View info

    ',place.widgetID=widgetContext.widgetID,t[e]=place});var n={place:t,widgetContext:widgetContext,searchString:searchString},r=Handlebars.templates.search_results(n);$("#"+widgetContext.widgetID+"-search-results").append(r),$(".pelagios .list-results li").css("background-image","url("+widgetContext.imageDir+"place_type_icons/unknown.png)");var i={temple:"temple.png",santuary:"sanctuary.png",river:"river.png","water-open":"river.png",mountain:"mountain.png",island:"island.png",tribe:"tribe.png",settlement:"settlement.png",urban:"settlement.png",people:"people.png",aqueduct:"aqueduct.png",cape:"cape.png",mine:"mine.png",station:"port.png",road:"road.png",villa:"villa.png",wall:"wall.png",province:"people.png"};$.each(i,function(e,t){$(".pelagios .list-results li."+e).css("background-image","url("+widgetContext.imageDir+"place_type_icons/"+t+")")}),widgetContext.displayMap&&(searchMap=new search_map.SearchMap(widgetContext.widgetID+"-search-map_canvas")),$.each(t,function(e,t){widgetContext.displayMap&&searchMap.addMarker(t.geojson,t.label,t.content,function(){s(t.pleiadesID)}),$("#"+widgetContext.widgetID+"-place-"+t.pleiadesID).click(function(){s(t.pleiadesID)})});function s(e){$(".pelagios-search-result-list li").css("text-decoration","none"),$(".pelagios-search-result-list li").css("font-weight","normal"),$("#"+widgetContext.widgetID+"-place-"+e).css("text-decoration","underline"),$("#"+widgetContext.widgetID+"-place-"+e).css("font-weight","bold"),displayPlace(e)}showSearchResults()}else $("#"+widgetContext.widgetID+"-search-results").append("

    No matches found for '"+searchString+"'

    "),$("#"+widgetContext.widgetID+"-search-results").show()}function hideSearchResults(){$("#"+widgetContext.widgetID+"-search-results-map").hide(),$("#"+widgetContext.widgetID+"-search-results").hide()}function showSearchResults(){widgetContext.displayMap&&($("#"+widgetContext.widgetID+"-search-results-map").show(),searchMap.refresh()),$("#"+widgetContext.widgetID+"-search-results").show()}function hidePlace(){$("#"+widgetContext.widgetID+"-map").hide(),$("#"+widgetContext.widgetID+"-place").hide()}function showPlace(){$("#"+widgetContext.widgetID+"-place").show(),widgetContext.displayMap&&placeMap!=null&&($("#"+widgetContext.widgetID+"-map").show(),placeMap.refresh()),placeMap==null&&$("#"+widgetContext.widgetID+"-map").hide()}function addSection(e,t,n,r){var i={name:e,title:t,iconURL:n,strapline:r,widgetContext:widgetContext},s=Handlebars.templates.section(i);$("#"+widgetContext.widgetID+"-sections").append(s),$("#"+widgetContext.widgetID+"-content-"+e).hide(),$("#"+widgetContext.widgetID+"-header-"+e).click(function(){$("#"+widgetContext.widgetID+"-content-"+e).toggle(),toggleIcon(widgetContext.widgetID+"-toggle-"+e)})}function toggleIcon(e){var t=$("#"+e).attr("src"),n=t==widgetContext.imageDir+"icons/down-arrow.png"?widgetContext.imageDir+"icons/right-arrow.png":widgetContext.imageDir+"icons/down-arrow.png";$("#"+e).attr("src",n)}function toggleSelectedLink(e){var t=$("#"+e),n=t.css("text-decoration"),r=n=="underline"?"none":"underline";t.css("text-decoration",r)}function getDatasetInfo(e){var t;return $.each(dataset,function(e,n){n.id==rootDatasetID&&(t=n)}),t}function debug(e){widgetContext.debug&&console.log(e)}var placeMap={},searchMap={},searchString="";eval(widget_container_tmpl),eval(place_tmpl),eval(section_tmpl),eval(flickr_tmpl),eval(pleiades_tmpl),eval(pelagios_partner_tmpl),eval(error_tmpl),eval(search_tmpl),eval(annotations_tmpl),eval(search_results_tmpl),eval(new_tab_tmpl),eval(about_tmpl);var dataset=$.parseJSON(datasetJSON);typeof $("#"+widgetContext.widgetID)==undefined&&debug("ERROR: $(#"+widgetContext.widgetID+") is undefined"),$("head").append('');var html=Handlebars.templates.widget_container({widgetContext:widgetContext});$("#"+widgetContext.widgetID).append(html),$(".pelagios .container").width(widgetContext.containerWidth);try{$("#"+widgetContext.widgetID+"-container").draggable()}catch(err){debug("ERROR: Could not make widget draggable")}this.setTypePlace=function(){var e=Handlebars.templates.place({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e),hidePlace(),widgetContext.icon==1&&($("#"+widgetContext.widgetID+"-container").hide(),$("#"+widgetContext.widgetID+"-icon").click(widgetPopUp),widgetContext.onMouseOver&&($("#"+widgetContext.widgetID+"-icon").mouseover(widgetPopUp),$(document).click(function(){$("#"+widgetContext.widgetID+"-container").hide()}),$("#"+widgetContext.widgetID).click(function(e){return e.stopPropagation(),!1})),$("#"+widgetContext.widgetID+"-close-widget").click(function(){$("#"+widgetContext.widgetID+"-container").hide()})),displayPlace(widgetContext.pleiadesID)},this.setTypeSearch=function(){var e=Handlebars.templates.search({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e);var e=Handlebars.templates.place({widgetContext:widgetContext});$("#"+widgetContext.widgetID+"-content").append(e),hidePlace(),hideSearchResults(),$("#"+widgetContext.widgetID+"-search-form").submit(function(){return searchString=$("input:first").val(),displaySearchResults(),!1})}}var config={URL_PELAGIOS_API_V2:"http://pelagios.dme.ait.ac.at/api/",API_KEY_FLICKR:"ddf82df2aba035bfcf14c12a4eff3335",TIMEOUT_PLEIADES:6e3,TIMEOUT_PELAGIOS:6e4,TIMEOUT_FLICKR:6e3,URL_PLEIADES:"http://pleiades.stoa.org/places/",URL_FLICKR_SEARCH:"http://api.flickr.com/services/rest/?format=json&method=flickr.photos.search",MAX_PHOTOS_FLICKR:30,MSG_PLACE_NOT_FOUND:"The place specified for this widget does not exist in the Pleiades gazetteer.",MSG_TITLE_PLACE_NOT_FOUND:"Error: Unknown Place",MSG_PLEIADES_TIMEOUT:"We cannot display the place name and map at the moment because the Pleiades website is not responding. Apologies for the inconvenience and please try again later.",MSG_TITLE_PLEIADES_TIMEOUT:"Error: Pleiades not responding",NUM_ANNOTATIONS_TO_DISPLAY:20};return{Widget:Widget}});var Handlebars={};Handlebars.VERSION="1.0.beta.2",Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},Handlebars.registerPartial=function(e,t){this.partials[e]=t},Handlebars.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")}),Handlebars.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse||function(){},r=t.fn,i="",s=Object.prototype.toString.call(e);s==="[object Function]"&&(e=e());if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(s==="[object Array]"){if(e.length>0)for(var o=0,u=e.length;o0)for(var s=0,o=e.length;s":">",'"':""","'":"'","`":"`"},t=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?Handlebars.VM.program(t,n):r?r:(r=this.programs[e]=Handlebars.VM.program(t),r)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(n,r){return r=r||{},e.call(t,Handlebars,n,r.helpers,r.partials,r.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i){if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,{helpers:r,partials:i});if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in vm mode");return i[t]=Handlebars.compile(e),i[t](n,{helpers:r,partials:i})}},Handlebars.template=Handlebars.VM.template,define("lib/handlebars",function(){});if(!PELAGIOS_SEARCH_MAIN_JS_RUN){var PELAGIOS_SEARCH_MAIN_JS_RUN=!0;(function(){var e=document.getElementsByTagName("script"),t=e[e.length-1].src,n=t.replace(/search.js/g,"");require.config({paths:{jquery:"http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min",jqueryui:"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min"},priority:["jquery"],jQuery:"1.7.1",waitSeconds:5,baseUrl:n,shim:{jqueryui:{deps:["jquery"]},"lib/jquery_pagination":{deps:["jquery"]}}}),require(["app/pelagios","app/util","lib/handlebars"],function(e,t){var r=window.jQuery.noConflict(!0);r(document).ready(function(r){r(".pelagios-search").each(function(){var i={baseURL:n,widgetID:r(this).attr("id"),displayMap:r(this).attr("data-display_map")?r(this).attr("data-display_map")!=="false":!0,debug:r(this).attr("data-debug")?r(this).attr("data-debug")==="true":!1,overlay:!1,templateDir:n+"template/",imageDir:n+"images/",iconDir:n+"images/partner_icons/",scriptDir:n+"scripts/",cssDir:n+"css/",containerWidth:r(this).attr("data-container_width")?r(this).attr("data-container_width"):"550",mapWidth:r(this).attr("data-container_width")?r(this).attr("data-container_width")-125:"425",pleiadesFlickrGroupOnly:!1,type:"search"};t.includesGoogleMaps2()&&(i.displayMap=!1),i.debug&&console.log("CREATING WIDGET widgetID:"+i.widgetID+" baseURL:"+i.baseURL),widget=new e.Widget(i),widget.setTypeSearch()})})})})()}define("search",function(){});var requirejs,require,define;(function(global){function isFunction(e){return ostring.call(e)==="[object Function]"}function isArray(e){return ostring.call(e)==="[object Array]"}function each(e,t){if(e){var n;for(n=0;n-1;n-=1)if(e[n]&&t(e[n],n,e))break}}function hasProp(e,t){return e.hasOwnProperty(t)}function eachProp(e,t){var n;for(n in e)if(e.hasOwnProperty(n)&&t(e[n],n))break}function mixin(e,t,n,r){return t&&eachProp(t,function(t,i){if(n||!hasProp(e,i))r&&typeof t!="string"?(e[i]||(e[i]={}),mixin(e[i],t,n,r)):e[i]=t}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeContextModuleFunc(e,t,n){return function(){var r=aps.call(arguments,0),i;return n&&isFunction(i=r[r.length-1])&&(i.__requireJsBuild=!0),r.push(t),e.apply(null,r)}}function addRequireMethods(e,t,n){each([["toUrl"],["undef"],["defined","requireDefined"],["specified","requireSpecified"]],function(r){var i=r[1]||r[0];e[r[0]]=t?makeContextModuleFunc(t[i],n):function(){var e=contexts[defContextName];return e[i].apply(e,arguments)}})}function makeError(e,t,n,r){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=r,n&&(i.originalError=n),i}function newContext(e){function v(e){var t,n;for(t=0;e[t];t+=1){n=e[t];if(n===".")e.splice(t,1),t-=1;else if(n===".."){if(t===1&&(e[2]===".."||e[0]===".."))break;t>0&&(e.splice(t-1,2),t-=2)}}}function m(e,n,r){var i=n&&n.split("/"),s=i,o=t.map,u=o&&o["*"],a,f,l,c,h,p,d,m;e&&e.charAt(0)==="."&&(n?(t.pkgs[n]?s=i=[n]:s=i.slice(0,i.length-1),e=s.concat(e.split("/")),v(e),f=t.pkgs[a=e[0]],e=e.join("/"),f&&e===a+"/"+f.main&&(e=a)):e.indexOf("./")===0&&(e=e.substring(2)));if(r&&(i||u)&&o){c=e.split("/");for(h=c.length;h>0;h-=1){d=c.slice(0,h).join("/");if(i)for(p=i.length;p>0;p-=1){l=o[i.slice(0,p).join("/")];if(l){l=l[d];if(l){m=l;break}}}!m&&u&&u[d]&&(m=u[d]);if(m){c.splice(0,h,m),e=c.join("/");break}}}return e}function g(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===h.contextName)return t.parentNode.removeChild(t),!0})}function y(e){var n=t.paths[e];if(n&&isArray(n)&&n.length>1)return g(e),n.shift(),h.undef(e),h.require([e]),!0}function b(e,t,n,r){var i=e?e.indexOf("!"):-1,o=null,f=t?t.name:null,l=e,c=!0,p="",d,v,g;return e||(c=!1,e="_@r"+(u+=1)),i!==-1&&(o=e.substring(0,i),e=e.substring(i+1,e.length)),o&&(o=m(o,f,r),v=s[o]),e&&(o?v&&v.normalize?p=v.normalize(e,function(e){return m(e,f,r)}):p=m(e,f,r):(p=m(e,f,r),d=h.nameToUrl(p))),g=o&&!v&&!n?"_unnormalized"+(a+=1):"",{prefix:o,name:p,parentMap:t,unnormalized:!!g,url:d,originalName:l,isDefine:c,id:(o?o+"!"+p:p)+g}}function w(e){var t=e.id,r=n[t];return r||(r=n[t]=new h.Module(e)),r}function E(e,t,r){var i=e.id,o=n[i];hasProp(s,i)&&(!o||o.defineEmitComplete)?t==="defined"&&r(s[i]):w(e).on(t,r)}function S(e,t){var r=e.requireModules,i=!1;t?t(e):(each(r,function(t){var r=n[t];r&&(r.error=e,r.events.error&&(i=!0,r.emit("error",e)))}),i||req.onError(e))}function x(){globalDefQueue.length&&(apsp.apply(i,[i.length-1,0].concat(globalDefQueue)),globalDefQueue=[])}function T(e,t,n){var r=e&&e.map,i=makeContextModuleFunc(n||h.require,r,t);return addRequireMethods(i,h,r),i.isBrowser=isBrowser,i}function N(e){delete n[e],each(f,function(t,n){if(t.map.id===e)return f.splice(n,1),t.defined||(h.waitCount-=1),!0})}function C(e,t){var r=e.map.id,i=e.depMaps,s;if(!e.inited)return;return t[r]?e:(t[r]=!0,each(i,function(e){var i=e.id,o=n[i];if(!o)return;return!o.inited||!o.enabled?(s=null,delete t[r],!0):s=C(o,mixin({},t))}),s)}function k(e,t,r){var i=e.map.id,o=e.depMaps;if(!e.inited||!e.map.isDefine)return;return t[i]?s[i]:(t[i]=e,each(o,function(s){var o=s.id,u=n[o],a;if(p[o])return;if(u){if(!u.inited||!u.enabled){r[i]=!0;return}a=k(u,t,r),r[o]||e.defineDepById(o,a)}}),e.check(!0),s[i])}function L(e){e.check()}function A(){var e=t.waitSeconds*1e3,r=e&&h.startTime+e<(new Date).getTime(),i=[],s=!1,o=!0,u,a,c,p;if(l)return;l=!0,eachProp(n,function(e){u=e.map,a=u.id;if(!e.enabled)return;if(!e.error)if(!e.inited&&r)y(a)?(p=!0,s=!0):(i.push(a),g(a));else if(!e.inited&&e.fetched&&u.isDefine){s=!0;if(!u.prefix)return o=!1}});if(r&&i.length)return c=makeError("timeout","Load timeout for modules: "+i,null,i),c.contextName=h.contextName,S(c);o&&(each(f,function(e){if(e.defined)return;var t=C(e,{}),n={};t&&(k(t,n,{}),eachProp(n,L))}),eachProp(n,L)),(!r||p)&&s&&(isBrowser||isWebWorker)&&!d&&(d=setTimeout(function(){d=0,A()},50)),l=!1}function O(e){w(b(e[0],null,!0)).init(e[1],e[2])}function M(e,t,n,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(n,t,!1)}function _(e){var t=e.currentTarget||e.srcElement;return M(t,h.onScriptLoad,"load","onreadystatechange"),M(t,h.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}var t={waitSeconds:7,baseUrl:"./",paths:{},pkgs:{},shim:{}},n={},r={},i=[],s={},o={},u=1,a=1,f=[],l,c,h,p,d;return p={require:function(e){return T(e)},exports:function(e){e.usingExports=!0;if(e.map.isDefine)return e.exports=s[e.map.id]={}},module:function(e){return e.module={id:e.map.id,uri:e.map.url,config:function(){return t.config&&t.config[e.map.id]||{}},exports:s[e.map.id]}}},c=function(e){this.events=r[e.id]||{},this.map=e,this.shim=t.shim[e.id],this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},c.prototype={init:function(e,t,n,r){r=r||{};if(this.inited)return;this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.depMaps.rjsSkipMap=e.rjsSkipMap,this.errback=n,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check()},defineDepById:function(e,t){var n;return each(this.depMaps,function(t,r){if(t.id===e)return n=r,!0}),this.defineDep(n,t)},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(this.fetched)return;this.fetched=!0,h.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();T(this,!0)(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))},load:function(){var e=this.map.url;o[e]||(o[e]=!0,h.load(this.map.id,e))},check:function(e){if(!this.enabled||this.enabling)return;var t=this.map.id,r=this.depExports,i=this.exports,o=this.factory,u,a;if(!this.inited)this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error)try{i=h.execCb(t,o,r,i)}catch(l){u=l}else i=h.execCb(t,o,r,i);this.map.isDefine&&(a=this.module,a&&a.exports!==undefined&&a.exports!==this.exports?i=a.exports:i===undefined&&this.usingExports&&(i=this.exports));if(u)return u.requireMap=this.map,u.requireModules=[this.map.id],u.requireType="define",S(this.error=u)}else i=o;this.exports=i,this.map.isDefine&&!this.ignore&&(s[t]=i,req.onResourceLoad&&req.onResourceLoad(h,this.map,this.depMaps)),delete n[t],this.defined=!0,h.waitCount-=1,h.waitCount===0&&(f=[])}this.defining=!1,e||this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}},callPlugin:function(){var e=this.map,r=e.id,i=b(e.prefix,null,!1,!0);E(i,"defined",bind(this,function(i){var s=this.map.name,o=this.map.parentMap?this.map.parentMap.name:null,u,a,f;if(this.map.unnormalized){i.normalize&&(s=i.normalize(s,function(e){return m(e,o,!0)})||""),a=b(e.prefix+"!"+s,this.map.parentMap,!1,!0),E(a,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),f=n[a.id],f&&(this.events.error&&f.on("error",bind(this,function(e){this.emit("error",e)})),f.enable());return}u=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),u.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[r],eachProp(n,function(e){e.map.id.indexOf(r+"_unnormalized")===0&&N(e.map.id)}),S(e)}),u.fromText=function(e,t){var n=useInteractive;n&&(useInteractive=!1),w(b(e)),req.exec(t),n&&(useInteractive=!0),h.completeLoad(e)},i.load(e.name,T(e.parentMap,!0,function(e,t){return e.rjsSkipMap=!0,h.require(e,t)}),u,t)})),h.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){this.enabled=!0,this.waitPushed||(f.push(this),h.waitCount+=1,this.waitPushed=!0),this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var r,i,s;if(typeof e=="string"){e=b(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.depMaps.rjsSkipMap),this.depMaps[t]=e,s=p[e.id];if(s){this.depExports[t]=s(this);return}this.depCount+=1,E(e,"defined",bind(this,function(e){this.defineDep(t,e),this.check()})),this.errback&&E(e,"error",this.errback)}r=e.id,i=n[r],!p[r]&&i&&!i.enabled&&h.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=n[e.id];t&&!t.enabled&&h.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),e==="error"&&delete this.events[e]}},h={config:t,contextName:e,registry:n,defined:s,urlFetched:o,waitCount:0,defQueue:i,Module:c,makeModuleMap:b,configure:function(e){e.baseUrl&&e.baseUrl.charAt(e.baseUrl.length-1)!=="/"&&(e.baseUrl+="/");var r=t.pkgs,i=t.shim,s=t.paths,o=t.map;mixin(t,e,!0),t.paths=mixin(s,e.paths,!0),e.map&&(t.map=mixin(o||{},e.map,!0,!0)),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),e.exports&&!e.exports.__buildReady&&(e.exports=h.makeShimExports(e.exports)),i[t]=e}),t.shim=i),e.packages&&(each(e.packages,function(e){var t;e=typeof e=="string"?{name:e}:e,t=e.location,r[e.name]={name:e.name,location:t||e.name,main:(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}}),t.pkgs=r),eachProp(n,function(e,t){e.map=b(t)}),(e.deps||e.callback)&&h.require(e.deps||[],e.callback)},makeShimExports:function(e){var t;return typeof e=="string"?(t=function(){return getGlobal(e)},t.exports=e,t):function(){return e.apply(global,arguments)}},requireDefined:function(e,t){return hasProp(s,b(e,t,!1,!0).id)},requireSpecified:function(e,t){return e=b(e,t,!1,!0).id,hasProp(s,e)||hasProp(n,e)},require:function(t,n,r,o){var u,a,f,l,c;if(typeof t=="string")return isFunction(n)?S(makeError("requireargs","Invalid require call"),r):req.get?req.get(h,t,n):(u=t,o=n,f=b(u,o,!1,!0),a=f.id,hasProp(s,a)?s[a]:S(makeError("notloaded",'Module name "'+a+'" has not been loaded yet for context: '+e)));r&&!isFunction(r)&&(o=r,r=undefined),n&&!isFunction(n)&&(o=n,n=undefined),x();while(i.length){c=i.shift();if(c[0]===null)return S(makeError("mismatch","Mismatched anonymous define() module: "+c[c.length-1]));O(c)}return l=w(b(null,o)),l.init(t,n,r,{enabled:!0}),A(),h.require},undef:function(e){var t=b(e,null,!0),i=n[e];delete s[e],delete o[t.url],delete r[e],i&&(i.events.defined&&(r[e]=i.events),N(e))},enable:function(e,t){var r=n[e.id];r&&w(e).enable()},completeLoad:function(e){var r=t.shim[e]||{},o=r.exports&&r.exports.exports,u,a,f;x();while(i.length){a=i.shift();if(a[0]===null){a[0]=e;if(u)break;u=!0}else a[0]===e&&(u=!0);O(a)}f=n[e];if(!u&&!s[e]&&f&&!f.inited){if(t.enforceDefine&&(!o||!getGlobal(o))){if(y(e))return;return S(makeError("nodefine","No define call for "+e,null,[e]))}O([e,r.deps||[],r.exports])}A()},toUrl:function(e,t){var n=e.lastIndexOf("."),r=null;return n!==-1&&(r=e.substring(n,e.length),e=e.substring(0,n)),h.nameToUrl(m(e,t&&t.id,!0),r)},nameToUrl:function(e,n){var r,i,s,o,u,a,f,l,c;if(req.jsExtRegExp.test(e))l=e+(n||"");else{r=t.paths,i=t.pkgs,u=e.split("/");for(a=u.length;a>0;a-=1){f=u.slice(0,a).join("/"),s=i[f],c=r[f];if(c){isArray(c)&&(c=c[0]),u.splice(0,a,c);break}if(s){e===s.name?o=s.location+"/"+s.main:o=s.location,u.splice(0,a,o);break}}l=u.join("/")+(n||".js"),l=(l.charAt(0)==="/"||l.match(/^[\w\+\.\-]+:/)?"":t.baseUrl)+l}return t.urlArgs?l+((l.indexOf("?")===-1?"?":"&")+t.urlArgs):l},load:function(e,t){req.load(h,e,t)},execCb:function(e,t,n,r){return t.apply(r,n)},onScriptLoad:function(e){if(e.type==="load"||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=_(e);h.completeLoad(t.id)}},onScriptError:function(e){var t=_(e);if(!y(t.id))return S(makeError("scripterror","Script error",e,[t.id]))}}}function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"?interactiveScript:(eachReverse(scripts(),function(e){if(e.readyState==="interactive")return interactiveScript=e}),interactiveScript)}var version="2.0.4",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,ostring=Object.prototype.toString,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=typeof window!="undefined"&&!!navigator&&!!document,isWebWorker=!isBrowser&&typeof importScripts!="undefined",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera!="undefined"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1,req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath;if(typeof define!="undefined")return;if(typeof requirejs!="undefined"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=undefined}typeof require!="undefined"&&!isFunction(require)&&(cfg=require,require=undefined),req=requirejs=function(e,t,n,r){var i=defContextName,s,o;return!isArray(e)&&typeof e!="string"&&(o=e,isArray(t)?(e=t,t=n,n=r):e=[]),o&&o.context&&(i=o.context),s=contexts[i],s||(s=contexts[i]=req.s.newContext(i)),o&&s.configure(o),s.require(e,t,n)},req.config=function(e){return req(e)},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),addRequireMethods(req),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=function(e){throw e},req.load=function(e,t,n){var r=e&&e.config||{},i;if(isBrowser)return i=r.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),i.type=r.scriptType||"text/javascript",i.charset="utf-8",i.async=!0,i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),i.attachEvent&&!(i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)):(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)),i.src=n,currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;isWebWorker&&(importScripts(n),e.completeLoad(t))},isBrowser&&eachReverse(scripts(),function(e){head||(head=e.parentNode),dataMain=e.getAttribute("data-main");if(dataMain)return cfg.baseUrl||(src=dataMain.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath,dataMain=mainScript),dataMain=dataMain.replace(jsSuffixRegExp,""),cfg.deps=cfg.deps?cfg.deps.concat(dataMain):[dataMain],!0}),define=function(e,t,n){var r,i;typeof e!="string"&&(n=t,t=e,e=null),isArray(t)||(n=t,t=[]),!t.length&&isFunction(n)&&n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(n.length===1?["require"]:["require","exports","module"]).concat(t)),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(e||(e=r.getAttribute("data-requiremodule")),i=contexts[r.getAttribute("data-requirecontext")])),(i?i.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)})(this),define("requireLib",function(){}) \ No newline at end of file diff --git a/src/app/dataset.json b/src/app/dataset.json index 90cb928..29ed193 100644 --- a/src/app/dataset.json +++ b/src/app/dataset.json @@ -122,6 +122,13 @@ "iconFileName": "pelagios.png", "strapline": "Pleiades URIs appearing in ISAW Papers articles" } +, +{ + "id": "e9e161a08db2906d135d7abefb145636", + "title": "OCRE", + "iconFileName": "pelagios.png", + "strapline": "Online Coins of the Roman Empire" +} ] diff --git a/src/demo/search/iframe_demo.html b/src/demo/search/iframe_demo.html new file mode 100644 index 0000000..9feadaa --- /dev/null +++ b/src/demo/search/iframe_demo.html @@ -0,0 +1,22 @@ + + + + + + + Pelagios Search Widget Demo + + + +

    Pelagios iframe demo

    + + + + + +