var CourseList = {
    show_list: function(course_index) {
        WSData.fetch_course_data(CourseList.render_list, [course_index]);
    },

    render_list: function(course_index) {
        if (course_index === undefined) {
            $('html,body').animate({scrollTop: 0}, 'fast');
        }

        WSData.normalize_instructors();
        var course_data = WSData.course_data();
        var index = 0;
        for (index = 0; index < course_data.sections.length; index++) {
            course_data.sections[index].index = index;
        }

        source = $("#quarter-list").html();
        template = Handlebars.compile(source);
        $("#page-header").html(template({year: course_data.year, quarter: course_data.quarter}));

        // In case someone backs onto the page from a modal
        Modal.hide();

        if (course_index !== undefined) {
            $("#course"+course_index).collapse('show');
            $('html,body').animate({scrollTop: $("#course_wrapper"+course_index).offset().top},'slow');
        }

        // Handle the case of no courses
        if (course_data.sections.length == 0) {
            var source   = $("#no-courses").html();
            var template = Handlebars.compile(source);
            $("#courselist").html(template(course_data));
            return;
        }

        var source   = $("#courses").html();
        var template = Handlebars.compile(source);
        $("#courselist").html(template(course_data));

        $(".display_visual_sched").bind("click", function(ev) {
            var hist = window.History;
            hist.pushState({
                state: "visual"
            },  "", "/mobile/visual");

            return false;
        });


        $(".instructor").bind("click", function(ev) {
            var hist = window.History;
            hist.pushState({
                state: "instructor",
                instructor: ev.target.rel
            },  "", "/mobile/instructor/"+ev.target.rel);

            return false;
        });


        $(".show_textbooks").bind("click", function(ev) {
            var hist = window.History;
            hist.pushState({
                state: "textbooks",
            },  "", "/mobile/textbooks");

            return false;
        });


    }
};


@@ -815,221 +815,8 @@
 );%0A%0A
-        if (course_index !== undefined) %7B%0A            $(%22#course%22+course_index).collapse('show');%0A            $('html,body').animate(%7BscrollTop: $(%22#course_wrapper%22+course_index).offset().top%7D,'slow');%0A        %7D%0A%0A
     
@@ -1243,24 +1243,306 @@
 se_data));%0A%0A
+        if (course_index !== undefined) %7B%0A            $(%22#course%22+course_index).collapse('show');%0A            console.log(%22Scrolling to course_wrapper%22+course_index);%0A            $('html,body').animate(%7BscrollTop: $(%22#course_wrapper%22+course_index).offset().top%7D,'slow');%0A        %7D%0A%0A
         $(%22.

Reorder code to fix MUWM-415