var miniExt=function(){var args=arguments;if(args.length==1)args=[this,args[0]];for(var prop in args[1])args[0][prop]=args[1][prop];return args[0]};function miniClass(){}miniClass.prototype.construct=function(){};miniClass.extend=function(def){var classDef=function(){if(arguments[0]!==miniClass){return this.construct.apply(this,arguments)}};var proto=new this(miniClass);miniExt(proto,def);classDef.prototype=proto;classDef.extend=this.extend;return classDef};var miniEl=miniClass.extend({construct:function(elm,d){if(typeof(elm)=="string"){elm=(d||document).createElement(elm)}elm=$mini(elm);return elm},appendTo:function(elm){elm.appendChild(this);return this},appendBefore:function(elm){elm.parentNode.insertBefore(this,elm);return this},remove:function(){this.parentNode.removeChild(this);return this},addEvent:function(type,fn){miniLib.addEvent(this,type,fn);return this},offset:function(){var curleft=curtop=0;var o=obj=this;if(obj.offsetParent){do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent)}var b=(!window.opera)?parseInt(this.getStyle('border-width')||this.style.border)||0:0;return[curleft+b,curtop+b+this.offsetHeight]},parentTag:function(t){var elm=this;do{if(elm&&elm.nodeName&&elm.nodeName.toUpperCase()==t){return elm}elm=elm.parentNode}while(elm);return false},hasClass:function(cls){return this.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'))},addClass:function(cls){if(!this.hasClass(cls)){this.className+=" "+cls};return this},removeClass:function(cls){if(this.hasClass(cls)){this.className=this.className.replace(new RegExp('(\\s|^)'+cls+'(\\s|$)'),' ')}return this},setContent:function(c){this.innerHTML=c;return this},setStyle:function(st){var elmStyle=this.style;for(var itm in st){switch(itm){case'float':elmStyle['cssFloat']=elmStyle['styleFloat']=st[itm];break;case'opacity':elmStyle.opacity=st[itm];elmStyle.filter="alpha(opacity="+Math.round(st[itm]*100)+")";break;case'className':this.className=st[itm];break;default:elmStyle[itm]=st[itm]}}return this},getStyle:function(cssRule,d){var doc=(!d)?document.defaultView:d;if(this.nodeType==1)return(doc&&doc.getComputedStyle)?doc.getComputedStyle(this,null).getPropertyValue(cssRule):this.currentStyle[miniLib.camelize(cssRule)]},setAttributes:function(at){for(var itm in at){this[itm]=at[itm]}return this}});var miniLib={isMSIE:(navigator.appVersion.indexOf("MSIE")!=-1),addEvent:function(obj,type,fn){(obj.addEventListener)?obj.addEventListener(type,fn,false):obj.attachEvent("on"+type,fn)},cancelEvent:function(e){e=e||window.event;if(e.preventDefault&&e.stopPropagation){e.preventDefault();e.stopPropagation()}return false},toArray:function(iterable){var length=iterable.length,results=new Array(length);while(length--){results[length]=iterable[length]};return results},inArray:function(arr,item){return(miniLib.search(arr,item)!=null)},	camelize:function(s){return s.replace(/\-(.)/g, function(m, l){return l.toUpperCase()});},search:function(arr,itm){for(var i=0;i<arr.length;i++){if(arr[i]==itm)return i}return null},domLoad:[],domLoaded:function(){if(arguments.callee.done)return;arguments.callee.done=true;for(i=0;i<miniLib.domLoad.length;i++)miniLib.domLoad[i]()},onDomLoaded:function(fireThis){this.domLoad.push(fireThis);if(document.addEventListener){document.addEventListener("DOMContentLoaded",miniLib.domLoaded,null)}else if(miniLib.isMSIE){$mini("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){miniLib.domLoaded()}}}window.onload=miniLib.domLoaded}};function $find(elm){if(typeof(elm)=="string"){elm=document.getElementById(elm)}return(elm&&!elm.appendTo)?miniExt(elm,miniEl.prototype):elm}
