init flash event
355136
function(_options){
            // init flash vars
            var _id = _options.id,
                _params = _options.params;
            if (!_params){
                _params = {};
                _options.params = _params;
            }
            var _vars = _params.flashvars||'';
            _vars += (!_vars?'':'&')+('id='+_id);
            // delegate mouse event bubble
            if (!_options.hidden&&(!!_options.target||
                 _h.__canFlashEventBubble(_params.wmode))){
                var _tid = _e._$id(_options.target)||
                           _e._$id(_options.parent);
                _cache[_id+'-tgt'] = _tid;
            }
            _params.flashvars = _vars;
            // check event callback
            _u._$loop(_options,function(_value,_key){
                if (_u._$isFunction(_value)&&_key!='onready'){
                    _cache[_id+'-'+_key] = _value;
                }
            });
        }
30726
function(init)
        {
          var $this = this,
            r,
            g,
            b,
            a,
            h,
            s,
            v,
            changeEvents = new Array(),
            fireChangeEvents = 
              function(context)
              {
                for (var i = 0; i < changeEvents.length; i++) changeEvents[i].call($this, $this, context);
              },
            val =
              function(name, value, context)
              {
                // Kind of ugly
                var set = Boolean(value);
                if (set && value.ahex === "") value.ahex = "00000000";
                if (!set)
                {
                  if (name === undefined || name == null || name == '') name = 'all';
                  if (r == null) return null;
                  switch (name.toLowerCase())
                  {
                    case 'ahex': return ColorMethods.rgbaToHex({ r: r, g: g, b: b, a: a });
                    case 'hex': return val('ahex').substring(0, 6);
                    case 'all': return { r: r, g: g, b: b, a: a, h: h, s: s, v: v, hex: val.call($this, 'hex'), ahex: val.call($this, 'ahex') };
                    default:
                      var ret={};
                      for (var i = 0; i < name.length; i++)
                      {
                        switch (name.charAt(i))
                        {
                          case 'r':
                            if (name.length == 1) ret = r;
                            else ret.r = r;
                            break;
                          case 'g':
                            if (name.length == 1) ret = g;
                            else ret.g = g;
                            break;
                          case 'b':
                            if (name.length == 1) ret = b;
                            else ret.b = b;
                            break;
                          case 'a':
                            if (name.length == 1) ret = a;
                            else ret.a = a;
                            break;
                          case 'h':
                            if (name.length == 1) ret = h;
                            else ret.h = h;
                            break;
                          case 's':
                            if (name.length == 1) ret = s;
                            else ret.s = s;
                            break;
                          case 'v':
                            if (name.length == 1) ret = v;
                            else ret.v = v;
                            break;
                        }
                      }
                      return ret == {} ? val.call($this, 'all') : ret;
                      break;
                  }
                }
                if (context != null && context == $this) return;
                var changed = false;
                if (name == null) name = '';
                if (value == null)
                {
                  if (r != null)
                  {
                    r = null;
                    changed = true;
                  }
                  if (g != null)
                  {
                    g = null;
                    changed = true;
                  }
                  if (b != null)
                  {
                    b = null;
                    changed = true;
                  }
                  if (a != null)
                  {
                    a = null;
                    changed = true;
                  }
                  if (h != null)
                  {
                    h = null;
                    changed = true;
                  }
                  if (s != null)
                  {
                    s = null;
                    changed = true;
                  }
                  if (v != null)
                  {
                    v = null;
                    changed = true;
                  }
                  changed && fireChangeEvents.call($this, context || $this);
                  return;
                }
                switch (name.toLowerCase())
                {
                  case 'ahex':
                  case 'hex':
                    var ret = ColorMethods.hexToRgba(value && (value.ahex || value.hex) || value || 'none');

                    val.call($this, 'rgba', { r: ret.r, g: ret.g, b: ret.b, a: name == 'ahex' ? ret.a : a != null ? a : 255 }, context);
                    break;
                  default:
                    if (value && (value.ahex != null || value.hex != null))
                    {
                      val.call($this, 'ahex', value.ahex || value.hex || '00000000', context);
                      return;
                    }
                    var newV = {}, rgb = false, hsv = false;
                    if (value.r !== undefined && !name.indexOf('r') == -1) name += 'r';
                    if (value.g !== undefined && !name.indexOf('g') == -1) name += 'g';
                    if (value.b !== undefined && !name.indexOf('b') == -1) name += 'b';
                    if (value.a !== undefined && !name.indexOf('a') == -1) name += 'a';
                    if (value.h !== undefined && !name.indexOf('h') == -1) name += 'h';
                    if (value.s !== undefined && !name.indexOf('s') == -1) name += 's';
                    if (value.v !== undefined && !name.indexOf('v') == -1) name += 'v';
                    for (var i = 0; i < name.length; i++)
                    {
                      switch (name.charAt(i))
                      {
                        case 'r':
                          if (hsv) continue;
                          rgb = true;
                          newV.r = value && value.r && value.r | 0 || value && value | 0 || 0;
                          if (newV.r < 0) newV.r = 0;
                          else if (newV.r > 255) newV.r = 255;
                          if (r != newV.r)
                          {
                            r = newV.r;
                            changed = true;
                          }
                          break;
                        case 'g':
                          if (hsv) continue;
                          rgb = true;
                          newV.g = value && value.g && value.g | 0 || value && value | 0 || 0;
                          if (newV.g < 0) newV.g = 0;
                          else if (newV.g > 255) newV.g = 255;
                          if (g != newV.g)
                          {
                            g = newV.g;
                            changed = true;
                          }
                          break;
                        case 'b':
                          if (hsv) continue;
                          rgb = true;
                          newV.b = value && value.b && value.b | 0 || value && value | 0 || 0;
                          if (newV.b < 0) newV.b = 0;
                          else if (newV.b > 255) newV.b = 255;
                          if (b != newV.b)
                          {
                            b = newV.b;
                            changed = true;
                          }
                          break;
                        case 'a':
                          newV.a = value && value.a != null ? value.a | 0 : value != null ? value | 0 : 255;
                          if (newV.a < 0) newV.a = 0;
                          else if (newV.a > 255) newV.a = 255;
                          if (a != newV.a)
                          {
                            a = newV.a;
                            changed = true;
                          }
                          break;
                        case 'h':
                          if (rgb) continue;
                          hsv = true;
                          newV.h = value && value.h && value.h | 0 || value && value | 0 || 0;
                          if (newV.h < 0) newV.h = 0;
                          else if (newV.h > 360) newV.h = 360;
                          if (h != newV.h)
                          {
                            h = newV.h;
                            changed = true;
                          }
                          break;
                        case 's':
                          if (rgb) continue;
                          hsv = true;
                          newV.s = value && value.s != null ? value.s | 0 : value != null ? value | 0 : 100;
                          if (newV.s < 0) newV.s = 0;
                          else if (newV.s > 100) newV.s = 100;
                          if (s != newV.s)
                          {
                            s = newV.s;
                            changed = true;
                          }
                          break;
                        case 'v':
                          if (rgb) continue;
                          hsv = true;
                          newV.v = value && value.v != null ? value.v | 0 : value != null ? value | 0 : 100;
                          if (newV.v < 0) newV.v = 0;
                          else if (newV.v > 100) newV.v = 100;
                          if (v != newV.v)
                          {
                            v = newV.v;
                            changed = true;
                          }
                          break;
                      }
                    }
                    if (changed)
                    {
                      if (rgb)
                      {
                        r = r || 0;
                        g = g || 0;
                        b = b || 0;
                        var ret = ColorMethods.rgbToHsv({ r: r, g: g, b: b });
                        h = ret.h;
                        s = ret.s;
                        v = ret.v;
                      }
                      else if (hsv)
                      {
                        h = h || 0;
                        s = s != null ? s : 100;
                        v = v != null ? v : 100;
                        var ret = ColorMethods.hsvToRgb({ h: h, s: s, v: v });
                        r = ret.r;
                        g = ret.g;
                        b = ret.b;
                      }
                      a = a != null ? a : 255;
                      fireChangeEvents.call($this, context || $this);
                    }
                    break;
                }
              },
            bind =
              function(callback)
              {
                if ($.isFunction(callback)) changeEvents.push(callback);
              },
            unbind =
              function(callback)
              {
                if (!$.isFunction(callback)) return;
                var i;
                while ((i = $.inArray(callback, changeEvents)) != -1) changeEvents.splice(i, 1);
              },
            destroy =
              function()
              {
                changeEvents = null;
              }
          $.extend(true, $this, // public properties and methods
            {
              val: val,
              bind: bind,
              unbind: unbind,
              destroy: destroy
            });
          if (init)
          {
            if (init.ahex != null) val('ahex', init);
            else if (init.hex != null) val((init.a != null ? 'a' : '') + 'hex', init.a != null ? { ahex: init.hex + ColorMethods.intToHex(init.a) } : init);
            else if (init.r != null && init.g != null && init.b != null) val('rgb' + (init.a != null ? 'a' : ''), init);
            else if (init.h != null && init.s != null && init.v != null) val('hsv' + (init.a != null ? 'a' : ''), init);
          }
        }
129910
function onActivateEvent() {
         // register pointer events
         me.input.registerPointerEvent("pointerdown", this, this.clicked.bind(this));
         me.input.registerPointerEvent("pointerup", this, this.release.bind(this));
         me.input.registerPointerEvent("pointercancel", this, this.release.bind(this));
         me.input.registerPointerEvent("pointerenter", this, this.enter.bind(this));
         me.input.registerPointerEvent("pointerleave", this, this.leave.bind(this));
       }
352998
function () {
        var that = this;

        that.uniqueId = utils.uniqueId('i');

        that.createWrapper();
        that.notify('initialize');

        that.bindWindowEvents();

        that.setOptions();
        that.fixPosition();
    }
1229484
protected function _initFlashMessenger ()
    {
        // Init and assign flash messenger instance, to be used in layout and/or templates
        //$this->flashMessenger       = $this->plugin('flashMessenger');   // Do not use $this->flashMessenger() as this method is defined below

        // Original FM does not display current messages (added on this request).
        // We use this enhanced version instead.
        $this->flashMessenger       = new \Teon\Base\Mvc\Controller\Plugin\FlashMessengerNow();

        // Default messages are info messages
        $this->flashMessenger->setNamespace('info');

        // Convenience access
        $this->fm                   = $this->flashMessenger;
        $this->view->flashMessenger = $this->flashMessenger;
        $this->view->fm             = $this->flashMessenger;
    }
952997
private void init() {
		view.setLayerTitle(layer.getTitle());
		view.setLayerVisible(layer.isMarkedAsVisible());

		updateVisibilityToggle();

		mapPresenter.getEventBus().addViewPortChangedHandler(new ViewPortChangedHandler() {
			@Override
			public void onViewPortChanged(ViewPortChangedEvent event) {
				updateVisibilityToggle();
			}
		});

		// React to layer visibility events:
		mapPresenter.getEventBus().addLayerVisibilityHandler(new LayerVisibilityHandler() {

			@Override
			public void onShow(LayerShowEvent event) {
			}

			@Override
			public void onHide(LayerHideEvent event) {
			}

			@Override
			public void onVisibilityMarked(LayerVisibilityMarkedEvent event) {
				view.setLayerVisible(layer.isMarkedAsVisible());

			}
		}, this.layer);
	}
1006479
function () {
            Panel.superclass.initEvents.call(this);

            var SIGNATURE = CustomEvent.LIST;

            /**
            * CustomEvent fired after the modality mask is shown
            * @event showMaskEvent
            */
            this.showMaskEvent = this.createEvent(EVENT_TYPES.SHOW_MASK);
            this.showMaskEvent.signature = SIGNATURE;

            /**
            * CustomEvent fired after the modality mask is hidden
            * @event hideMaskEvent
            */
            this.hideMaskEvent = this.createEvent(EVENT_TYPES.HIDE_MASK);
            this.hideMaskEvent.signature = SIGNATURE;

            /**
            * CustomEvent when the Panel is dragged
            * @event dragEvent
            */
            this.dragEvent = this.createEvent(EVENT_TYPES.DRAG);
            this.dragEvent.signature = SIGNATURE;
        }
646427
function init() {
      if ($el.hasClass('horizontal')){
        scrollDirection = 'horiz';
        scrollOffsetAttr = 'scrollLeft';
        sizeAttr = 'width';
        offsetAttr = 'left';
      }

      $el.prepend('<div class="tse-scrollbar"><div class="drag-handle"></div></div>');
      $scrollbarEl = $el.find('.tse-scrollbar');
      $dragHandleEl = $el.find('.drag-handle');

      if (options.wrapContent) {
        $contentEl.wrap('<div class="tse-scroll-content" />');
      }
      $scrollContentEl = $el.find('.tse-scroll-content');

      resizeScrollContent();

      if (options.autoHide) {
        $el.on('mouseenter', flashScrollbar);
      }

      $dragHandleEl.on('mousedown', startDrag);
      $scrollbarEl.on('mousedown', jumpScroll);
      $scrollContentEl.on('scroll', onScrolled);

      resizeScrollbar();

      $(window).on('resize', function() {
        recalculate();
      });

      if (!options.autoHide) {
        showScrollbar();
      }
    }
738641
function initHighlightingOnLoad() {
    if (window.addEventListener) {
      window.addEventListener('DOMContentLoaded', initHighlighting, false);
      window.addEventListener('load', initHighlighting, false);
    } else if (window.attachEvent)
      window.attachEvent('onload', initHighlighting);
    else
      window.onload = initHighlighting;
  }
490031
protected void propagateFocusEvent() {

        if (m_initialized) {
            NativeEvent nativeEvent = Document.get().createFocusEvent();
            DomEvent.fireNativeEvent(nativeEvent, this, getElement());
        }
    }
434934
protected function initPluginEvents()
    {
        $eventFileUploaded = <<<JS
            function(e, data, previewId){
                var input = $(e.target);
                $("#" + previewId).find('.media-id').val(data.response.mediaId);
            }
JS;
        $pluginEvents = [
            'fileuploaded' => new JsExpression($eventFileUploaded),
        ];
        if ($this->urlSort) {
            $sortUrl = Url::to($this->urlSort);
            $eventFileSorted = <<<JS
                function(e, params){
                    $.post("{$sortUrl}", params);
                }
JS;
            $pluginEvents['filesorted'] = new JsExpression($eventFileSorted);
        }
        $this->pluginEvents = ArrayHelper::merge($this->pluginEvents, $pluginEvents);
    }
560120
function init() {
  'use strict';

  var wheel = document.querySelector('#wheel > svg');
  var cdn = document.querySelector('.mdl-gen__cdn .mdl-gen__cdn-link');
  var mc = new MaterialCustomizer(wheel, cdn);

  // Workaround for IE.
  var dl = document.querySelector('#download');
  dl.addEventListener('click', function() {
    if (window.navigator.msSaveBlob) {
      window.navigator.msSaveBlob(this.blob, 'material.min.css');
    }
  }.bind(mc));

  // Hook up GA event
  dl.addEventListener('click', function() {
    ga('send', {
      hitType: 'event',
      eventCategory: 'customizer',
      eventAction: 'download',
      eventLabel: mc.getSelectedPrimary() + '-' + mc.getSelectedSecondary()
    });
  });

  var clickCtr = 0;
  cdn.addEventListener('click', function() {
    var selection = window.getSelection();
    selection.removeAllRanges();

    var range = document.createRange();
    if (clickCtr === 0) {
      var link = cdn.querySelectorAll('.token.attr-value')[1];
      range.setStart(link, 2);
      range.setEnd(link, 3);
    } else {
      range.setStart(cdn, 1);
      range.setEnd(cdn, 2);
    }

    selection.addRange(range);
    clickCtr = (clickCtr + 1) % 2;
  });

  // Prevent browser's selection handling
  cdn.addEventListener('mouseup', function(ev) {
    ev.preventDefault();
  });
  cdn.addEventListener('mousedown', function(ev) {
    ev.preventDefault();
  });

  document.addEventListener('mouseup', function() {
    if (window.getSelection().toString().indexOf('.min.css') !== -1) {
      ga('send', {
        hitType: 'event',
        eventCategory: 'customizer',
        eventAction: 'copy',
        eventLabel: mc.getSelectedPrimary() + '-' + mc.getSelectedSecondary()
      });
    }
  });

  // Download template
  var req = new XMLHttpRequest();
  req.onload = function() {
    mc.template = this.responseText;
    mc.highlightField('Indigo');
    mc.highlightField('Pink');
    window.requestAnimationFrame(function() {
      mc.updateCDN();
      mc.updateStylesheet();
    });
  };
  req.open('get', '../material.min.css.template', true);
  req.send();
}
329892
public static function initEvent()
    {
        if (!self::$supported) {
            return;
        }
        self::updateConfig();
        self::$fd = eio_get_event_stream();
        self::$ev = EventLoop::$instance->event(self::$fd,
            \Event::READ | \Event::PERSIST,
            function ($fd, $events, $arg) {
                while (eio_nreqs()) {
                    eio_poll();
                }
            }
        );
        self::$ev->add();
    }
26541
function () {
            var domElt = this.getDom();
            var actingDom = aria.utils.Dom.getDomElementChild(domElt, 0);

            if (actingDom) {
                this._frame.linkToDom(actingDom);
            }

            aria.widgets.container.Tab.superclass._init.call(this);
        }
617827
public function initialize()
    {
        if ($this->isInitialize) {
            return ;
        }

        $this->isInitialize = true;

        $this->getEventManager()->trigger(self::EVENT_INITIALIZE, $this);
    }
1270967
function onLoadstart(event) {
					Log.info(getTstmp(event.timeStamp) + ", " + this.xidx + ": loadstart");
					this.xfirstByteSent = getTstmp(event.timeStamp);
				}
1373657
function () {

	Menu.superclass.initEvents.call(this);

    // Create custom events

	var i = EVENT_TYPES.length - 1,
		aEventData,
		oCustomEvent;


	do {

		aEventData = EVENT_TYPES[i];

		oCustomEvent = this.createEvent(aEventData[1]);
		oCustomEvent.signature = CustomEvent.LIST;
		
		this[aEventData[0]] = oCustomEvent;

	}
	while (i--);

}