(function($) {
    $(document).on('freshopInitialized', function () {
        freshop
            .on('storeLoaded', function(event, store) {
                var $congratsLanding = $('#congratulations-landing');
                if (!$congratsLanding.length) return;
                if (store.has_product_catalog) {
                    $congratsLanding.find('#congrats-view-online-shopping').addClass('hidden');
                    $congratsLanding.find('#congrats-online-shopping').removeClass('hidden');
                }
                else {
                    $congratsLanding.find('#congrats-view-online-shopping').removeClass('hidden');
                    $congratsLanding.find('#congrats-online-shopping').addClass('hidden');
                }
            });
    });
})(jQuery);