Pues lo he hecho todo como me dijiste pero no se por que, si te parece me ayudas paso a paso
1 de todo, inserta el script debajo del <body> + la imagen de debajo del script. CUando lo hagas avisame y reviso
<script type="text/javascript">
function updateBackground() {
screenWidth = $(window).width();
screenHeight = $(window).height();
var bg = jQuery("#bg");
// Proporcion horizontal/vertical. En este caso la imagen es cuadrada
ratio = 1;
if (screenWidth/screenHeight > ratio) {
$(bg).height("auto");
$(bg).width("100%");
} else {
$(bg).width("auto");
$(bg).height("100%");
}
// Si a la imagen le sobra anchura, la centramos a mano
if ($(bg).width() > 0) {
$(bg).css('left', (screenWidth - $(bg).width()) / 2);
}
}
$(document).ready(function() {
// Actualizamos el fondo al cargar la pagina
updateBackground();
$(window).bind("resize", function() {
// Y tambien cada vez que se redimensione el navegador
updateBackground();
});
});
</script>
<img id="bg" src="/images/fondo.jpg" alt="Fondo" />