/**
 * Displays Facebook news from kode account
 * elemId : (Str) Id of page element, that fb wall should be displayed.
 * return : (Nothing).
 */
function displayFBWall(elemId) {
  $( function() {
    $('#'+elemId).fbWall( { 
        id:'234097533283211',
        accessToken:'206158599425293|7809823973348bcf8cd72f6d.1-100000221135225|BW9n2eoyL7EYvJs7GEmv61NbBFk',
        max: 3,
        showGuestEntries: false,
        showComments: false
    } );
  } );
}


/**
 * Checks uri, to handle one of the portfolio pages
 * uri    : (Str) Site's uri.
 * return : (Int) Index of portfolio elements to display.
 */
function handlePortfolioSites(uri) {
    var sites = new Array('motorola', 'thomsonreuters', 'penguin', 'ohim');
    var regex = /portfolio\/(\w+)$/;
    var res   = undefined;
    var index = -1;
    if ( res = uri.match(regex) ) {
        for (var i in sites) {
            if ( sites[i] == res[1] ) {
                index = parseInt(i);
                break;
            }
        }
    }
    return index;
}

