﻿var partners_obj = {};

partners_obj.pbrText = "<p class='popup_title'>Powered by Relativity</p><p>Method is an application that is “Powered by Relativity.”  This designation represents applications that are built for Relativity and run completely within the platform’s user interface.</p>"


function showTooltip(elem) {
    var popup = getHiddenSection(elem);
    popup.stop(true, true).fadeIn('fast', function () {

        if ($.browser.msie) {
            if ($.browser.version <= 7) {

                this.style.removeAttribute("filter");
            }
        }


    });



};

function hideTooltip(elem) {
    var popup = getHiddenSection(elem);
    popup.stop(true, true).fadeOut('fast', function () { });
}

function getHiddenSection(toggle_button) {


    return toggle_button.siblings("div.popup_wrapper").children("div.add-info");

    // return toggle_button.siblings("div.add-info");
}

try {
    Typekit.load({
        /*
        * This funtion will be called as soon as fonts have started loading.
        */
        loading: function (data) {
            // fonts are loading.
        },

        /*
        * This function will be called after the fonts have loaded and rendered.
        */
        active: function () {
            // fonts have loaded!
        },

        /*
        * This function will be called if Typekit does not support the current browser.
        */
        inactive: function () {
            // this browser doesn't support fonts
        }

    });
} catch (e) { }

$(document).ready(function () {
    $("a.pbr_popup").each(function () {
        // $(this).siblings("div.add-info").html(partners_obj.caTitle + $(this).siblings("div.add-info").html() + partners_obj.caText);
        $(this).siblings("div.popup_wrapper").children("div.add-info").html(partners_obj.pbrText);

    });
    $("a.pbr_popup").mouseover(function () {
        showTooltip($(this));
        return false;
    });
    $("a.pbr_popup").mouseout(function () {
        hideTooltip($(this));
        return false;
    });
}); 
