$(function() {
    $.getJSON('js/apps.json', function(data) {
        $.each(data, function(id, props) {
            var div = $('#'+id).show();
            if (props.hasOwnProperty('url'))
                div.find('h2 a').attr('href', props.url.replace('{host}', window.location.hostname));
            $.each(props, function(key, value) {
                div.find('.'+key).text(value.replace('{host}', window.location.hostname));
            });
        });
    });
});
