These functions works perfectly, but I be sure that there is a smarter way than this:
$(window).scroll(function(){
$('#header').css({
'left': $(this).scrollLeft() + (($(window).width() - $("#header").width()) / 2)
});
});
$(window).resize(function(){
$('#header').css({
'left': $(this).scrollLeft() + (($(window).width() - $("#header").width()) / 2)
});
});
$(function(){
$('#header').css({
'left': $(this).scrollLeft() + (($(window).width() - $("#header").width()) / 2)
});
});