function loadMultiSiteContent(uri, fnc)
{
    if (typeof uri == undefined || typeof fnc == undefined) {
        return;
    }

    uri = '/multisite/proxy/'+encodeURIComponent(uri);

    if (typeof fnc == 'function') {
        $.get(uri, fnc);
    } else {
        $(fnc).load(uri);
    }
}

$(document).ready(function(){
        // make all images in the article block teaser (that are not already linked to something)
        // link to the article node
    $('.block.articleWrapper').each(function(){
        var url = $('h1 a:eq(0)', this).attr('href');  // liz uses h1's
        url = (url) ? url : $('h2 a:eq(0)', this).attr('href'); // nufgen uses h2's
        $('img', this).each(function(){
            if (! $(this).parents('a').length) {
                $(this).wrap('<a href="'+url+'"></a>');
            }
        });
    });

    $('.mainContent div.comment a').each(function(){
        var orig = $(this).attr('href');
        if (orig.indexOf('#') == -1) {
            $(this).attr('href', orig+'#commentForm' );
        }
    });
    $('.articleWrapper .comment button[rel^="/comment"]').each(function(){
        var orig = $(this).attr('rel');
        if (orig.indexOf('#') == -1) {
            $(this).attr('rel', orig+'#commentForm' );
        }
    });
});
