





	
	











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.insertNewtagsStyle = 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\"); }" +
"#jigluNewtagsWidget { background-color: #383838; border: 1px solid #383838; overflow: hidden; width: 200px; }" +
"#jigluNewtagsWidget h2, #jigluNewtagsWidget h2 a, #jigluNewtagsWidget img, #jigluNewtagsWidget ul, #jigluNewtagsWidget ul li, #jigluNewtagsWidget ul li a, #jigluNewtagsWidget 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; }" +
"#jigluNewtagsWidget div.action { background-color: white; border-top: 1px solid #ffffff; display: block; font-size: 11px; margin: 4px; padding: 4px 0; text-align: center; }" +
"#jigluNewtagsWidget div.action a, #jigluNewtagsWidget div.tagmap a { color: black; text-decoration: none; }" +
"#jigluNewtagsWidget div.action a:hover, #jigluNewtagsWidget div.tagmap a:hover { text-decoration: underline; }" +
"#jigluNewtagsWidget div.logo { background-color: white; border-bottom: 1px solid #ffffff; float: none; margin: 4px; padding: 0; }" +
"#jigluNewtagsWidget div.message { color: #ffffff; font-size: 12px; margin: 0 8px 8px 8px; padding: 0; }" +
"#jigluNewtagsWidget div.sections { margin: 0; overflow: hidden; padding: 0; }" +
"#jigluNewtagsWidget div.section { margin: 0; padding: 0; }" +
"#jigluNewtagsWidget div.tagmap { border: 1px solid #ffffff; display: block; font-size: 12px; margin: 4px 4px 8px; padding: 2px 0; text-align: center; }" +
"#jigluNewtagsWidget span.logo { cursor: hand; display: block; float: none; height: 42px; margin: 0; width: 140px; padding: 0; }" +
"#jigluNewtagsWidget h2 { background-color: #383838; color: #00ffdd; font-size: 12px; font-weight: bold; margin: 0 4px 2px 4px; padding: 1px 1px 1px 2px; }" +
"#jigluNewtagsWidget h2 a, #jigluNewtagsWidget h2 a:link, #jigluNewtagsWidget h2 a:visited { color: #00ffdd; display: inline; margin: 0; padding: 0; text-decoration: none; width: auto; }" +
"#jigluNewtagsWidget h2 a:hover { color: #00ffdd; text-decoration: underline; }" +
"#jigluNewtagsWidget img { border: none; display: block; height: 42px; margin: 0; padding: 0; width: 140px; }" +
"* html #jigluNewtagsWidget img { display: none; }" +
"#jigluNewtagsWidget ul { font-size: 12px; margin: 0 4px 12px 4px; padding: 0; }" +
"#jigluNewtagsWidget ul li, #jigluNewtagsWidget li { color: #00b5ff; font-size: 12px; margin: 0 0 2px 20px; padding: 0; list-style-type: disc; list-style-position: outside; }" +
"#jigluNewtagsWidget ul li a, #jigluNewtagsWidget ul li a:link, #jigluNewtagsWidget ul li a:visited, #jigluNewtagsWidget ul a, #jigluNewtagsWidget ul a:link, #jigluNewtagsWidget ul a:visited, #jigluNewtagsWidget li a, #jigluNewtagsWidget li a:link, #jigluNewtagsWidget li a:visited { color: #ffffff; display: inline; margin: 0; padding: 0; text-decoration: none; width: auto; }" +
"#jigluNewtagsWidget ul li a:hover, #jigluNewtagsWidget ul a:hover, #jigluNewtagsWidget li a:hover { color: #ffffff; 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.insertNewtagsContent = function()
{
	document.getElementById("jigluNewtagsWidget").innerHTML = ("<div id=\"jigluNewtagsWidget\">" +
"	<div class=\"logo\"><a href=\"http://www.jiglu.com:80/\" target=\"_top\"><span class=\"logo\" style=\"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://www.jiglu.com:80/custom/images/widget/logo.png\', sizingMethod=\'crop\');\"><img src=\"http://www.jiglu.com:80/custom/images/widget/logo.png\" alt=\"Jiglu\" / ></span></a></div>" +
"	<div class=\"tagmap\">" +
"		<a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/!overlay\">View tag map</a>" +
"	</div>" +
"	" +
"		" +
"		" +
"		" +
"			" +
"				<div class=\"section\">" +
"					<h2><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/!overlay\">New topics&nbsp;&raquo;</a></h2>" +
"					<ul>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/youve-1!overlay\" rel=\"tag\">youâ€™ve</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/second-gunman!overlay\" rel=\"tag\">second gunman</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/senior-director!overlay\" rel=\"tag\">senior director</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/ser-divulgada!overlay\" rel=\"tag\">ser divulgada</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/shaky-hands!overlay\" rel=\"tag\">shaky hands</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/shittiest-quality!overlay\" rel=\"tag\">shittiest quality</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/shooting-mode!overlay\" rel=\"tag\">shooting mode</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/shooting-mode!overlay\" rel=\"tag\">shooting modes</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/short-supply!overlay\" rel=\"tag\">short supply</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/topics/showing-footage!overlay\" rel=\"tag\">showing footage</a></li>" +
"						" +
"					</ul>" +
"				</div>" +
"			" +
"			" +
"				<div class=\"section\">" +
"					<h2><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/!overlay\">New people&nbsp;&raquo;</a></h2>" +
"					<ul>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/Simon%20Brew!overlay\">Simon Brew</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/Summer%20Movies%20Poll!overlay\">Summer Movies Poll</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/Erica%20Schrag!overlay\">Erica Schrag</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/Summer%20Movies!overlay\">Summer Movies</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/June%20Previews!overlay\">June Previews</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/April%20Previews!overlay\">April Previews</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/May%20Previews!overlay\">May Previews</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/Grant%20Morrison!overlay\">Grant Morrison</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/Tony%20Daniel!overlay\">Tony Daniel</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/people/Charity%20Buzz!overlay\">Charity Buzz</a></li>" +
"						" +
"					</ul>" +
"				</div>" +
"			" +
"			" +
"				<div class=\"section\">" +
"					<h2><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/!overlay\">New events&nbsp;&raquo;</a></h2>" +
"					<ul>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080515!overlay\">Thursday, 15 May 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080529!overlay\">Thursday, 29 May 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080505!overlay\">Monday, 5 May 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080708!overlay\">Tuesday, 8 July 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080426!overlay\">Saturday, 26 April 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080416!overlay\">Wednesday, 16 April 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080415!overlay\">Tuesday, 15 April 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080412!overlay\">Saturday, 12 April 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080401!overlay\">Tuesday, 1 April 2008</a></li>" +
"						" +
"							<li><a onclick=\"return(Jiglu.overlayOpen(this))\" href=\"http://ttiger-tagging.jiglu.com/tags/events/20080310!overlay\">Monday, 10 March 2008</a></li>" +
"						" +
"					</ul>" +
"				</div>" +
"			" +
"			" +
"		" +
"	" +
"	<div class=\"action\">" +
"		<a href=\"http://www.jiglu.com:80/\" target=\"_top\">Get Jiglu for your site</a>" +
"	</div>" +
"</div>");
};



Jiglu.initNewtags = function()
{
	if (Jiglu._loadedNewtags)
	{
		return;
	}

	Jiglu._loadedNewtags = true;

	Jiglu.insertNewtagsStyle();
	Jiglu.insertNewtagsContent();

	if (Jiglu.markupTags)
	{
		Jiglu.markupTags();
	}
};

if (Jiglu._chainedNewtags)
{
	Jiglu.initNewtags();
}
else if (document.body.innerHTML)
{
	document.write("<div id=\"jigluNewtagsWidget\"></div>");

	if (window.addEventListener)
	{
		window.addEventListener("DOMContentLoaded", Jiglu.initNewtags, false);
		window.addEventListener("load", Jiglu.initNewtags, false); 
	}
	else if (window.attachEvent)
	{
		window.attachEvent("onload", Jiglu.initNewtags);
	}
}

