var data = 
  { 
    "home":{ "title" : "Home Page", "color" : "#770","height":"100px"},
    "aboutme":{ "title" : "About Me", "color" : "#661","height":"90px"},
    "skills":{ "title" : "Skills", "color" : "#552","height":"70px"},
    "porfolio":{ "title" : "Portfolio", "color" : "#443","height":"90px"},
    "contact":{ "title" : "Contact Me", "color" : "#334","height":"70px"},
    "admin":{ "title" : "Admin", "color" : "#225","height":"40px"},
  }

  $(document).ready(function()
  {
	var msx = 0; 
	var msy = 0;
 	var flip = 0;
	var temp;
   	$().mousemove(function(e){msx=e.pageX; msy =  e.pageY;}); 

	$("#skills li strong").click(function () {
	$("#skills li p").hide()
      	$(this).next("p").toggle();
   	 });

	$("#disclaimer").click(function () 
	{
	
	if ($("#smallprint").is(":hidden")) 
	{
	        $("#smallprint").slideDown("slow");
	} 
	else 
	{
	        $("#smallprint").hide();
	}
	});

	$("#loadrandom").click(function () {
		x=get_random(random_phrase.count())-1;
		$("#random").html(random_phrase[x]);	

	});


	$("#mainnav a").hover
		(function () 
		{
		pos = $(this).position();
		
		temp = this.title;
		this.title="";
		$("#tooltip").html("<strong>"+data[this.id].title+" - </strong>"+temp);
		$("#tooltip").css({left:pos.left-200});
		$("#tooltip").css({top:pos.top});
		$("#tooltip").css({height:data[this.id].height});
		$(this).css({background:data[this.id].color});
		$("#tooltip").css({background:data[this.id].color}); 
		$("#tooltip").fadeIn();
      		}, 
	 	function () 
		{
		this.title=temp;
		$("body").animate( { background:"#000" }, 100 );
		$("#tooltip").css({left:-200});
		$("#tooltip").css({top:-200});
		
		$("#tooltip").hide();
		$("#tooltip").html("");
		$(this).css({background:"transparent"});
	      	});
  });

