/**
 * @file
 *
 * Highwire Article Pre-Val Widget.
 */

(function ($) {
  Drupal.behaviors.highwire_article_preval = {
    attach: function (context, settings) {
       $(".highwire-prelocation", context).each(function(index){
         var $this = $(this);
         var logoType = $this.data('logo-type');
         var mouseOver = $this.data('mouseover');
         var doi = $this.data('doi');
         var settings = {
           settings: {
             logoType: logoType,
             mouseOver: mouseOver,
           },
           doi: doi
         };
         $this.preAPI(settings);
       });
    }
  };
})(jQuery);