// configuration variable for the hint object, these setting will be shared among all hints created by this object
var HINTS_CFG = {
	'smart'      : true, // don't go off screen, don't overlap the object in the document
	'margin'     : 10, // minimum allowed distance between the hint and the window edge (negative values accepted)
	'gap'        : -1, // minimum allowed distance between the hint and the origin (negative values accepted)
	'align'      : 'bctl', // align of the hint and the origin (by first letters origin's top|middle|bottom left|center|right to hint's top|middle|bottom left|center|right)
	'css'        : '', // a style class name for all hints, applied to DIV element (see style section in the header of the document)
	'show_delay' : 200, // a delay between initiating event (mouseover for example) and hint appearing
	'hide_delay' : 500, // a delay between closing event (mouseout for example) and hint disappearing
	'follow'     : false, // hint follows the mouse as it moves
	'z-index'    : 100, // a z-index for all hint layers
	'IEfix'      : false, // fix IE problem with windowed controls visible through hints (activate if select boxes are visible through the hints)
	'IEtrans'    : ['blendTrans(DURATION=.3)'], // [show transition, hide transition] - transition effects, only work in IE5+
	'opacity'    : 90 // opacity of the hint in %%
};
// text/HTML of the hints
var HINTS_ITEMS = [
	wrap2('<a href="http://www.arenal.net" target="_blank"><img src="imgs/web025.jpg" /></a>'),
	wrap2('<a href="http://www.fortunawelcome.com" target="_blank"><img src="imgs/web026.jpg" /></a>'),
	wrap('<a href="http://www.arenalonline.com" target="_blank">www.arenalonline.com</a>', 'imgs/warning.gif'),
	wrap2('<a href="http://www.tabacon.com" target="_blank"><img src="imgs/tabacon.gif" /></a>'),
	wrap2('<div align="center"><img src="imgs/volcano.jpg" /><br /><br /><b>Arenal Volcano</b></div>'),
	wrap2('<a href="http://www.skytrek.com" target="_blank"><img src="imgs/Skytram.jpg" /></a>'),
	wrap2('<a href="http://www.desafiocostarica.com" target="_blank"><img src="imgs/desafio.jpg" /></a>'),
	wrap2('<a href="http://www.arenalmundoaventura.com" target="_blank"><img src="imgs/web021.jpg" /></a>'),
	wrap2('<a href="http://www.natureair.com" target="_blank"><img src="imgs/web022.jpg" /></a><br /><br /><a href="http://www.flysansa.com" target="_blank"><img src="imgs/web023.jpg" /></a>'),
	wrap2('<b>Arenal Lake</b>'),
	wrap2('<img src="imgs/village.jpg" /><br /><b>Arenal Rainforest Village</b><br /><br />GPS<br />N 10&#176; 23&#39; 20&#176;<br />E 84&#176; 34&#39; 50&#176;'),
	wrap2('<a href="http://www.fincalunanuevalodge.com" target="_blank"><img src="imgs/lunanueva.jpg" /></a>'),
	wrap2('<a href="http://lacarretahotel.com" target="_blank"><img src="imgs/lacarreta.jpg" /></a>'),
	wrap2('<b>Arenal Volcano National Park</b><br /><a href="http://www.costarica-nationalparks.com/arenalnationalpark.html" target="_blank">www.costarica-nationalparks.com/arenalnationalpark.html</a>'),
	wrap2('<a href="http://www.acmcr.org" target="_blank"><img src="imgs/childrens rainforest.jpg" /></a>'),
	wrap2('<b>Manuel Brenes Biological Reserve</b><br /><a href="http://www.costarica-nationalparks.com/albertobrenesbiologicalreserve.html" target="_blank">www.costarica-nationalparks.com/albertobrenesbiologicalreserve.html</a>'),
	wrap2('<a href="http://www.canopysanlorenzo.com" target="_blank">www.canopysanlorenzo.com</a>'),
	wrap2('<a href="http://landsinlove.com" target="_blank"><img src="imgs/landsin.gif" /></a>'),
	wrap2('<a href="http://chachaguarainforesthotel.com" target="_blank"><img src="imgs/chachagua.gif" /></a>')
];

// this custom function receives what's unique about individual hint and wraps it in the HTML template
function wrap (s_text, s_icon) {
	return '<table cellpadding="0" cellspacing="0" border="0"><tr><td rowspan="2"><img src="' + s_icon + '"></td><td colspan="2"><img src="imgs/pixel.gif" width="1" height="15"></td></tr><tr><td background="imgs/2.gif" height="28" nowrap>' + s_text + '</td><td><img src="imgs/4.gif"></td></tr></table>';
}
// multiple templates/functions can be used in the same page
function wrap2 (s_text) {
	return [
		'<table cellpadding="0" cellspacing="0" border="0">',
		'<tr><td><img src="imgs/corner_tl.gif" width="10" height="10" /></td><td style="background-image:url(imgs/side_t.gif)"></td><td><img src="imgs/corner_tr.gif" width="10" height="10" /></td></tr>',
		'<tr><td style="background-image:url(imgs/side_l.gif)"></td><td class="hintText">', s_text ,'</td><td style="background-image:url(imgs/side_r.gif)"></td></tr>',
		'<tr><td><img src="imgs/corner_bl.gif" width="10" height="10" /></td><td style="background-image:url(imgs/side_b.gif)"></td><td><img src="imgs/corner_br.gif" width="10" height="10" /></td></tr>',
		'</table>'
	].join('');
}

var myHint = new THints (HINTS_ITEMS, HINTS_CFG);