// Polyfill for position: sticky
// @see https://github.com/katranci/PositionSticky
import * as positionSticky  from './polyfills/position-sticky/position-sticky'
import * as navigation      from './navigation.js'
import * as smoothScroller  from './behavior/smooth-scroller'
import * as alert           from './components/alert'
import * as collapse        from './components/collapse.js'
// import * as counter         from './components/character-counter.js'
import * as dropdown        from './components/dropdown.js'
import * as tab             from './components/tab.js'
import * as tables          from './components/responsive-overflow-table.js'
import * as truncate from './components/truncate.js'
import * as proxima_nova_bold from "../../../fonts/avvo/proxima_nova/proxima_nova_bold.woff"
import * as proxima_nova_regular from "../../../fonts/avvo/proxima_nova/proxima_nova_regular.woff"
import * as proxima_nova_regular_subset from "../../../fonts/avvo/proxima_nova/proxima_nova_regular_subset.woff";



function init() {
  const $ = global.jQuery

  // Polyfills for the foot
  positionSticky.init()

  // jQuery plugins
  collapse.init()
  dropdown.init()
  alert.init()
  tables.init()
  tab.init()
  truncate.init()

  $(() => {
    // UI components to run after page-load
    navigation.init()
    counter.init()
    smoothScroller.init()
  })
}

export { init }
