var ddimgtooltip={

	tiparray:function(){
		var tooltips=[]
		//define each tooltip below: tooltip[inc]=['path_to_image', 'optional desc', optional_CSS_object]
		//For desc parameter, backslash any special characters inside your text such as apotrophes ('). Example: "I\'m the king of the world"
		//For CSS object, follow the syntax: {property1:"cssvalue1", property2:"cssvalue2", etc}

		tooltips[0]=["img/bio/awall.png", "<b>Vient de:</b><br>Laval, Qc<br><br><b>Poids:</b><br>280 lbs<br><br><b>Prise de Finition:</b><br>???<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[1]=["img/bio/bryankevins.png", "<center><i>À venir...</i></center>"]
		tooltips[2]=["img/bio/chriscruze.png", "<b>Vient de:</b><br>Hollywood<br><br><b>Poids:</b><br>185 lbs<br><br><b>Prise de Finition:</b><br>Cruze Control<br><br><b>Championnats MWF:</b><br>Titre MWF (2x)<br>Titre Régional (2x)"]
		tooltips[3]=["img/bio/darkko.png", "<b>Vient des:</b><br>Ténèbres<br><br><b>Poids:</b><br>295 lbs<br><br><b>Prise de Finition:</b><br>Chokeslam<br><br><b>Championnats MWF:</b><br>Titre MWF (2x)<br>Titre Tag Team (3x)"]
		tooltips[4]=["img/bio/frankythemobster.png", "<b>Vient de:</b><br>Milan, Italie<br><br><b>Poids:</b><br>225 lbs<br><br><b>Prise de Finition:</b><br>Credibility Statement<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[5]=["img/bio/fredlamerveille.png", "<b>Vient de:</b><br>Ste-Anne des Plaines, Qc<br><br><b>Poids:</b><br>220 lbs<br><br><b>Prise de Finition:</b><br>Spear<br><br><b>Championnats MWF:</b><br>Titre MWF (3x)<br><br>Titre Tag Team (3x)"]
		tooltips[6]=["img/bio/greenphantom.png", "<b>Vient de:</b><br>Ancient Green Hills of Two Mountains<br><br><b>Poids:</b><br>250 lbs<br><br><b>Prise de Finition:</b><br>The Phantasm<br><br><b>Championnats MWF:</b><br>Titre Tag Team (1x)"]
		tooltips[7]=["img/bio/hcryder.png", "<b>Vient de:</b><br>Laval, Qc<br><br><b>Poids:</b><br>161 lbs<br><br><b>Prise de Finition:</b><br>Ninja<br><br><b>Championnats MWF:</b><br>Titre Régional (1x)<br>Titre Tag Team (2x)"]
		tooltips[8]=["img/bio/jasonstarr.png", "<b>Vient de:</b><br>Laval, Qc<br><br><b>Poids:</b><br>170 lbs lbs<br><br><b>Prise de Finition:</b><br>Crack-A-Starr<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[9]=["img/bio/johnfury.png", "<center><i>À venir...</i></center>"]
		tooltips[10]=["img/bio/jjspade.png", "<b>Vient de:</b><br>Montréal, Qc<br><br><b>Poids:</b><br>205 lbs<br><br><b>Prise de Finition:</b><br>Michinoku Driver<br><br><b>Championnats MWF:</b><br>Titre Régional (1x)"]
		tooltips[11]=["img/bio/johnnynorth.png", "<center><i>À venir...</i></center>"]
		tooltips[12]=["img/bio/leonsaver.png", "<b>Vient de:</b><br>Toronto, Ontario<br><br><b>Poids:</b><br>165 lbs<br><br><b>Prise de Finition:</b><br>SuperSex<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[13]=["img/bio/mathieustjacques.png", "<b>Vient de:</b><br>St-Eustache, Qc<br><br><b>Poids:</b><br>200 lbs<br><br><b>Prise de Finition:</b><br>Throwback<br><br><b>Championnats MWF:</b><br>Titre MWF (2x)<br>Titre Tag Team (1x)"]
		tooltips[14]=["img/bio/maverick.png", "<b>Vient de:</b><br>Valleyfield, Qc<br><br><b>Poids:</b><br>285 lbs<br><br><b>Prise de Finition:</b><br>Maverick Effect<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[15]=["img/bio/michaelcage.png", "<b>Vient de:</b><br>Hollywood, California<br><br><b>Poids:</b><br>190 lbs<br><br><b>Prise de Finition:</b><br>Five Star Superkick<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[16]=["img/bio/mystery.png", "<b>Vient de:</b><br>Triangle des Bermudes<br><br><b>Poids:</b><br>135 lbs<br><br><b>Prise de Finition:</b><br>Bermuda Lock<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[17]=["img/bio/patguenette.png", "<b>Vient de:</b><br>Ste-Anne des Plaines, Qc<br><br><b>Poids:</b><br>210 lbs<br><br><b>Prise de Finition:</b><br>PG Rated<br><br><b>Championnats MWF:</b><br>Titre MWF (3x)<br>Titre Régional (1x)<br>Titre Tag Team (1x)"]
		tooltips[18]=["img/bio/patskillz.png", "<b>Vient de:</b><br>Hudson, Qc<br><br><b>Poids:</b><br>185 lbs<br><br><b>Prise de Finition:</b><br>Skillz DDT<br><br><b>Championnats MWF:</b><br>Titre Régional (1x)<br>Titre Tag Team (1x)"]
		tooltips[19]=["img/bio/paulyplatinum.png", "<center><i>À venir...</i></center>"]
		tooltips[20]=["img/bio/razen.png", "<b>Vient de:</b><br>Rue Gauvin, Vanier, Qc<br><br><b>Poids:</b><br>170 lbs<br><br><b>Prise de Finition:</b><br>Ghanarea<br><br><b>Championnats MWF:</b><br>Titre Régional (1x)"]
		tooltips[21]=["img/bio/shaynehawke.png", "<b>Vient de:</b><br>West Island<br><br><b>Poids:</b><br>180 lbs<br><br><b>Prise de Finition:</b><br>TomaHawke<br><br><b>Championnats MWF:</b><br>Titre Régional (1x)"]
		tooltips[22]=["img/bio/soaamin.png", "<b>Vient de:</b><br>Juba Sudan<br><br><b>Poids:</b><br>350 lbs<br><br><b>Prise de Finition:</b><br>Sudanese Meat Cleaver<br><br><b>Championnats MWF:</b><br>Titre MWF (1x)"]
		tooltips[23]=["img/bio/stewramjattan.png", "<b>Vient de:</b><br>Trinidad, Tobago<br><br><b>Poids:</b><br>170 lbs<br><br><b>Prise de Finition:</b><br>Northern Light Suplex<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[24]=["img/bio/surfermitch.png", "<b>Vient de:</b><br>Malibu, Californie<br><br><b>Poids:</b><br>160 lbs<br><br><b>Prise de Finition:</b><br>450 Splash<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[25]=["img/bio/thomasdubois.png", "<b>Vient de:</b><br>St-Hyacinthe, Qc<br><br><b>Poids:</b><br>235 lbs<br><br><b>Prise de Finition:</b><br>???<br><br><b>Championnats MWF:</b><br>Aucun"]
		tooltips[26]=["img/bio/travistoxic.png", "<b>Vient de:</b><br>Endroit Inconnu<br><br><b>Poids:</b><br>155 lbs<br><br><b>Prise de Finition:</b><br>Walk to Rope Shooting Star Press<br><br><b>Championnats MWF:</b><br>Aucun"]

		return tooltips //do not remove/change this line
	}(),

	tooltipoffsets: [20, -30], //additional x and y offset from mouse cursor for tooltips

	//***** NO NEED TO EDIT BEYOND HERE

	tipprefix: 'imgtip', //tooltip ID prefixes

	createtip:function($, tipid, tipinfo){
		if ($('#'+tipid).length==0){ //if this tooltip doesn't exist yet
			return $('<div id="' + tipid + '" class="profil" />').html(
				'<div align="center"><img src="' + tipinfo[0] + '" /></div>'
				+ ((tipinfo[1])? '<div align="justify" style="padding-top:5px">'+tipinfo[1]+'</div>' : '')
				)
			.css(tipinfo[2] || {})
			.appendTo(document.body)
		}
		return null
	},

	positiontooltip:function($, $tooltip, e){
		var x=e.pageX+this.tooltipoffsets[0], y=e.pageY+this.tooltipoffsets[1]
		var tipw=$tooltip.outerWidth(), tiph=$tooltip.outerHeight(), 
		x=(x+tipw>$(document).scrollLeft()+$(window).width())? x-tipw-(ddimgtooltip.tooltipoffsets[0]*2) : x
		y=(y+tiph>$(document).scrollTop()+$(window).height())? $(document).scrollTop()+$(window).height()-tiph-10 : y
		$tooltip.css({left:x, top:y})
	},
	
	showbox:function($, $tooltip, e){
		$tooltip.show()
		this.positiontooltip($, $tooltip, e)
	},

	hidebox:function($, $tooltip){
		$tooltip.hide()
	},


	init:function(targetselector){
		jQuery(document).ready(function($){
			var tiparray=ddimgtooltip.tiparray
			var $targets=$(targetselector)
			if ($targets.length==0)
				return
			var tipids=[]
			$targets.each(function(){
				var $target=$(this)
				$target.attr('rel').match(/\[(\d+)\]/) //match d of attribute rel="imgtip[d]"
				var tipsuffix=parseInt(RegExp.$1) //get d as integer
				var tipid=this._tipid=ddimgtooltip.tipprefix+tipsuffix //construct this tip's ID value and remember it
				var $tooltip=ddimgtooltip.createtip($, tipid, tiparray[tipsuffix])
				$target.mouseenter(function(e){
					var $tooltip=$("#"+this._tipid)
					ddimgtooltip.showbox($, $tooltip, e)
				})
				$target.mouseleave(function(e){
					var $tooltip=$("#"+this._tipid)
					ddimgtooltip.hidebox($, $tooltip)
				})
				$target.mousemove(function(e){
					var $tooltip=$("#"+this._tipid)
					ddimgtooltip.positiontooltip($, $tooltip, e)
				})
				if ($tooltip){ //add mouseenter to this tooltip (only if event hasn't already been added)
					$tooltip.mouseenter(function(){
						ddimgtooltip.hidebox($, $(this))
					})
				}
			})

		}) //end dom ready
	}
}

//ddimgtooltip.init("targetElementSelector")
ddimgtooltip.init("*[rel^=imgtip]")
