if(typeof Meetup==="undefined"){Meetup={}}Meetup.DiscreteAttentionBorder=function(){return this.initialize(Meetup.DiscreteAttentionBorder,this,arguments)};Meetup.DiscreteAttentionBorder.prototype=new Meetup.DiscreteBase();Meetup.DiscreteAttentionBorder.prototype.init=function(){var parent=this.parent,G1=MochiKit.DOM.getFirstElementByTagAndClassName,MSG=MochiKit.Style.getStyle,ELMS=this.elements,root=ELMS.root;ELMS.top=G1("div","top",root);ELMS.right=G1("div","right",root);ELMS.bottom=G1("div","bottom",root);ELMS.left=G1("div","left",root);ELMS.root.style.position="absolute";ELMS.top.style.position="absolute";ELMS.top.style.top="0px";ELMS.top.style.left="0px";ELMS.right.style.position="absolute";ELMS.bottom.style.position="absolute";ELMS.bottom.style.left="0px";ELMS.left.style.position="absolute";ELMS.left.style.left="0px";this.border(this.parent.DEFAULT_BORDER);this.color(this.parent.DEFAULT_COLOR);var self=this;this.attach("onBeforeShow",function(){self.willHide=false});this.bindEvents();return this.publicMethods()};Meetup.DiscreteAttentionBorder.ROOT_CLASS_NAME="J_discreteAttentionBorder";Meetup.DiscreteAttentionBorder.EVENT_NAMES=["onBeforeShow","onAfterShow","onBeforeHide","onAfterHide"];Meetup.DiscreteAttentionBorder.PUBLIC_METHODS=["attach","border","blink","color","detach","discard","getRoot","hasDiscarded","hide","isShowing","opacity","dimension","offset","position","show","zIndex"];Meetup.DiscreteAttentionBorder.SERIALIZED_HTML='<div class="top"></div><div class="right"></div><div class="bottom"></div><div class="left"></div>';Meetup.DiscreteAttentionBorder.DEFAULT_COLOR=[255,255,0];Meetup.DiscreteAttentionBorder.DEFAULT_BORDER=10;Meetup.DiscreteAttentionBorder.SEC_FADE_IN=0.2;Meetup.DiscreteAttentionBorder.prototype.borderSize=0;Meetup.DiscreteAttentionBorder.prototype.borderColor=null;Meetup.DiscreteAttentionBorder.prototype.blinkTimes=0;Meetup.DiscreteAttentionBorder.prototype.blinkEndOp=0;Meetup.DiscreteAttentionBorder.prototype.tweenCount=0;Meetup.DiscreteAttentionBorder.prototype.willHide=false;Meetup.DiscreteAttentionBorder.prototype.blink=function(times,willHide){this.willHide=willHide||false;this.blinkTimes=(times||3)*2;this.tweenCount=0;this.startBlink()};Meetup.DiscreteAttentionBorder.prototype.border=function(border){if(arguments.length>0){var b=this.parent.getNumeric(border);this.offsetX=-b;this.offsetY=-b;this.borderSize=b;this.resetDimension();this.resetPosition()}return this.borderSize};Meetup.DiscreteAttentionBorder.prototype.color=function(color){var col_hex;if(arguments.length>0){if(color instanceof Array){this.borderColor=color}else{try{this.borderColor=this.parent.parseColorValue(color)}catch(er){LOG.error("invalid color input");this.borderColor=this.parent.DEFAULT_COLOR}}col_hex=this.parent.compileColor(this.borderColor);this.setColor(col_hex)}else{col_hex=this.parent.compileColor(this.borderColor)}return col_hex};Meetup.DiscreteAttentionBorder.prototype.dimension=function(w,h){if(arguments.length!==0){this.w=w;this.h=h;this.resetDimension();this.resetPosition()}return{x:this.x,y:this.y}};Meetup.DiscreteAttentionBorder.prototype.position=function(x,y){if(arguments.length!==0){this.x=x;this.y=y;this.resetPosition()}return{x:this.x,y:this.y}};Meetup.DiscreteAttentionBorder.prototype.startBlink=function(){var startOp,endOp;if(this.isShowing()){this.blinkEndOp=0}else{this.blinkEndOp=1;MochiKit.Style.setStyle(this.elements.root,{display:"block",opacity:0,visibility:"visible"})}this.blinkIter()};Meetup.DiscreteAttentionBorder.prototype.blinkIter=function(){if(this.tweenCount<this.blinkTimes){Meetup.Tweener.addTween(this.elements.root,{opacity:this.blinkEndOp,time:0.1,transition:"linear",onComplete:this.bindedFunctions.onBlinkFinish})}else{if(!this.isShowing()){MochiKit.Style.setStyle(this.elements.root,{display:"none",opacity:1,visibility:"visible"})}if(this.willHide){this.hide()}}};Meetup.DiscreteAttentionBorder.prototype.resetDimension=function(){var b=this.borderSize;var b2=b*2;var px_b=b+"px";var px_w=(this.w+b2)+"px";var px_h=this.h+"px";var px_t=b+"px";var ELMS=this.elements;ELMS.top.style.width=px_w;ELMS.top.style.height=px_b;ELMS.top.style.borderRadius=[px_b,px_b,0,0].join(" ");ELMS.top.style.backgroundImage="none";try{ELMS.top.style.WebkitBorderRadius=[px_b,px_b,0,0].join(" ");ELMS.top.style.MozBorderRadius=[px_b,px_b,0,0].join(" ")}catch(e1){}ELMS.right.style.left=(this.w+b)+"px";ELMS.right.style.top=px_t;ELMS.right.style.width=px_b;ELMS.right.style.height=px_h;ELMS.right.style.backgroundImage="none";ELMS.bottom.style.top=(this.h+b)+"px";ELMS.bottom.style.width=px_w;ELMS.bottom.style.height=px_b;ELMS.bottom.style.borderRadius=[0,0,px_b,px_b].join(" ");ELMS.bottom.style.backgroundImage="none";try{ELMS.bottom.style.WebkitBorderRadius=[0,0,px_b,px_b].join(" ");ELMS.bottom.style.MozBorderRadius=[0,0,px_b,px_b].join(" ")}catch(e2){}ELMS.left.style.top=px_t;ELMS.left.style.width=px_b;ELMS.left.style.height=px_h;ELMS.left.style.backgroundImage="none"};Meetup.DiscreteAttentionBorder.prototype.resetPosition=function(){var coord,rs=this.elements.root.style;coord=this.parent.translateCoordinate(this.x,this.y,this.w,this.h,this.offsetX,this.offsetY);rs.left=coord.x+"px";rs.top=coord.y+"px"};Meetup.DiscreteAttentionBorder.prototype.setColor=function(c){var ELMS=this.elements;ELMS.top.style.backgroundColor=c;ELMS.right.style.backgroundColor=c;ELMS.bottom.style.backgroundColor=c;ELMS.left.style.backgroundColor=c};Meetup.DiscreteAttentionBorder.prototype.onBlinkFinish=function(){this.blinkEndOp=Number(!Boolean(this.blinkEndOp));++this.tweenCount;this.blinkIter()};