Ox.SmallVideoTimeline = function(options, self) { self = self || {}; var that = Ox.Element({}, self) .defaults({ duration: 0, editing: false, getTimelineURL: null, 'in': 0, out: 0, paused: false, showMilliseconds: 0, type: 'player', width: 256 }) .options(options || {}) .addClass('OxSmallVideoTimeline') .css(Ox.extend({ width: self.options.width + 'px' }, self.options.type == 'player' ? { background: 'rgb(0, 0, 0)', borderRadius: '8px' } : {})); self.height = self.options.type == 'player' ? 16 : 24; self.imageLeft = self.options.type == 'player' ? 8 : 4; self.imageWidth = self.options.width - (self.options.type == 'player' ? 16 : 8) self.imageHeight = self.options.type == 'player' ? 16 : 18; self.interfaceLeft = self.options.type == 'player' ? 0 : 4; self.interfaceTop = self.options.type == 'player' ? 0 : 2; self.interfaceWidth = self.options.type == 'player' ? self.options.width : self.imageWidth; that.css({ height: self.height + 'px' }); self.$image = Ox.SmallVideoTimelineImage({ duration: self.options.duration, editing: self.options.editing, getTimelineURL: self.options.getTimelineURL, 'in': self.options['in'], out: self.options.out, results: self.options.results, subtitles: self.options.subtitles, width: self.imageWidth, type: self.options.type }) .css({ position: 'absolute', left: self.imageLeft + 'px', width: self.options.width + 'px' }) .appendTo(that); self.$interface = Ox.Element() .addClass('OxInterface') .css({ position: 'absolute', left: self.interfaceLeft + 'px', top: self.interfaceTop + 'px', width: self.interfaceWidth + 'px', height: '20px', zIndex: 11 }) .bind({ mousedown: mousedown, mouseleave: mouseleave, mousemove: mousemove }) .bindEvent({ drag: function(event, e) { mousedown(e); } }) .appendTo(that); if (self.options.type == 'player') { self.$positionMarker = $('