$(function() {
	$('ul.images li a').lightBox();

	$("#news-flash a.close").click(function() {
		$("#news-flash").slideToggle();

		$.ajax({
		  url: "http://www.aldwickbury.org.uk/settings/ajax_close_flash",
		  
		  success: function(html){
			$("#results").append(html);
		  }
		});
		return false;
	});
		
	$("#login-failed").animate({opacity:0}, 1).fadeTo(1000,1);
		
   });

function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}

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;
  