/* Image w/ description tooltip v2.0
* Created: April 23rd, 2010. This notice must stay intact for usage 
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/


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]=[src="Logos/BS-Make-Your-Mark-2.jpg","<h4>Make Your Mark</h4><br/>Dates of the festival June 17 - 26, the theme Rochesterfest - Make Your MARK! and the<br /> words Rochester, MN. Make your MARK Thats this years theme", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
		tooltips[1]=[src="Logos/Hartco.jpg","<h4>Hartco Construction</h4><br/>Quality at it's best! General Contractor, Realtor, and Property Manager. Hartco Construction<br/> in Oronoco, MN is a private company categorized under General Contractors. <br/>Hartco Construction usually offer:Atlas General Contractors.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
		tooltips[2]=[src="Logos/Jaci-Edwards.jpg","<h4>Jaci Edwards</h4><br/>Can help you find homes for sale, Jaci Edwards real estate agents, and information <br/> about the real estate market. Whether you are interested in buying or selling a home<br/>Jaci Edwards can help with all of your needs.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
		tooltips[3]=[src="Logos/Video-Analisys.jpg","<h4>Thelen Video Analysis</h4><br/>Video motion analysis is becoming a primary training tool for many athletes,coaches and <br/>trainers.  Competition today is steep and teams and athletes need an extra edge. Thelen Video <br/>Analysis provides that edge with state-of-the-art motion analysis products. Our motion  <br/> analysis systems are on the cutting edge of today's motion training techniques for <br/> applications ranging from golf swing training and baseball hitting to physical therapy and <br/>figure skating analysis.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
		tooltips[4]=[src="Logos/United-Skates.jpg","<h4>United Skates</h4><br/>Date: April 26, 2009<br/> Time: 1:00 & 4:00pm<br/> Location: Sioux Falls Ice & Recreation Center", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
		tooltips[5]=[src="Logos/New-Beginings.jpg","<h4>New Beginnings</h4><br/>Created for Rochester Assembly Of God Church for the New Beginnings Event 2011<br/> JANUARY 28TH 6:30-10pm In the … Rochester Assembly main Sanctuary Sign up at the <br/> Information Center Questions contact: Brenda Sorenson 206-6330 or Jodi Green 288-1015.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[6]=[src="Logos/US-Open.jpg","<h4>US OPEN</h4><br/>I would like to welcome you to our US Open Extravaganza. I am sure you will enjoy<br/> the evening of PSA members, talented local skaters, and special guest stars performing <br/> to raise funds for two very worthy organizations. In the spirit of giving, proceeds from <br/>this evenings Extravaganza will benefit the Professional Skaters Foundation<br/> and Special Olympics.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[7]=[src="Logos/HAAT-Tech.jpg","<h4>HAAT Technology </h4><br/>HAAT Technology, Inc is a full service information technology and management consulting <br/>firm. Our mission is to provide unparalleled customer support, deliver strategic efficient and<br/>  cost-effective professional services and benchmark solutions in the areas of: Technical,<br/> management, applicationconsulting and staffing services, to the Telecommunications,<br/> Healthcare  and Government industries, resultingin a profit for our investors,employees and  <br/>owners.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[8]=[src="Logos/Naked-Truth.jpg","<h4>The Naked Truth Project </h4><br/>A One Day Symposium To Train and Equip Counselors & Leaders The Journey Of Reclaiming <br/>Sexual INTEGRITY.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[9]=[src="Logos/LAPD.jpg","<h4>LAPD </h4><br/>Basketball Championship Team Logo 2008", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[10]=[src="Logos/Randall-Douglas.jpg","<h4>Randall Douglas Logo </h4><br/>A Leader in high-end custom shoots, immaculate prints, and designer books  ", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[11]=[src="Logos/Junk-B-Gone.jpg","<h4>Junk-B-Gone </h4><br/>Serving the Rochester, MN area. We strive to be innovative and professional, demonstrating <br/> the highest degree of integrity and service for our customers. Whatever your waste removal <br/> needs, just give us a call, we can help. We will remove as little as one single item, or the<br/> contents of an entire home or business. Our competitive pricing system assures our <br/>customers the best PRICE available we will beat any competitors price guranteed just ask? <br/>We schedule your junk removal appointment at a time that is convenient to you, even on the <br/>weekends. We want your complete satisfaction.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[12]=[src="Fine-Art/Bruce-L.jpg","<h4>Bruce Lee </h4><br/>Since 1973, the year Bruce Lee died and his famous motion picture Enter the Dragon <br/>was released, movies have been the single most influential factor behind the growing <br/>popularity of martial arts. Lee’s cinematic success spawned a global industry of the <br/>martial arts, and schools opened and flourished worldwide. During the 1970s more  <br/>students took up the study of martial arts than at any time before or since.To those  <br/>involved in martial arts, the years from 1972 to 1975 the height of Lees popularity<br/> are often cited as the Bruce Lee era.", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[13]=[src="Fine-Art/Cat-In-The-Hat-L.jpg","<h4>Cat In The Hat </h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[14]=[src="Fine-Art/Fairy-L.jpg","<h4>Fairy</h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[15]=[src="Fine-Art/Jack-L.jpg","<h4>Samurai Jack</h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[16]=[src="Fine-Art/Spidy-L.jpg","<h4>Spiderman</h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[17]=[src="Fine-Art/Chair-L.jpg","<h4>Chair</h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[18]=[src="Print/US-Open.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[19]=[src="Print/Mite-Clinic.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[20]=[src="Print/Spring-Session.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[21]=[src="Print/Gateway-Christian-College.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[22]=[src="Print/Totagatic-River-Cabin.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[23]=[src="Print/Franks-Painting.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[24]=[src="Print/PSA-Folder.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[25]=[src="Print/Jaci-Edwards-flyer.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[26]=[src="Flash/Membership Renewal.swf","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[27]=[src="Logos/SCHILD-CHECK.jpg","<h4>Child Check </h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[28]=[src="Logos/Diamondized-Collections.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[29]=[src="Logos/CER.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[30]=[src="Web-Design/R-W-Design.jpg","<h4></h4><br/>", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[31]=[src="Web-Design/B-N-M-Design.jpg","<h4></h4><br/>", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[32]=[src="Web-Design/L-C-Design.jpg","<h4></h4><br/>", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[33]=[src="Web-Design/G-T-Design.jpg","<h4></h4><br/>", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[34]=[src="Logos/Guelph-Naturopathic.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[35]=[src="Logos/Xoomount.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[36]=[src="Logos/In-Th-Loop.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[37]=[src="Logos/Leedingedge.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[38]=[src="Logos/Inside-Pulse.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[39]=[src="Logos/Jamona.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[40]=[src="Logos/Shaver-Bargains.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[41]=[src="Logos/Icy-Challenge.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[42]=[src="Logos/Moosefest.jpg","<h4></h4><br/>", {background:"#252525", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[43]=[src="Print/Ethics-booklet.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[44]=[src="Print/Seed-Of-Faith.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[45]=[src="Print/Marketing-Plan.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[46]=[src="Print/Directory-2012.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[47]=[src="Print/Figure-It-Out-book-cover.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[48]=[src="Print/YAS-flyer.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
tooltips[49]=[src="Print/Buddy-Lee-flyer.jpg","", {background:"#000", color:"#ffffff", font:"11px Arial", border:"0px ridge darkblue"}]
		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="ddimgtooltip" />').html(
				'<div style="text-align:center"><img src="' + tipinfo[0] + '" /></div>'
				+ ((tipinfo[1])? '<div style="text-align:left; margin-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]")
