var moopop={width:0,height:0,captureByRel:function(A,B){this.capture($ES("a",B||document).filterByAttribute("rel","*=",A))},capture:function(C,B,A){if($defined(B)&&$defined(A)){this.width=B;this.height=A}switch($type(C)){case"element":this.add_pop_to(C);break;case"string":case"array":$$(C).each(function(D){this.add_pop_to(D)},this);break}this.width=null;this.height=null},add_pop_to:function(B){B.addEvent("click",function(C){new Event(C).stop();this.popup(B)}.bind(this));var A=B.getAttribute("rel").match(/\[(\d+),\s*(\d+)\]/)||["",this.width,this.height];if(A[1]){B.setAttribute("popupprops","width="+A[1]+", height="+A[2])}},popup:function(A){window.open(A.href,"",A.getAttribute("popupprops")||"")}};window.addEvent("domready",function(){moopop.captureByRel("popup")});