// moopop: unobtrusive javascript popups via late binding using mootools 1.2 copyright (c) 2007-2008 by gonchuki - http://blog.gonchuki.com version: 1.1 released: June 23, 2008 This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License. http://creativecommons.org/licenses/by-sa/3.0/

var moopop={width:0,height:0,captureByRel:function(a,b){this.capture((b||document).getElements("a[rel*="+(a||"popup")+"]"))},capture:function(c,b,a){if($defined(b)&&$defined(a)){this.width=b;this.height=a}switch($type(c)){case"string":c=$$(c);case"element":case"array":$splat(c).each(this.add_pop_to,this)}this.width=null;this.height=null},add_pop_to:function(c){c.addEvent("click",function(d){d.stop();this.popup(c)}.bind(this));var b=c.get("rel").match(/\[(\d+),\s*(\d+)/)||["",this.width,this.height];var a=c.get("rel").match(/,(r)/)||[];if(b[1]){c.store("popupprops","width="+b[1]+", height="+b[2]+(a[1]?", scrollbars=yes, resizable=yes":""))}},popup:function(a){window.open(a.get("href"),a.get("name")||"",a.retrieve("popupprops")||"")}};window.addEvent("domready",function(){moopop.captureByRel("popup")});