jQuery.fn.toggleFade = function(speed, easing, callback) {
   return this.animate({opacity:'toggle'}, speed, easing, callback).css("z-index",99);
}; 

$(document).ready(function(){
	$("#tac").css("left",($(window).width()-700)/2);
	if($.browser.msie && parseInt($.browser.version) <= 7) {
		$("#tac").height($(window).height()-50);
	}
	if(!($.browser.msie && parseInt($.browser.version) <= 6)) {
		$("#img2").after("<img id=\"img3\" src=\"theme/img-land.png\" />");
		$("#img5").before("<img id=\"img4\" src=\"../theme/img-sunset.png\" />");
		$("#img6").after("<img id=\"img7\" src=\"../theme/img-turbines.png\" />");
	}

	$("#details a").click(function () { $("#details dl").toggle(); });
	$("a.entryphoto").click(function () { $("#entryessay").fadeOut(); $("#entryphoto").toggleFade(); });
	$("a.entryessay").click(function () { $("#entryphoto").fadeOut(); $("#entryessay").toggleFade(); });
	$("a.tac").click(function () { $("#tac").toggleFade(); });
	$("a.close").click(function () { $(this).parent().parent().fadeOut(); });
});