`) }, calcHeaderHeight: function() { var self = this; $(document).ready(function(){ self.selectors.searchBar.css('margin-top',$('.navbar').height()); }) $(window).resize(function() { self.selectors.searchBar.css('margin-top',$('.navbar').height()); }) }, handleSeeMore: function(e) { console.log(e); var href = e.currentTarget.href; e.preventDefault(); this.selectors.searchInput.prop("disabled", true); window.location.href = href; }, initEvents: function() { var self = this; $(".search-backdrop").click(function(){ searchOverlay.toggleOverlay(false) })	this.selectors.searchInput.on('input', function(event) { clearInterval(self.state.timer); self.state.timer = setTimeout(function() { self.handleInput(event) },500) }) this.selectors.searchInput.on('keyup', function (e) { if (e.keyCode === 13) { self.selectors.searchInput.prop("disabled", true); window.location.href = `${self.settings.browseUrl}${self.selectors.searchInput.val()}` } }); this.calcHeaderHeight(); }, formatDuration: function(secs) { return this.padNumber(Math.floor(secs/3600)) + ':' + this.padNumber(Math.floor(secs/60)%60) + ':' + this.padNumber(secs%60) }, padNumber: function(num) { return (num < 10 ? '0' : '') + num; } } searchOverlay.initEvents();