$(document).ready(function(){
	$('.open').click(function(){
		$("div.panel").animate({height: "140px"}).animate({height: "120px" }, "fast");
		window.setTimeout(function(){$("div.panel-contents").fadeIn("slow");});
	});
	function closePanels(){
		$(".panel").animate({height: "150px"}).animate({height: "0px",top:"0px"}, "fast", function(){$(this).hide();});
	}
	$('.close').click(function(){					
		$('div.panel-contents').fadeOut("fast",closePanels());	
	});     
});

/* EXTERNAL LINKS */
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;
