/* 
 * @file
 * ThirdAge Delayed Content
 * JavaScript to insert ads/widgets/etc. into the page after it has finished
 * loading.
 */

(function ($) {

  /**
   * Loads delayed content.
   */
  Drupal.behaviors.taDelay = {
    attach: function (context, settings) {
      // Iterate through the content bundles.
      settings.taDelay = settings.taDelay || {};
      $.each(settings.taDelay, function(i, bundle){
        // Attach each one to the page after the specified delay.
        setTimeout(function() {
            $(bundle.container, context).html(bundle.content);
          }, bundle.time);
      });
    }
  };

})(jQuery);
;

