$.fn.repositionBackground = function(){
 
            if($(window).height() > $("#wrapper").height()){
                var newOffset = $(window).height() / 2 - 2000;
                var newY = $(window).height() / 2 - $("#wrapper").height() / 2;
                $("#wrapper").css({'top': newY + 'px'});
                $("body").css({'background-position': 'left ' + newOffset+ 'px'});
            }
            else{ //make wrapper and background stick if window too small
                $("#wrapper").css({'top': '0'});
                var newOffset = $("#wrapper").height() / 2 - 2000;
                $("body").css({'background-position': 'left ' + newOffset+ 'px'});
            }
 
            if($(window).width() > $("#wrapper").width()){
                var newX =  $(window).width() / 2 - $("#wrapper").width() / 2;
                $("#wrapper").css({'left': newX + 'px'});
            }
            else{
                $("#wrapper").css({'left': '0'});
            }
        }
 
        $(document).ready(function(){
            $(this).repositionBackground();
        });
 
        $(window).resize(function(){
            $(this).repositionBackground();
        });
