function intialize() {
	var i=0, elem, targets;
	
	$("#nav ul").hide();
	$("#nav ul ").css({display: "none"}); // Opera Fix

	$("#nav li").hover(
		function() {
			$(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(500);
			},
		function() {
			$(this).find('ul:first').css({visibility: "hidden"});
			}
		);
	/* $("#nav li a").focus(function() {
			$(this).parent().find('ul:first').css({visibility: "visible",display: "none"}).slideDown(500);
			}
		); */

	
	
	
	//Popups
	targets=document.getElementsByTagName("a");
	
	for(i=0; elem=targets[i]; i++) {
		if(elem.rel.match("popup"))
			elem.onclick=elem.onkeyup=popup;
			$("#"+elem.rel).hide();
			$("#"+elem.rel+" > .top").hide();
			
		}
	}


function popup(e) {
	target=this.rel;
	
	$("#"+target).fadeIn(125);
	$("#"+target+" > .top").slideDown(750);
	
	
	
	//$("#"+target).fadeIn(500);
	}
	


intialize();