var Academics = {
    is_desktop: undefined,

    render: function() {
        showLoading();
        CommonLoading.render_init();
        Academics.make_html();
    },

    make_html: function () {

        $('html,body').animate({scrollTop: 0}, 'fast');
        var source = $("#academics_page").html();
        var template = Handlebars.compile(source);
        $("#main-content").html(template());

        Academics.load_cards_for_viewport();
        // Set initial display state
        Academics.is_desktop = get_is_desktop();

        // Monitor for viewport changes and reorder cards if needed
        $(window).resize(function(){
            if (Academics.is_desktop !== get_is_desktop()){
                Academics.load_cards_for_viewport();
                Academics.is_desktop = get_is_desktop();
            }
        });
    },

    load_cards_for_viewport: function() {
        if (get_is_desktop()) {
            Academics._load_desktop_cards();
        } else {
            Academics._load_mobile_cards();
        }
    },

    _load_desktop_cards: function() {
        Academics._reset_content_divs();
        var desktop_body_cards = [
            GradeCard,
            CourseCards,
            VisualScheduleCard,
            TextbookCard,
            PrevTermCourseCards,
            PrevTermCourseCards1,
            GradStatusCard,
            GradCommitteeCard,
            FutureQuarterCardA,
            FutureQuarterCard1
        ];
        var desktop_sidebar_cards = [
        ];

        if(window.webservice_outage){
            desktop_body_cards.unshift(OutageCard);
        }

        Cards.load_cards_in_order(desktop_body_cards, $("#academics_content_cards"));
        // Cards.load_cards_in_order(desktop_sidebar_cards, $("#academics_sidebar_cards"));
    },

    _load_mobile_cards: function() {
        Academics._reset_content_divs();
        var mobile_cards = [
            GradeCard,
            CourseCards,
            VisualScheduleCard,
            TextbookCard,
            PrevTermCourseCards,
            PrevTermCourseCards1,
            GradStatusCard,
            GradCommitteeCard,
            FutureQuarterCardA,
            FutureQuarterCard1
        ];
        if(window.webservice_outage){
            desktop_body_cards.unshift(OutageCard);
        }
        Cards.load_cards_in_order(mobile_cards, $("#academics_content_cards"));
    },

    _reset_content_divs: function() {
        resetCardRenderCalled();
        $("#academics_content_cards").html('');
        // $("#academics_sidebar_cards").html('');
    }
};

@@ -1141,32 +1141,56 @@
 _body_cards = %5B%0A
+            OutageCard,%0A
             Grad
@@ -1188,32 +1188,32 @@
      GradeCard,%0A
-
             Cour
@@ -1533,109 +1533,8 @@
 %5D;%0A%0A
-        if(window.webservice_outage)%7B%0A            desktop_body_cards.unshift(OutageCard);%0A        %7D%0A%0A
     
@@ -1814,32 +1814,56 @@
 obile_cards = %5B%0A
+            OutageCard,%0A
             Grad
@@ -2133,32 +2133,32 @@
 ureQuarterCard1%0A
+
         %5D;%0A     
@@ -2156,108 +2156,8 @@
  %5D;%0A
-        if(window.webservice_outage)%7B%0A            desktop_body_cards.unshift(OutageCard);%0A        %7D%0A
     

remove remaining reference of window.webservice_outage