$(document).ready(function() {
    $(".peopleTooltip").each(
        function(){    
            //QTip ajax for day content
            //Suppress Title
            var pid = $(this).attr("title");
            $(this).attr("title", "");

            var tip_url = '/profile/tooltip/' + pid + '/';
            if ($(this).hasClass('peopleTooltipIcon')) {
                tip_url += '?show_icon=true';
            }

            $(this).qtip({

               content: {
                  text: '<img src="/public/images/core/util/loading.gif" /> Loading User Info',
                  url: tip_url
               },
               style: {
                  width:250, background: '#fff', tip: 'bottomLeft', color: '#000', border: { width: 1, radius: 3, color: '#3D3D3D'}
               },
               show: {
                   solo: true, when: { event: 'mouseover'}
               },
               hide: {
                    fixed: true, when: { event: 'mouseout'}
               },
               position: {
                    target: 'mouse', adjust: { mouse: true}, corner: { target: 'mouse', tooltip: 'bottomLeft' }
               }
            });
        }
    )
});
