jQuery.fn.popupwindow=function(e){var t=e||{};return this.each((function(e){var n,o,l,r,a,i;if(l=(jQuery(this).attr("rel")||"").split(";"),n={height:600,width:600,toolbar:0,scrollbars:0,status:0,resizable:1,left:0,top:0,center:0,createnew:1,location:0,menubar:0,onUnload:null},1==l.length&&1==l[0].split(":").length)a=l[0],void 0!==t[a]&&(n=jQuery.extend(n,t[a]));else for(var s=0;s<l.length;s++)r=l[s].split(":"),void 0!==n[r[0]]&&2==r.length&&(n[r[0]]=r[1]);1==n.center&&(n.top=(screen.height-(n.height+110))/2,n.left=(screen.width-n.width)/2),o="location="+n.location+",menubar="+n.menubar+",height="+n.height+",width="+n.width+",toolbar="+n.toolbar+",scrollbars="+n.scrollbars+",status="+n.status+",resizable="+n.resizable+",left="+n.left+",screenX="+n.left+",top="+n.top+",screenY="+n.top,jQuery(this).on("click",(function(){var t=n.createnew?"PopUpWindow"+e:"PopUpWindow";return i=window.open(this.href,t,o),n.onUnload&&(unloadInterval=setInterval((function(){i&&!i.closed||(clearInterval(unloadInterval),n.onUnload.call($(this)))}),500)),i.focus(),!1}))}))};
