function HideAllToolTips()
{    
    $('.qtip-active').hide();
}


$(document).ready(function(){
    ReloadToolTips();
});

function ReloadToolTips()
{
    HideAllToolTips();

    if($("#WatchListInfoBlock .bottomInfoBlock .menuBottom li.whatIsYourWatchList").length > 0)
    {
        $('#WatchListInfoBlock .bottomInfoBlock .menuBottom li.whatIsYourWatchList').qtip(
        {
            content: 'Your watch list is a place to store items you are planning to bid on or have bidded on',
            position:
            {
                corner:
                {
                    target: 'bottomMiddle',
                    tooltip: 'topMiddle'
                }
            },
            style: 'blue'
        });
    }
    
    if($("#WatchListInfoBlock .bottomInfoBlock .menuBottom li.howDoIBid").length > 0)
    {
        $('#WatchListInfoBlock .bottomInfoBlock .menuBottom li.howDoIBid').qtip(
        {
            content: "Hit any red 'place bid' button on the site and enter your amount",
            position:
            {
                corner:
                {
                    target: 'bottomMiddle',
                    tooltip: 'topMiddle'
                }
            },
            style: 'blue'
        });
    }
    
    if($("#WatchListPage .watchedBGColor .whatsThis").length > 0)
    {
        $('#WatchListPage .watchedBGColor .whatsThis').qtip(
        {
            content: 'This page lists all the items you have shown interest in',
            position:
            {
                corner:
                {
                    target: 'rightMiddle',
                    tooltip: 'leftMiddle'
                }
            },
            style: 'blue'
        });
    }

    if($("#WatchListPage .unconfirmedBGColor .whatsThis").length > 0)
    {
        $('#WatchListPage .unconfirmedBGColor .whatsThis').qtip(
        {
            content: 'This page lists all your bids yet to be submitted to us',
            position:
            {
                corner:
                {
                    target: 'rightMiddle',
                    tooltip: 'leftMiddle'
                }
            },
            style: 'red'
        });
    }

    if($("#WatchListPage .submittedBGColor .whatsThis").length > 0)
    {
        $('#WatchListPage .submittedBGColor .whatsThis').qtip(
        {
            content: 'This page lists all your bids we have received from you',
            position:
            {
                corner:
                {
                    target: 'rightMiddle',
                    tooltip: 'leftMiddle'
                }
            },
            style: 'green'
        });
    }

    if($("#WatchListPage .recommendedBGColor .whatsThis").length > 0)
    {
        $('#WatchListPage .recommendedBGColor .whatsThis').qtip(
        {
            content: 'This page lists any items from future sales you may be interested in according to your entered keywords',
            position:
            {
                corner:
                {
                    target: 'rightMiddle',
                    tooltip: 'leftMiddle'
                }
            },
            style: 'black'
        });
    }

    if($(".bannerButton .requestConditionReport").length > 0)
    {
        $('.bannerButton .requestConditionReport').qtip(
        {
            content: 'Request more information about this item',
            position:
            {
                corner:
                {
                    target: 'leftMiddle',
                    tooltip: 'rightMiddle'
                }
            },
            style: 'blue'
        });
    }

    if($(".bannerButton .addToWatchList").length > 0)
    {
        $('.bannerButton .addToWatchList').qtip(
        {
            content: 'Add this item to your watch list',
            position:
            {
                corner:
                {
                    target: 'leftMiddle',
                    tooltip: 'rightMiddle'
                }
            },
            style: 'black'
        });
    }
    
    if($(".bannerButton .placeBid").length > 0)
    {
        $('.bannerButton .placeBid').qtip(
        {
            content: 'Place an unconfirmed bid',
            position:
            {
                corner:
                {
                    target: 'leftMiddle',
                    tooltip: 'rightMiddle'
                }
            },
            style: 'red'
        });
    }
    
    if($(".bannerButton .unconfirmedBid").length > 0)
    {
        $('.bannerButton .unconfirmedBid').qtip(
        {
            content: 'Bid yet to be submitted',
            position:
            {
                corner:
                {
                    target: 'leftMiddle',
                    tooltip: 'rightMiddle'
                }
            },
            style: 'red'
        });
    }
    
    if($(".bannerButton .yourBid").length > 0)
    {
        $('.bannerButton .yourBid').qtip(
        {
            content: 'Your submitted maximum bid',
            position:
            {
                corner:
                {
                    target: 'leftMiddle',
                    tooltip: 'rightMiddle'
                }
            },
            style: 'green'
        });
    }
    
    if($(".bannerButton .watching").length > 0)
    {
        $('.bannerButton .watching').qtip(
        {
            content: 'Appearing in your watch list',
            position:
            {
                corner:
                {
                    target: 'leftMiddle',
                    tooltip: 'rightMiddle'
                }
            },
            style: 'blue'
        });
    }
    
    if($(".bannerButton .lotResultsText").length > 0)
    {
        $('.bannerButton .lotResultsText').qtip(
        {
            content: 'Sorry, this sale has ended',
            position:
            {
                corner:
                {
                    target: 'leftMiddle',
                    tooltip: 'rightMiddle'
                }
            },
            style: 'black'
        });
    }
}

/* STYLINGS */
$.fn.qtip.styles.bannerButton = {
    tip: true,
    border: {
        width: 0,
        radius: 1,
        color: '#7F7F7F'
    },
    padding: '15px',
    width: 235,
    color: '#FFFFFF',
    'font-weight': 'bold'
}

$.fn.qtip.styles.black = { 
    name: 'bannerButton',
    background: '#4B4B4B'
}

$.fn.qtip.styles.green = { 
    name: 'bannerButton',
    background: '#2E8D2A'
}

$.fn.qtip.styles.red = { 
    name: 'bannerButton',
    background: '#CD1A00'
}

$.fn.qtip.styles.blue = { 
    name: 'bannerButton',
    background: '#4E87CB'
}
