/*-----------------------------------------------------------------------------------------------*/
/*                                      SIMPLE jQUERY TOOLTIP                                    */
/*                                      VERSION: 1.1                                             */
/*                                      AUTHOR: jon cazier                                       */
/*                                      EMAIL: jon@3nhanced.com                                  */
/*                                      WEBSITE: 3nhanced.com                                    */
/*-----------------------------------------------------------------------------------------------*/

function InitTooltip() {
	$('.toolTip').hover(
		function() {
		this.tip = this.title;
		$(this).append(
			'<div class="toolTipWrapper">'
				+'<div class="toolTipTop"></div>'
				+'<div class="toolTipMid" id="toolTipMid1">'
					+this.tip
				+'</div>'
				/*+'<div class="toolTipBtm"></div>'*/
			+'</div>'
		);
		this.title = "";
		this.width = $(this).width();
		var tooltip = $(this).find('.toolTipWrapper');
		tooltip.css({left:this.width-22});
		var offset = $(this).offset();
		tooltip.css("top",offset.top - $(document).scrollTop() + $(this).height());
		tooltip.css("left",offset.left);
		$('.toolTipWrapper').fadeIn(300);		
				
		//curvy corners
	    $(".toolTipMid").corner();
    
	},
	function() {
		$('.toolTipWrapper').fadeOut(100);
		$(this).children().remove();
			this.title = this.tip;
		}
	);
};


