﻿function equalHeight(group) {
   tallest = 0;
   group.each(function() {
      thisHeight = $(this).height();
      if(thisHeight > tallest) {
         tallest = thisHeight;
      }
   });
   group.height(tallest);
}

/*
 * Tooltip script 
 */
this.tooltip = function(){			
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
				
	$("a.tooltip").hover(function(e){							  
		this.t = this.title;
		var ttLoc = $("#"+this.t).html();	
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ ttLoc +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};

jQuery(document).ready(function($) {
	tooltip();
	equalHeight($(".column"));
});
