{:uriI"�file:///Users/madmax/Programs/itmammoth/with_popup/app/assets/javascripts/with_popup.js?type=application/javascript&pipeline=self&id=cbf280403f717c54e13cc31c765063df42ff2c46a2354d986236d16c6e93ac71:ET:load_pathI"G/Users/madmax/Programs/itmammoth/with_popup/app/assets/javascripts;T:
filenameI"U/Users/madmax/Programs/itmammoth/with_popup/app/assets/javascripts/with_popup.js;T:	nameI"with_popup;T:logical_pathI"with_popup.self.js;T:content_typeI"application/javascript;T:sourceI"�(function($){
  var methods = {
    init: function(options) {
      return this.each(function() {
        var $this = $(this),
            data = $this.data('withPopup');

        if (!data) {
          defaultOptions = {
            windowOpenOption: '',
          }
          settings = $.extend({}, defaultOptions, options);
          mergeDataOptions($this, settings);

          $this.on('click.withPopup', openPopup);
          $this.data('withPopup', {
            target: $this,
            settings: settings,
          });
        }
      });
    },
   };

   $.fn.withPopup = function(method) {
    if (methods[method]) {
      return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
    } else if (typeof method === 'object' || !method) {
      return methods.init.apply(this, arguments);
    } else {
      $.error('Method ' +  method + ' does not exist on jQuery.withPopup');
    }
  };

  var openPopup = function(e) {
    var option = $(this).data('withPopup').settings.windowOpenOption;
    window.open('', 'withPopup', option);
  };

  var mergeDataOptions = function($el, settings) {
    if ($el.data('popupOption')) {
      settings.windowOpenOption = $el.data('popupOption');
    }
  };
})(jQuery);

(function($){
  console.debug('loaded');
  $('[data-with-popup]').on('click', function(e) {
    console.debug('clicked');
    window.open('', 'withPopup', e.currentTarget.data('withPopup'));
  });
})(jQuery);
;T:
metadata{:dependencieso:Set:
@hash{	I"environment-version;TTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"cfile-digest:///Users/madmax/Programs/itmammoth/with_popup/app/assets/javascripts/with_popup.js;TT:
requiredo;;{�:stubbedo;;{�:
linkso;;{�:charsetI"
utf-8;F:digest"%Q��ʑ������%D��x/V�@狡��:lengthi�:dependencies_digest"%�L��U��z�z�=�QB��o��%�� O��`:idI"Ecbf280403f717c54e13cc31c765063df42ff2c46a2354d986236d16c6e93ac71;F:
mtimel+�4V