var ralentango={version:"2131:2010-05-31"};if(typeof jQuery!="undefined"){jQuery.fn.textValue=function(value){if(!arguments.length)return ralentango.nodeTextValue(this[0]);this.each(function(){ralentango.nodeTextValue(this,value)});return this};if(!("console"in window)||!("firebug"in console)){window.console={};ralentango.fnnames=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];for(ralentango.i in ralentango.fnnames)window.console[ralentango.fnnames[ralentango.i]]=function(){}};ralentango.scriptsfromtop="scripts/";$(document).ready(function(){ralentango.fixImages();ralentango.decorateRoundeds();ralentango.decorateBoxes();ralentango.decorateCorners();ralentango.markLeftCells();ralentango.buildExtraMenus();ralentango.addLocaltoLiveLink();ralentango.linkPopups();ralentango.setUpShowsOnDemand();ralentango.linkIframes();console.log("Loaded jQuery "+$(document).jquery);console.log("Loaded library "+ralentango.version)})}ralentango.fixImages=function(){$("img").not("[title]").filter("[alt]").each(function(){this.title=this.alt});$(".caption img").each(function(){var attrs={};if(this.width){var width=0+this.width;if($(this).parent("div").hasClass("padded"))width-=20;attrs.style="width:"+width+"px"}$(this).after(env("p",attrs,this.title))});$("a img").parent("a").addClass("imageinside")};ralentango.decorateRoundeds=function(){$(".rounded").removeClass("rounded").wrap(env("div",{"class":"rounded"},env("div",env("div",env("div")))))};ralentango.decorateBoxes=function(){$("div.cornersbox").each(function(){$(this).append(env("div",{"class":"clearall",style:"height:0"})).corner("20px")});$("div.box").each(function(){$(this).removeClass("box").wrap(env("div",{"class":"boxed "+this.className})).attr("class","boxtop").append(env("div",{"class":"boxclear"})).after(env("div",{"class":"boxbottom"}))})};ralentango.decorateCorners=function(){$("div.corners").each(function(){$(this).corner($(this).attr("class").replace(/^.*corners( *|$)/,""))})};ralentango.markLeftCells=function(){$("td:first-child, th:first-child").addClass("tdl")};ralentango.linkPopups=function(){$("a.popup").bind("click",function(){window.open(this.href);return false}).each(function(){if(this.title)this.title+=" (opens in a new window)";else this.title="Opens "+this.href.replace(/^http:\/\//,"").replace(/\/$/,"")+" in a new window"})};ralentango.buildExtraMenus=function(){var jQvmenu=$("div#menu");if(!jQvmenu.length)return;var jQvLIs=$(">ul>li",jQvmenu);if(!jQvLIs.length)return;var jQhmenu=$("div#hmenu");if(jQhmenu.length){var jQhLIs=$("li",jQhmenu);if(!jQhLIs.length){var hmenuc=[$(env("ul")),$(env("ul")),$(env("ul"))];var which=0;jQvLIs.each(function(){if(which>1)which=1;else if($(this).is(".md"))which=4;else if($("ul",this).length){which=0;$(this).addClass("kids")}else if($(this).is(".me"))which=0;else which=1;if(which<4)$(hmenuc[which]).append($(this).clone()).append(env("em"," "))});$("div#content").append(env("div",{"class":"clearboth"}));$("div#hmenu").append(env("h3","Pages in this section")).append(hmenuc[0]).append(env("h3","Other sections")).append(hmenuc[1])}}var jQbreadcrumbs=$("div#breadcrumbs");if(jQbreadcrumbs.length){var jQbLIs=$("li",jQbreadcrumbs);if(!jQbLIs.length){}}};ralentango.addLocaltoLiveLink=function(){if(window.location.hostname=="localhost"){var $startlink=$("link[rel=start]");if($startlink.length){if(!$startlink.hasClass("nolocal")){$menudiv=$("div#menu>ul");if(!$menudiv.length)$menudiv=$("div#menu-middle>ul");if($menudiv.length){var href=$startlink.attr("href");if(href){href+=window.location.pathname.split("/").reverse()[0];$menudiv.append(env("li",env("a",{href:href,title:"Go to the corresponding page on the live website"},"Go to live page")))}$menudiv.append(env("li",env("a",{href:"../public_html/",title:"Go to the local home page"},"Go to local home")))}}}}};ralentango.setUpShowsOnDemand=function(){$("div#content").bind("click",function(event){var $tgt=$(event.target);if(!$tgt.is("a")){if(!$tgt.parents("a").length)return true;$tgt=$tgt.parents("a").eq(0)}var href=$tgt.attr("href");if(href.substr(0,1)!="#")return true;var speed=0;if($tgt.hasClass("quick"))speed=200;else if($tgt.hasClass("slow"))speed=500;if(href=="#showall"){if($tgt.hasClass("toggleme")&&($("div.showondemand:hidden").length==0))ralentango.hideallDDs(speed);else ralentango.showallDDs(speed);return false}if(href=="#hideall"){ralentango.hideallDDs(speed);return false}if(!$(href).is("div.showondemand"))return true;var id=href.substr(1);if($tgt.hasClass("leaveothers")){ralentango.showDD(id,speed);return false}if($tgt.hasClass("hideme")||($tgt.hasClass("toggleme")&&$("div#"+id).is(":visible"))){ralentango.hideDD(id,speed);return false}ralentango.hideallDDs(speed);ralentango.showDD(id,speed);return false});return};ralentango.linkIframes=function(){$("IFRAME").each(function(){var wls=window.location.search;if(wls){if(wls.substr(0,1)=="?")wls=wls.substr(1);this.src+=(this.src.indexOf("?")==-1?"?":"&")+wls}})};ralentango.env=function(name,args){var content="",attrs="";for(var i=1;i<arguments.length;i++){var arg=arguments[i];if(typeof(arg)=="object")for(var j in arg)attrs+=" "+((j=="className")||(j=="Class")?"class":j)+"=\""+arg[j]+"\"";else content+=arg}return"<"+name+attrs+">"+content+"</"+name+">"};var env=ralentango.env;ralentango.readCookie=function(name){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=cookies[i].replace(/^\s+/,"").split("=");if((cookie[0]==name)&&(cookie[1]!="")){return unescape(cookie[1])}}return null};ralentango.writeCookie=function(name,value,expiredays){var expirestring="";if(expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);expirestring=";expires="+exdate.toGMTString()}document.cookie=name+"="+escape(value)+expirestring;return value};ralentango.deleteCookie=function(name){document.cookie=name+"=;expires=-1";return null};ralentango.makeNiceDate=function(date){res=""+["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][date.getDay()]+" "+date.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][date.getMonth()]+" "+date.getFullYear()+"";return res};ralentango.sjax=function(action,path,data){if(!data)var data={};data.action=action;if(path)data.path=path;var res=null;$.ajax({type:"POST",url:"sjax.php",data:data,dataType:"json",cache:false,async:false,success:function(response){res=response},error:function(response){var msg=response.responseText.replace(/<br \/>/gi,"\n").replace(/<\/?b>/gi,"");alert("SJAX failure: "+msg)}});return res};ralentango.showallDDs=function(speed){$("div.showondemand").each(function(){ralentango.showDD(this.id,speed);$("a[href=#showall]").addClass("hideme");$("a[href=#hideall]").addClass("hidemeneeded")})};ralentango.hideallDDs=function(speed){$("div.showondemand").each(function(){ralentango.hideDD(this.id,speed)})};ralentango.showDD=function(id,speed){$("div#"+id).show(speed);$("a[href$="+id+"]").filter(".hideme").addClass("hidemeneeded").end().not(".hideme").addClass("shownotneeded")};ralentango.hideDD=function(id,speed){$("div#"+id).hide(speed);$("a[href$="+id+"]").removeClass("hidemeneeded shownotneeded");$("a[href=#showall]").removeClass("hideme");$("a[href=#hideall]").removeClass("hidemeneeded")};ralentango.nodeTextValue=function(node,value){if(!node.firstChild)return null;var child=node.firstChild;while(child){if(child.nodeType==3){if(value!=null)child.nodeValue=value;return child.nodeValue}var tval=ralentango.nodeTextValue(child,value);if(tval!=null)return tval;child=child.nextSibling}return null};