(function($) {
  $.widget('pageflow.hiddenTextIndicator', {
    _create: function() {
      var parent = this.options.parent,
          that = this;

      parent.on('pageactivate', function(event) {
        that.element.toggleClass('invert', $(event.target).hasClass('invert'));
        that.element.toggleClass('hidden',
                                 $(event.target).hasClass('hide_content_with_text') ||
                                 $(event.target).hasClass('no_hidden_text_indicator'));
      });

      parent.on('hidetextactivate', function() {
        that.element.addClass('visible');
      });

      parent.on('hidetextdeactivate', function() {
        that.element.removeClass('visible');
      });
    }
  });
}(jQuery));

(function($) {
  $.widget('pageflow.hiddenTextIndicator', {
    _create: function() {
      var parent = this.options.parent,
          that = this;

      parent.on('pageactivate', function(event) {
        var pageOrPageWrapper = $(event.target).add('.content_and_background', event.target);

        that.element.toggleClass('invert', $(event.target).hasClass('invert'));
        that.element.toggleClass('hidden',
                                 pageOrPageWrapper.hasClass('hide_content_with_text') ||
                                 pageOrPageWrapper.hasClass('no_hidden_text_indicator'));
      });

      parent.on('hidetextactivate', function() {
        that.element.addClass('visible');
      });

      parent.on('hidetextdeactivate', function() {
        that.element.removeClass('visible');
      });
    }
  });
}(jQuery));

Allow setting hide text related css classes on wrapper
Allow setting hide text related css classes on wrapper

So far the css classes `hide_content_with_text` and
`no_hidden_text_indicator` had to be present on the page's `section`
element. Allowing them also on the `.content_and_background` wrapper
element makes things much easer to control for page types since that
element is rendered by them.
