var EventListener={listeners:[],bSafari:/safari/i.test(navigator.userAgent),addEvents:function(B,D,E,C){for(var A=0; A1)?B.parentNode:B }},getEvents:function(D,C){var A=[]; for(var E,B=0; (E=this.listeners[B++]); ){if(E.element==D&&(!C||C==E.type)){A.push(E) }}return A },cancelEvent:function(A){this.preventDefault(A); this.stopPropagation(A); return false },preventDefault:function(C){try{C.preventDefault() }catch(A){C.returnValue=false }if(this.bSafari){var B=this.getTarget(C); if(/^a$/i.test(B.nodeName)){B.onclick=function(){return false } }}return false },stopPropagation:function(B){try{B.stopPropagation() }catch(A){B.cancelBubble=true }return false },delegate:function(B,A){return function(){B.apply(A,arguments) } }};