function fix_footer() {
	var footer = $("#footer")
	footer.css('display','none').css('display','block')
}

$(
  function() {
	/*
	 * focus on the search field
	 */
		$("#content form:first input[type=text]:first").focus()
	
	/*
	 * remember tab urls
	 */
		$('#top_navigation a').map(function(){
			try {
				var tab = $(this).text().replace(/\s+/,'_')
				var regex = new RegExp("(^|;\\s*)" + tab + "_tab_url=([^\\s;]+)","i")
				var tab_url = document.cookie.match(regex)
				if(tab_url && tab_url[2])
					$(this).attr('href',unescape(tab_url[2]))
			} catch(e) {
				// do nothing
			}
		})
	
  }
)