(function ($, Drupal, drupalSettings) {

  'use strict';

  Drupal.behaviors.panoMapsImprovements = {
    attach: function (context, drupalSettings) {

      var modulePath = drupalSettings.pano_maps.path;

      embedpano(
        {
          swf: '/' +
            modulePath + '/pano-swf/improvements/improvements-map-aga.swf',
          xml: '/' +
            modulePath + '/pano-swf/improvements/improvements-map-aga.xml',
          target: 'pano-canvas',
          html5: 'prefer+css3d',
          wmode: 'opaque',
          passQueryParameters: true
        }
      );
    }
  };
})(jQuery, Drupal, drupalSettings);
