function SlTooltip(j, attributes)
{
	var hide = {
		when: {event: 'mouseout' }
    };
	
	var show = {
		when: {event: 'mouseover'}, // Don't specify a show event
		ready: attributes['showOnReady'] === true,
		effect: 'fade'
	};
	
	var ptype = 'absolute';
	
	var posCornerTooltip = 'topMiddle';
	var posCornerTarget = 'bottomMiddle';
	
	if(attributes.pos)
	{
		switch(attributes.pos)
		{
			case 'left':
				posCornerTooltip = 'rightMiddle';
				posCornerTarget = 'leftMiddle';
				break;
			case 'right':
				posCornerTooltip = 'leftMiddle';
				posCornerTarget = 'rightMiddle';
				break;
		}
	}
	
	if(attributes.block === true)
	{
		ptype = 'static';
	}
	
	if(attributes.doNotHide === true)
	{
		hide = false;
		show =  { ready: true };
	}

	this.j = j;
	this.j.qtip({
        content: attributes['content'],
        position: {
           corner: {
              tooltip: posCornerTooltip,
              target: posCornerTarget
           },
           type: ptype
        },
        show: show,
        hide: hide,
        style: { 
            width: 200,
            padding: 20,
            background: 'white',
            color: 'black',
            textAlign: 'center',
            border: {
               width: 1,
               radius: 2,
               color: '#857668'
            },
            tip: true
        }
     });
  
	if(attributes.block === true)
		{
			//this.j.remove();
		
		}
}

SlTooltip.init = function(jQuerySelector, attributes)
{
	//jQuery('#' + domId).qtip({content: tooltip, show: true});
	var o = new SlTooltip(jQuery(jQuerySelector), attributes);
}
