jQuery(function($) {

    clickableList();

    $('input[title!=""]').hint();

});

clickableList = function() {

    var liRE = /^li$/i;
    var inRE = /^(input|a|button|label|textarea)$/i;

    // Click
    $('#content .list_members .list_content ul:not(.sorters) li, #content .list_members .CommonFileContent, #content .list_networks .CommonSideListArea:not(".CommonSideListAreaHeader"), #content .list_media:not(".list_media_detail") .CommonFileArea, #content ul.CommonAvatarListItemList > li').click(function(e){
        var target = e.target||e.srcElement;
        while (target.parentNode != null && !liRE.test(target.nodeName)) {
            if (target.nodeName && inRE.test(target.nodeName)) return;
            target = target.parentNode;
        }
        window.location=$(this).find("a").attr("href");
        return false;
    });

    // Hover
    $('#content .list_members .list_content ul:not(.sorters) li, #content .list_members .CommonFileContent, #content .list_networks .CommonSideListArea:not(".CommonSideListAreaHeader"), #content .list_media:not(".list_media_detail") .CommonFileArea, #content ul.CommonAvatarListItemList > li').hover(function() {
        $(this).addClass('hover')
    }, function() {
        $(this).removeClass('hover')
    });

}

function reconfigureTelligentModal () {
    Telligent_Modal.Configure('/communities/utility/loading.htm',['CommonModal'],['CommonModalTitle'],['CommonModalClose'],['CommonModalContent'],['CommonModalFooter'],['CommonModalResize'],['CommonModalMask'],100,false);
    Telligent_Modal._startDrag = function() {};
    Telligent_Modal._startResize = function() {};
    Telligent_Modal._checkForScrollResize = function() {};
    window.clearTimeout(Telligent_Modal._checkForScrollResizeHandle);
    //Telligent_Modal.Dispose();
}

function openTelligentModal (url,width,height,onCloseFunction) {
    if (null != location.href.match("wieiswie")) width = width/2;
    Telligent_Modal.Open(url,width,height,onCloseFunction);
}

