function SectionLoader(boxShift) {
   
    // systematically load in the sections of the site

    // id, url for the sections
  
    var sections = {
        'location': '/' + lang + '/home/#restaurant-finder',
        'menu': '/' + lang + '/home/#menu',
        'about': '/' + lang + '/home/#about-us',
        'specials': '/' + lang + '/home/#specials',
		'media': '/' + lang + '/home/#media'
      
    };
   

    // make sure to update this when adding sections
    var total_load = 5;
    
    var current_load = 0;
    
    // javascript initializations for different sections
    // need to go in here
    initSectionJS = function (p_id) {


        if (p_id == 'menu') {
            menuHandler = new MenuHandler();
            var timeMenu = new TimeMenu();
            
        }
        if (p_id == 'media') {
            tvTabScroller();
            filmTabScroller();
            newsTabScroller();
            //$('#news').click(function () {  });
        }

        if (p_id == 'specials') {
            var promo = new Promo();
        }

        swapTitles(p_id);
        addCorners(p_id);
    };


    initLoadDoneJS = function () {
      
        var miscSwitches = new MiscSwitches(boxShift);
        var urlHandler = new UrlHandler(boxShift);
        var miscEnd = new MiscEnd();
    };

    swapTitles = function (p_id) {

        if ($.browser.msie) {
            $('#' + p_id + ' h2 span').each(function (key, element) {
                $(this).addClass('img');
                $(this).html('<img class="title" src="/img/titles/' + $(this).attr('data-img') + '"/>');
            });

            $('#' + p_id + ' h1 span').each(function (key, element) {
                $(this).addClass('img');
                $(this).html('<img class="title" src="/img/titles/' + $(this).attr('data-img') + '"/>');
            });
        }
    }

    addCorners = function (p_id) {
        if ($.browser.msie && $.browser.version < 9) {
            $('#' + p_id + ' div.whole, #' + p_id + ' div.leftHalf, #' + p_id + ' div.rightHalf, #' + p_id + ' div.leftOneThird, #' + p_id + ' div.rightOneThird, #' + p_id + ' div.leftTwoThird, #' + p_id + ' div.rightTwoThird').each(function (index, value) {
                $(this).prepend('<div class="top corners">&nbsp;</div>');
                $(this).append('<div class="bottom corners">&nbsp;</div>');
            });
        }
    }


    this.init = function () {
        swapTitles('home');
        addCorners('home');
        $('#location').toggle();
        $('#menu').toggle();

    };

    this.loadAll = function () {
        $.each(sections, function (id, url) {
           url = url.replace("#", "%23");
          
            $('#' + id).load(url, function () {
                $(this).fadeIn(1000);

                // init the JS for that section
                initSectionJS(id);

                // increase the marker for what section we're on
                current_load++;
                if (current_load == total_load) {
                    initLoadDoneJS();
                }

            });
        });

    };


}
