var $=function(id,pNode,dig){return new utils(id,pNode,dig)};function utils(id,pNode,dig){if(dig==undefined){dig=true}var o=utils.sys.Ini(id,pNode,dig);for(var i=0;i0&&id!=window)?e=id:e.push(id)}return e}}var ids,notLastId=true;(typeof(id)==="string")?ids=id.split(" "):ids=id;var attributes=ids[0].match(/\[.*?]/g);if(!pNode){for(var i=1;i1)?ids.shift():notLastId=false;for(var i=0;i1){ids.shift();e=this.Ini(ids,eArr[0],dig,e)}else{e.push(eArr[0])}}else{if(/^\*/.test(ids[0])){var eArr=document.getElementsByName(ids[0].replace(/^\*|\[.*]/g,""));if(eArr.length==0){return e}(ids.length>1)?ids.shift():notLastId=false;if(pNode==document){for(var i=0;i1){ids.shift();e=this.Ini(ids,eArr,dig,e)}else{e.push(eArr)}}else{var eArr=[];eArr=pNode.getElementsByTagName(ids[0].replace(/\[.*]/g,""));if(!dig){var cTA=[];for(var i=0;i1)?ids.shift():notLastId=false;for(var i=0;i":function(obj1,obj2){return parseInt(obj1)>parseInt(obj2)},"<":function(obj1,obj2){return parseInt(obj1)=":function(obj1,obj2){return parseInt(obj1)>=parseInt(obj2)},"<=":function(obj1,obj2){return parseInt(obj1)<=parseInt(obj2)},"~":function(obj1,obj2){return(new RegExp(eval("/^"+obj2.replace(new RegExp(/%/g),"\\S*")+"$/"))).test(obj1)}},FilterAttributes:function(e,attributes){var et=[];if(e.length){var src=new Array(),cal=new Array(),a=new Array();for(var i=0;i|<=|>=|==|!=|<|>|~/);a[i]=src[i].split(cal[i])}for(var i=0;i0){this.job[0]--}}},StandBy:function(fn,root,callback){root.queues.add(function(){for(var i=0;i=0)&&(navigator.userAgent.indexOf("Opera")<0),"Firefox":navigator.userAgent.indexOf("Firefox")>=0,"Opera":navigator.userAgent.indexOf("Opera")>=0,"IE6":(navigator.userAgent.indexOf("Opera")<0)&&!window.XMLHttpRequest,"IE10":(navigator.userAgent.indexOf("MSIE")>=0)&&(function(){return this===undefined}())}};var base={css:function(name,value){if(arguments.length==1){this.each(function(me,i,root){var cssText=";";for(var key in name){value=name[key];me.style[key]=me.style[key]||0;if(/^\+\=/.test(value)){value=parseInt(me.style[key])+parseInt(value.replace("+=",""))}else{if(/^\-\=/.test(value)){value=parseInt(me.style[key])-parseInt(value.replace("-=",""))}}if(/px$/.test(me.style[key])){value+="px"}cssText+=key+":"+value+";"}me.style.cssText+=cssText})}else{if(name){this.each(function(me,i,root){me.style[name]=value})}}return this},extSys:function(value){String.prototype.Length=function(){var ZH=this.replace(/[\x00-\xff]/g,"").length;return{zh:ZH,en:this.length-ZH}};String.prototype.Trim=function(type){switch(type){case"left":return this.replace(/(^\s*)/g,"");case"right":return this.replace(/(\s*$)/g,"");default:return this.replace(/(^\s*)|(\s*$)/g,"")}}},opacity:function(value){var ieV=value*100,cssTxt;this.each(function(me,i,root){cssTxt=";filter:Alpha(Opacity="+ieV+");opacity:"+value+";-moz-opacity:"+value+";";me.style.cssText+=cssTxt});return this},sleep:function(){this.queues.sleep();return this},go:function(){this.queues.awake();return this},wait:function(time,callback){return this.StandBy(function(root){root.queues.sleep();setTimeout(function(){root.queues.awake();root.done()},time)},this,callback)},append:function(node){this.each(function(me,i,root){me.appendChild(node.cloneNode(true))});return this},addEvent:function(type,fun,base){if(!base){var args=new Array();for(var i=2;i=1){r=1;clearInterval(timer);root.done()}for(key in base){scrollParent[key]=root.slice(base[key],diff[key],r)}running(me,i)},15)},this,callback)},animate:function(options,duration,method,easing,callback,running){running=running||function(){};method=method||"ease";easing=easing||"easeIn";var progress;(method=="liner"||method=="bounce")?progress=this.progress[method]:progress=this.progress[method][easing];var opac=options["opacity"];delete options["opacity"];return this.StandBy(function(root,me,i){var startTime=new Date().getTime();var ms=me.style;if(!(ms.position=="fixed"||ms.position=="relative")&&(options["left"]||options["top"])){ms.position="absolute"}var opacityTmp=function(opacDiff,opacBase,r){return root.transOpacity(opacDiff,opacBase,r)};var opacBase=(!(parseInt(ms.opacity)===0)&&(isNaN(ms.opacity)||ms.opacity==false))?1:parseInt(ms.opacity),opacDiff=(opac-opacBase)||0;if(opacDiff==0){opacityTmp=function(){return""}}var res=root.differ(options,ms),diff=res.diff,base=res.base,cssTxt,timer2,timer=setInterval(function(){var now=new Date().getTime();var r=progress((now-startTime),duration);if(r>=1){r=1;clearInterval(timer);root.done()}cssTxt=";"+opacityTmp(opacDiff,opacBase,r)+root.trans(diff,base,r);ms.cssText+=cssTxt;running(me,i,r)},15)},this,callback)},illusion:function(options,callback){var e=[];var opacity=options.opacity;this.each(function(me,i,root){var clone=me.cloneNode(true);clone.style.cssText+=";filter:Alpha(Opacity="+(opacity*100)+");opacity:"+opacity+";-moz-opacity:"+opacity+";";e.push(clone);document.body.appendChild(clone)});e=$(e).css(options);if(callback){callback()}return e}};utils.prototype.Addon(effect);var Extend=function(destination,source){for(var property in source){destination[property]=source[property] }};function addEventHandler(oTarget,sEventType,fnHandler){if(oTarget.addEventListener){oTarget.addEventListener(sEventType,fnHandler,false)}else{if(oTarget.attachEvent){oTarget.attachEvent("on"+sEventType,fnHandler)}else{oTarget["on"+sEventType]=fnHandler}}}function removeEventHandler(oTarget,sEventType,fnHandler){if(oTarget.removeEventListener){oTarget.removeEventListener(sEventType,fnHandler,false)}else{if(oTarget.detachEvent){oTarget.detachEvent("on"+sEventType,fnHandler)}else{oTarget["on"+sEventType]=null}}}function getPageScroll(){var x,y;if(window.pageYOffset){y=window.pageYOffset;x=window.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){y=document.documentElement.scrollTop;x=document.documentElement.scrollLeft}else{if(document.body){y=document.body.scrollTop;x=document.body.scrollLeft}}}return{X:x,Y:y}}function getPageSize(){var scrW,scrH;if(window.innerHeight&&!isNaN(window.scrollMaxY)){scrW=window.innerWidth+window.scrollMaxX;scrH=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){scrW=document.body.scrollWidth;scrH=document.body.scrollHeight}else{if(document.body){scrW=document.body.offsetWidth;scrH=document.body.offsetHeight}}}var winW,winH;if(window.innerHeight){winW=window.innerWidth;winH=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){winW=document.documentElement.clientWidth;winH=document.documentElement.clientHeight}else{if(document.body){winW=document.body.clientWidth;winH=document.body.clientHeight}}}var pageW=(scrW