
$(document).ready(function() {
    $(".fg-button").hover(
        function() {
            if ($(this).attr("disabled") == false) {
                $(this).addClass("ui-state-hover");
            }
        },
        function() {
            $(this).removeClass("ui-state-hover");
        }
     );
    $(".fg-button").click(
        function() {
            $(this).addClass("ui-state-active");
        },
        function() {
            $(this).removeClass("ui-state-active");
        }
     );
    $(".NullLink").each(function() {
        $(this).attr("href", "#");
        $(this).click(function() { return false; });
    });
});



function centerItemInWindow(jQueryItemReference) {
    //request data for centering  
    var windowWidth = document.documentElement.clientWidth;
    var windowHeight = document.documentElement.clientHeight;
    var popupHeight = jQueryItemReference.height();
    var popupWidth = jQueryItemReference.width();
    //alert("windowHeight = " + windowHeight + ", windowWidth = " + windowWidth + ", popupHeight = " + popupHeight + ", popupWidth = " + popupWidth);
    //centering
    jQueryItemReference.css({
        "position": "absolute",
        "top": windowHeight / 2 - popupHeight / 2,
        "left": windowWidth / 2 - popupWidth / 2
    });
    //only need force for IE6  
}  