documentWidth=0;
windowWidth=0
jQuery($(window).resize(function() {
            if(($(window).width()<windowWidth)){
                $("#header").width(documentWidth);
                $("#footer_wrapper").width(documentWidth);
                $("#navbar_main_wrapper").width(documentWidth);
            }
                $("#header").width($(document).width());
                $("#footer_wrapper").width($(document).width());
                $("#navbar_main_wrapper").width($(document).width());
            documentWidth=$(document).width();
            windowWidth=$(window).width();
            var wrapperWidth=$("#content_wrapper").width();
            var docWidth=$(document).width();
            var winWidth=$(window).width();
            $("#content_wrapper").css('margin-left',(docWidth-wrapperWidth)/2);
            $("html,body").scrollLeft((docWidth-winWidth)/2);
            //$('html,body').animate({ scrollLeft: (docWidth-winWidth)/2}, 0);
            }));

jQuery($(document).ready(function(){
            documentWidth=$(document).width();
            windowWidth=$(window).width();
                $("#header").width($(document).width());
                $("#footer_wrapper").width($(document).width());
                $("#navbar_main_wrapper").width($(document).width());
            }));

