function changeCaption(project) {
    if (project.id !== currentCaption) {
        // adjust arrows icon color
        $('#icon-' + currentCaption).attr('src', 'img/icon-arrows-orange.png');
        $('#icon-' + project.id).fadeOut('fast', function() {
            $(this).attr('src', 'img/icon-arrows-blue.png');
        }).fadeIn('fast');
            
        // fade out current content
        $('#caption #content').fadeOut('slow', function() {
            // adjust caption content
            $('#screenshot').attr('src', webroot + 'upload/previews/' + project.id + '.png');
            $('#screenshot').attr('alt', project.project_name);
            $('#client').html(project.client_name + '<br />' + project.client_desc);
            $('#technology').html(project.project_tech);
            $('#screen_url').attr('href', webroot + 'projects/view/' + project.id);
        // fade in new content
        }).fadeIn('slow');
            
        // set current caption to new ID
        currentCaption = project.id;
    }
}
