:: LinkWidgets[widget]
<<widget 'linkWithImage' container>>
	<<set _styleclass = 'linkWithImage '>>
	<<if _args.length > 2>>
		<<set _styleclass += _args[2]>>
	<</if>>
	<div @class="_styleclass">
	<<image _args[0]>>
	<<set _c to _contents>>
	<<capture _c>>
		<<link _args[1]>>
			_c
		<</link>>
	<</capture>>
	</div>
<</widget>>

<<widget 'linkWithTooltip' container>>
	<<set _label = _args[0]>>
	<<set _tooltip = _args[1]>>

	<<if !$tooltipCounter>><<set $tooltipCounter = 0>><</if>>
	<<set $tooltipCounter = $tooltipCounter % 1000000>>
	<<set $tooltipCounter += 1>>
	<<set _tooltip_id = 'tooltip_'+$tooltipCounter>>
	<<set _tooltip_id_hidden = 'tooltip_'+$tooltipCounter+'_hidden'>>
	<<set _d to _contents>>

	<a @id=_tooltip_id_hidden style="display:none">
		_tooltip
	</a>
	<span @id=_tooltip_id class="withTooltip" title=""><<capture _d>><<link _label>>_d<</link>><</capture>></span>
	<<capture _tooltip_id, _tooltip_id_hidden>>
		<<done>>
			<<run setup.tooltip("#"+_tooltip_id, '#'+_tooltip_id_hidden)>>
		<</done>>
	<</capture>>
<</widget>>

<<widget 'ESC'>>
	<<if _args[0] instanceof setup.Location>>
		<<set _escPassage = _args[0].passage>>
	<<else>>
		<<set _escPassage = clone(_args.raw)>>
	<</if>>
<</widget>>
