jQuery.noConflict(); var $j = jQuery;

	
	function textReplace() {
		// This sets up the text replacement and so on for the Idea div and the Survey page
		$j("legend.accessibility").hide();
		$j("div.survey form div.details").hide();
		$j("div.survey form div.show").show(); // This shows fields once we've reposted the form, where necessary

		$j("legend.ir").each(function(){
			var cssClassesStr = new String($j(this).attr("class"));
			var cssClasses = cssClassesStr.split("ir replace-");
			$j(this).after("<"+ cssClasses[1] + " class=\"ir legend\">"+ $j(this).html() +"</"+ cssClasses[1] +">").remove();
		});
			
		$j("div.survey form input.no").focus(function(){
			$j(this).parent().parent().parent().next(".details").slideDown("slow");
		});
		$j("div.survey form option.show_details").click(function(){
			$j(this).parent().parent().parent().next(".details").slideDown("slow");
		});
		
		$j("div.survey form input.yes").focus(function(){
			$j(this).parent().parent().parent().next(".details").slideUp("slow");
		});

	}
	
function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
			anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}
window.onload = externalLinks;
