function doLightbox(){new Lightbox()}function doExpanders(){document.observe("click",function(B){var C=B.findElement("a[rel^=expander]");if(C){B.stop();if(C.rel!="expander"){$$('a[href][rel="'+C.rel+'"]').each(function(D){if(D.href){$(D.href.match(/[^\#]+^/)).close()}})}var A=$(String(C.href.match(/[^#]+$/)));if(A.visible()){A.close()}else{A.open()}}})}function doExpandables(){$$(".expandable").each(function(A){Object.extend(A,{close:function(){new Effect.BlindUp(A,{duration:0.6,afterFinish:function(){this.previous("a[rel^=expander]").removeClassName("open").addClassName("closed")}.bind(A)})},open:function(){new Effect.BlindDown(A,{duration:0.6,afterFinish:function(){this.previous("a[rel^=expander]").removeClassName("closed").removeClassName("request_open").addClassName("open")}.bind(A)})}})});$$(".expandable").invoke("close")}function addProjectEvents(){$$(".project").each(function(A){A.observe("click",function(E){E.stop();var C=A.href.match(/[^\#]+$/);if(C){$$(".selected").invoke("removeClassName","selected");E.element().addClassName("selected");var D=$(String(C+"_tl"));new Effect.Fade($("thumbs_container"),{duration:0.6,queue:"start",afterFinish:function(){$$(".thumb_list").invoke("hide");new Effect.Appear(this,{duration:0.6,beforeStart:function(){D.show()}});this.fire("content:change")}.bind($("thumbs_container"))});var B=$(String(C+"_w"));new Effect.Fade($("words_container"),{duration:0.6,queue:"end",afterFinish:function(){$$(".words").invoke("hide");new Effect.Appear(this,{duration:0.6,beforeStart:function(){B.show()}});this.fire("content:change")}.bind($("words_container"))})}return false}.bindAsEventListener(A))})}function sizeTheWrappers(){$$(".movable_container").each(function(A){A.select(".contained").each(function(B){this.setStyle({width:(this.getWidth()+B.getWidth())+"px"})}.bind(A))})}function addListeners(){document.observe("content:change",function(A){A.stop();var B=A.findElement(".expandable").previous("a[rel^=expander]");if(B){if(B.hasClassName("closed")){B.removeClassName("closed").addClassName("request_open")}}})}function doThumbsAndWords(){$$(".thumb_list",".words").invoke("hide");$$(".thumb_list")[0].show();$$(".words")[0].show();$$(".project")[0].addClassName("selected")};