;jQuery.fn.popupwindow=function(p){var e=p||{};return this.each(function(c){var d,parameters,mysettings,b,a,winObj;mysettings=(jQuery(this).attr("rel")||"").split(",");d={height:480,width:640,toolbar:0,scrollbars:0,status:0,resizable:0,left:100,top:0,center:1,createnew:1,location:0,menubar:0,onUnload:null};if(mysettings.length==1&&mysettings[0].split(":").length==1){a=mysettings[0];if(typeof e[a]!="undefined"){d=jQuery.extend(d,e[a])}}else{for(var i=0;i<mysettings.length;i++){b=mysettings[i].split(":");if(typeof d[b[0]]!="undefined"&&b.length==2){d[b[0]]=b[1]}}}if(d.center==1){d.top=(screen.height-(d.height+110))/2;d.left=(screen.width-d.width)/2}parameters="location="+d.location+",menubar="+d.menubar+",height="+d.height+",width="+d.width+",toolbar="+d.toolbar+",scrollbars="+d.scrollbars+",status="+d.status+",resizable="+d.resizable+",left="+d.left+",screenX="+d.left+",top="+d.top+",screenY="+d.top;jQuery(this).bind("click",function(){var a=d.createnew?"PopUpWindow"+c:"PopUpWindow";winObj=window.open(this.href,a,parameters);if(d.onUnload){unloadInterval=setInterval(function(){if(!winObj||winObj.closed){clearInterval(unloadInterval);d.onUnload.call($(this))}},500)}winObj.focus();return false})})};
