		
window.onload = function() {
	this.setTimeout("doMapLoad()", 200);

	targets = $("meta").getElements('div.item');
	
	tn = targets.length;
	
	for (i=0; i < tn; i++) {
		if (targets[i].id != "map_wrap") {
			targets[i].addEvent('mouseenter', function(e) {
			    var event = new Event(e);

				var bullet = this.getElement('.bullet');
			
				if (!bullet) return;

				var clone = bullet.clone();

				clone.id = "other_" + clone.id;

				$("hidden_temp").appendChild(clone);

				clone.style.height = "auto";

				var theHeight = clone.getSize().size.y;

				var fx = new Fx.Styles(bullet.id, {duration: 400, transition: Fx.Transitions.Quad.easeOut});
				fx.start({
						'height': theHeight,
						'color': '#000000'
					});

				$("hidden_temp").removeChild(clone);
			});
			targets[i].addEvent('mouseleave', function(e) {
				var bullet = this.getElement('.bullet');
			
				if (!bullet) return;
			
				var fx = new Fx.Styles(bullet.id, {duration: 400, transition: Fx.Transitions.Quad.easeOut});
				fx.start({
						'height': 14,
						'color': '#999999'
					});					
			});
		}
	}
	
	theLinks = $("text").getElements(".link_trigger");
	nl = theLinks.length;
	
	for (i=0; i < nl; i++) {		
		//var fx = new Fx.Style("bull_" + theLinks[i].id.slice(5), 'opacity', {duration: 300});
		//fx.hide();

		$("bull_" + theLinks[i].id.slice(5)).effect('opacity', {duration: 200, transition: Fx.Transitions.linear}).hide();
		
		//theLinks[i].addEvent('click', function() {
		theLinks[i].onclick = function() {
			bullet = $("bull_" + this.id.slice(5));
			bullet.style.top = (this.offsetParent.offsetTop + this.offsetTop).toString() + "px";
			bullet.style.left = (this.offsetParent.offsetLeft + this.offsetLeft).toString() + "px";

			bullet.effect('opacity', {duration:200, transition: Fx.Transitions.linear}).start(1.0);

			//var fx = new Fx.Style(bullet.id, 'opacity', {duration: 300, transition: Fx.linear});
			//fx.start(0, 1.0);
			
			//bullet.style.display = "block"
			
			//bullet.style.opacity = "0.5";
			
			return false;
		}
	}

	linkPopups = $("text").getElements(".link_popup");
	nlp = linkPopups.length;

	for (i=0; i < nlp; i++) {
		/*
		if (linkPopups[i].className != "link_popup media")
			linkPopups[i].addEvent('mouseleave', function(e) {					
				this.effect('opacity', {duration:200, transition: Fx.Transitions.linear}).start(0);
			});
		*/
		var id = linkPopups[i].id.slice(10);
		$("close_" + id).onclick = function() {
			var id = this.id.slice(6);
			$("bull_link_" + id).effect('opacity', {duration:200, transition: Fx.Transitions.linear}).hide();
			return false;
		}
	}
							
}

window.onunload = GUnload;
