// ------------------------------------------------------------
// 
// ------------------------------------------------------------
String.prototype.rot13 = function(){ //v1.0
	return this.replace(/[a-zA-Z]/g, function(c){
		return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
	});
};

// ------------------------------------------------------------
// 
// ------------------------------------------------------------
$(document).ready(
	function ()
	{
		$("#nav-archives select").change(handleArchivesNav);
		
		$("dl#main dd.content a.e").each(
			function ()
			{
				$(this).attr("href", $(this).attr("rel").rot13());
			}
		);
	}
);

// ------------------------------------------------------------
// 
// ------------------------------------------------------------
function handleArchivesNav ()
{
	self.location = $("#nav-archives").attr("action") + "?i=" + $(this).val();
};

