Source: components/toggle-pluss-promo.js

;(function () {
    'use strict';

    /**
     * Hide  special offer boxes on the dagbladet front page
     * depend on if user is logged and has access to the Pluss or not logged
     * Special offer box has special class "pluss-promo"
     */
    db.libs.togglePlussPromo = (function($) {
        /**
         * Void to hide promo boxes if user is logged into the Pluss
         * promo boxes are - special offer "subscribe now and get a discount for subscription" etc
         * promo boxes have 'pluss-promo' class
         * @return void
         */
        function hideRows() {
            if (db.utils.userIsLoggedPluss()) {
                $('div.front_rows.pluss-promo').hide();
                if (typeof am === 'object' && typeof am.reflow === 'function') {
                    am.reflow();
                }
            }
        }

        function init () {
            hideRows();
        }

        return {
            init: init,
            reflow: hideRows
        };
    })(jQuery);
})();