﻿var CluetipForumMenu = function() {
	return {
		init:function(context) {
			context = context || document;
			jQuery('.cluetip', context).cluetip({
				width:300,
				dropShadow:false,
				sticky:true,
				mouseOutClose:true,
				showTitle:false,
				local:true,
				arrows:true,
				topOffset:-15,
				leftOffset:-15,
				positionBy:'fixed',
				cluetipClass:     'ForumMenu',
				closeText: '<img src="/stylesSC/clueTip/Close.gif" alt="lukk" border="0" style="float: right; margin: 5px;" />',
				hoverIntent: {sensitivity: 100, interval: 50, timeout: 0}
			});
			jQuery('.cluetip', context).attr('title',''); // Clear title attributes
			jQuery('.cluetip img', context).attr('title','');
			jQuery('body').click(function() { // Hide tooltips when the mouse is clicked
			    if ($('cluetip')) //NOTE: if-statement added by Trive.
			    {
				    $('cluetip').hide(); //NOTE: Changed from $('#cluetip').hide(); to avoid conflict between JQuery and Prototype
				}
			});
		}
	};
}();
