function newsLoad() {
    $('#newsitems').fadeOut(1000, function() {
        $('#newsitems').load('/getAjaxNews?pa=' + Math.floor(Math.random()*10000));
    });
    $('#newsitems').fadeIn(1000);
}

function eventsLoad() {
    $('#eventitems').fadeOut(1000, function() {
        $('#eventitems').load('/getAjaxEvents?pa=' + Math.floor(Math.random()*10000));
    });
    $('#eventitems').fadeIn(1000);
}

function testimonialsLoad() {
    $('#testimonialitems').fadeOut(1000, function() {
        $('#testimonialitems').load('/getAjaxTestimonials?pa=' + Math.floor(Math.random()*10000));
    });
    $('#testimonialitems').fadeIn(1000);
}


$(document).ready(
    function onDocumentLoad() {

        $(this).everyTime('15s', function() {
            newsLoad();
        });

        $(this).everyTime('25s', function() {
           testimonialsLoad();
        });

        newsLoad();
        testimonialsLoad();

});

