get data from json
// check url
var url = window.location.pathname;
var output = url.indexOf('/events')!=-1;
//alert (output[0]);
if (output) {
(function eventsData() {
var flickerAPI = "http://pmone-new.pmone.de/fileadmin/theme/public/json/events.json"
$.getJSON( flickerAPI)
.done(function( data ) {
$('.right').find('> .subBox').eq(0).after('<div class="subBox eventList"></div>');
$.each( data, function( i, item ) {
//alert( data.title );
var tblRow = "<p>" + item.title + "</p>" +
"<p>" + item.description + "</p>" + "<p>" + item.location + "</p>" + "<p>" + item.url + "</p>";
$(tblRow).appendTo(".right .eventList");
});
});
})();
}