(function(){"use strict";var root=this,re_trim=/^\s*|\s*$/g;Object.keys||(Object.keys=function(){var hwp=Object.prototype.hasOwnProperty,hdeb=!{toString:null}.propertyIsEnumerable("toString"),de=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],del=de.length;return function(obj){if("object"!=typeof obj&&("function"!=typeof obj||null===obj))throw new TypeError("type err");var prop,i,r=[];for(prop in obj)hwp.call(obj,prop)&&r.push(prop);if(hdeb)for(i=0;del>i;i++)hwp.call(obj,de[i])&&r.push(de[i]);return result}}()),Array.prototype.forEach||(Array.prototype.forEach=function(fun){if(void 0===this||null===this)throw TypeError();var t=Object(this),len=t.length>>>0;if("function"!=typeof fun)throw TypeError();var i,thisp=arguments[1];for(i=0;len>i;i++)i in t&&fun.call(thisp,t[i],i,t)}),Function.prototype.bind||(Function.prototype.bind=function(o){function nop(){}if("function"!=typeof this)throw TypeError("function");var slice=[].slice,args=slice.call(arguments,1),self=this,bound=function(){return self.apply(this instanceof nop?this:o,args.concat(slice.call(arguments)))};return nop.prototype=self.prototype,bound.prototype=new nop,bound}),function(){if(!document.querySelectorAll&&!document.querySelector&&document.createStyleSheet){var style=document.createStyleSheet(),select=function(selector,maxCount){var i,all=document.all,l=all.length,resultSet=[];for(style.addRule(selector,"foo:bar"),i=0;l>i&&!("bar"===all[i].currentStyle.foo&&(resultSet.push(all[i]),resultSet.length>maxCount));i+=1);return style.removeRule(0),resultSet};document.querySelectorAll=function(selector){return select(selector,1/0)},document.querySelector=function(selector){return select(selector,1)[0]||null}}}(),String.prototype.trim||!function(){String.prototype.trim=function(){return this.replace(re_trim,"")}}(),window.JSON||(window.JSON={parse:function(sJSON){return new Function("","return "+sJSON)()},stringify:function(){var f,r=/["]/g;return f=function(vContent){var result,i,j;switch(result=typeof vContent){case"string":return'"'+vContent.replace(r,'\\"')+'"';case"number":case"boolean":return vContent.toString();case"undefined":return"undefined";case"function":return'""';case"object":if(!vContent)return"null";if(result="",vContent.splice){for(i=0,j=vContent.length;j>i;i++)result+=","+f(vContent[i]);return"["+result.substr(1)+"]"}for(i in vContent)vContent.hasOwnProperty(i)&&void 0!==vContent[i]&&"function"!=typeof vContent[i]&&(result+=',"'+i+'":'+f(vContent[i]));return"{"+result.substr(1)+"}"}}}()}),function(con){for(var prop,method,empty={},dummy=function(){},properties="memory".split(","),methods="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");prop=properties.pop();)con[prop]=con[prop]||empty;for(;method=methods.pop();)con[method]=con[method]||dummy}(root.console=root.console||{})}).call(this),function(){"use strict";var info,U,dom,root=this,win=window,doc=document,docElem=document.documentElement,ax5={},node_names="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",re_tag=/<([\w:]+)/,re_single_tags=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,re_html=/<|&#?\w+;/,re_noInnerhtml=/<(?:script|style|link)/i,core_pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re_margin=/^margin/,re_numsplit=new RegExp("^("+core_pnum+")(.*)$","i"),re_numnonpx=new RegExp("^("+core_pnum+")(?!px)[a-z%]+$","i"),re_position=/^(top|right|bottom|left)$/,re_is_json=/^(["'](\\.|[^"\\\n\r])*?["']|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/,re_ms=/^-ms-/,re_snake_case=/[\-_]([\da-z])/gi,re_camel_case=/([A-Z])/g,re_dot=/\./,re_int=/[-|+]?[\D]/gi,re_not_num=/\D/gi,re_money_split=new RegExp("([0-9])([0-9][0-9][0-9][,.])"),re_amp=/&/g,re_eq=/=/,re_class_name_split=/[ ]+/g,safe_fragment=(doc.createElement("body"),function(){var list=node_names.split("|"),safeFrag=doc.createDocumentFragment();if(safeFrag.createElement)for(;list.length;)safeFrag.createElement(list.pop());return safeFrag}()),tag_map=(safe_fragment.appendChild(doc.createElement("div")),{option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"]}),tag_not_support_innerhtml={col:1,colGroup:1,frameSet:1,html:1,head:1,style:1,table:1,tBody:1,tFoot:1,tHead:1,title:1,tr:1};ax5.guid=1,ax5.get_guid=function(){return ax5.guid++},ax5.info=info=function(){function url_util(url,urls){return url={href:win.location.href,param:win.location.search,referrer:doc.referrer,pathname:win.location.pathname,hostname:win.location.hostname,port:win.location.port},urls=url.href.split(/[\?#]/),url.param=url.param.replace("?",""),url.url=urls[0],url.href.search("#")>-1&&(url.hashdata=U.last(urls)),urls=null,url.base_url=U.left(url.href,"?").replace(url.pathname,""),url}var version="0.0.1",base_url="",onerror=function(){console.error(ax5.util.to_array(arguments).join(":"))},event_keys={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34,INSERT:45,SPACE:32},browser=function(ua,mobile,browserName,match,browser,browserVersion){return ua=navigator.userAgent.toLowerCase(),mobile=-1!=ua.search(/mobile/g),browserVersion,-1!=ua.search(/iphone/g)?{name:"iphone",version:0,mobile:!0}:-1!=ua.search(/ipad/g)?{name:"ipad",version:0,mobile:!0}:-1!=ua.search(/android/g)?(match=/(android)[ \/]([\w.]+)/.exec(ua)||[],browserVersion=match[2]||"0",{name:"android",version:browserVersion,mobile:mobile}):(browserName="",match=/(opr)[ \/]([\w.]+)/.exec(ua)||/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[],browser=match[1]||"",browserVersion=match[2]||"0","msie"==browser&&(browser="ie"),{name:browser,version:browserVersion,mobile:mobile})}(),is_browser=!("undefined"==typeof window||"undefined"==typeof navigator||!win.document),wheel_enm=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";return{version:version,base_url:base_url,onerror:onerror,event_keys:event_keys,browser:browser,is_browser:is_browser,wheel_enm:wheel_enm,url_util:url_util}}(),ax5.util=U=function(){function each(O,_fn){if(is_nothing(O))return[];var key,i=0,l=O.length,isObj=void 0===l||"function"==typeof O;if(isObj){for(key in O)if("undefined"!=typeof O[key]&&_fn.call(O[key],key,O[key])===!1)break}else for(;l>i&&("undefined"==typeof O[i]||_fn.call(O[i],i,O[i++])!==!1););return O}function map(O,_fn){if(is_nothing(O))return[];var key,fn_result,i=0,l=O.length,results=[];if(is_object(O)){for(key in O)if("undefined"!=typeof O[key]){if(fn_result=void 0,(fn_result=_fn.call(O[key],key,O[key]))===!1)break;results.push(fn_result)}}else for(;l>i;)if("undefined"!=typeof O[i]){if(fn_result=void 0,(fn_result=_fn.call(O[i],i,O[i++]))===!1)break;results.push(fn_result)}return results}function search(O,_fn){if(is_nothing(O))return-1;var key,i=0,l=O.length;if(is_object(O))for(key in O){if("undefined"!=typeof O[key]&&is_function(_fn)&&_fn.call(O[key],key,O[key]))return key;if(O[key]==_fn)return key}else for(;l>i;){if("undefined"!=typeof O[i]&&is_function(_fn)&&_fn.call(O[i],i,O[i]))return i;if(O[i]==_fn)return i;i++}return-1}function reduce(O,_fn){var i,l,token_item;if(is_array(O)){for(i=0,l=O.length,token_item=O[i];l-1>i&&("undefined"==typeof O[i]||(token_item=_fn.call(root,token_item,O[++i]))!==!1););return token_item}if(is_object(O)){for(i in O)if("undefined"!=typeof O[i]&&(token_item=_fn.call(root,token_item,O[i]))===!1)break;return token_item}return console.error("argument error : ax5.util.reduce - use Array or Object"),null}function reduce_right(O,_fn){for(var i=O.length-1,token_item=O[i];i>0&&("undefined"==typeof O[i]||(token_item=_fn.call(root,token_item,O[--i]))!==!1););return token_item}function filter(O,_fn){if(is_nothing(O))return[];var k,fn_result,i=0,l=O.length,results=[];if(is_object(O))for(k in O)"undefined"!=typeof O[k]&&(fn_result=_fn.call(O[k],k,O[k]))&&results.push(O[k]);else for(;l>i;)"undefined"!=typeof O[i]&&((fn_result=_fn.call(O[i],i,O[i]))&&results.push(O[i]),i++);return results}function to_json(O){var json_string="";if(ax5.util.is_array(O)){var i=0,l=O.length;for(json_string+="[";l>i;i++)i>0&&(json_string+=","),json_string+=to_json(O[i]);json_string+="]"}else if(ax5.util.is_object(O)){json_string+="{";var json_object_body=[];each(O,function(key,value){json_object_body.push('"'+key+'": '+to_json(value))}),json_string+=json_object_body.join(", "),json_string+="}"}else ax5.util.is_string(O)?json_string='"'+O+'"':ax5.util.is_number(O)?json_string=O:ax5.util.is_undefined(O)?json_string="undefined":ax5.util.is_function(O)&&(json_string='"{Function}"');return json_string}function parse_json(str,force){if(!force&&!re_is_json.test(str))return{error:500,msg:"syntax error"};try{return new Function("","return "+str)()}catch(e){return{error:500,msg:"syntax error"}}}function extend(O,_O,overwrite){if("object"!=typeof O&&"function"!=typeof O&&(O={}),"string"==typeof _O)O=_O;else if(overwrite===!0)for(var k in _O)O[k]=_O[k];else for(var k in _O)"undefined"==typeof O[k]&&(O[k]=_O[k]);return O}function extend_all(O,_O,overwrite){if("object"!=typeof O&&"function"!=typeof O&&(O={}),"string"==typeof _O)O=_O;else for(var k in _O)"undefined"==typeof O[k]?O[k]=_O[k]:"[object Object]"==Object.prototype.toString.call(O[k])?O[k]=extend_all(O[k],_O[k],overwrite):overwrite===!0&&(O[k]=_O[k]);return O}function clone(O){return extend({},O)}function get_type(O){var typeName;return null!=O&&O==O.window?typeName="window":O&&1==O.nodeType?typeName="element":O&&11==O.nodeType?typeName="fragment":"undefined"==typeof O?typeName="undefined":"[object Object]"==_toString.call(O)?typeName="object":"[object Array]"==_toString.call(O)?typeName="array":"[object String]"==_toString.call(O)?typeName="string":"[object Number]"==_toString.call(O)?typeName="number":"[object NodeList]"==_toString.call(O)?typeName="nodelist":"function"==typeof O&&(typeName="function"),typeName}function is_window(O){return null!=O&&O==O.window}function is_element(O){return!(!O||1!=O.nodeType&&11!=O.nodeType)}function is_object(O){return"[object Object]"==_toString.call(O)}function is_array(O){return"[object Array]"==_toString.call(O)}function is_function(O){return"function"==typeof O}function is_string(O){return"[object String]"==_toString.call(O)}function is_number(O){return"[object Number]"==_toString.call(O)}function is_nodelist(O){return"[object NodeList]"==_toString.call(O)||O&&O[0]&&1==O[0].nodeType}function is_undefined(O){return"undefined"==typeof O}function is_nothing(O){return"undefined"==typeof O||null===O||""===O}function first(O){if(is_object(O)){var keys=Object.keys(O),item={};return item[keys[0]]=O[keys[0]],item}return is_array(O)?O[0]:void console.error("ax5.util.object.first","argument type error")}function last(O){if(is_object(O)){var keys=Object.keys(O),item={};return item[keys[keys.length-1]]=O[keys[keys.length-1]],item}return is_array(O)?O[O.length-1]:void console.error("ax5.util.object.last","argument type error")}function set_cookie(cn,cv,exdays,opts){var expire;return"number"==typeof exdays&&(expire=new Date,expire.setDate(expire.getDate()+exdays)),opts=opts||{},doc.cookie=[escape(cn),"=",escape(cv),expire?"; expires="+expire.toUTCString():"",opts.path?"; path="+opts.path:"",opts.domain?"; domain="+opts.domain:"",opts.secure?"; secure":""].join("")}function get_cookie(cname){for(var name=cname+"=",ca=doc.cookie.split(";"),i=0,l=ca.length;l>i;i++){for(var c=ca[i];" "==c.charAt(0);)c=c.substring(1);if(-1!=c.indexOf(name))return unescape(c.substring(name.length,c.length))}return""}function require(mods,callBack,errorBack){for(var onloadTimer,onerrorTimer,head=doc.head||doc.getElementsByTagName("head")[0],readyRegExp=info.is_browser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,loadCount=mods.length,loadErrors=[],loaded_src={},returned=!1,scripts=dom.get("script[src]"),onload=(dom.get("style[href]"),function(){1>loadCount&&0==loadErrors.length&&!returned&&(callBack&&callBack({}),returned=!0)}),onerror=function(){1>loadCount&&loadErrors.length>0&&!returned&&(console.error(loadErrors),errorBack&&errorBack({type:"loadFail",list:loadErrors}),returned=!0)},i=0;i<mods.length;i++){for(var plugin,plug_load,plug_err,src=mods[i],type=right(src,"."),hasPlugin=!1,plugin_src=info.base_url+src,attr_nm="js"===type?"src":"href",s=0;s<scripts.length;s++)if(scripts[s].getAttribute(attr_nm)===plugin_src){hasPlugin=!0;break}hasPlugin?(loadCount--,onload()):(plugin="js"===type?dom.create("script",{type:"text/javascript",src:plugin_src,"data-src":plugin_src}):dom.create("link",{rel:"stylesheet",type:"text/css",href:plugin_src}),plug_load=function(e,plugin_src){e&&("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState))&&(loaded_src[plugin_src]||loadCount--,onloadTimer&&clearTimeout(onloadTimer),onloadTimer=setTimeout(onload,1))},plug_err=function(e){loadCount--,loadErrors.push({src:info.base_url+src,error:e}),onerrorTimer&&clearTimeout(onerrorTimer),onerrorTimer=setTimeout(onerror,1)},ax5.xhr({url:plugin_src,contentType:"",res:function(){var time_id;head.appendChild(plugin),plugin.onload=function(e){plug_load(e,plugin_src),time_id&&clearTimeout(time_id)},time_id=setTimeout(function(){plug_load({type:"load"},plugin_src)},500)},error:function(){plug_err(this)}}))}}function alert(O){return win.alert(to_json(O)),O}function left(str,pos){return"undefined"==typeof str||"undefined"==typeof pos?"":is_string(pos)?str.indexOf(pos)>-1?str.substr(0,str.indexOf(pos)):str:is_number(pos)?str.substr(0,pos):""}function right(str,pos){return"undefined"==typeof str||"undefined"==typeof pos?"":is_string(pos)?str.lastIndexOf(pos)>-1?str.substr(str.lastIndexOf(pos)+1):str:is_number(pos)?str.substr(str.length-pos):""}function camel_case(str){return str.replace(re_ms,"ms-").replace(re_snake_case,function(all,letter){return letter.toUpperCase()})}function snake_case(str){return camel_case(str).replace(re_camel_case,function(all,letter){return"-"+letter.toLowerCase()})}function number(str,cond){var result,pair=(""+str).split(re_dot),isMinus=Number(pair[0])<0||"-0"==pair[0],returnValue=0;return pair[0]=pair[0].replace(re_int,""),pair[1]?(pair[1]=pair[1].replace(re_not_num,""),returnValue=Number(pair[0]+"."+pair[1])||0):returnValue=Number(pair[0])||0,result=isMinus?-returnValue:returnValue,each(cond,function(k,c){"round"==k?result=is_number(c)?+(Math.round(result+"e+"+c)+"e-"+c):Math.round(result):"money"==k?result=function(val){var txtNumber=""+val;if(isNaN(txtNumber)||""==txtNumber)return"";var arrNumber=txtNumber.split(".");arrNumber[0]+=".";do arrNumber[0]=arrNumber[0].replace(re_money_split,"$1,$2");while(re_money_split.test(arrNumber[0]));return arrNumber.length>1?arrNumber.join(""):arrNumber[0].split(".")[0]}(result):"abs"==k?result=Math.abs(Number(result)):"byte"==k&&(result=function(val){val=Number(result);var n_unit="KB",myByte=val/1024;return myByte/1024>1&&(n_unit="MB",myByte/=1024),myByte/1024>1&&(n_unit="GB",myByte/=1024),number(myByte,{round:1})+n_unit}(result))}),result}function to_array(O){return"undefined"!=typeof O.length?Array.prototype.slice.call(O):[]}function merge(first,second){var l=second.length,i=first.length,j=0;if("number"==typeof l)for(;l>j;j++)first[i++]=second[j];else for(;void 0!==second[j];)first[i++]=second[j++];return first.length=i,first}function param(O,cond){var p;return is_string(O)&&"undefined"!=typeof cond&&"param"==cond?O:is_string(O)&&"undefined"!=typeof cond&&"object"==cond||is_string(O)&&"undefined"==typeof cond?(p={},each(O.split(re_amp),function(){var item=this.split(re_eq);p[item[0]]=item[1]}),p):(p=[],each(O,function(k,v){p.push(k+"="+escape(v))}),p.join("&"))}function error(){ax5.info.onerror.apply(this,arguments)}var _toString=Object.prototype.toString;return{alert:alert,each:each,map:map,search:search,reduce:reduce,reduce_right:reduce_right,filter:filter,to_json:to_json,parse_json:parse_json,extend:extend,extend_all:extend_all,clone:clone,first:first,last:last,left:left,right:right,get_type:get_type,is_window:is_window,is_element:is_element,is_object:is_object,is_array:is_array,is_function:is_function,is_string:is_string,is_number:is_number,is_nodelist:is_nodelist,is_undefined:is_undefined,is_nothing:is_nothing,set_cookie:set_cookie,get_cookie:get_cookie,require:require,camel_case:camel_case,snake_case:snake_case,number:number,to_array:to_array,merge:merge,param:param,error:error}}(),ax5.dom=dom=function(query){var axdom=function(){function ax(query){this.toString=function(){return"[object ax5.dom]"},this.elements=dom.get(query),this.length=this.elements.length,this.css=function(O){var rs=dom.css(this.elements,O);return rs===this.elements?this:rs},this.class_name=function(command,O){var rs=dom.class_name(this.elements,command,O);return rs===this.elements?this:rs},this.on=function(typ,_fn){return dom.on(this.elements,typ,_fn),this},this.off=function(typ,_fn){return dom.off(this.elements,typ,_fn),this},this.attr=function(O){var rs=dom.attr(this.elements,O);return rs===this.elements?this:rs},this.find=function(query){return new axdom(dom.get(this.elements[0],query))},this.prev=function(times){return new axdom(dom.prev(this.elements,times))},this.next=function(times){return new axdom(dom.next(this.elements,times))},this.parent=function(cond){return new axdom(dom.parent(this.elements,cond))},this.child=function(){return new axdom(dom.child(this.elements))},this.width=function(){return dom.width(this.elements)},this.height=function(){return dom.height(this.elements)},this.html=function(val){var rs=dom.html(this.elements,val);return rs===this.elements?this:rs},this.append=function(val){var rs=dom.manipulate("append",this.elements,val);return rs===this.elements?this:rs},this.prepend=function(val){var rs=dom.manipulate("prepend",this.elements,val);return rs===this.elements?this:rs},this.before=function(val){var rs=dom.manipulate("before",this.elements,val);return rs===this.elements?this:rs},this.after=function(val){var rs=dom.manipulate("after",this.elements,val);return rs===this.elements?this:rs},this.remove=function(){return dom.remove(this.elements)},this.offset=function(){return dom.offset(this.elements)},this.position=function(){return dom.position(this.elements)},this.box_model=function(cond){return dom.box_model(this.elements,cond)},this.data=function(command,O){var rs=dom.data(this.elements,command,O);return rs===this.elements?this:rs},this.empty=function(){return dom.empty(this.elements),this}}return ax}();return new axdom(query)},function(){function eBind(elem,type,eventHandle){U.is_string(type)||console.error("type="+type),type=U.left(type,"."),elem.addEventListener?elem.addEventListener(type,eventHandle,!1):elem.attachEvent&&elem.attachEvent("on"+type,eventHandle)}function eUnBind(elem,type,eventHandle){type=U.left(type,"."),elem.removeEventListener?eventHandle?elem.removeEventListener(type,eventHandle):elem.removeEventListener(type):elem.detachEvent&&(eventHandle?elem.detachEvent("on"+type,eventHandle):elem.detachEvent("on"+type))}function va_elem(elem,fn_name){var type=U.get_type(elem);return"window"===type?elem:"array"===type&&U.is_element(elem[0])?elem:"element"===type?[elem]:elem&&9===elem.nodeType?[elem.documentElement]:elem&&"[object ax5.dom]"==elem.toString()?elem.elements:"array"!==type&&"nodelist"!==type?(console.error("ax5.dom."+fn_name+" : elements parameter incorrect"),[]):elem}function sibling(els,forward,times){var prop="prev"==forward?"previousSibling":"nextSibling",el=[].concat(els)[0];times="undefined"==typeof times||1>times?1:times;do el=el[prop];while(function(){return el?(1==el.nodeType&&times--,times>0):!1}());return el}function style(el,key){if(U.is_string(key))return curCSS(el,key);if(U.is_array(key)){for(var css={},i=0,l=key.length;l>i;i++)css[key[i]]=curCSS(el,key[i]);return css}return null}function box_size(els,fn_nm){var d=-1,tag_nm="",el=[].concat(els)[0];if(U.is_window(el))return el.document.documentElement[U.camel_case("client-"+fn_nm)];var _sbs=U.camel_case("scroll-"+fn_nm),_obs=U.camel_case("offset-"+fn_nm),_cbs=U.camel_case("client-"+fn_nm);if(el)if(tag_nm=el.tagName.toLowerCase(),"html"==tag_nm)d=Math.max(doc.body[_sbs],el[_sbs],doc.body[_obs],el[_obs],el[_cbs]);else if(el.getBoundingClientRect&&(d=el.getBoundingClientRect()[fn_nm]),"undefined"==typeof d){d=style(el,fn_nm,fn_nm);var box_cond="width"==fn_nm?style(el,["box-sizing","padding-left","padding-right","border-left-width","border-right-width"],fn_nm):style(el,["box-sizing","padding-top","padding-bottom","border-top-width","border-bottom-width"],fn_nm);"content-box"==box_cond["box-sizing"]&&(d=parseInt(d)+ax5.util.reduce(box_cond,function(p,n){return U.number(0|p)+U.number(n)}))}return U.number(d)}function node_name(el,node_nm){return el.nodeName&&el.nodeName.toLowerCase()===node_nm.toLowerCase()}function create_fragment(elems){for(var tmp,tag,wrap,elem,j,safe=safe_fragment.appendChild(doc.createElement("div")),nodes=[],i=0,l=elems.length;l>i;i++)if(elem=elems[i],elem||0===elem)if("fragment"==U.get_type(elem))nodes.push(elem.firstChild);else if("element"==U.get_type(elem))nodes.push(elem);else if(re_html.test(elem)){for(tmp=safe.appendChild(doc.createElement("div")),tag=(re_tag.exec(elem)||["",""])[1].toLowerCase(),wrap=tag_map[tag]||[0,"",""],tmp.innerHTML=wrap[1]+elem.replace(re_single_tags,"<$1></$2>")+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;for(U.merge(nodes,tmp.childNodes),tmp.textContent="";tmp.firstChild;)tmp.removeChild(tmp.firstChild);tmp=safe.lastChild,safe.removeChild(tmp),tmp=null}else nodes.push(doc.createTextNode(elem));for(i=0;elem=nodes[i++];)safe.appendChild(elem);return safe}function clear_element_data(el){var el,c_el,ci,cl;for(var hd in el.e_hd)if("function"==typeof el.e_hd[hd])eUnBind(el,hd,el.e_hd[hd]);else for(var ehi=0;ehi<el.e_hd[hd].length;ehi++)eUnBind(el,hd,el.e_hd[hd][ehi]);if(el.e_hd&&delete el.e_hd,el.ax5_data&&delete el.ax5_data,"ie"!==ax5.info.browser.name&&ax5.info.browser.version>7)for(var a in el.attributes)"object"==typeof el.attributes[a]&&(el.attributes[a]=null);if(el.hasChildNodes())for(c_el=el.childNodes,ci=0,cl=c_el.length;cl>ci;ci++)clear_element_data(c_el[ci])}function ready(_fn){var is_ready=!1;promise(function(){is_ready||(is_ready=ax5.dom.is_ready=!0,_fn())})}function promise(_fn){if("complete"===doc.readyState)setTimeout(_fn);else if(doc.addEventListener)doc.addEventListener("DOMContentLoaded",_fn,!1),win.addEventListener("load",_fn,!1);else{doc.attachEvent("onreadystatechange",_fn),win.attachEvent("onload",_fn);var top=!1;try{top=null==win.frameElement&&doc.documentElement}catch(e){}top&&top.doScroll&&!function doScrollCheck(){if(!ax5.dom.is_ready){try{top.doScroll("left")}catch(e){return setTimeout(doScrollCheck,50)}_fn()}}()}}function resize(_fn){ready(function(){eBind(window,"resize",_fn)})}function scroll(_fn){return"undefined"==typeof _fn?{top:docElem.scrollTop||doc.body.scrollTop,left:docElem.scrollLeft||doc.body.scrollLeft}:(ready(function(){eBind(window,"scroll",_fn)}),!1)}function get(query,sub_query){var els,p_els,r_els=[],i=0,l=query.length;if("[object ax5.dom]"===query.toString())r_els=query.elements;else if(U.is_window(query))r_els.push(query);else if(U.is_element(query))r_els.push(query);else if(U.is_array(query)||U.is_nodelist(query))for(i=0;l>i;i++)U.is_element(query[i])&&r_els.push(query[i]);else if(U.is_string(query)&&"#"===query.substr(0,1))r_els.push(doc.getElementById(query.substr(1)));else for(els=doc.querySelectorAll(query),l=els.length,i=0;l>i;i++)r_els.push(els[i]);if("undefined"!=typeof sub_query)for(p_els="ie"==info.browser.name&&info.browser.version<8?doc:r_els[0],r_els=[],els=p_els.querySelectorAll(sub_query),l=els.length,i=0;l>i;i++)r_els.push(els[i]);return r_els}function get_one(query,sub_query){return get(query,sub_query)[0]}function create(node_nm,attr,val){var element=doc.createElement(node_nm);for(var k in attr)element.setAttribute(k,attr[k]);return val&&element.appendChild(create_fragment([].concat(val))),element}function css(els,O){if(els=va_elem(els,"css"),U.is_string(O)||U.is_array(O))return style(els[0],O,"css");for(var k,matchs,i=0,l=els.length;l>i;i++)for(k in O)els[i].style[U.camel_case(k)]=(matchs=re_numsplit.exec(O[k]))?Math.max(0,matchs[1])+(matchs[2]||"px"):O[k];return els}function class_name(els,command,O){var cns;if(els=va_elem(els,"clazz"),"add"===command||"remove"===command||"toggle"===command){O=[].concat(O);for(var di=0;di<els.length;di++)cns=els[di].className,cns=""!==cns?cns.split(re_class_name_split):[],"add"===command?O.forEach(function(O){-1==U.search(cns,function(){return O.trim()==this})&&cns.push(O.trim())}):"remove"===command?O.forEach(function(O){cns=U.filter(cns,function(){return O.trim()!=this})}):"toggle"===command&&O.forEach(function(O){var class_count=cns.length;cns=U.filter(cns,function(){return O.trim()!=this}),class_count===cns.length&&cns.push(O.trim())}),els[di].className=cns.join(" ");return els}return"undefined"==typeof O&&(O=command),cns=els[0].className.trim().split(re_class_name_split),U.is_string(O)?U.search(cns,function(){return this.trim()===O})>-1:(console.error("set_class argument error"),els)}function attr(els,O){els=va_elem(els,"attr");var k,i=0,l=els.length;if(U.is_object(O))for(;l>i;i++)for(k in O)null==O[k]?els[i].removeAttribute(k):els[i].setAttribute(k,O[k]);else if(U.is_string(O))return els[0].getAttribute(O);return els}function on(els,typ,_fn){els=va_elem(els,"on");for(var i=0;i<els.length;i++){var __fn,_d=els[i];if(!_d)break;_d.e_hd||(_d.e_hd={}),"undefined"==typeof _d.e_hd[typ]?__fn=_d.e_hd[typ]=_fn:(U.is_array(_d.e_hd[typ])||(_d.e_hd[typ]=[_d.e_hd[typ]]),_d.e_hd[typ].push(_fn),__fn=_d.e_hd[typ][_d.e_hd[typ].length-1]),eBind(_d,typ,__fn)}}function off(els,typ,_fn){els=va_elem(els,"off");for(var i=0;i<els.length;i++){var _d=els[i];if(_d.e_hd)if(U.is_array(_d.e_hd[typ])){for(var _na=[],i=0;i<_d.e_hd[typ].length;i++)_d.e_hd[typ][i]==_fn||"undefined"==typeof _fn?eUnBind(_d,typ,_d.e_hd[typ][i]):_na.push(_d.e_hd[typ][i]);_d.e_hd[typ]=_na}else(_d.e_hd[typ]==_fn||"undefined"==typeof _fn)&&(eUnBind(_d,typ,_d.e_hd[typ]),delete _d.e_hd[typ])}}function child(els){els=va_elem(els,"child");var l,return_elems=[],i=0;if(els[0])for(l=els[0].children.length;l>i;i++)return_elems.push(els[0].children[i]);return return_elems}function parent(els,cond){els=va_elem(els,"parent");var _target=els[0];if(_target)for(;function(){var result=!0;if("undefined"==typeof cond)_target=_target.parentNode?_target.parentNode:!1;else if(U.is_function(cond))result=cond(_target);else if(U.is_object(cond))for(var k in cond)if("tagname"===k){if(_target.tagName.toLocaleLowerCase()!=cond[k]){result=!1;break}}else if("clazz"===k||"class_name"===k){if(!("className"in _target)){result=!1;break}for(var klasss=_target.className.split(re_class_name_split),hasClass=!1,a=0;a<klasss.length;a++)if(klasss[a]==cond[k]){hasClass=!0;break}result=hasClass}else{if(!_target.getAttribute){result=!1;break}if(_target.getAttribute(k)!=cond[k]){result=!1;break}}return!result}();){if(!_target.parentNode){_target=!1;break}_target=_target.parentNode}return _target}function prev(els,times){return els=va_elem(els,"prev"),sibling(els,"prev",times)}function next(els,times){return els=va_elem(els,"next"),sibling(els,"next",times)}function width(els){return els=va_elem(els,"width"),box_size(els,"width")}function height(els){return els=va_elem(els,"height"),box_size(els,"height")}function empty(els){els=va_elem(els,"empty");for(var el,i=0,l=els.length;l>i;i++){for(el=els[i];el.firstChild;)clear_element_data(el.firstChild),el.removeChild(el.firstChild);el.options&&node_name(el,"select")&&(el.options.length=0)}return els}function html(els,val){els=va_elem(els,"html");var tag;if("undefined"==typeof val)return els[0].innerHTML;if(tag=(re_tag.exec(val)||["",""])[1].toLowerCase(),U.is_string(val)&&!re_noInnerhtml.test(val))if(tag_not_support_innerhtml[tag])append(empty(els),val);else{val=val.replace(re_single_tags,"<$1></$2>");for(var i=0,l=els.length;l>i;i++)"innerHTML"in els[i]&&(els[i].innerHTML=val)}else(U.is_element(val)||U.is_nodelist(val))&&append(empty(els),val);return els}function append(els,val){return manipulate("append",els,val)}function prepend(els,val){return manipulate("prepend",els,val)}function before(els,val){return manipulate("before",els,val)}function after(els,val){return manipulate("after",els,val)}function manipulate(act,els,val){els=va_elem(els,act);var _el,i=0,l=els.length,el=[].concat(val),cf=create_fragment,els=els;if("append"===act)for(;l>i;i++)for(_el=cf(el);_el.firstChild;)els[i].appendChild(_el.firstChild);else if("prepend"==act)for(;l>i;i++)for(_el=cf(el);_el.firstChild;)els[i].insertBefore(_el.firstChild,els[i].firstChild);else if("before"==act)for(;l>i;i++)for(_el=cf(el);_el.firstChild;)els[i].parentNode.insertBefore(_el.firstChild,els[i]);else if("after"==act)for(;l>i;i++)for(_el=cf(el);_el.firstChild;)els[i].parentNode.insertBefore(_el.firstChild,els[i].nextSibling);return els}function remove(els){els=va_elem(els,"remove");for(var i=0,l=els.length;l>i;i++)els[i].parentNode&&(clear_element_data(els[i]),els[i].parentNode.removeChild(els[i]))}function offset(els){els=va_elem(els,"offset");var box,el=els[0];return el.getBoundingClientRect&&(box=el.getBoundingClientRect()),{top:box.top+(win.pageYOffset||docElem.scrollTop||doc.body.scrollTop)-(docElem.clientTop||0),left:box.left+(win.pageXOffset||docElem.scrollLeft||doc.body.scrollLeft)-(docElem.clientLeft||0)}}function offset_parent(el){for(var offsetParent=el.offsetParent||docElem;offsetParent&&!node_name(offsetParent,"html")&&"static"===curCSS(offsetParent,"position");)offsetParent=offsetParent.offsetParent;return offsetParent||docElem}function position(els){els=va_elem(els,"offset");var el_parent,el=els[0],pos={top:0,left:0},parentPos={top:0,left:0};return"fixed"===css(el,"position")?pos=el.getBoundingClientRect():(el_parent=offset_parent(el),pos=offset(el),node_name(el_parent,"html")||(parentPos=offset(el_parent)),parentPos.top+=curCSS(el_parent,"borderTopWidth","float"),parentPos.left+=curCSS(el_parent,"borderLeftWidth","float")),{top:pos.top-parentPos.top-(curCSS(el,"marginTop","float")||0),left:pos.left-parentPos.left-(curCSS(el,"marginLeft","float")||0)}}function box_model(els,cond){els=va_elem(els,"box_model");var el=els[0],model={};return cond&&(cond=U.camel_case(cond)),("undefined"==typeof cond||"offset"==cond)&&(model.offset=offset(el)),("undefined"==typeof cond||"position"==cond)&&(model.position=position(el)),("undefined"==typeof cond||"width"==cond)&&(model.width=width(el)),("undefined"==typeof cond||"height"==cond)&&(model.height=height(el)),("undefined"==typeof cond||"padding"==cond)&&(model.padding=U.map(style(el,["padding-top","padding-right","padding-bottom","padding-left"]),function(k,v){return parseFloat(v)})),("undefined"==typeof cond||"margin"==cond)&&(model.margin=U.map(style(el,["margin-top","margin-right","margin-bottom","margin-left"]),function(k,v){return parseFloat(v)})),("undefined"==typeof cond||"border"==cond)&&(model.border=U.map(style(el,["border-top","border-right","border-bottom","border-left"]),function(k,v){return v})),("undefined"==typeof cond||"borderWidth"==cond)&&(model.borderWidth=U.map(style(el,["border-top-width","border-right-width","border-bottom-width","border-left-width"]),function(k,v){return parseFloat(v)})),("undefined"==typeof cond||"boxSizing"==cond)&&(model.boxSizing=style(el,"box-sizing")),"undefined"==typeof cond?model:model[cond]}function data(els,command,O){els=va_elem(els,"data");
var k,i=0,l=els.length;if("set"===command||"undefined"==typeof O&&U.is_object(command))for("undefined"==typeof O&&(O=command);l>i;i++)for(k in O)"undefined"==typeof els[i].ax5_data&&(els[i].ax5_data={}),els[i].ax5_data[k]=O[k];else{if("remove"!==command&&("get"===command||"read"===command||"undefined"==typeof O&&U.is_string(command)))return"undefined"==typeof O&&(O=command),U.is_string(O)?"undefined"==typeof els[0].ax5_data[O]?"":els[0].ax5_data[O]:els;if("remove"===command)if("undefined"==typeof O)for(;l>i;i++)els[i].ax5_data={};else if(U.is_string(O))for(;l>i;i++)delete els[i].ax5_data[O];else for(;l>i;i++)each(O,function(){delete els[i].ax5_data[this]})}return els}var curCSS;curCSS=window.getComputedStyle?function(elem,name,num){var width,minWidth,maxWidth,computed,ret,style;return computed=window.getComputedStyle(elem,null),ret=computed?computed.getPropertyValue(name)||computed[name]:void 0,style=elem.style,computed&&re_numnonpx.test(ret)&&re_margin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth),num&&(ret=parseFloat(ret)||0),ret}:function(elem,name,num){var computed,ret,style,left,rs,rsLeft;return computed=elem.currentStyle,ret=computed?computed[name]:void 0,style=elem.style,null==ret&&style&&style[name]&&(ret=style[name]),re_numnonpx.test(ret)&&!re_position.test(name)&&(left=style.left,rs=elem.runtimeStyle,rsLeft=rs&&rs.left,rsLeft&&(rs.left=elem.currentStyle.left),style.left="fontSize"===name?"1em":ret,ret=style.pixelLeft+"px",style.left=left,rsLeft&&(rs.left=rsLeft)),ret=""===ret?"auto":ret,num&&(ret=parseFloat(ret)||0),ret},U.extend(ax5.dom,{ready:ready,scroll:scroll,resize:resize,get:get,get_one:get_one,create:create,css:css,class_name:class_name,attr:attr,on:on,off:off,child:child,parent:parent,prev:prev,next:next,html:html,width:width,height:height,append:append,prepend:prepend,before:before,after:after,manipulate:manipulate,remove:remove,empty:empty,offset:offset,position:position,box_model:box_model,data:data})}(),"object"==typeof module&&module&&"exports"in module?module.exports=ax5:(root.ax5=ax5,"function"==typeof define&&define.amd&&define("_ax5",[],function(){return ax5}))}.call(this),ax5.xhr=function(){function request(queue,onend){var http,that,i,time_id,ontimeout,cfg=queue.pop();if("undefined"==typeof cfg)onend();else if(cfg=U.extend_all(cfg,ax5.xhr.options),""!=cfg.url){http=getXHR(),cfg.param=U.param(cfg.param,"param"),"GET"==cfg.method.toUpperCase()&&""!=cfg.param&&(cfg.url=-1!=cfg.url.search(/\?/)?cfg.url+"&"+cfg.param:cfg.url+"?"+cfg.param),cfg.response||(cfg.response=cfg.res),cfg.username?http.open(cfg.method,cfg.url,cfg.async,cfg.username,cfg.password):http.open(cfg.method,cfg.url,cfg.async),"GET"==cfg.method.toUpperCase()&&(cfg.header.accept="*/*",cfg.header["content-type"]="text/plain");try{for(i in cfg.header)http.setRequestHeader(i,cfg.header[i])}catch(e){}"withCredentials"in http&&(http.withCredentials=cfg.withCredentials),http.onreadystatechange=function(){if(4==http.readyState){if(-1==time_id)return;clearTimeout(time_id),time_id=-1,that={},that.response_url="responseURL"in http?http.responseURL:"",that.status="status"in http?http.status:"",that.result=http.statusText,that.state=http.readyState,that.type=http.responseType;try{that.data="responseText"in http?http.responseText:""}catch(e){}200==http.status?cfg.response?cfg.response.call(that,that.data,that.status,http):console.log(http):0!=http.status&&(that.error=that.result,cfg.error?cfg.error.call(that,that):cfg.response?cfg.response.call(that,that.data,that.status,http):console.log(http)),request(queue,onend)}},ontimeout=function(){-1!=time_id&&(4!==http.readyState&&http.abort(),time_id=-1,that={error:"timeout"},cfg.error?cfg.error.call(that,that):cfg.response?cfg.response.call(that,that,that.data,that.status,http):console.log(http))},"ontimeout"in http?(http.timeout=cfg.timeout,http.ontimeout=ontimeout):time_id=setTimeout(ontimeout,cfg.timeout),http.send(cfg.param)}}var getXHR,U=ax5.util;try{new ActiveXObject("Msxml2.XMLHTTP"),getXHR=function(){return new ActiveXObject("Msxml2.XMLHTTP")}}catch(e){try{new ActiveXObject("Microsoft.XMLHTTP"),getXHR=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}catch(e){getXHR="XMLHttpRequest"in window?function(){return new XMLHttpRequest}:function(){}}}return function(opts,onend){var queue=[].concat(opts);request(queue,function(){onend&&onend()})}}(),function(){function config(opts){return U.extend_all(options,opts,!0),options}var U=ax5.util,options={header:{accept:"*/*","content-type":"application/x-www-form-urlencoded; charset=UTF-8"},method:"GET",url:"",param:"",async:!0,username:"",password:"",withCredentials:!1,crossDomain:!1,timeout:0};ax5.util.extend(ax5.xhr,{options:options,config:config})}(),ax5.ui=function(core){function ax_ui(){this.main=function(){this.config={},this.name="root"}.apply(this,arguments),this.set_config=function(cfg,call_init){return core.util.extend_all(this.config,cfg,!0),("undefined"==typeof call_init||call_init===!0)&&this.init(),this},this.init=function(){console.log(this.config)}}return{root:ax_ui}}(ax5);