jQuery - check if background image loaded
$('<img/>').attr('src', 'http://picture.de/image.png').load(function() {
$(this).remove(); // prevent memory leaks as @benweet suggested
$('body').css('background-image', 'url(http://picture.de/image.png)');
// do something
});