﻿$(document).ready(function() {
    if (typeof Sys !== "undefined") {
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_pageLoaded(InovexRadioButtonList_PageLoadedHandler);
    }
});

function InovexRadioButtonList_PageLoadedHandler(sender, args) {
    LoadInovexRadioButtonListEvents();
}

function LoadInovexRadioButtonListEvents() {
    var inovexRadioButtonList = $("table.radiobuttonlistAuto[id$=RadioButtonList]");
    inovexRadioButtonList.each(function(i) {
        var htmlContent = $(this).siblings(".hint").html();

        if (jQuery.trim(htmlContent) != "") {
            $(this).unbind("mouseover").bind("mouseover", { htmlContent: htmlContent }, InovexUserControlHintFocused)
            .unbind("mouseout").bind("mouseout", {}, InovexUserControlHintLostFocus);
        }
    });
}

// Fixes the following error:
// Microsoft JScript runtime error: Sys.ScriptLoadFailedException: The script '...' failed to load. Check for: Inaccessible path.
if (typeof Sys !== "undefined") { Sys.Application.notifyScriptLoaded(); }

