

/***********************************************
* Image w/ description tooltip- By Dynamic Web Coding (www.dyn-web.com)
* Copyright 2002-2007 by Sharon Paine
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* IMPORTANT: Put script after tooltip div or 
	 put tooltip div just before </BODY>. */

var dom = (document.getElementById) ? true : false;
var ns5 = (!document.all && dom || window.opera) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ie4 && !ie5 && !dom) ? true : false;

var origWidth, origHeight;

// avoid error of passing event object in older browsers
if (nodyn) { event = "nope" }

///////////////////////  CUSTOMIZE HERE   ////////////////////
// settings for tooltip 
// Do you want tip to move when mouse moves over link?
var tipFollowMouse= true;	
// Be sure to set tipWidth wide enough for widest image
var tipWidth= 350;
var offX= 10;	// how far from mouse to show tip
var offY= 12; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "8pt";
// set default text color and background color for tooltip here
// individual tooltips can have their own (set in messages arrays)
// but don't have to
var tipFontColor= "#000000";
var tipBgColor= "#D9D9DE"; 
var tipBorderColor= "#0F4A80";
var tipBorderWidth= 2;
var tipBorderStyle= "ridge";
var tipPadding= 4;

// tooltip content goes here (image, description, optional bgColor, optional textcolor)
var messages = new Array();
// multi-dimensional arrays containing: 
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip
messages[0] = new Array('http://www.getinkpr.com/images/rightlowerimages/popup/image1.jpg','Leblon Cacha&#231;a','black','white');
messages[1] = new Array('http://www.getinkpr.com/images/rightlowerimages/popup/image22_022609.jpg','Area 31 Private Dining Room','black','white');
messages[2] = new Array('http://www.getinkpr.com/images/rightlowerimages/popup/image3_022609.jpg','Francisca Bastos Design','black','white');
messages[3] = new Array('http://www.getinkpr.com/images/rightlowerimages/popup/image4_022609.jpg','The Grill Friends of Wine and Food','black','white');
messages[4] = new Array('http://www.getinkpr.com/images/rightlowerimages/popup/image5_022609.jpg','Rosa Mexicano','black','white');
messages[5] = new Array('http://www.getinkpr.com/images/home/header/Oprahbig.jpg','Kirk Perron, founder Jamba Juice<br>Oprah Winfrey Show','black','white');
messages[6] = new Array('http://www.getinkpr.com/images/home/header/Davidbig.jpg','David Hyde Pierce, Shelley Fabres<br>Alzheimer&#146;s Memory Walk','black','white');
messages[7] = new Array('http://www.getinkpr.com/images/pops/image4_022609.jpg','Lindsey Waite, Joseph Quinones, Ellen Marchman<br/>The Grill on the Alley Grand Opening','black','white');
messages[8] = new Array('http://www.getinkpr.com/images/pops/image3_022609.jpg','Chef Jeff McInnis, Ellen Marchman, Chef John Critchley<br/>Area 31 Grand Opening','black','white');
messages[9] = new Array('http://www.getinkpr.com/images/home/header/bnewimage3.jpg','Dana Rhoden, Patrick McMullan<br>Book Launch','black','white');
messages[10] = new Array('','<b>LEBLON Cacha&#231;a <br/><i>Philadelphia Business Journal</i></b>','#EEEEEE','black');
messages[11] = new Array('','<b>LEBLON Cacha&#231;a <br/><i>Wall Street Journal</i></b>','#EEEEEE','black');
messages[12] = new Array('','<b>LEBLON Cacha&#231;a <br/><i>Miami Herald</i></b>','#EEEEEE','black');
messages[13] = new Array('','<b>LEBLON Cacha&#231;a <br/><i>Ocean Drive</i></b>','#EEEEEE','black');
messages[14] = new Array('','<b>LEBLON Cacha&#231;a <br/><i>Palm Beach</br> Cottage & Gardens</i></b>','#EEEEEE','black');
messages[15] = new Array('','<b>Santo Restaurant<br/><i>Playboy</i></b>','#EEEEEE','black');
messages[16] = new Array('','<b>Santo Restaurant<br/><i>Florida International Magazine</i></b>','#EEEEEE','black');
messages[17] = new Array('','<b>Santo Restaurant<br/><i>Living Real Miami</i></b>','#EEEEEE','black');
messages[18] = new Array('','<b>Pelican Hotel<br/><i>Miami Herald</i></b>','#EEEEEE','black');
messages[19] = new Array('','<b>Pelican Hotel<br/><i>Where Magazine</i></b>','#EEEEEE','black');
messages[20] = new Array('','<b>Rosa Mexicano <br/><i>Florida International Magazine<i>','#EEEEEE','black');
messages[21] = new Array('','<b>Rosa Mexicano <br/><i>Palm Beach Illustrated<i>','#EEEEEE','black');
messages[22] = new Array('','<b>Area 31<br/><i>Daily Candy </i></b>','#EEEEEE','black');
messages[23] = new Array('','<b>Rosa Mexicano <br/><i>Ocean Drive en Espanol<i>','#EEEEEE','black');
messages[24] = new Array('','<b>Rosa Mexicano <br/><i>Selecta<i>','#EEEEEE','black');
messages[25] = new Array('','<b>Eurochow<br/><i>Detour</i>','#EEEEEE','black');
messages[26] = new Array('','<b>Eurochow<br/><i>Detour</i></b>','#EEEEEE','black');
messages[27] = new Array('','<b>Eurochow<br/><i>Los Angeles Magazine</i></b>','#EEEEEE','black');
messages[28] = new Array('','<b>Eurochow<br/><i>Daily Variety</i></b>','#EEEEEE','black');
messages[29] = new Array('','<b>Loews Hotel<br/><i>The New York Times</i></b>','#EEEEEE','black');
messages[30] = new Array('','<b>Karu &amp; Y<br/><i>Hospitality Design</i></b>','#EEEEEE','black');
messages[31] = new Array('','<b>Karu &amp; Y<br/><i>Hospitality Design</i></b>','#EEEEEE','black');
messages[32] = new Array('','<b>Karu &amp; Y<br/><i>The Wall Street Journal</i></b>','#EEEEEE','black');
messages[33] = new Array('','<b>Karu &amp; Y<br/><i>Flaunt</i></b>','#EEEEEE','black');
messages[34] = new Array('','<b>Karu &amp; Y<br/><i>Flaunt</i></b>','#EEEEEE','black');
messages[35] = new Array('http://www.getinkpr.com/images/cevents/POLO-INVITE-1.jpg','','','black');
messages[36] = new Array('http://www.getinkpr.com/images/cevents/RisingStars-PalmBeach_Illustrated-Ad.jpg','','','black');
/*Previews*/
messages[37] = new Array('','<b>LEBLON Cacha&#231;a <br/><i>Simply the Best</i></b>','#EEEEEE','black');
messages[38] = new Array('','<b>Jaguar Ceviche <br/><i>Vogue Latin America</i></b>','#EEEEEE','black');
messages[39] = new Array('','<b>Rosa Mexicano <br/><i>Palm Beach Illustrated</i></b>','#EEEEEE','black');
/*DVD CLIPS*/
messages[40] = new Array('','<b>cool de sac play caf&eacute;</b>','#EEEEEE','black');
messages[41] = new Array('','<b>LEBLON Cacha&#231;a</b>','#EEEEEE','black');
messages[42] = new Array('','<b>Jaguar Ceviche','#EEEEEE','black');
/*Preview 052809*/
messages[48] = new Array('','<b>Area 31','#EEEEEE','black');
/*Previews-022609*/
messages[43] = new Array('','<b>The Grill on the Alley<br/><i>Cravings of Aventura</i></b>','#EEEEEE','black');
messages[44] = new Array('','<b>Area 31<br/><i>Miami New Times </i></b>','#EEEEEE','black');
messages[45] = new Array('','<b>Francisco Bastos Design<br/><i>Where Miami</i></b>','#EEEEEE','black');
messages[46] = new Array('','<b>Area 31<br/><i>Restaurant Hospitality </i></b>','#EEEEEE','black');
messages[47] = new Array('','<b>Jeff McInnis<br/><i>Top Chef Contestant </i></b>','#EEEEEE','black');
messages[48] = new Array('','<b>Area 31<br/><i>Miami Herald</i></b>','#EEEEEE','black');
messages[49] = new Array('','<b>The Grill on the Alley<br/><i>Miami Herald</i></b>','#EEEEEE','black');
messages[50] = new Array('','<b>Area 31 Restaurant<br/><i>Travel + Leisure</i></b>','#EEEEEE','black');
messages[51] = new Array('','<b>Area 31<br/><i>Esquire Magazine</i></b>','#EEEEEE','black');
/*new top of features (press) image*/
messages[52] = new Array('http://www.getinkpr.com/images/rightlowerimages/popup/Ellen-Louis-Shireen.jpg','Ellen Marchman, Louis Aguirre, Shireen Sandoval<br/>Deco Drive at DELISHE','black','white');
/*Salon Vaso Event 121609 */
messages[53] = new Array('http://www.getinkpr.com/images/cevents/XMas-Stimulus-Packagefull.jpg','','','black');
/*Area 31 New Press Clip */
messages[54] = new Array('','<b>Area 31 Restaurant<br/><i>New York Times</i></b>','#EEEEEE','black');
messages[55] = new Array('','<b>New World Symphony</b>','#EEEEEE','black');
messages[56] = new Array('http://www.getinkpr.com/images/cevents/Acu2020_Flyer_0310bg.jpg','','','black');


////////////////////  END OF CUSTOMIZATION AREA  ///////////////////

// preload images that are to appear in tooltip
// from arrays above
if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

// to layout image and text, 2-row table, image centered in top cell
// these go in var tip in doTooltip function
// startStr goes before image, midStr goes between image and text
//var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
var startStr = '<table ><tr><td align="center" >'
var imgStr = '<img src="';
var midStr = '" border="0">';
var endtablestring = '</td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

////////////////////////////////////////////////////////////
//  initTip	- initialization for tooltip.
//		Global variables for tooltip. 
//		Set styles
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		//tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

/////////////////////////////////////////////////
//  doTooltip function
//			Assembles content for tooltip and writes 
//			it to tipDiv
/////////////////////////////////////////////////
var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	// set colors if included in messages array
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ie4||ie5||ns5) {
			//var tip = startStr + 
			if (messages[num][0])  {
				var tip = startStr +imgStr + messages[num][0] + midStr + endtablestring + '<div align="center"><span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span></div>' + endStr;
			}			
				else	{
				var tip = startStr + endtablestring + '<div align="center"><span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span></div>' + endStr;
			}
			

		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
	mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	if (tipOn) positionTip(evt);
}

/////////////////////////////////////////////////////////////
//  positionTip function
//		If tipFollowMouse set false, so trackMouse function
//		not being used, get position of mouseover event.
//		Calculations use mouseover event position, 
//		offset amounts and tooltip width to position
//		tooltip within window.
/////////////////////////////////////////////////////////////
function positionTip(evt) {
	if (!tipFollowMouse) {
		mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
		mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;
	var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
/////////////////adding here
		if (messages[4] || messages[3])  {
			if ((mouseX+offX+tpWd)>winWd) 
				//tipcss.left = mouseX-(tpWd+20)+"px";
				tipcss.left = mouseX-(tpWd+40)+"px";
			else tipcss.left = mouseX-40+"px";
		}
		else if (messages[14] || messages[19] || messages[24] || messages[29] || messages[34]) {
			if ((mouseX+offX+tpWd)>winWd) 
				//tipcss.left = mouseX-(tpWd+20)+"px";
				tipcss.left = mouseX-(tpWd+20)+"px";
			else tipcss.left = mouseX-40+"px";
		}
		else  {
			if ((mouseX+offX+tpWd)>winWd) 
				tipcss.left = mouseX-(tpWd+offX)+"px";
			else tipcss.left = mouseX+offX+"px";
		}
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = winHt-(tpHt+offY)+"px";
	else tipcss.top = mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

document.write('<div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>')


