//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;

//LIGHTBOX
$(document).ready(function(){
	$(".lightbox").lightbox();
});

//IMAGE ROTATOR AND FORM SHOW/HIDE
$(function() {

	$("#one-link").click(function() {
		$("#one-info, #one-image").show();
		$("#two-info, #two-image, #three-info, #three-image, #four-info, #four-image, #five-info, #five-image").hide();
		return false;
	});
	$("#two-link").click(function() {
		$("#two-info, #two-image").show();
		$("#one-info, #one-image, #three-info, #three-image, #four-info, #four-image, #five-info, #five-image").hide();
		return false;
	});
	$("#three-link").click(function() {
		$("#three-info, #three-image").show();
		$("#one-info, #one-image, #two-info, #two-image, #four-info, #four-image, #five-info, #five-image").hide();
		return false;
	});
	$("#four-link").click(function() {
		$("#four-info, #four-image").show();
		$("#one-info, #one-image, #two-info, #two-image, #three-info, #three-image, #five-info, #five-image").hide();
		return false;
	});
	$("#five-link").click(function() {
		$("#five-info, #five-image").show();
		$("#one-info, #one-image, #two-info, #two-image, #three-info, #three-image, #four-info, #four-image").hide();
		return false;
	});
	
	$("#consultant-link").click(function() {
		$("#consultant-info").slideToggle();
		$("#emailfriend-info").slideUp();
		return false;
	});
	$("#emailfriend-link").click(function() {
		$("#consultant-info").slideUp();
		$("#emailfriend-info").slideToggle();
		return false;
	});
	
});
