$(document).ready(function() {   
	$("#photoLink").click(function() {
		$("#photoContest").show("normal", function() {
			$("#saveWildlife").hide("normal");
			$("#photoLink").hide("fast");
			$("#saveLink").show("fast");
    	});
    });
	$("#saveLink").click(function() {
		$("#saveWildlife").show("normal", function() {
			$("#photoContest").hide("normal");
			$("#saveLink").hide("fast");
			$("#photoLink").show("fast");
    	});
    });  
	$("#photoClose").click(function() {
		$("#photoContest").hide("normal", function() {
			$("#photoLink").show("fast");
			$("#saveLink").show("fast");
    	});
    });
	$("#saveClose").click(function() {
		$("#saveWildlife").hide("normal", function() {
			$("#photoLink").show("fast");
			$("#saveLink").show("fast");
    	});
    });
});

//Script by Trånn: http://come.to/tronds
//Submitted to JavaScript Kit (http://javascriptkit.com)
//Visit http://javascriptkit.com for this script

var initialsubj="FrogLog, The Critter-saving Escape Ramp"
var initialmsg="Hi:\n You may want to check out this site: "+window.location
var good;
function checkEmailAddress(field) {

var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi);
if (goodEmail) {
good = true;
}
else {
alert('Please enter a valid address.');
field.focus();
field.select();
good = false;
   }
}
u = window.location;
function mailThisUrl() {
good = false
checkEmailAddress(document.eMailer.email);
if (good) {

//window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+document.title+" "+u;
window.location = "mailto:"+document.eMailer.email.value+"?subject="+initialsubj+"&body="+initialmsg
   }
}

//////////////////////////////////////////////////////////////////////
var guarHeader = document.getElementById("guarHeader");   
var guarLink = document.getElementById("guarLink");

guarHeader.onclick = function() {window.open('guarantee.html', 'myWindow', 'height=400, width=400, top=150, left=150, resizeable="no", menubar="no", toolbar="no", status="no", scrollbars="no", location="no"');}
guarHeader.onmouseover = function() {guarHeader.style.color = "#FF6633"; guarHeader.style.cursor = "pointer";}
guarHeader.onmouseout = function() {guarHeader.style.color = "#FF0000"; guarHeader.style.cursor = "default";}

guarLink.onclick = function() {window.open('guarantee.html', 'myWindow', 'height=400, width=400, top=100, left=200, resizeable="no", menubar="no", toolbar="no", status="no", scrollbars="no", location="no"');}
guarLink.onmouseover = function() {guarLink.style.color = "#FF6633"; guarLink.style.cursor = "pointer";}
guarLink.onmouseout = function() {guarLink.style.color = "#FF0000"; guarLink.style.cursor = "default";}
