$(GLOBAL).bind("appStart", function () {
  if (window.location.hash) {
    var name = window.location.hash.replace("#", "");
    toggleOptionsHeader("#" + name, false);
  }
});

$('#faqFilter').keypress(function (e) {
  if (e.which == 13) {
    $(this).trigger("filterQuery");
  }
});

$('#faqFilter').on("filterQuery", function (e) {
  var filterString = $("#faqFilter").val();
  if (filterString != null && filterString.length > 0) {
    var regex = new RegExp(filterString, "gi");
    $("#faqContainer .panel.lifted").each(function () {
      if ($(this).html().match(regex) == null) {
        $(this).hide();
      } else {
        $(this).show();
      }
    });
  } else {
    $(".panel.lifted").show();
  }
});