﻿//Functions for use with Prototip Tooltips within BevMo

//Generic tooltip for what's this button
function whatsThisTipBase(tipDomId, tipTitle, tipContentElementId, hookTarget, hookTip)
{
    return new Tip(tipDomId, $(tipContentElementId).innerHTML,
        {
            className: 'bevmo',
            title: tipTitle,
            showOn: 'click',
            hideOn: false,
            hideAfter: 3,
            closeButton: true,
            fixed: true,
            effect: 'appear',
            hook: {target: hookTarget, tip: hookTip}
        }
    );
}

function whatsThisTip(tipDomId, tipTitle, tipContentElementId)
{
    return whatsThisTipBase(
        tipDomId, 
        tipTitle, 
        tipContentElementId,
        'topRight',
        'bottomLeft'
        );
}

//Generic tooltip for award winner products
function awardWinnerTip(tipDomId, tipContentElementId)
{
    return new Tip(tipDomId, $(tipContentElementId).innerHTML,
        {
            className: 'bevmo',
            title: 'Product Awards',
            showOn: 'click',
            hideOn: false,
            hideAfter: 3,
            closeButton: true,
            fixed: true,
            effect: 'appear',
            hook: {target: 'topRight', tip: 'bottomLeft'}
        }
    );
}

function GenericTip(tipDomId,tipTitle,tipContent,tipCssClass)
{
            
     return new Tip(tipDomId, tipContent,
        {
            className: tipCssClass,
            title: tipTitle,
            showOn: 'click',
            hideOn: false,
            hideAfter: 1,
            closeButton: true,
            fixed: false,
            effect: 'appear'
            
        }
    );
}

function GenericTipTopLeft(tipDomId,tipTitle,tipContent,tipCssClass)
{
            
     return new Tip(tipDomId, tipContent,
        {
            className: tipCssClass,
            title: tipTitle,
            showOn: 'click',
            hideOn: false,
            hideAfter: 1,
            closeButton: true,
            fixed: true,
            effect: 'appear'           
        }
    );
}