/* Script to launch link whilst still being strict compliant */
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;

/* Add href to entire li so all is clickable */

$(document).ready(function(){

	$("#nav li").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});
	
});


/* New Menu code for squares */
 $(document).ready(function () {  
   
     //Append a div with hover class to all the LI  
     $('#navMenu li').append('<div class="hover"><\/div>');  
   
   
     $('#navMenu li').hover(  
           
         //Mouseover, fadeIn the hidden hover class    
         function() {  
               
             $(this).children('div').stop(true,true).fadeIn('1000');   
           
         },   
       
         //Mouseout, fadeOut the hover class  
         function() {  
           
             $(this).children('div').stop(true,true).fadeOut('1000');      
           
     }).click (function () {  
       
         //Add selected class if user clicked on it  
         $(this).addClass('selected');  
           
     });  
   
 });  

	