Incordia.Packages.create("Incordia.dom.Element");Incordia.Packages.create("CDON.ui.Popup");CDON.ui.Popup=Incordia.Class.extend({args:null,constructor:function(args){this.args=Incordia.merge(CDON.ui.Popup.defaults,args)},load:function(){var links=document.getElementsByTagName("a");for(var i=0,link;link=links[i];++i){var setting=Incordia.getSetting(link.rel,this.args.rel);if(setting!=null)this.bindLink(link,setting.value)}},bindLink:function(link,settings){addEvent(link,"click",function(e){if(!e)e=window.event;this.showPopup(link.href);if(e.preventDefault)e.preventDefault();if(e.stopPropagation)e.stopPropagation();e.cancelBubble=true;e.returnValue=false}.bind(this))},showPopup:function(href){if(null==window.open(href,this.args.target,this.args.features)&&this.args.doFallback)location.href=href},global:{defaults:{rel:"popup",features:"width=600,height=500",target:"_blank",doFallback:true}}});