 $ ->
+  # Used to load dynamic content of a tab
   loadAjaxTab = (li) ->
     link = $("a", li)
     content_id = link.attr("href").substring(1, 999)

    if li.data("ajax-url") && !li.data("ajax-loaded")
      loadAjaxTab(li)

  active_tab = $(".bb-tabs-container .nav li.active[data-ajax-url]")
  loadAjaxTab(active_tab) if active_tab.length > 0

        content.html(data)
        content.fadeIn "fast"

  # Loads the dynamic content of a tab when activated and sets the URL to the tab ID
  $("body").on "click", ".bb-tabs-container .nav li", ->
    li = $(this)

    if li.data("ignore-next-history-push")
      li.data("ignore-next-history-push", null)
    else if li.data("specific-id-given")
      urlb = new UrlBuilder(window.location.href)
      urlb.queryParameters["bb_selected_tab"] = $(this).data("tab-container-id")

