/*-----------------------------------------------------------------------------------------------*/
/*                                      SIMPLE jQUERY TOOLTIP                                    */
/*                                      VERSION: 1.1                                             */
/*                                      AUTHOR: jon cazier                                       */
/*                                      EMAIL: jon@3nhanced.com                                  */
/*                                      WEBSITE: 3nhanced.com                                    */
/*-----------------------------------------------------------------------------------------------*/

$(document).ready(function() {
	$('.toolTip').hover(
		function() {
		this.tip = this.title;
		$(this).append(
			'<div class="toolTipWrapper">'
				+'<div class="toolTipTop"></div>'
				+'<div class="toolTipMid">'
					+this.tip
				+'</div>'
				+'<div class="toolTipBtm"></div>'
			+'</div>'
		);
		this.title = "";
		this.width = $(this).width();
		$(this).find('.toolTipWrapper').css({left:this.width-5})
		$('.toolTipWrapper').fadeIn(350);
	},
	function() {
		$('.toolTipWrapper').fadeOut(250);
		$(this).children().remove();
			this.title = this.tip;
		}
	);
	
	$('.toolTip2').hover(
		function() {
		this.tip2 = this.title;
		$(this).append(
			'<div class="toolTipWrapper2">'
				+'<div class="toolTipTop2"></div>'
				+'<div class="toolTipMid2">'
					+this.tip2
				+'</div>'
				+'<div class="toolTipBtm2"></div>'
			+'</div>'
		);
		this.title = "";
		this.width = $(this).width();
		$(this).find('.toolTipWrapper2').css({left:this.width-5})
		$('.toolTipWrapper2').fadeIn(350);
	},
	function() {
		$('.toolTipWrapper2').fadeOut(250);
		$(this).children().remove();
			this.title = this.tip2;
		}
	);
	
});
