Since it is position:fixed
just add width:100%
to the css rule and it will auto adjust on its own..
header{
background-color: #005e00;
display: block;
position: fixed;
z-index: 500;
width:100%;
box-shadow: 0px 5px 5px #888888;
}
no need for scripting..
Demo at http://jsfiddle.net/b9knL/2/