(function(){varg=g||window.$_;typeofdocument!=="undefined"&&!("classList"indocument.createElement("a"))&&function(c){varc=(c.HTMLElement||c.Element).prototype,f=Object,d=String.prototype.trim||function(){returnthis.replace(/^\s+|\s+$/g,"")},a=Array.prototype.indexOf||function(a){for(varb=0,e=this.length;b<e;b++)if(binthis&&this[b]===a)returnb;return-1},b=function(a,b){this.name=a;this.code=DOMException[a];this.message=b},e=function(e,h){if(h==="")thrownewb("SYNTAX_ERR","An invalid or illegal string was specified");
if(/\s/.test(h))thrownewb("INVALID_CHARACTER_ERR","String contains an invalid character");returna.call(e,h)},h=function(a){for(varb=d.call(a.className),b=b?b.split(/\s+/):[],e=0,h=b.length;e<h;e++)this.push(b[e]);this._updateClassName=function(){a.className=this.toString()}},i=h.prototype=[],g=function(){returnnewh(this)};b.prototype=Error.prototype;i.item=function(a){returnthis[a]||null};i.contains=function(a){a+="";returne(this,a)!==-1};i.add=function(a){a+="";e(this,a)===-1&&(this.push(a),
b,e){varh,c;if(typeofa.hasAttribute!=="undefined")a.hasAttribute(b)&&(h=a.getAttribute(b)),c=true;elseif(typeofa[b]!=="undefined")h=a[b],c=false;elseif(b==="class"&&typeofa.className!=="undefined")b="className",h=a.className,c=false;if(typeofh==="undefined"&&(typeofe==="undefined"||e===null))console.log(e),console.log(a),console.log("Element does not have the selected attribute");else{if(typeofe==="undefined")returnh;typeofe!=="undefined"&&e!==null?c===true?a.setAttribute(b,e):a[b]=e:e===
e:console.log("Property "+b+" nor an equivalent seems to exist")}g.ext("dom",{addClass:function(a){g.each(function(b){b.classList.add(a)})},removeClass:function(a){g.each(function(b){b.classList.remove(a)})},hide:function(){this.css("display","none")},show:function(a){typeofa==="undefined"&&(a="block");this.css("display",a)},attr:function(a,b){vare=this.el;if(e.length>1&&typeofb==="undefined")console.log(e),console.log("Must be a singular element");elseif(e.length>1&&typeofb!=="undefined")g.each(function(e){returnc(e,
b,c){vare;functiond(){c.apply(arguments)}typeofa.attachEvent!=="undefined"?(f(b,c),a.attachEvent("on"+b,d),e=a.KIS_0_3_0=a.KIS_0_3_0||{},a=e,a.listeners=a.listeners||{},a.listeners[b]=a.listeners[b]||[],a.listeners[b].push({callback:c,listener:d})):console.log("Failed to attach event:"+b+" on "+a)},f=function(a,b,c){if(typeofa.detachEvent!=="undefined"){vard=a.KIS_0_3_0;if(d&&d.listeners&&d.listeners[b])for(varf=d.listeners[b],g=f.length,k=0;k<g;k++)if(f[k].callback===c){a.detachEvent("on"+