// $Id$

/**
 * This function looks for swfobject class items and loads them
 * as swfobjects. This is different than the D6 version because we don't have
 * the same JS functions
 */
$(document).ready( function () {
  // get each swf div that needs to be processed
  $('.swfobject:not(.swfobjectInit-processed)').each(function () {     
    var config = Drupal.settings.swfobject_api['files'][$(this).attr('id')];
    swfobject.embedSWF(config.url, $(this).attr('id'), config.width, config.height, config.version, config.express_redirect, config.flashVars, config.params, config.attributes);
    // set this item to processed
    $(this).addClass('swfobjectInit-processed');
  });
});
