/*
 * Tooltip
 */

this.tooltip = function(){	
	/* CONFIG */		
		xOffset = -8;
		yOffset = -80;		
		// these 2 variable determine popup's distance from the cursor
	/* END CONFIG */		
	$(".tooltip").hover(function(e){
		this.t = this.title;
		this.title = "";
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$(".tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

/*
 * Slide menu
 */

$(document).ready(function() {
	
	// Expand Panel
	$("#nav-tab-open").click(function(){
		$("div#panel").slideDown("fast");
	
	});	
	
	// Collapse Panel
	$("#nav-tab-close").click(function(){
		$("div#panel").slideUp("fast");	
	});		
	
	// Switch buttons
	$("#nav-toggle a").click(function () {
		$("#nav-toggle a").toggle();
	});		
	
});

// source elderscrolls.net
