
function toggle_filter_mlist(identifier) {
	var header = $('#filter-mheader-' + identifier);
	var list = $('#filter-mlist-' + identifier);
	if (list.css('display') == 'none') {
		header.remove();
		list.css('display', 'block');
	}
	else {
		list.css('display', 'none');
	}
}	

function toggle_element(identifier) {
  id = $('#'+identifier)
  if (id.css('display') == 'none') { id.css('display', 'block') } 
  else { id.css('display', 'none') }
} 

function apply_radius(radius) {
  //binded to the distance select box, set to fire onchange, it changes the
  //distance radius and goes to that url

  var url = location.href.replace(/\/di-[^/]*/, '')
  //remove the block piece of the url if there is one
  url = url.replace(/#[^/]*/, '')
  //remove the location filter if there is one
  url = url.replace(/\/lcf-[^/]*/, '')

  url = url + 'di-' + radius + '/#search-title'
  window.location = url
}

function goto_url(uri) {
  //access the given uri
  window.location = uri
}