var debug = true;
var debugIe = false;
var debugString = '';
var $j = jQuery.noConflict();

$j().ready(function()
{
	if (debugIe && !self.console) alert(debugString);

	$j("#shortcuts > li").mouseover(function() {
		var top = $j(this).parent().offset();
		var current = $j(this).offset();
		$j(this).parent().find("> li").css("position", "static");
		$j(this).css("position", "relative");
//		$j(this).find("> ul").css("left", "25px").css("top", (top.top - current.top - 10) + "px");
		$j(this).find("> ul").css("left", "25px").css("top", "12px");
		$j(this).find("> a").addClass("open");
	});

	$j("#shortcuts > li").mouseout(function() {
		var top = $j(this).parent().find("ul").css("left", "-999em")
		$j(this).find("> a").removeClass("open");
		$j(this).parent().find("> li").css("position", "static");
	});

	$j(".spot > p.alphaBottom, .spot > p.alphaTop").each(function (){
		if ($j(this).find("a").length == 1)
		{
			$j(this).parent().css("cursor", "pointer").click(function() {
				document.location = $j(this).find("a:first").attr("href");
			})
		}
	});

});

function log(s)
{
	var now = new Date();
	s = (now.getTime() + '').substr(9) + ": " + s;
	if (debug && self.console) console.log(s);
	debugString += s + '\n';
}
