if (typeof Jiglu == "undefined") { Jiglu = new Object(); } if (typeof Jiglu.overlayOpen != "function") { Jiglu.overlayClose = function() { var overlay = document.getElementById("jigluOverlay"); overlay.parentNode.removeChild(overlay); var titleBar = document.getElementById("jigluTitleBar"); titleBar.parentNode.removeChild(titleBar); var mask = document.getElementById("jigluMask"); mask.parentNode.removeChild(mask); }; Jiglu.overlayOpen = function(tag) { var mask = document.createElement("div"); mask.id = "jigluMask"; mask.onclick = Jiglu.overlayClose; var titleBar = document.createElement("div"); titleBar.id = "jigluTitleBar"; titleBar.onclick = function() { return false; }; var titleBarClose = document.createElement("div"); titleBarClose.id = "jigluTitleBarClose"; titleBarClose.onclick = Jiglu.overlayClose; titleBar.appendChild(titleBarClose); var overlay = document.createElement("iframe"); overlay.id = "jigluOverlay"; overlay.name = "jigluOverlay"; overlay.src = tag.href; overlay.setAttribute("frameBorder", 0); document.body.appendChild(mask); document.body.appendChild(titleBar); document.body.appendChild(overlay); return(false); }; Jiglu.sectionExpand = function(section) { section = section.parentNode; while ((section.nodeType != 1) || (section.tagName.toLowerCase() != "ul")) { section = section.nextSibling; } section.style.display = "block"; return(false); }; } Jiglu.insertAutotagStyle = function() { var rules = "a.jigluLink { border-bottom: 1px dotted #0000ff; text-decoration: none; }" + "#jigluMask { background-color: black; border: none; height: 100%; left: 0; opacity: 0.2; filter: alpha(opacity=20); position: fixed; top: 0; width: 100%; z-index: 1000; }" + "* html #jigluMask { position: absolute; height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + \"px\"); }" + "#jigluTitleBar { background: #003366 url(\"http://www.jiglu.com:80/custom/images/overlay/titlebar.png\") no-repeat top left; height: 480px; position: fixed; left: 50%; margin: -240px 0 0 -386px; text-align: left; top: 50%; width: 772px; z-index: 1001; }" + "* html #jigluTitleBar { position: absolute; margin-top: expression(-12 - parseInt(this.offsetHeight / 2) + (document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + \"px\"); }" + "#jigluTitleBarClose { float: right; height: 20px; width: 20px; }" + "#jigluOverlay { background-color: white; border: none; height: 452px; left: 50%; margin: -216px 0 0 -382px; position: fixed; top: 50%; width: 764px; z-index: 1002; }" + "* html #jigluOverlay { position: absolute; margin-top: expression(-2 - parseInt(this.offsetHeight / 2) + (document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + \"px\"); }" + "#jigluAutotagWidget { background-color: #ffffff; border: 1px solid #999999; overflow: hidden; width: 150px; }" + "#jigluAutotagWidget h2, #jigluAutotagWidget h2 a, #jigluAutotagWidget img, #jigluAutotagWidget ul, #jigluAutotagWidget ul li, #jigluAutotagWidget ul li a, #jigluAutotagWidget div { background: none; border: none; float: none; font-family: \"Trebuchet MS\", Trebuchet, Helvetica, Swiss, Arial, Geneva, sans-serif; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 1.2; text-align: left; text-decoration: none; text-indent: 0; text-transform: none; vertical-align: baseline; }" + "#jigluAutotagWidget div.action { background-color: white; border-top: 1px solid #000000; display: block; font-size: 11px; margin: 4px; padding: 4px 0; text-align: center; }" + "#jigluAutotagWidget div.action a, #jigluAutotagWidget div.tagmap a { color: black; text-decoration: none; }" + "#jigluAutotagWidget div.action a:hover, #jigluAutotagWidget div.tagmap a:hover { text-decoration: underline; }" + "#jigluAutotagWidget div.logo { background-color: white; border-bottom: 1px solid #000000; float: none; margin: 4px; padding: 0; }" + "#jigluAutotagWidget div.message { color: #000000; font-size: 12px; margin: 0 8px 8px 8px; padding: 0; }" + "#jigluAutotagWidget div.sections { margin: 0; overflow: hidden; padding: 0; }" + "#jigluAutotagWidget div.section { margin: 0; padding: 0; }" + "#jigluAutotagWidget div.tagmap { border: 1px solid #000000; display: block; font-size: 12px; margin: 4px 4px 8px; padding: 2px 0; text-align: center; }" + "#jigluAutotagWidget span.logo { cursor: hand; display: block; float: none; height: 42px; margin: 0; width: 140px; padding: 0; }" + "#jigluAutotagWidget h2 { background-color: #ffffff; color: #003caa; font-size: 12px; font-weight: bold; margin: 0 4px 2px 4px; padding: 1px 1px 1px 2px; }" + "#jigluAutotagWidget h2 a, #jigluAutotagWidget h2 a:link, #jigluAutotagWidget h2 a:visited { color: #003caa; display: inline; margin: 0; padding: 0; text-decoration: none; width: auto; }" + "#jigluAutotagWidget h2 a:hover { color: #003caa; text-decoration: underline; }" + "#jigluAutotagWidget img { border: none; display: block; height: 42px; margin: 0; padding: 0; width: 140px; }" + "* html #jigluAutotagWidget img { display: none; }" + "#jigluAutotagWidget ul { font-size: 12px; margin: 0 4px 12px 4px; padding: 0; }" + "#jigluAutotagWidget ul li, #jigluAutotagWidget li { color: #00b5ff; font-size: 12px; margin: 0 0 2px 20px; padding: 0; list-style-type: disc; list-style-position: outside; }" + "#jigluAutotagWidget ul li a, #jigluAutotagWidget ul li a:link, #jigluAutotagWidget ul li a:visited, #jigluAutotagWidget ul a, #jigluAutotagWidget ul a:link, #jigluAutotagWidget ul a:visited, #jigluAutotagWidget li a, #jigluAutotagWidget li a:link, #jigluAutotagWidget li a:visited { color: #000000; display: inline; margin: 0; padding: 0; text-decoration: none; width: auto; }" + "#jigluAutotagWidget ul li a:hover, #jigluAutotagWidget ul a:hover, #jigluAutotagWidget li a:hover { color: #000000; text-decoration: underline; }"; var styleElement = document.createElement('style'); styleElement.type = "text/css"; styleElement.media = "screen"; if (styleElement.styleSheet) { styleElement.styleSheet.cssText = rules; } else { styleElement.appendChild(document.createTextNode(rules)); } document.getElementsByTagName('head')[0].appendChild(styleElement); }; Jiglu.insertAutotagContent = function() { document.getElementById("jigluAutotagWidget").innerHTML = ("
" + "
\"Jiglu\"
" + "
" + " View tag map" + "
" + "
" + " " + " " + " " + " " + "
" + "

Topics »

" + " " + "
" + " " + " " + "
" + "

People »

" + " " + "
" + " " + " " + " " + " " + " " + "
" + "
" + " Get Jiglu for your site" + "
" + "
"); }; Jiglu.Tag = function(url, title) { this.url = url; this.title = title; } Jiglu.markupTags = function() { if ("".replace(/^/, String)) { return; } var tags = new Object(); var tagsList = new Array(); var baseName = "prime minister"; tags[baseName.toLowerCase()] = new Jiglu.Tag("http://traveldetective-tagging.jiglu.com/tags/topics/prime-minister!overlay", "Jiglu topic tag: prime minister"); tagsList.push(baseName); var baseName = "Royal Tour"; tags[baseName.toLowerCase()] = new Jiglu.Tag("http://traveldetective-tagging.jiglu.com/tags/topics/royal-tour!overlay", "Jiglu topic tag: Royal Tour"); tagsList.push(baseName); var variantName = "Royal Tours"; tags[variantName.toLowerCase()] = new Jiglu.Tag("http://traveldetective-tagging.jiglu.com/tags/topics/royal-tour!overlay", "Jiglu topic tag: Royal Tour"); tagsList.push(variantName); var contactName = "Helen Clarke"; tags[contactName.toLowerCase()] = new Jiglu.Tag("http://traveldetective-tagging.jiglu.com/tags/people/Helen%20Clarke!overlay", "Jiglu people tag: Helen Clarke"); tagsList.push(contactName) var contactName = "Peter Greenberg"; tags[contactName.toLowerCase()] = new Jiglu.Tag("http://traveldetective-tagging.jiglu.com/tags/people/Peter%20Greenberg!overlay", "Jiglu people tag: Peter Greenberg"); tagsList.push(contactName) var contactName = "Robert Landau"; tags[contactName.toLowerCase()] = new Jiglu.Tag("http://traveldetective-tagging.jiglu.com/tags/people/Robert%20Landau!overlay", "Jiglu people tag: Robert Landau"); tagsList.push(contactName) var targetURL = "http://www.digitalrailroad.net/robertlandau/Default.aspx"; tags[targetURL] = new Jiglu.Tag(targetURL, "Jiglu link tag: Robert Landau Archive"); var targetURL = "http://www.robertlandau.com/"; tags[targetURL] = new Jiglu.Tag(targetURL, "Jiglu link tag: RL Web"); if (tagsList.length > 0) { tagsList.sort(function(a, b) { return(b.length - a.length); }); var tagsRegExp = new RegExp("(^|[^A-Za-z])(" + tagsList.join("|") + ")([^A-Za-z]|$)", "i"); var elementRegExp = new RegExp("(<[^>]+>)?([^<]*)", "g"); var possibleElements = [ "blockquote", "li", "p"]; for (var i = 0; i < possibleElements.length; i++) { var elements = document.getElementsByTagName(possibleElements[i]); for (var j = 0; j < elements.length; j++) { var html = elements[j].innerHTML; var changed = false; var anchor = false; html = html.replace(elementRegExp, function(match, element, text) { element = !element ? "" : element; text = !text ? "" : text; if (element.toLowerCase().substr(0, 3) == "") { anchor = false; } if (text != "" && !anchor) { text = text.replace(tagsRegExp, function(match, pre, foundTag, post) { var tag = tags[foundTag.toLowerCase()]; changed = true; return(pre + "" + foundTag + "" + post); }); } return(element + text); }); if (changed) { elements[j].innerHTML = html; } } } } for (var i = 0; i < document.links.length; i++) { if (typeof document.links[i].href == "string") { var link = document.links[i].href.replace(/#.*$/, ""); if (tags[link] && !document.links[i].title) { document.links[i].title = tags[link].title; } } } } Jiglu.initAutotag = function() { if (Jiglu._loadedAutotag) { return; } Jiglu._loadedAutotag = true; Jiglu.insertAutotagStyle(); Jiglu.insertAutotagContent(); if (Jiglu.markupTags) { Jiglu.markupTags(); } }; if (Jiglu._chainedAutotag) { Jiglu.initAutotag(); } else if (document.body.innerHTML) { document.write("
"); if (window.addEventListener) { window.addEventListener("DOMContentLoaded", Jiglu.initAutotag, false); window.addEventListener("load", Jiglu.initAutotag, false); } else if (window.attachEvent) { window.attachEvent("onload", Jiglu.initAutotag); } }