Ox.VideoPlayerMenu = function(options, self) { self = self || {}; var that = Ox.Element({}, self) .defaults({ items: [] }) .options(options || {}) .update({ // ... }) .on({ click: function(e) { var $target = $(e.target), group, id; that.hide(); if ( !$target.is('.OxLine') && !$target.is('.OxSpace') && !$target.is('.OxDisabled') ) { group = $target.parent().data().group; id = $target.parent().data().id; self.$items.filter(function($item) { return $item.data().group == group; }).forEach(function($item) { $($item.children()[1]).attr({ src: Ox.UI.getImageURL('symbol' + ( $item.data().id == id ? 'Check' : 'None' )) }); }); that.triggerEvent('click', { group: group, id: id }); } } }); self.$items = []; self.height = 2; self.options.items.forEach(function(item) { var $item; if (!Ox.isEmpty(item)) { $item = $('