function PopupActions(popup) {

  function _popup() {}

  // helper method to translate leaflet methods to actions
  function leaflet_method(name) {
    _popup[name] = function() {
      var args = arguments;
      return Action(function() {
        popup[name].apply(popup, args);
      });
    };
  }

  // leaflet methods
  leaflet_method('openOn');
  _popup.openClose = function(map) {
    if (!map) {
      throw new Error("openClose gets map as first param");
    }
    return Action({
      enter: function() {
        popup.openOn(map);
      },

      exit: function() {
        map.closePopup(popup);
      }

    });
  };

  return _popup;
}
directional popup allows to create popups in the left and the right of a point,
not only on the top.

Same api than L.popup but you can spcify ``potision`` to 'left' or 'right'