//-----------------------------------------------------------
// Help popup
//-----------------------------------------------------------
<!--

var isIE = $.browser.msie;

$(document).ready(function() {

	// requires beauty tip js, excanvas js, bgiframe js, hover intent js (optional)
	// beauty tip does not work with right to left languages

	var rtl= isInterfaceLangRightToLeft();
	var useBeautyTip=!rtl;

	// if position not absolute then helptip positioned in wrong place
	if (rtl && isIE) 
		$('.helpmarker').css({'position':'absolute'});

	if (useBeautyTip) {

		$('.helpmarker').bt({
			width: 125,
			spikeLength: 25,
			spikeGirth: 20,
			positions: ['right','bottom','left','top'],
			overlap: -5,
			fill: 'white',
			strokeWidth: 3,
			strokeStyle: '#99BB77',
			padding: 10,
			cornerRadius: 10,
			cssStyles: {fontSize: '75%'}
		});
	}
	else {
		$('.helpmarker').hover(

			function() {
				$(this).attr('title','');
				var helpMarkerID=$(this).attr('id');
				var helpIndex=helpMarkerID.replace('helpmarker','');
				var helpMarkerPos=$(this).offset();
				var helpMarkerWidth=$(this).width();
				var helpTipWidth=$('#helptip'+helpIndex).width();
				if (isInterfaceLangRightToLeft()) {
					var helpTipLeft=helpMarkerPos.left-22-helpTipWidth;
				}
				else {
					var helpTipLeft=helpMarkerPos.left+helpMarkerWidth+10;
				}
				var helpTipTop=helpMarkerPos.top;
	
				$('#helptip'+helpIndex).css({left:helpTipLeft+"px", top:helpTipTop+"px"});
				$('#helptip'+helpIndex).show("blind",{},500,null);
	
			}, function() {
				$(this).attr('title','');
				var helpMarkerID=$(this).attr('id');
				var helpIndex=helpMarkerID.replace('helpmarker','');
				// flickers in ie
				//$('#helptip'+helpIndex).hide("blind",{},500,null);
				$('#helptip'+helpIndex).hide();
			});
	}
});

//-->
