         $(this).addClass "open"
         el.show()
 
-$.fn.bind_clearable_fields = ->
+bind_clearable_fields = ->
   $("[data-clearable-field]").each ->
     input = $(this)
     form = (if input.length > 0 then $(input[0].form) else $())

      else
        $(id).show()

$.fn.bind_button_urls = ->
  $("[data-button-url]").on "click", ->
    window.location = $(this).data("button-url")
    false

$.fn.bind_counter = ->
  $data = $(this).data()

  if $func
    eval "$(link).#{$func}"

  $callback = $(link).data("callback-after")
  if $callback
    eval "#{$callback}"

$ ->

  $("a[rel=popover]").popover()
  $(".tooltip").tooltip()
  $("a[rel=tooltip]").tooltip()

  bind_clearable_fields()
  bind_filter_html_elements()
  bind_button_urls()
  bind_datepicker()

  $("[data-counter='true']").bind_counter()

