/*
 * AIDA-JS: DOM, Animations, Ajax and more Framework Library
 *
 * Copyright © 2009 Sandro Lain
 * Date: Wed, 09 Sep 2009 11:10:58 +0200
 *
 */
var AIDAJS={version:2.1,status:'b',updated:20090309,baseUrl:''};function _(value,lite){if(window.console){console.log(value)}else if(lite||window.AIDAJS_DEBUG){Require.module('firebug-lite',function(){firebug.init();console.log(value)})}}function checkGlobals(){var arr=['console','window','location','document','navigator','netscape','parent','top','scrollbars','name','scrollX','scrollY','frames','applicationCache','self','screen','history','content','menubar','toolbar','locationbar','personalbar','statusbar','directories','closed','crypto','pkcs11','controllers','opener','status','defaultStatus','innerWidth','innerHeight','outerWidth','outerHeight','screenX','screenY','pageXOffset','pageYOffset','scrollMaxX','scrollMaxY','length','fullScreen','frameElement','sessionStorage','globalStorage','localStorage','eventsUID'];var finded='Finded:<hr/><table>';for(var i in window){var first=i.substr(0,1);if(typeof window[i]=='function'||arr.indexOf(i)>=0||first.toUpperCase()==first){continue}console.log(i+': ',window[i])}}function Agent(userAgent){this.set(userAgent)}Agent.prototype={value:'',set:function(userAgent){if(typeof userAgent=='object'){userAgent=userAgent.value}this.value=userAgent||navigator.userAgent},isMSIE:function(version){return(window.ActiveXObject&&(version=this.value.match((new RegExp('(MSIE) ('+(version||'[0-9\.]+')+')','i')))))?parseFloat(version[2],10):false},isGecko:function(version){var u=this.value;return(!(/Konqueror|Safari|KHTML/.test(u))&&(u.indexOf('Gecko')>-1)&&(version=u.match((new RegExp('(rv:)('+(version||'[0-9\.]+')+')','i')))))?parseFloat(version[2],10):false},isWebKit:function(version){return(!navigator.taintEnabled&&(version=this.value.match((new RegExp('(WebKit)/('+(version||'[0-9\.]+')+')','i')))))?parseFloat(version[2],10):false},isOpera:function(version){return(window.opera&&(version=(this.value).match((new RegExp('(Opera)[ \/]('+(version||'[0-9\.]+')+')','i')))))?parseFloat(version[2],10):false},isKHTML:function(version){return((version=this.value.match((new RegExp('(KHTML)/('+(version||'[0-9\.]+')+')','i')))))?parseFloat(version[2],10):false},isSafari:function(){return(/Safari/.test(this.value))},isKonqueror:function(){return(/Konqueror/.test(this.value))},isNetscape:function(version){return((version=(this.value).match((new RegExp('(Netscape|NS)[0-9]*[ /]{0,1}('+(version||'[0-9\.]+')+')','i')))))?parseFloat(version[2],10):false},isFirefox:function(version){return((version=(this.value).match((new RegExp('(Firefox|Minefield)/('+(version||'[0-9\.]+')+')','i')))))?parseFloat(version[2],10):false},isWindows:function(){return this.value.match(/(Windows|Win)/gi)?true:false},isMac:function(){return this.value.match(/(Macintosh|Mac|OS X)/gi)?true:false},isLinux:function(){return this.value.match(/Linux/gi)?true:false}};Agent.iTouch=function(){return(window.orientation!==undefined)};function isArray(value){return(value instanceof Array)}function isElement(element,tag){return tag?((element=element.nodeName)&&element.toLowerCase()==tag.toLowerCase()):(element.nodeName&&element.ownerDocument)}function isNumeric(num){return!isNaN(parseInt(num,10))}function isEnumerable(o){return(typeof o=='object'&&(o.constructor==Array||o.callee||typeof o.length=='number'))}function is(value){return(value!==false&&value!==undefined&&value!==null)}function toArray(a){if(_MUST_EXTEND||Agent.engine=='trident'){for(var r=[],i=a.length-1;i>=0;i--){r[i]=I(a[i])}return r}return Array.prototype.slice.call(a)}function exec(code){return window.execScript?window.execScript(code):(this.eval?this.eval(code):eval(code))}function getType(o){var t=typeof o;if(t=='object'){if(o===null){return'null'}if(o instanceof Array){return'array'}if(o instanceof Date){return'date'}if(o.nodeName){switch(o.nodeType){case 1:return'element';case 3:return'textnode'}}if(o.callee){return'arguments'}if(o instanceof Error){return'error'}}return t}function I(element,doc){if(!doc||!doc.documentElement){doc=document}element=!is(element)?doc.documentElement:(typeof element=='string'?doc.getElementById(element):element);if(element&&!element._extended){AidaElements.prototypize(element)}return element}function V(element,newValue){return I(element).val(newValue)}function N(rules,parent,doc){if(!is(rules)){return null}doc=doc||document;var result=null;switch(typeof rules){case'object':if(rules instanceof Array){var i=rules.length,rule;while(i--){rule=rules.shift();if(!result){result=I(doc.createElement(rule));continue}switch(typeof rule){case'object':if(!(rule instanceof Array)&&!rule.nodeType){I(result).set(rule);break}case'string':case'number':N(rule,result);break;default:return null}}}else if(rules.nodeType){result=rules}break;case'number':case'string':result=doc.createTextNode(rules+'');break}if(parent&&result){I(parent).appendChild(result)}return result}(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString,hasDuplicate=false;var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,check,mode,extra,prune=true,contextXML=isXML(context);chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])selector+=parts.shift();set=posProcess(selector,set)}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0]}if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,contextXML)}}else{checkSet=parts=[]}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results)}return results};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else if(match===true){continue}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else if(pass){result.push(item);anyFound=true}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace)result.push(elem)}else if(inplace){curLoop[i]=false}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return!!elem.firstChild},empty:function(elem){return!elem.firstChild},has:function(elem,i,match){return!!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0==i},eq:function(elem,i,match){return match[3]-0==i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while(node=node.previousSibling){if(node.nodeType===1)return false}if(type=='first')return true;node=elem;case'last':while(node=node.nextSibling){if(node.nodeType===1)return false}return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first==0){return diff==0}else{return(diff%first==0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}(function(){var form=document.createElement("div"),id="script"+(new Date).getTime();form.innerHTML="<a name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form)})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop]}})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0)return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}}})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&elem.ownerDocument.documentElement.nodeName!=="HTML"};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};window.Sizzle=Sizzle})();var $=(function(){var parser=function(query,startElement,first){if(is(startElement)){startElement=I(startElement);if(!startElement){return[]}}if(!startElement){startElement=document}if(first&&startElement.querySelector){return startElement.querySelector(query)}if(startElement.querySelectorAll){return toArray(startElement.querySelectorAll(query))}var result=Sizzle(query,startElement);if(_MUST_EXTEND){var i=result.length;while(i){--i;result[i]=I(result[i])}}return first?result.shift():result};parser.first=function(query,startElement){return parser(query,startElement,true)};return parser})();var _MUST_EXTEND=false,AidaElements={prototypize:function(element){if(element&&element.nodeType==1&&!element._extended){if(_MUST_EXTEND||Agent.engine=='trident'){element._extended=true;AidaElements._extended.push(element);return AidaElements.extend(element,AidaElements._extensions)}var win=element.ownerDocument,prototype=(win?win.defaultView:window).Element.prototype,i,extensions=AidaElements._extensions;for(i in extensions){prototype[i]=extensions[i]}}},extend:function(element,m){for(var i in m){if(!element[i]){element[i]=m[i]}}return element},implement:function(implement){var i,extensions=AidaElements._extensions,prototype=Element.prototype;for(i in implement){prototype[i]=extensions[i]=implement[i]}if(_MUST_EXTEND){for(var extended=AidaElements._extended,j=extended.length-1,element;j>=0;j--){element=extended[j];for(i in implement){if(!element[i]){element[i]=implement[i]}}}}implement=null},_extensions:{},_extended:[]},TextNodes={spanSubtext:function(o,s,f){var v=o.nodeValue,b=v.substring(s,f),r=N(['span',b]),l=v.length,a=[];if(s>0){a.push(v.substring(0,s))}a.push(r);if(f&&f<l){a.push(v.substring(f,l))}for(var p=o.parentNode,n,i=a.length-1,c;i>=0;i--){c=N(a[i]);if((n=o.nextSibling)){p.insertBefore(c,n)}else{p.appendChild(c)}}p.removeChild(o);return r}};(function(){var scripts=document.getElementsByTagName('script'),i=scripts.length,script;while(i){if((script=scripts[--i])){script=(script.src+'').split('/');if(script.pop()=='aida.js'){AIDAJS.baseUrl=script.join('/');break}}}var p='prototype',O=Object,Op=O[p],D=Date,Dp=D[p],S=String,Sp=S[p],Ap=Array[p],Np=Number[p],F=Function,Fp=F[p],M=Math,R=RegExp,ua=new Agent(),version,uid=0;if((version=ua.isMSIE())){Agent.engine='trident';Agent.version=version}else if((version=ua.isGecko())){Agent.engine='gecko';Agent.version=version}else if((version=ua.isWebKit())){Agent.engine='webkit';Agent.version=version}else if((version=ua.isOpera())){Agent.engine='presto';Agent.version=version}else if((version=ua.isKHTML())){Agent.engine='khtml';Agent.version=version}if(ua.isWindows()){Agent.system='win'}else if(ua.isMac()){Agent.system='mac'}else if(ua.isLinux()){Agent.system='linux'}O.extend=function(e,o){e=e||{};o=o||{};for(var i in o){e[i]=o[i]}return e};O.params=function(params){var result=[],i;for(i in params){result.push(encodeURIComponent(i)+"="+encodeURIComponent(params[i]))}return result.join('&').replace(/%20/g,"+")};O.each=function(obj,func,bind){if(obj instanceof Array){return obj.each(func,bind)}for(var i in obj){func.call(bind,obj[i],i,obj)}obj=func=bind=null};D.parse=function(date,a){date=date.trim();var m,n=new Date();if((m=date.match(/([0-9]{4})[\/\s-]*([0-2]?[0-9])[\/\s-]*([0-3]?[0-9])[\s]*([0-2]?[0-9])[\:\s]*([0-5]?[0-9])[\:\s]*([0-5]?[0-9])/))){var year=m[1].toInt(),month=m[2].toInt()-1,day=m[3].toInt();if(!year){year=n.getFullYear()}if(month<0){month=n.getMonth()}if(!day){day=n.getDate()}return new Date(year,month,day,m[4].toInt(),m[5].toInt(),m[6].toInt())}if((m=date.match(/([0-9]{4})[\/\s-]*([0-2]?[0-9])[\/\s-]*([0-3]?[0-9])/))){var year=m[1].toInt(),month=m[2].toInt()-1,day=m[3].toInt();if(!year){year=n.getFullYear()}if(month<0){month=n.getMonth()}if(!day){day=n.getDate()}return new Date(year,month,day)}if((m=date.match(/([0-2]?[0-9])[\:\s]*([0-5]?[0-9])[\:\s]*([0-5]?[0-9])/))){return new Date(n.getFullYear(),n.getMonth(),n.getDate(),m[1].toInt(),(m[2].toInt()-1),m[3].toInt())}return a?n:null};D.now=function(){return new Date().getTime()};D.formats={en:{m:['January','February','March','April','May','June','July','August','September','October','November','December'],w:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']},it:{m:['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],w:['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato']},es:{m:['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],w:['Lunes','Martes','MiÈrcoles','Jueves','Viernes','Sabado','Domingo']},fr:{m:['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'],w:['Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi','Dimanche']}};Dp.format=function(f,l){var c=Date.formats,n=this,y=n.getFullYear(),m=n.getMonth()+1,d=n.getDate(),w=n.getDay(),h=n.getHours(),g=h%12||12,i=n.getMinutes(),s=n.getSeconds(),a=g==h?'am':'pm',na=new Date(y,m-1,1),nb=new Date(y,m,1),t=((na.getTime()-nb.getTime())/86400000).round()+1,e=/(a|A|M|F|D|l)/g;l=c[(l||'en').toLowerCase()]||c.en;f=f.replace('G',h).replace('g',g).replace('H',h.zeroFill(2)).replace('h',g.zeroFill(2));f=f.replace('i',i.zeroFill(2)).replace('s',s.zeroFill(2));f=f.replace('Y',y).replace('y',y.zeroFill(2,true)).replace('n',m).replace('m',m.zeroFill(2));f=f.replace('j',d).replace('d',d.zeroFill(2)).replace('w',w).replace('t',t);if(f.match(e)){f=f.replace(e,function(s,b){switch(b){case'a':return a;case'A':return a.toUpperCase();case'M':return l.m[m-1].substr(0,3);case'F':return l.m[m-1];case'D':return l.w[w].substr(0,3);case'l':return l.w[w]}return b})}return f};S.random=function(l,c){c=c||'0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';for(var g=c.length,r='',n,i=l||8;i>0;i--){n=Math.floor(Math.random()*g);r+=c.substring(n,n+1)}return r};S.randomId=function(){return'aidajs_rid_'+String.random()};S.uniqueId=function(){return'aidajs_uid_'+uid++};S.buildQueryString=function(o,u){var r=[],i;for(i in o){r.push(i+'='+encodeURIComponent(o[i]))}return r.join(u||'&')};Sp.cleanSize=function(a){var s=this,v=0,u='',e=s.match(/(-?[0-9\.]*)(in|cm|mm|pt|pc|em|ex|px|%)?/i);if(e){v=parseFloat(e[1],10)||0;u=e[2]||''}return a?[v,u]:v};Sp.htmlEntities=function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;')};Sp.nl2br=function(){return this.replace(/[^>]\n/g,'<br/>')};Sp.stripTags=function(){return this.replace(/<[^>]+>/g,'')};Sp.has=function(s){return(this.indexOf(s)>=0)};Sp.trim=function(){return this.replace(/^\s+|\s+$/g,'')};Sp.ltrim=function(){return this.replace(/^\s+/g,'')};Sp.rtrim=function(){return this.replace(/^\s+$/g,'')};Sp.clean=function(){return this.replace(/\s{2,}/g,' ').trim()};Sp.empty=function(s){return(this.length===0||(s&&this.match(/^[\s]*$/gm)))?true:false};Sp.toInt=function(i){return parseInt(this,i||10)};Sp.toFloat=function(i){return parseFloat(this,i||10)};Sp.camelCase=function(){return this.replace(/-\D/g,function(m){return m.charAt(1).toUpperCase()})};Sp.hyphenate=function(){return this.replace(/\w[A-Z]/g,function(m){return(m.charAt(0)+'-'+m.charAt(1).toLowerCase())})};Sp.capitalize=function(){return this.toLowerCase().replace(/\b[a-z]/g,function(m){return m.toUpperCase()})};Sp.parseCss=function(){for(var s=this,p=s.split(';'),r={},i=p.length-1,d,n;i>=0;i--){d=p[i].split(':');n=d[0].trim().camelize();if(n){r[n]=d[1].trim()}}return r};Sp.repeat=function(n){var str='';while(--n>=0){str+=this}return str};Sp.whiteSpaceChar=function(i){return(this.charCodeAt(i||0)<=32)};Sp.digitChar=function(i){return((i=this.charCodeAt(i||0))&&i>=48&&i<=57)};Sp.letterChar=function(i){return((i=this.charCodeAt(i||0))&&((i>=65&&i<=90)||(i>=97&&i<=122)))};Sp.upperCaseChar=function(i){return((i=this.charCodeAt(i||0))&&i>=65&&i<=90)};Sp.lowerCaseChar=function(i){return((i=this.charCodeAt(i||0))&&i>=97&&i<=122)};Sp.compareVersion=function(b){b=(b+'').split('.');var a=this.split('.'),i,c,d,l=Math.min(a.length,b.length);for(i=0;i<l;i++){c=a[i].toInt();d=b[i].toInt();if(c>d){return 1}if(c<d){return-1}}return 0};Sp.base64encode=function(){var input=this.utf8encode(),l=input.length,output="",chr1,chr2,chr3,enc1,enc2,enc3,enc4,i=0,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";while(i<l){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+k.charAt(enc1)+k.charAt(enc2)+k.charAt(enc3)+k.charAt(enc4)}return output};Sp.base64decode=function(){var input=this.replace(/[^A-Za-z0-9\+\/\=]/g,""),l=input.length,output="",chr1,chr2,chr3,enc1,enc2,enc3,enc4,i=0,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f=String.fromCharCode;while(i<l){enc1=k.indexOf(input.charAt(i++));enc2=k.indexOf(input.charAt(i++));enc3=k.indexOf(input.charAt(i++));enc4=k.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+f(chr1);if(enc3!=64){output=output+f(chr2)}if(enc4!=64){output=output+f(chr3)}}return output.utf8decode()};Sp.crc32=function(){var str=this.utf8encode(),x=0,y=0,table="00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D",crc=0,i,iTop=str.length;crc=crc^(-1);for(i=0;i<iTop;i++){y=(crc^str.charCodeAt(i))&0xFF;x="0x"+table.substr(y*9,8);crc=(crc>>>8)^x}return crc^(-1)};Sp.md5=function(){var string=this;function RotateLeft(lValue,iShiftBits){return(lValue<<iShiftBits)|(lValue>>>(32-iShiftBits))}function AddUnsigned(lX,lY){var lX4,lY4,lX8,lY8,lResult;lX8=(lX&0x80000000);lY8=(lY&0x80000000);lX4=(lX&0x40000000);lY4=(lY&0x40000000);lResult=(lX&0x3FFFFFFF)+(lY&0x3FFFFFFF);if(lX4&lY4){return(lResult^0x80000000^lX8^lY8)}if(lX4|lY4){if(lResult&0x40000000){return(lResult^0xC0000000^lX8^lY8)}else{return(lResult^0x40000000^lX8^lY8)}}else{return(lResult^lX8^lY8)}}function F(x,y,z){return(x&y)|((~x)&z)}function G(x,y,z){return(x&z)|(y&(~z))}function H(x,y,z){return(x^y^z)}function I(x,y,z){return(y^(x|(~z)))}function FF(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(F(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b)}function GG(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(G(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b)}function HH(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(H(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b)}function II(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(I(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b)}function ConvertToWordArray(string){var lWordCount;var lMessageLength=string.length;var lNumberOfWords_temp1=lMessageLength+8;var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1%64))/64;var lNumberOfWords=(lNumberOfWords_temp2+1)*16;var lWordArray=Array(lNumberOfWords-1);var lBytePosition=0;var lByteCount=0;while(lByteCount<lMessageLength){lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=(lWordArray[lWordCount]|(string.charCodeAt(lByteCount)<<lBytePosition));lByteCount++}lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=lWordArray[lWordCount]|(0x80<<lBytePosition);lWordArray[lNumberOfWords-2]=lMessageLength<<3;lWordArray[lNumberOfWords-1]=lMessageLength>>>29;return lWordArray}function WordToHex(lValue){var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;for(lCount=0;lCount<=3;lCount++){lByte=(lValue>>>(lCount*8))&255;WordToHexValue_temp="0"+lByte.toString(16);WordToHexValue=WordToHexValue+WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2)}return WordToHexValue}function Utf8Encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128)}}return utftext}var x=Array(),k,AA,BB,CC,DD,a,b,c,d,S11=7,S12=12,S13=17,S14=22,S21=5,S22=9,S23=14,S24=20,S31=4,S32=11,S33=16,S34=23,S41=6,S42=10,S43=15,S44=21;string=Utf8Encode(string);x=ConvertToWordArray(string);a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;for(k=0;k<x.length;k+=16){AA=a;BB=b;CC=c;DD=d;a=FF(a,b,c,d,x[k+0],S11,0xD76AA478);d=FF(d,a,b,c,x[k+1],S12,0xE8C7B756);c=FF(c,d,a,b,x[k+2],S13,0x242070DB);b=FF(b,c,d,a,x[k+3],S14,0xC1BDCEEE);a=FF(a,b,c,d,x[k+4],S11,0xF57C0FAF);d=FF(d,a,b,c,x[k+5],S12,0x4787C62A);c=FF(c,d,a,b,x[k+6],S13,0xA8304613);b=FF(b,c,d,a,x[k+7],S14,0xFD469501);a=FF(a,b,c,d,x[k+8],S11,0x698098D8);d=FF(d,a,b,c,x[k+9],S12,0x8B44F7AF);c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);a=FF(a,b,c,d,x[k+12],S11,0x6B901122);d=FF(d,a,b,c,x[k+13],S12,0xFD987193);c=FF(c,d,a,b,x[k+14],S13,0xA679438E);b=FF(b,c,d,a,x[k+15],S14,0x49B40821);a=GG(a,b,c,d,x[k+1],S21,0xF61E2562);d=GG(d,a,b,c,x[k+6],S22,0xC040B340);c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);b=GG(b,c,d,a,x[k+0],S24,0xE9B6C7AA);a=GG(a,b,c,d,x[k+5],S21,0xD62F105D);d=GG(d,a,b,c,x[k+10],S22,0x2441453);c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);b=GG(b,c,d,a,x[k+4],S24,0xE7D3FBC8);a=GG(a,b,c,d,x[k+9],S21,0x21E1CDE6);d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);c=GG(c,d,a,b,x[k+3],S23,0xF4D50D87);b=GG(b,c,d,a,x[k+8],S24,0x455A14ED);a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);d=GG(d,a,b,c,x[k+2],S22,0xFCEFA3F8);c=GG(c,d,a,b,x[k+7],S23,0x676F02D9);b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);a=HH(a,b,c,d,x[k+5],S31,0xFFFA3942);d=HH(d,a,b,c,x[k+8],S32,0x8771F681);c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);a=HH(a,b,c,d,x[k+1],S31,0xA4BEEA44);d=HH(d,a,b,c,x[k+4],S32,0x4BDECFA9);c=HH(c,d,a,b,x[k+7],S33,0xF6BB4B60);b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);d=HH(d,a,b,c,x[k+0],S32,0xEAA127FA);c=HH(c,d,a,b,x[k+3],S33,0xD4EF3085);b=HH(b,c,d,a,x[k+6],S34,0x4881D05);a=HH(a,b,c,d,x[k+9],S31,0xD9D4D039);d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);b=HH(b,c,d,a,x[k+2],S34,0xC4AC5665);a=II(a,b,c,d,x[k+0],S41,0xF4292244);d=II(d,a,b,c,x[k+7],S42,0x432AFF97);c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);b=II(b,c,d,a,x[k+5],S44,0xFC93A039);a=II(a,b,c,d,x[k+12],S41,0x655B59C3);d=II(d,a,b,c,x[k+3],S42,0x8F0CCC92);c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);b=II(b,c,d,a,x[k+1],S44,0x85845DD1);a=II(a,b,c,d,x[k+8],S41,0x6FA87E4F);d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);c=II(c,d,a,b,x[k+6],S43,0xA3014314);b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);a=II(a,b,c,d,x[k+4],S41,0xF7537E82);d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);c=II(c,d,a,b,x[k+2],S43,0x2AD7D2BB);b=II(b,c,d,a,x[k+9],S44,0xEB86D391);a=AddUnsigned(a,AA);b=AddUnsigned(b,BB);c=AddUnsigned(c,CC);d=AddUnsigned(d,DD)}var temp=WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);return temp.toLowerCase()};Sp.sha1=function(){var msg=this;function rotate_left(n,s){var t4=(n<<s)|(n>>>(32-s));return t4}function lsb_hex(val){var str="",i,vh,vl;for(i=0;i<=6;i+=2){vh=(val>>>(i*4+4))&0x0f;vl=(val>>>(i*4))&0x0f;str+=vh.toString(16)+vl.toString(16)}return str}function cvt_hex(val){var str="";var i;var v;for(i=7;i>=0;i--){v=(val>>>(i*4))&0x0f;str+=v.toString(16)}return str}function Utf8Encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128)}}return utftext}var blockstart,i,j,W=[80],H0=0x67452301,H1=0xEFCDAB89,H2=0x98BADCFE,H3=0x10325476,H4=0xC3D2E1F0,A,B,C,D,E,temp;msg=Utf8Encode(msg);var msg_len=msg.length;var word_array=[];for(i=0;i<msg_len-3;i+=4){j=msg.charCodeAt(i)<<24|msg.charCodeAt(i+1)<<16|msg.charCodeAt(i+2)<<8|msg.charCodeAt(i+3);word_array.push(j)}switch(msg_len%4){case 0:i=0x080000000;break;case 1:i=msg.charCodeAt(msg_len-1)<<24|0x0800000;break;case 2:i=msg.charCodeAt(msg_len-2)<<24|msg.charCodeAt(msg_len-1)<<16|0x08000;break;case 3:i=msg.charCodeAt(msg_len-3)<<24|msg.charCodeAt(msg_len-2)<<16|msg.charCodeAt(msg_len-1)<<8|0x80;break}word_array.push(i);while((word_array.length%16)!=14){word_array.push(0)}word_array.push(msg_len>>>29);word_array.push((msg_len<<3)&0x0ffffffff);for(blockstart=0;blockstart<word_array.length;blockstart+=16){for(i=0;i<16;i++){W[i]=word_array[blockstart+i]}for(i=16;i<=79;i++){W[i]=rotate_left(W[i-3]^W[i-8]^W[i-14]^W[i-16],1)}A=H0;B=H1;C=H2;D=H3;E=H4;for(i=0;i<=19;i++){temp=(rotate_left(A,5)+((B&C)|(~B&D))+E+W[i]+0x5A827999)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp}for(i=20;i<=39;i++){temp=(rotate_left(A,5)+(B^C^D)+E+W[i]+0x6ED9EBA1)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp}for(i=40;i<=59;i++){temp=(rotate_left(A,5)+((B&C)|(B&D)|(C&D))+E+W[i]+0x8F1BBCDC)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp}for(i=60;i<=79;i++){temp=(rotate_left(A,5)+(B^C^D)+E+W[i]+0xCA62C1D6)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp}H0=(H0+A)&0x0ffffffff;H1=(H1+B)&0x0ffffffff;H2=(H2+C)&0x0ffffffff;H3=(H3+D)&0x0ffffffff;H4=(H4+E)&0x0ffffffff}temp=cvt_hex(H0)+cvt_hex(H1)+cvt_hex(H2)+cvt_hex(H3)+cvt_hex(H4);return temp.toLowerCase()};Sp.sha256=function(){var s=this;var chrsz=8;var hexcase=0;function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}function S(X,n){return(X>>>n)|(X<<(32-n))}function R(X,n){return(X>>>n)}function Ch(x,y,z){return((x&y)^((~x)&z))}function Maj(x,y,z){return((x&y)^(x&z)^(y&z))}function Sigma0256(x){return(S(x,2)^S(x,13)^S(x,22))}function Sigma1256(x){return(S(x,6)^S(x,11)^S(x,25))}function Gamma0256(x){return(S(x,7)^S(x,18)^R(x,3))}function Gamma1256(x){return(S(x,17)^S(x,19)^R(x,10))}function core_sha256(m,l){var K=[0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2],HASH=[0x6A09E667,0xBB67AE85,0x3C6EF372,0xA54FF53A,0x510E527F,0x9B05688C,0x1F83D9AB,0x5BE0CD19],W=[64],a,b,c,d,e,f,g,h,i,j,T1,T2;m[l>>5]|=0x80<<(24-l%32);m[((l+64>>9)<<4)+15]=l;for(i=0;i<m.length;i+=16){a=HASH[0];b=HASH[1];c=HASH[2];d=HASH[3];e=HASH[4];f=HASH[5];g=HASH[6];h=HASH[7];for(j=0;j<64;j++){if(j<16){W[j]=m[j+i]}else{W[j]=safe_add(safe_add(safe_add(Gamma1256(W[j-2]),W[j-7]),Gamma0256(W[j-15])),W[j-16])}T1=safe_add(safe_add(safe_add(safe_add(h,Sigma1256(e)),Ch(e,f,g)),K[j]),W[j]);T2=safe_add(Sigma0256(a),Maj(a,b,c));h=g;g=f;f=e;e=safe_add(d,T1);d=c;c=b;b=a;a=safe_add(T1,T2)}HASH[0]=safe_add(a,HASH[0]);HASH[1]=safe_add(b,HASH[1]);HASH[2]=safe_add(c,HASH[2]);HASH[3]=safe_add(d,HASH[3]);HASH[4]=safe_add(e,HASH[4]);HASH[5]=safe_add(f,HASH[5]);HASH[6]=safe_add(g,HASH[6]);HASH[7]=safe_add(h,HASH[7])}return HASH}function str2binb(str){var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(24-i%32)}return bin}function Utf8Encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128)}}return utftext}function binb2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8))&0xF)}return str}s=Utf8Encode(s);return binb2hex(core_sha256(str2binb(s),s.length*chrsz))};Sp.utf8encode=function(){var string=this.replace(/\r\n/g,"\n"),utftext="",l=string.length,n,c,f=String.fromCharCode;for(n=0;n<l;n++){c=string.charCodeAt(n);if(c<128){utftext+=f(c)}else if((c>127)&&(c<2048)){utftext+=f((c>>6)|192)+f((c&63)|128)}else{utftext+=f((c>>12)|224)+f(((c>>6)&63)|128)+f((c&63)|128)}}return utftext};Sp.utf8decode=function(){var utftext=this,string="",l=utftext.length,i=0,c=0,c1=0,c2=0,f=String.fromCharCode;while(i<l){c=utftext.charCodeAt(i);if(c<128){string+=f(c);i++}else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=f(((c&31)<<6)|(c2&63));i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=f(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3}}return string};Sp.urlEncode=function(){return escape(this.utf8encode())};Sp.urlDecode=function(){return(unescape(this)).utf8decode()};if(!Ap.indexOf){Ap.indexOf=function(v,b){for(var i=+b||0,l=this.length;i<l;i++){if(this[i]===v){return i}}return-1}}if(!Ap.filter){Ap.filter=function(f,t){if(typeof f!="function"){throw new TypeError()}for(var a=this,l=a.length,r=[],i=0,j=0,o;i<l;i++){o=a[i];if(f.call(t,o,i,a)){r[j++]=o}}o=null;return r}}if(!Ap.forEach){Ap.forEach=function(func,bind){if(typeof func!="function"){throw new TypeError()}for(var i=0,l=this.length;i<l;i++){func.call(bind,this[i],i,this)}func=bind=null}}Ap.each=Ap.forEach;if(!Ap.every){Ap.every=function(func,t){for(var i=0,l=this.length;i<l;i++){if(!func.call(t,this[i],i,this)){return false}}return true}}if(!Ap.map){Ap.map=function(f,t){if(typeof f!="function"){throw new TypeError()}for(var l=this.length,result=[],i=0;i<l;i++){result=result.concat(f.call(t,this[i],i,this))}return result}}if(!Ap.some){Ap.some=function(func,t){for(var i=0,l=this.length;i<l;i++){if(func.call(t,this[i],i,this)){return true}}return false}}Ap.unique=function(b){var result=[],i=0,l=this.length,act;while(i<l){act=this[i++];if(result.indexOf(act,0,b)<0){result.push(act)}}return result};Ap.replace=function(find,replace){var result=[],i=0,l=this.length,act;while(i<l){act=this[i];result[i]=(act===find)?replace:act;i++}return result};Ap.intersect=function(arr){var result=[],l=this.length,i=0,act;while(i<l){act=this[i++];if(arr.indexOf(act)>=0){result.push(act)}}return result};Ap.remove=function(find){var i=0;while(i<this.length){this[i]===find?this.splice(i,1):++i}return this};Ap.copy=function(s,l){var h=this.length,i=0,result=[];s=((s=s||0)<0)?h+s:s;l=l||h-s;while(i<l){result[i++]=this[s++]}return result};Ap.exists=function(i,s){return this.indexOf(i,s)!=-1};Ap.has=Ap.exists;Ap.clean=function(){var result=[],i=0,l=this.length,act;while(i<l){if(is(act=this[i++])){result.push(act)}}return result};Ap.nearest=function(val){var r=null,act,last=null,newe,i=this.length;while(i){act=this[--i];newe=Math.abs(act-val);if(last===null||newe<last){last=newe;result=act}}return result};Ap.randomize=function(){return this.copy().sort(Sort.random)};Ap.random=function(){return this[Math.floor(Math.random()*this.length)]};Ap.invoke=function(){var arr=toArray(arguments),func=arr.shift(),l=this.length,i=0,act,met;if(typeof f=='function'){while(i<l){func.apply(this[i++],arr)}}else{while(i<l){act=this[i++];if(typeof(met=act[func])=='function'){met.apply(act,arr)}}}};Np.bound=function(n,m){return this<n?n:(this>m?m:this)};Np.round=function(p){p=Math.pow(10,p||0);return Math.round(this*p)/p};Np.ceil=function(){return Math.ceil(this)};Np.floor=function(){return Math.floor(this)};Np.pow=function(e){return Math.pow(this,e)};Np.toInt=function(i){return parseInt(this,i||10)};Np.toFloat=function(i){return parseFloat(this,i||10)};Np.zeroFill=function(z,m){var i=0,r='',n=this,l;n=parseInt(n,10)+'';l=n.length;if(m&&l>z){return n.substr(l-z,z)}l=z-l;while(i++<l){r+='0'}return r+''+n};F.empty=function(){};F.value=function(f){return(typeof f==='function')?f:function(){return f}};F.exists=function(f){return typeof f=='string'?typeof window[f]=='function':f instanceof Function};Fp.interval=function(t,a){var f=this,r=function(){f.apply(null,a||[])};return setInterval(r,t)};Fp.timeout=function(t,a){var f=this,r=function(){f.apply(null,a||[])};return setTimeout(r,t)};Fp.tryCatch=function(t,a,f){try{return this.apply(t,a||[])}catch(e){return(f||function(){return false}).apply(t,e)}};Fp.bind=function(obj){var sfnf=this;return function(){return fn.apply(obj,arguments)}};Fp.execTime=function(b,a){var s=new Date();this.apply(b,a);return(new Date())-s};Fp.benchmark=function(b,a,t){t=t||100;var m=0,s,i=t+1;while(--i){s=new Date();this.apply(b,a);m+=(new Date())-s}return m/t};M.ipo=function(c1,c2){return Math.sqrt(c1*c1+c2*c2)};M.rand=function(n,m){if(arguments.length<2){m=n;n=0}return(Math.random()*(m-n+1)+n).floor()};M.rad=function(grades){return((2*Math.PI)/360)*grades};M.angle=function(sin,cos){var asin=Math.asin(sin),PI=Math.PI;return(cos>0?-(asin-PI/2):asin+(PI*3/2))/(PI*2)};p=1.61803398874989484820458683;M.PHI=p;M.LOW_PHI=1/p;R.EMAIL=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;R.TIMESTAMP=/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/;R.URL=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;if(Agent.engine=='trident'&&Agent.version<7){try{document.execCommand('BackgroundImageCache',false,true)}catch(e){}}if(Agent.engine=='trident'||(Agent.engine=='presto'&&Agent.version<9.5)){document.nativeGetElementById=document.getElementById;document.getElementById=function(id){var element=document.nativeGetElementById(id);if(element){if(element.id==id){return element}var i=1,all=document.all[id],allLength=all.length;while(i<allLength){if((element=all[i++]).id==id){return element}}}return null}}if(typeof Element=='undefined'){var extension={},proto;window.Element=function(){};if((proto=window['[[DOMElement.prototype]]'])){Element.prototype=d}else if((proto=document.createElement('html').constructor)&&(proto=proto.__proto__)){Element.prototype=d}else if((proto=document.createElement('div').__proto__)&&proto==document.createElement('span').__proto__){Element.prototype=proto}else{Element.prototype={};_MUST_EXTEND=true}if(typeof p=='undefined'){Element.prototype.__proto__=extension.__proto__=Element.prototype}AidaElements.implement(extension);extension=proto=null}Element.prototype._extended=true;var domImplements={byQuery:function(query,first){return $(query,this,first)},byTag:function(tag){var elements=toArray(this.getElementsByTagName(tag||'*'));if(Agent.engine=='trident'){for(var i=0,j=0,elementsLength=elements.length,result=[],element;i<elementsLength;i++){element=elements[i];if(element.nodeType==1){result[j++]=element}}elements=result}return elements},byClass:function(classes,tag){var i=0,result=[],temp;if(this.getElementsByClassName){classes=classes.trim().split(/[\.\s]+/);for(var classesLength=classes.length;i<classesLength;i++){if((temp=classes[i])){temp=toArray(this.getElementsByClassName(temp));result=result.length?result.intersect(temp):temp}}if(tag){return toArray(this.getElementsByTagName(tag)).intersect(result)}return result}var elements=this.getElementsByTagName(tag||'*'),elementsLength=elements.length;while(i<elementsLength){temp=I(elements[i++]);if(temp.hasClass(classes)){result.push(temp)}}return result},byName:function(name,tag){var elements=this.getElementsByTagName(tag||'*'),elementsLength=elements.length,result=[],temp;while(i<elementsLength){if((temp=elements[i++]).getAttribute('name')==name){result.push(temp)}}return result},byAttribute:function(value,tag){var elements=this.getElementsByTagName(tag||'*'),elementsLength=elements.length,result=[],temp;while(i<elementsLength){if((temp=elements[i++]).checkAttribute(value)){result.push(temp)}}return result},empty:function(){var childNodes=this.childNodes,i=childNodes.length,nodeType;while(i){if((nodeType=childNodes[--i].nodeType)&&(nodeType==1||nodeType==3)){return false}}return true},first:function(returnAllNodes){if(returnAllNodes){return I(this.firstChild)}var childNodes=this.childNodes,nodesLength=childNodes.length,child,i=0;while(i<nodesLength){if((child=childNodes[i++]).nodeType==1){return I(child)}}return null},last:function(returnAllNodes){if(returnAllNodes){return I(this.lastChild)}var childNodes=this.childNodes,i=childNodes.length,child;while(i){if((child=childNodes[--i]).nodeType==1){return I(child)}}return null},next:function(returnAllNodes){var nextNode=this.nextSibling;if(nextNode){if(returnAllNodes){return I(nextNode)}do{if(nextNode.nodeType==1){return I(nextNode)}}while((nextNode=nextNode.nextSibling))}return null},prev:function(returnAllNodes){var prevNode=this.previousSibling;if(prevNode){if(returnAllNodes){return I(prevNode)}do{if(prevNode.nodeType==1){return I(prevNode)}}while((prevNode=prevNode.previousSibling))}return null},getText:function(){return this.textContent!==undefined?this.textContent:this.innerText},firstLetter:function(returnText){for(var childNodes=this.childNodes,childsLength=childNodes.length,i=0,node,nodeType,nodeValue;i<childsLength;i++){node=I(childNodes[i]);switch(node.nodeType){case 1:if((nodeValue=node.firstLetter(t))){return nodeValue}break;case 3:nodeValue=node.nodeValue;if(!nodeValue.match(/^[\s]*$/gm)){if(returnText){return nodeValue.substr(0,1)}if(nodeValue.length==1&&!node.previousSibling&&!node.nextSibling&&node.parentNode.nodeName.toLowerCase()=='span'){return node.parentNode}return TextNodes.spanSubtext(node,0,1)}break}}return null},hasClass:function(classes){classes=classes.split(/[\.\s]+/gi);var className=this.className,i=classes.length,tempClass;while(i){if((tempClass=classes[--i])&&!(new RegExp("(^|\\s)"+tempClass+"(\\s|$)",'g')).test(className)){return false}}return true},addClass:function(classes){this.removeClass(classes).className+=' '+classes.split(/[\.\s]+/g).join(' ');return this},removeClass:function(classes){this.className=this.className.replace((new RegExp("(^|\\s+)("+classes.split(/[\.\s]+/gi).join('|')+")(\\s+|$)",'g')),' ');return this},getClasses:function(){return this.className.split(/[\.\s]+/gi)},switchClass:function(){var argumentsLength=arguments.length,i=0,classes;while(i<argumentsLength){classes=arguments[i];if(this.hasClass(classes)){this.removeClass(classes).addClass((i==argumentsLength-1)?arguments[1]:arguments[i+1]);return this}++i}this.addClass(arguments[1]);return this},booClass:function(classes){return this[this.hasClass(classes)?'removeClass':'addClass'](classes)},remove:function(){this.parentNode.removeChild(this);return this},append:function(){var fragment=document.createDocumentFragment(),argumentsLength=arguments.length,i=0;while(i<argumentsLength){fragment.appendChild(N(arguments[i++]))}this.appendChild(fragment);return this},appendTo:function(element){I(element).append(this);return this},prepend:function(){var fragment=document.createDocumentFragment(),argumentsLength=arguments.length,i=0,firstChild;while(i<argumentsLength){fragment.appendChild(N(arguments[i++]))}if((firstChild=this.firstChild)){this.insertBefore(fragment,firstChild)}else{this.appendChild(fragment)}return this},prependTo:function(element){I(element).prepend(this);return this},before:function(){var fragment=document.createDocumentFragment(),argumentsLength=arguments.length,i=0,parentNode=this.parentNode;while(i<argumentsLength){fragment.appendChild(N(arguments[i++]))}parentNode.insertBefore(fragment,this);return this},beforeOf:function(element){I(element).before(this);return this},after:function(){var fragment=document.createDocumentFragment(),argumentsLength=arguments.length,i=0,parentNode=this.parentNode,nextNode;while(i<argumentsLength){fragment.appendChild(N(arguments[i++]))}if((nextNode=this.nextSibling)){parentNode.insertBefore(fragment,nextNode)}else{parentNode.appendChild(fragment)}return this},afterOf:function(element){I(element).after(this);return this},clone:function(element){var clone=I(this.cloneNode(true));if(element){I(element).append(clone)}return clone},move:function(element){element=this.clone(element);this.remove();return element},childs:function(){var childNodes=this.childNodes,childsLength=childNodes.length,i=0,result=[];while(i<childsLength){node=childNodes[i];if(node.nodeType==1){result.push(node)}++i}return result},removeChilds:function(){var style=this.style,display=style.display;style.display='none';while(this.hasChildNodes()){this.removeChild(this.firstChild)}style.display=display;return this},moveChilds:function(element){element=I(element);var fragment=document.createDocumentFragment(),firstChild,style=this.style,display=style.display;while(this.hasChildNodes()){firstChild=this.firstChild;fragment.appendChild(firstChild.cloneNode(true));this.removeChild(firstChild)}style.display=display;I(element).appendChild(fragment);return this},replaceChilds:function(){return this.removeChilds().append.apply(this,arguments)},cloneChilds:function(element){this.moveChilds.apply(I(this.cloneNode(true)),element);return this},into:function(element){element=I(element);var node=this;do{if(node===element){return true}}while((node=node.parentNode));return false},parent:function(tag){if(tag){tag=tag.toLowerCase();var parent=this,nodeName;while(parent&&(nodeName=parent.nodeName)){if(nodeName.toLowerCase()==tag){return parent}parent=parent.parentNode}return null}return I(this.parentNode)},get:function(){var argumentsLength=arguments.length;if(argumentsLength==1){var attribute=arguments[0];switch(attribute){case'class':case'className':return this.className;case'style':case'css':return this.css()}return this.getAttribute(attribute)}var result={},i=0;while(i){attribute=arguments[--i];result[attribute]=this.get(attribute)}return result},set:function(key,value){if(typeof key=='object'){for(value in key){this.set(value,key[value])}}else if(typeof value=='function'){this.addEvent(key,value)}else{switch(key){case'class':case'className':this.addClass(value);break;case'style':case'css':this.css(value);break;case'innerHTML':this.innerHTML+=value;break;case'unselectable':this.disableSelect();break;default:this.setAttribute(key,value);break}}return this},checkAttribute:function(rule,value){switch(typeof rule){case'string':var matches;if(value){rule+='='+value}if((matches=rule.match(/^\[?([a-z]+)(\~|\^|\$|\*|\|)?(\=([^\]]+))?\]?$/i))){var attribute=matches[1],string=matches[4];if((value=this.get(attribute))){if(matches[3]){var ereg;switch(matches[2]){case'~':ereg='(^|\\s)'+string+'(\\s|$)';break;case'^':ereg='^'+string;break;case'$':ereg=string+'$';break;case'*':ereg=string;break;case'|':ereg='^'+string+'(-.*)?$';break;default:ereg='^'+string+'$';break}if(value.match((new RegExp(ereg)))){return true}}else{return true}}}break;case'object':if(rule instanceof Array){var i=0,rulesLength=rule.length;while(i<rulesLength){if(!this.hasAttribue(rule[i++])){return false}}}else{var attName;for(attName in rule){if(!this.hasAttribue(attName,rule[attName])){return false}}}return true}return false},css:function(key,value){var style=this.style,aEng=Agent.engine,aVer=Agent.version,isIE=(aEng=='trident'),w=(this.ownerDocument||{}).defaultView,currentStyle=(w?w.getComputedStyle(this,null):this.currentStyle)||{};if(!key){return isIE?style.cssText:this.getAttribute('style')}var styleGet=function(key){key=key.camelCase();switch(key){case'opacity':if(isIE){if((value=(style.filter||currentStyle.filter||'').match(/progid\:DXImageTransform\.Microsoft\.Alpha\([\s]*Opacity=([0-9]+)[\s]*\)/i))){value=parseInt(value[1],10)/100}}else{value=style.opacity||currentStyle.opacity||''}return isNumeric(value)?parseFloat(value,10):1;case'backgroundImageUrl':return(style.backgroundImage||currentStyle.backgroundImage||'').match(/^(url\(['" ]*)?([^'" \)]+)/i)[2]||'';case'backgroundPositionX':if(isIE){return style.backgroundPositionX||currentStyle.backgroundPositionX}value=(style.backgroundPosition||currentStyle.backgroundPosition||'').split(/[^a-z0-9%\.-]+/i)[0]||'0%';switch(value){case'left':value='0%';break;case'center':value='50%';break;case'right':value='100%';break}return value;case'backgroundPositionY':if(isIE){return style.backgroundPositionY||currentStyle.backgroundPositionY}value=(style.backgroundPosition||currentStyle.backgroundPosition||'').split(/[^a-z0-9%\.-]+/i)[1]||'0%';switch(value){case'top':value='0%';break;case'center':value='50%';break;case'bottom':value='100%';break}return value;case'flaot':key=isIE?'styleFloat':'cssFloat';break;case'borderRadius':switch(aEng){case'gecko':key='MozBorderRadius';break;case'webkit':key='WebkitBorderRadius';break;case'presto':key='OBorderRadius';break}break;case'borderTopLeftRadius':switch(aEng){case'gecko':key='MozBorderRadiusTopleft';break;case'webkit':key='WebkitBorderTopLeftRadius';break}break;case'borderTopRightRadius':switch(aEng){case'gecko':key='MozBorderRadiusTopright';break;case'webkit':key='WebkitBorderTopRightRadius';break}break;case'borderBottomLeftRadius':switch(aEng){case'gecko':key='MozBorderRadiusBottomleft';break;case'webkit':key='WebkitBorderBottomLeftRadius';break}break;case'borderBottomRightRadius':switch(aEng){case'gecko':key='MozBorderRadiusBottomright';break;case'webkit':key='WebkitBorderBottomRightRadius';break}break;case'boxShadow':switch(aEng){case'gecko':key='MozBoxShadow';break;case'webkit':key='WebkitBoxShadow';break}break;case'borderImage':switch(aEng){case'gecko':key='MozBorderImage';break;case'webkit':key='WebkitBorderImage';break;default:key='BorderImage';break}break;case'backgroundSize':switch(aEng){case'presto':key='OBackgroundSize';break;case'webkit':key='WebkitBackgroundSize';break;case'khtml':key='KhtmlBackgroundSize';break}break;case'rotate':case'rotateX':case'rotateY':case'rotateZ':case'scaleX':case'scaleY':case'scaleZ':case'skewX':case'skewY':case'skewZ':case'translateX':case'translateY':case'translateZ':var ereg=new RegExp('\\s*'+key+'\\(([^\\)]*)\\)\\s*');switch(aEng){case'webkit':key='WebkitTransform';break;case'gecko':key='MozTransform';break}if((value=(style[key]||currentStyle[key]||'').match(ereg))){return value[1]}return'0'}return style[key]||currentStyle[key]||''},styleSet=function(key,value){key=key.camelCase();if(typeof value=='number'&&['opacity','zIndex'].indexOf(key)<0){value+='px'}switch(key){case'opacity':if(isIE){style.filter=(style.filter||currentStyle.filter||'').replace(/progid\:DXImageTransform\.Microsoft\.Alpha\([^\)]*\)/gi,'')+(value===''?'':'progid:DXImageTransform.Microsoft.Alpha(Opacity='+Math.round(parseFloat(value,10).bound(0,1)*100)+')')}else{style.opacity=value===''?'':parseFloat(value,10).bound(0,1)}break;case'backgroundImageUrl':style.backgroundImage="url('"+value+"')";break;case'backgroundPositionX':if(isIE){style.backgroundPositionX=value;return}style.backgroundPosition=value+' '+styleGet('backgroundPositionY');break;case'backgroundPositionY':if(isIE){style.backgroundPositionY=value;return}style.backgroundPosition=styleGet('backgroundPositionX')+' '+value;break;case'float':style[isIE?'styleFloat':'cssFloat']=value;break;case'borderRadius':switch(aEng){case'gecko':style.MozBorderRadius=value;break;case'webkit':style.WebkitBorderRadius=value;break;default:style.borderRadius=value;break}break;case'borderTopLeftRadius':switch(aEng){case'gecko':style.MozBorderRadiusTopleft=value;break;case'webkit':style.WebkitBorderTopLeftRadius=value;break}break;case'borderTopRightRadius':switch(aEng){case'gecko':style.MozBorderRadiusTopright=value;break;case'webkit':style.WebkitBorderTopRightRadius=value;break}break;case'borderBottomLeftRadius':switch(aEng){case'gecko':style.MozBorderRadiusBottomleft=value;break;case'webkit':style.WebkitBorderBottomLeftRadius=value;break}break;case'borderBottomRightRadius':switch(aEng){case'gecko':style.MozBorderRadiusBottomright=value;break;case'webkit':style.WebkitBorderBottomRightRadius=value;break}break;case'boxShadow':switch(aEng){case'gecko':style.MozBoxShadow=value;break;case'webkit':style.WebkitBoxShadow=value;break}break;case'borderImage':switch(aEng){case'gecko':style.MozBorderImage=value;break;case'webkit':style.WebkitBorderImage=value;break;default:style.BorderImage=value;break}break;case'backgroundSize':switch(aEng){case'presto':style.OBackgroundSize=value;break;case'webkit':style.WebkitBackgroundSize=value;break;case'khtml':style.KhtmlBackgroundSize=value;break}break;case'rotate':case'rotateX':case'rotateY':case'rotateZ':case'scaleX':case'scaleY':case'scaleZ':case'skewX':case'skewY':case'skewZ':case'translateX':case'translateY':case'translateZ':if(aEng=='trident'&&key=='rotate'){value=parseFloat(value,10);var rotation=Math.PI*value/180,costheta=Math.cos(rotation),sintheta=Math.sin(rotation);style.filter=style.filter.replace(/progid\:DXImageTransform\.Microsoft\.Matrix\([^\)]\)/g,'')+"progid:DXImageTransform.Microsoft.Matrix(M11="+costheta+",M12="+(-sintheta)+",M21="+sintheta+",M22="+costheta+",SizingMethod='auto expand')"}else{var ereg=new RegExp('\\s*('+key+'\\(([^\\)]+)\\)|none)\\s*');value=' '+key+'('+value+') ';switch(aEng){case'webkit':key='WebkitTransform';break;case'gecko':key='MozTransform';break}style[key]=(style[key]||currentStyle[key]||'').replace(ereg,'')+value}break;default:style[key]=value;break}};switch(typeof key){case'object':var i=0;if(key instanceof Array){var keysLength=key.length,result={};while(i<keysLength){value=key[i++];result[value]=styleGet(value)}return result}for(i in key){styleSet(i,key[i])}break;case'string':if(is(value)){styleSet(key,value)}else if(key.has(':')){if(isIE){style.cssText=key}else{this.setAttribute('style',key)}}else{return styleGet(key)}break}return this},fixIEAlphaBackground:function(){if(Agent.engine=='trident'&&Agent.version<7){this.style.filter+='progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src=\''+this.css('backgroundImageUrl')+'\', sizingMethod=\'crop\')';this.style.backgroundImage=''}return this},val:function(newValue){if(is(newValue)){if(/radio|checkbox/.test(this.type)){if(typeof newValue=='boolean'){this.checked=newValue}else{newValue=[].concat(newValue);this.checked=newValue.has(this.value)||newValue.has(this.name)}}else if(this.nodeName.toLowerCase()=='select'){newValue=[].concat(newValue);var options=this.options,i=options.length,option;while(i){option=options[--i];option.selected=newValue.has(option.value)||newValue.has(option.text)}}else{this.value=newValue}}else{switch(this.nodeName.toLowerCase()){case'select':var index=this.selectedIndex,options=this.options,option;if(index<0){return null}if(this.type=='select-multiple'){var i=options.length,values=[];while(i){option=I(options[--i]);if(option.selected){values.push(option.val())}}return values}option=I(options[index]);if(option.selected){return option.val()}break;case'option':return(this.attributes.value||{}).specified?this.value:this.text}return this.value||''}return null},realHeight:function(width){var clone=this.clone(),result,style=clone.style,paddings=this.css(['paddingTop','paddingBottom']);style.visibility='hidden';style.display='block';style.height='auto';if(Agent.engine=='trident'&&Agent.version<7){style.position='absolute'}if(width){style.width=width+'px'}this.before(clone);result=clone.clientHeight-(paddings.paddingTop+'').cleanSize()-(paddings.paddingBottom+'').cleanSize();clone.remove();return result||0},getPixelSize:function(size){var tempElement=N(['div',{style:{width:size,height:'0px',visibility:'hidden'}}],this);size=tempElement.sizes()[0];tempElement.remove();return size},hide:function(){this.style.display='none';return this},show:function(){this.style.display='block';return this},hidden:function(){return(!this.offsetWidth||!this.offsetHeight)},visible:function(){return(this.offsetWidth&&this.offsetHeight)},getId:function(){var result=this.getAttribute('id');if(!result){this.id=result='unique_id_'+uid++}return result},position:function(options){var element=this,left=0,top=0;do{left+=element.offsetLeft;top+=element.offsetTop}while((element=element.offsetParent));if(options){var xAlign,yAlign,targetElement,alignment,sizes=this.sizes();if((targetElement=I(options.element||options.respect||options.parent))){targetElement=targetElement.position();left-=targetElement[0];top-=targetElement[1]}if((alignment=options.alignment)){switch(alignment){case 2:case 5:case 8:xAlign=0.5;break;case 3:case 6:case 9:xAlign=1;break}switch(alignment){case 4:case 5:case 6:yAlign=0.5;break;case 7:case 8:case 9:yAlign=1;break}}else{xAlign=options.x;yAlign=options.y}if(xAlign){left+=Math.round(sizes[0]*xAlign)}if(yAlign){top+=Math.round(sizes[1]*yAlign)}}return[left,top]},sizes:function(){return[this.offsetWidth,this.offsetHeight]},at:function(x,y){var position=this.position(),sizes=this.sizes(),left=position[0],top=position[1];return(x>=left&&x<(left+sizes[0])&&y>=top&&y<(top+sizes[1]))},disableSelect:function(){Event.add(this,'selectstart',function(event){return event.stop()});this.unselectable='on';this.css({MozUserSelect:'none'});return this},invoke:function(){var args=toArray(arguments),func=args.shift();if(typeof func=='function'||typeof(func=this[func])=='function'){return func.apply(this,args)}return false}};AidaElements.implement(domImplements);domImplements=null})();var Storage;(function(){var dataKey=String.uniqueId(),idPointer=0,dataCache={},windowCache={};Storage={getStorage:function(element){var elementCache;if(element==window){elementCache=windowCache}else{var uid=element[dataKey]||(element[dataKey]=uid=++idPointer);elementCache=dataCache[uid]||(dataCache[uid]={})}return elementCache},removeStorage:function(element){if(element==window){windowCache={}}else{var uid=element[dataKey];if(uid){delete dataCache[uid];try{delete element[dataKey]}catch(e){if(element.removeAttribute){element.removeAttribute(dataKey)}}}}},storeData:function(element,name,data){var elementCache=Storage.getStorage(element);if(data!==undefined){elementCache[name]=data}return elementCache[name]},retrieveData:function(element,name){var elementCache=Storage.getStorage(element);return elementCache[name]},removeData:function(element,name){var elementCache=Storage.getStorage(element);if(name){delete elementCache[name];name=null;for(name in elementCache){break}if(!name){Storage.removeStorage(element)}}}}})();function Event(event,element,type){this.event=event;this.element=element;this.type=type}Event.prototype={event:null,element:null,mousePosition:function(target){var x,y,body,documentElement;if(typeof(x=this.event.pageX)=='number'){y=this.event.pageY}else if((x=event.clientX)&&(body=document.body)&&(documentElement=document.documentElement)){x+=body.scrollLeft+documentElement.scrollLeft;y=this.event.clientY+body.scrollTop+documentElement.scrollTop}return target&&(target=typeof target=='boolean'?Env.pageScroll():I(target).position())?[x-target[0],y-target[1]]:[x,y]},target:function(){return this.event.target||this.event.srcElement||document},relatedTarget:function(){return this.event.relatedTarget||(this.target()==this.event.fromElement?this.event.toElement:this.event.fromElement)},withinElement:function(element){element=element?I(element):this.element;var related=this.relatedTarget();while(related&&related!=element){related=related.parentNode}return related==element},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{this.event.returnValue=false}return this},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation()}else{this.event.cancelBubble=true}return this},stop:function(){this.stopPropagation().preventDefault();return false},getKey:function(){var event=this.event,keyCode=event.which||event.keyCode||'',key=String.fromCharCode(keyCode).toUpperCase(),shift=event.shiftKey,ctrl=event.ctrlKey,meta=event.metaKey,alt=event.altKey,map=Event.keysMap,keyMap,chomboKey='',i;if((keyMap=map[keyCode])){if(typeof keyMap=='string'){key=keyMap}else{key=keyMap[0];i=keyMap.indexOf((meta?8:0)+(shift?4:0)+(ctrl?2:0)+(alt?1:0));if(i>0){chomboKey=keyMap[i+1]}}}return{ctrl:ctrl,alt:alt,shift:shift,meta:meta,code:keyCode,key:key,chombo:chomboKey}},getButton:function(){var event=this.event,button=event.button,left,middle,right;if(button){left=button&1;right=button&2;middle=button&4}else{button=event.which;left=button==1;right=button==2;middle=button==3}return{button:button,left:left,middle:middle,right:right,shift:event.shiftKey,ctrl:event.ctrlKey,alt:event.altKey,meta:event.metaKey}},getWheel:function(){var event=this.event,delta=event.detail;if(detail){delta=-delta/3}else{delta=event.wheelDelta/120;if(window.opera){delta=-delta}}return{wheel:delta,shift:event.shiftKey,ctrl:event.ctrlKey,alt:event.altKey,meta:event.metaKey}},get:function(attribute){return this.event[attribute]}};Event.keysMap={8:'BackSpace',9:'Tab',12:'CursorCenter',13:'Enter',16:'Shift',17:'Ctrl',18:'Alt',19:'Pause',20:'CapsLock',27:'Escape',32:'Space',33:'PageUp',34:'PageDown',35:['End',2,'GoToBottom'],36:['CursorHome',2,'ControlHome'],37:'CursorLeft',38:'CursorUp',39:'CursorRight',40:'CursorDown',44:'Print',45:'Insert',46:['Delete',4,'EraseField',2,'EraseEOP',1,'ClearScreen'],91:'LeftWin',92:'RightWin',96:'NumLock0',97:'NumLock1',98:'NumLock2',99:'NumLock3',100:'NumLock4',101:'NumLock5',102:'NumLock6',103:'NumLock7',104:'NumLock8',105:'NumLock9',112:'F1',113:'F2',114:'F3',115:'F4',116:'F5',117:'F6',118:'F7',119:'F8',120:'F9',121:'F10',122:'F11',123:'F12',124:'F13',125:'F14',126:'F15',144:'NumLock',145:'ScrollLock',224:'Cmd'};var Env;(function(){var eventsUID=1,readyList=[],readyInit=false,ready=false,readyRun=function(){if(ready){return}readyList.each(function(func){func.call(document)});readyList=null;ready=true;readyRun=Function.empty};Event.onLoad=function(func,data){Event.add(window,'load',func,data)};Event.onReady=function(func){if(typeof func!=='function'){throw new TypeError('Argument is not a Function')}if(ready){func.call(document);return true}readyList.push(func);if(!readyInit){if(document.addEventListener){document.addEventListener("DOMContentLoaded",((Agent.engine=='presto')?function(){if(ready){return}for(var i=0,stylesheets=document.styleSheets,length=document.styleSheets.length;i<length;i++){if(stylesheets[i].disabled){setTimeout(arguments.callee,0);return}}document.removeEventListener("DOMContentLoaded",arguments.callee,false);readyRun()}:function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);readyRun()}),false)}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);readyRun()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(ready){return}try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}readyRun()})()}}Event.add(window,'load',readyRun);readyInit=true}return true};Event.specials={mouseenter:function(element,type,func){var newFunc=func,isIE=(Agent.engine=='trident');if(!isIE||(isIE&&Agent.version<8)){type='mouseover';newFunc=function(event){return event.withinElement()?true:func.call(element,event)}}return[[element,type,newFunc]]},mouseleave:function(element,type,func){var newFunc=func,isIE=(Agent.engine=='trident');if(!isIE||(isIE&&Agent.version<8)){type='mouseout';newFunc=function(event){return event.withinElement()?true:func.call(element,event)}}return[[element,type,newFunc]]},mousedownlong:function(element,type,func){var result=[],timeout,ok=true,time=func.data;result.push([element,'mousedown',function(event){ok=false;timeout=setTimeout(function(){ok=true;func.call(element,event,true)},(time||1)*1000);return true}]);result.push([document,'mouseup',function(event){clearTimeout(timeout);if(!ok&&func){func.call(element,event,false)}ok=true;return true}]);return result},mouseoverlong:function(element,type,func){var result=[],timeout,ok=true,time=func.data;result.push([element,'mouseover',function(event){ok=false;timeout=setTimeout(function(){ok=true;func.call(element,event,true)},(time||1)*1000);return true}]);result.push([element,'mouseout',function(event){clearTimeout(time);if(!ok&&func){func.call(element,event,false)}ok=true;return true}]);return result},focus:function(element,type,func){if(Agent.engine=='trident'){type='focusin'}return[[element,type,func]]},blur:function(element,type,func){if(Agent.engine=='trident'){type='focusout'}return[[element,type,func]]},mousewheel:function(element,type,func){if(Agent.engine=='gecko'){type='DOMMouseScroll'}return[[document,type,func]]},domloaded:function(element,type,func){if(element==window){Event.onReady(func)}return false},ready:function(element,type,func){if(element==window){Event.onReady(func)}return false}};var specials=Event.specials;specials.clickout=specials.dblclickout=specials.mousemoveout=function(element,type,func){type=type.replace(/out$/,'');var newFunc=function(event){var parent=event.target();do{if(parent===element){return true}}while((parent=parent.parentNode));return func.call(element,event)};return[[document,type,newFunc]]};Event.add=function(element,type,func,data){if(typeof func!=='function'){throw new TypeError('Argument #2 is not a Function!')}if(!(element=I(element))){throw new TypeError('Argument #0 is not an Element!')}if(Agent.engine=='trident'&&element.setInterval){element=window}if(!element.eventsUID){element.eventsUID=Event.eventsUID++}if(!func.eventsUID){func.eventsUID=Event.eventsUID++}if(data!==undefined){var tempFunc=func;func=Event.proxy(tempFunc);func.data=data}type.split(/[^a-zA-Z]+/g).each(function(type){type=type.toLowerCase().replace(/^on/,'');var elementEventStorage=Storage.retrieveData(element,'event|'+type)||Storage.storeData(element,'event|'+type,{}),key=Event.getKey(element,type,func),rules=Event.getRules(element,type,func);if(rules){rules.each(function(rule){var element=rule[0],realType=rule[1],func=rule[2],newFunc=function(event){return func.call(element,new Event(event||Window.window(element).event,element,type))};if(element.addEventListener){element.addEventListener(realType,newFunc,false)}else if(element.attachEvent){element.attachEvent('on'+realType,newFunc)}rule[2]=newFunc});elementEventStorage[key]=rules}});return true};Event.remove=function(element,type,func){if(!(element=I(element))){throw new TypeError('Argument #0 is not an Element!')}if(type){type.split(/[^a-zA-Z]+/gi).each(function(type){type=type.toLowerCase().replace(/^on/,'');var elementEventStorage=Storage.retrieveData(element,'event|'+type)||Storage.storeData(element,'event|'+type,{});if(func){var key=Event.getKey(element,type,func),rules=elementEventStorage[key];if(rules){rules.each(function(rule){var element=rule[0],type=rule[1],func=rule[2];if(element.removeEventListener){element.removeEventListener(type,func,false)}else if(element.detachEvent){element.detachEvent('on'+type,func)}});delete elementEventStorage[key]}}else{for(var i in elementEventStorage){Event.remove(element,type,i.split('|').pop())}}})}else{var elementStorage=Storage.getStorage(element);for(var i in elementStorage){if(i.match(/^event\|/)){Event.remove(element,i.split('|').pop())}}}};Event.get=function(element,type){if(!(element=I(element))){throw new TypeError('Argument #0 is not an Element!')}var result={};type.split(/[^a-zA-Z]+/gi).each(function(type){type=type.toLowerCase().replace(/^on/,'');var elementEventStorage=Storage.retrieveData(element,'event|'+type);if(elementEventStorage){var key=Event.getKey(element,type,func),rules=elementEventStorage[key];if(rules){result[type]=rules;return}}result[type]={}});return result};Event.proxy=function(func,proxyFunc){proxyFunc=proxyFunc||function(){return func.apply(this,arguments)};proxyFunc.eventsUID=func.eventsUID=func.eventsUID||proxyFunc.eventsUID||Event.eventsUID++;return proxyFunc};Event.getRules=function(element,type,func){if(specials[type]){return specials[type](element,type,func)}return[[element,type,func]]};Event.getKey=function(element,type,func){return[element.eventsUID,type,(typeof func=='function'?func.eventsUID:func)].join('|')};var _eventTypes={'DOMFocusIn':'UIEvent','DOMFocusOut':'UIEvent','DOMActivate':'UIEvent','focus':'UIEvent','blur':'UIEvent','click':'MouseEvent','mousedown':'MouseEvent','mouseup':'MouseEvent','mouseover':'MouseEvent','mousemove':'MouseEvent','mouseout':'MouseEvent','keydown':'KeyboardEvent','keyup':'KeyboardEvent','textInput':'TextEvent','DOMSubtreeModified':'MutationEvent','DOMNodeInserted':'MutationEvent','DOMNodeRemoved':'MutationEvent','DOMNodeRemovedFromDocument':'MutationEvent','DOMNodeInsertedIntoDocument':'MutationEvent','DOMAttrModified':'MutationEvent','DOMCharacterDataModified':'MutationEvent','DOMElementNameChanged':'MutationNameEvent','DOMAttributeNameChanged':'MutationNameEvent','load':'Event','unload':'Event','abort':'Event','error':'Event','select':'Event','change':'Event','submit':'Event','reset':'Event','resize':'Event','scroll':'Event','dataavailable':'HTMLEvents'};Event.create=function(type,prop){var event,group;if(document.createEvent){type=(type||'dataavailable').replace(/^on/,'');group=_eventTypes[type]||'Event';event=document.createEvent(group);prop=Object.extend({altKey:false,bubbles:true,button:0,cancelable:true,charCode:0,clientX:0,clientY:0,ctrlKey:false,currentTarget:null,detail:0,eventPhase:null,isChar:false,keyCode:0,layerX:0,layerY:0,metaKey:false,pageX:0,pageY:0,relatedTarget:null,screenX:0,screenY:0,shiftKey:false,target:null,timeStamp:0,type:'',view:window,which:0},prop||{});switch(group){case'HTMLEvents':case'Event':case'Events':event.initEvent(type,prop.bubbles,prop.cancelable);break;case'UIEvent':event.initUIEvent(type,prop.bubble,prop.cancelable,prop.view,prop.detail);break;case'MouseEvent':event.initMouseEvent(type,prop.bubble,prop.cancelable,prop.view,prop.detail,prop.screenX,prop.screenY,prop.clientX,prop.clientY,prop.ctrlKey,prop.altKey,prop.shiftKey,prop.metaKey,prop.button,prop.relatedTarget);break;case'KeyboardEvent':event.initKeyEvent(type,prop.bubble,prop.cancelable,prop.view,prop.ctrlKey,prop.altKey,prop.shiftKey,prop.metaKey,prop.keyCode,prop.charCode);break;case'MutationEvent':event.initMutationEvent(type,prop.bubble,prop.cancelable,prop.relatedNode,prop.prevValue,prop.newValue,prop.attrName,prop.attrChange);break;case'MutationNameEvent':event.initMutationNameEvent(type,prop.bubble,prop.cancelable,relatedNode,prevNamespaceUri,prevNodeName);break;case'TextEvent':event.initTextEvent(type,prop.bubble,prop.cancelable,prop.view,prop.data);break;case'PopupBlocked':event.initPopupBlockedEvent();break;case'XULCommandEvent':event.initCommandEvent();break}}else if(document.createEventObject){event=document.createEventObject();if(prop){Object.extend(event,prop)}}type=group=prop=null;return event};Event.fire=function(element,type,event){element=I(element);if(element==document&&document.createEvent&&!element.dispatchEvent){element=document.documentElement}type=(type||'dataavailable').replace(/^on/,'');event=Event.create(type,event);if(document.createEvent){element.dispatchEvent(event)}else{element.fireEvent('on'+type,event)}return event};var eventsImplements={addEvent:function(type,func,data){Event.add(this,type,func,data);return this},removeEvent:function(type,func){Event.remove(this,type,func);return this},getEvent:function(e){return Event.getEvent(this,e)},fireEvent:function(type,event){return Event.fire(this,type,event)}};AidaElements.implement(eventsImplements);window.addEvent=document.addEvent=function(type,func,data){Event.add(this,type,func,data);return this};window.removeEvent=document.removeEvent=function(type,func,data){Event.remove(this,type,func,data);return this};var frameList=[],frameInterval,mpStarted,stage={mouse:{x:0,y:0}},mouse=stage.mouse;Event.addOnEnterFrame=function(func){frameList.push(func)};Event.removeOnEnterFrame=function(func){for(var i=frameList.length-1;i>=0;i--){if(frameList[i]===func){delete frameList[i]}}};Event.startOnEnterFrame=function(fps){if(!mpStarted){Event.add(document,'mousemove',function(event){var p=event.mousePosition();mouse.x=p[0];mouse.y=p[1]})}frameInterval=setInterval(function(){for(var i=0,listLength=frameList.length;i<listLength;i++){frameList[i].call(document,stage)}},Math.round(1000/(fps||25)))};Event.stopOnEnterFrame=function(){clearInterval(frameInterval);frameInterval=null};var viewSize=function(type){var result;if((typeof(result=window['inner'+type])=='number')){return result}type='client'+type;return document.documentElement[type]||document.body[type]},paseSize=function(type,direction,p){var tempA,tempB,body=document.body,documentElement=document.documentElement;if(typeof(tempA=window['inner'+type])=='number'&&typeof(tempB=window['scrollMax'+direction])=='number'){return tempA+tempB}return Math.max(Math.max(body["scroll"+type],documentElement["scroll"+type]),Math.max(body["offset"+type],documentElement["offset"+type]))},dpi=0,scrollbarSize;Env={dpi:function(){var result;if(dpi){return dpi}if(!(dpi=screen.logicalXDPI)){var element=N(['div',{style:{position:'absolute',left:'-1000px',top:'-1000px',visibility:'hidden',width:'1in',height:'1in'}}],BODY);dpi=element.offsetHeight;element.remove()}return dpi||96},scrollbarSize:function(){if(scrollbarSize){return scrollbarSize}var element=N(['div',{style:{position:'absolute',left:'-1000px',top:'-1000px',visibility:'hidden',width:'50px',height:'50px',overflow:'hidden'}}],BODY);scrollbarSize=parseInt(t.clientWidth,10);element.css({overflow:'scroll'});scrollbarSize=(scrollbarSize-=parseInt(element.clientWidth,10));element.remove();return scrollbarSize},viewWidth:function(){return viewSize('Width')},viewHeight:function(){return viewSize('Height')},viewSize:function(){return[viewSize('Width'),viewSize('Height')]},scrollWidth:function(){var body=document.body,documentElement=document.documentElement;return window.pageXOffset||body.scrollLeft||documentElement.scrollLeft||0},scrollHeight:function(){var body=document.body,documentElement=document.documentElement;return window.pageYOffset||body.scrollTop||documentElement.scrollTop||0},pageScroll:function(){return[Env.scrollWidth(),Env.scrollHeight()]},maxScrollWidth:function(){return paseSize('Width','X','Left')-viewSize('Width')},maxScrollHeight:function(){return paseSize('Height','Y','Top')-viewSize('Height')},maxScroll:function(){return[paseSize('Width','X','Left')-viewSize('Width'),paseSize('Height','Y','Top')-viewSize('Height')]},pageWidth:function(){return paseSize('Width','X','Left')},pageHeight:function(){return paseSize('Height','Y','Top')},pageSize:function(){return[paseSize('Width','X','Left'),paseSize('Height','Y','Top')]},viewCenter:function(w,h,wd,hd){var t=getType(w),c=Env.viewSize(),s=Env.pageScroll();if(t=='array'||(t=='element'&&(w=I(w).sizes()))){hd=wd;wd=h;h=w[1];w=w[0]}return[Math.round((c[0]-(w||0))*(wd||0.5))+s[0],Math.round((c[1]-(h||0))*(hd||0.5))+s[1]]},gridPosition:function(x,y,o){var s=Env.clientSizes(),c=(o||(o={})).cols,r=o.rows,w=o.width,h=o.height,i=0,xc=0,yc=0;w=c?s[0]/c:w||50;h=r?s[1]/r:h||50;while((w*i)<=x){xc=i++}i=0;while((h*i)<=y){yc=i++}return[xc,yc]},generateGrid:function(w,h,n,s){for(var i=0,j=0,x=0,y=0,r=[];i<n;i++,j++){x=w*j;if((x+w)>s){x=j=0;y+=h}r[i]=[x,y]}return r},gridCoords:function(w,h,n,s){s=Math.floor(s/w);return[((n%s)*w),Math.floor(n/s)*h]},positionRatio:function(p,s,t){if(!t){return s/p}t=t.bound(0,1);var fh=s*t,sh=s-fh;return p<fh?(p/fh)-1:(p>fh?(p-fh)/sh:0)},detectAdblock:function(){var atest=N(['img',{src:AIDAJS.baseUrl+'/media/ad_banner.gif',width:'1',height:'1',display:'inline-block',visibility:'visible',opacity:1,width:'468px',height:'60px'}],BODY);var result=(atest.css('display')=='none'||atest.css('visibility')=='hidden'||atest.hidden());atest.remove();return result},detectAdblock2:function(func){var key='abdrmkey_'+String.random(),val='abdrmval_'+String.random(),funk='abdrmfunk_'+String.random(),frag=document.createDocumentFragment();window[funk]=func;var atest=document.createElement('script');atest.src=AIDAJS.baseUrl+'/ad-banner-drm.js?'+key+'='+val;atest.id='tryit';atest.type='text/javascript';atest.defer='defer';BODY.appendChild(atest);setTimeout(function(){var atest2=document.createElement('script');atest2.type='text/javascript';atest2.defer='defer';atest2.innerHTML='window.'+funk+'(!(window.'+key+' == "'+val+'"));';BODY.appendChild(atest2)},500)},detectAdblockAdsense:function(func){return(typeof window.google_render_ad=='undefined')},scroll:function(options){var s=Env.pageScroll(),sx=s[0],sy=s[1],fx=options.x||options.left,fy=options.y||options.top,f=Env.validateScroll(is(fx)?fx:sx,is(fy)?fy:sy),dx=f[0]-sx,dy=f[1]-sy,e=options.effect||EE.linear,px,py,cin=new Cinematic(function(i,t){window.scrollTo(e(i,sx,dx,t),e(i,sy,dy,t))},options);if(!options.noStart){cin.start()}return cin},validateScroll:function(x,y){var m=Env.maxScroll();return[Math.min(x||0,m[0]),Math.min(y||0,m[1])]},enableHTML5:function(){if(Agent.engine=='trident'){var tags=['abbr','article','aside','audio','bb','canvas','datagrid','datalist','details','dialog','figure','footer','header','mark','menu','meter','nav','output','progress','section','time','video'],i=tags.length,el;while(i){el=document.createElement(tags[--i])}el=null}},coordsToBounds:function(tw,th,x,y,w,h){return[y,(x+w),(y+h),x]},boundsToCoords:function(tw,th,t,r,b,l){return[l,t,(r-l),(b-t)]}}})();var BODY,HEAD,APPS_LAYER;Event.onReady(function(){HEAD=I(document.getElementsByTagName('head')[0]);BODY=I(document.getElementsByTagName('body')[0]);APPS_LAYER=N(['div',{id:'aidajs_apps_layer',style:{position:'absolute',left:'0px',top:'0px',zIndex:'26',width:'100%'}}],BODY)});var Require={},LoadImage;Require.JS=(function(){var requiredCache={},ready={},toExecute={},execUrl=function(url){toExecute[url].each(function(func){func[0].call(func[1])});ready[url]=true;delete toExecute[url]},requireFunc=function(url,func,bind){var element=requiredCache[url],executed;if(element){if(func){if(ready[url]){func()}else{toExecute[url].push([func,bind])}}return element}toExecute[url]=[];if(func){toExecute[url].push([func,bind])}element=document.createElement('script');element.src=url;element.type='text/javascript';element.defer='defer';if(Agent.engine=='trident'){element.onreadystatechange=function(){if('loaded,complete'.has(element.readyState)){if(!executed){execUrl(url);executed=true}}}}else{if(Agent.engine=='webkit'){(function(){if('loaded,complete'.has(element.readyState)){if(!executed){execUrl(url);executed=true}return}setTimeout(arguments.callee,20)})()}element.onload=function(){if(!executed){execUrl(url);executed=true}return}}document.getElementsByTagName('head')[0].appendChild(element);return element};requireFunc.once=function(url,func,bind){return(requiredCache[url]=Require.JS(url,func,bind))};requireFunc.required=function(url){return requiredCache[url]?true:false};return requireFunc})();Require.module=function(module,func,bind){return Require.JS.once(AIDAJS.baseUrl+'/'+module+'.js',func,bind)};Require.CSS=(function(){var requiredCache={},ready={},toExecute={},execUrl=function(url){toExecute[url].each(function(func){func[0].call(func[1])});ready[url]=true;delete toExecute[url]},requireFunc=function(url,func,bind){var element=requiredCache[url],executed;if(element){if(func){if(ready[url]){func()}else{toExecute[url].push([func,bind])}}return element}toExecute[url]=[];if(func){toExecute[url].push([func,bind])}element=document.createElement('link');element.href=url;element.type='text/css';element.rel='stylesheet';element.media='all';if(toExecute[url].length){if('webkit,gecko'.has(Agent.engine)){(function(){try{element.sheet.cssRule}catch(e){setTimeout(arguments.callee,20);return}if(!executed){execUrl(url);executed=true}})()}else{element.onreadystatechange=function(){if('loaded,complete'.has(element.readyState)){if(!executed){execUrl(url);executed=true}}};element.onload=function(){if(!executed){execUrl(url);executed=true}return}}}document.getElementsByTagName('head')[0].appendChild(element);return element};requireFunc.once=function(url,func,bind){return(requiredCache[url]=Require.CSS(url,func,bind))};requireFunc.required=function(url){return requiredCache[url]?true:false};return requireFunc})();Require.Image=LoadImage=(function(){var loadFunc=function(options){var element=new Image(),onLoad=options.onload||Function.empty;element.onload=function(){var selfFunc=arguments.callee;if(selfFunc.done){return false}selfFunc.done=true;this.onload=null;return onLoad.call(this)};element.onerror=options.onerror||Function.empty;element.onabort=options.onabort||Function.empty;element.src=options.url;return element};loadFunc.more=function(images,options){var totalImages,i=0,result=[],onStart=o.onstart||Function.empty,onProgress=o.onprogress||Function.empty,onComplete=o.oncomplete||Function.empty;if(!isArray(images)){images=[images]}totalImages=images.length;onStart.call(images[0],0,totalImages);images.each(function(image){if(typeof image!='object'){image={url:image}}var onLoad=image.onload||Function.empty,onError=image.onerror||Function.empty,onAbort=image.onabort||Function.empty;image.onload=function(event){onLoad.call(this,event);i++;onProgress.call(this,i,totalImages);if(i==totalImages){onComplete.call(this,totalImages)}};image.onerror=function(event){onError.call(this,event);i++;onProgress.call(this,i,totalImages);if(i==totalImages){onComplete.call(this,totalImages)}};image.onabort=function(event){onAbort.call(this,event);i++;onProgress.call(this,i,totalImages);if(i==totalImages){onComplete.call(this,totalImages)}};result.push(LoadImage(image))});return result};return loadFunc})();var Sort={random:function(){return 0.5-Math.random()},number:function(a,b){return a-b},numberDesc:function(a,b){return b-a},string:function(a,b){a=(a+'').toLowerCase();b=(b+'').toLowerCase();return a<b?-1:(a>b?1:0)},stringDesc:function(a,b){a=(a+'').toLowerCase();b=(b+'').toLowerCase();return a<b?1:(a>b?-1:0)},date:function(a,b){return a.getTime()-b.getTime()},dateDesc:function(a,b){return b.getTime()-a.getTime()},natural:function(a,b){a+='';b+='';var cr=function(a,b){var bias=0,ia=0,ib=0,ca,cb,da,db;while(true){ca=a.charAt(ia++);cb=b.charAt(ib++);da=ca.digitChar();db=cb.digitChar();if(!da&&!db){return bias}else if(!da){return-1}else if(!db){return+1}else if(ca<cb){if(bias===0){bias=-1}}else if(ca>cb){if(bias===0){bias=+1}}else if(ca===0&&cb===0){return bias}}};var ia=0,ib=0,na,nb,ca,cb,r;while(true){na=nb=0;while((ca=a.charAt(ia++))&&(ca.whiteSpaceChar()||ca=='0')){na=ca=='0'?na+1:0}while((cb=b.charAt(ib++))&&(cb.whiteSpaceChar()||cb=='0')){nb=cb=='0'?nb+1:0}if((ca.digitChar()&&cb.digitChar())&&((r=cr(a.substring(ia),b.substring(ib)))!==0)){return r}if(ca===0&&cb===0){return na-nb}if(ca<cb){return-1}else if(ca>cb){return+1}}}};var Window={open:function(u,o){var n=o.name||'win_'+String.random(),w=o.width,h=o.height,aw=screen.availWidth,ah=screen.availHeight,sw=screen.width,sh=screen.height,x=0,y=0,a='';if(o.fullscreen){w=aw;h=ah}if(o.center){y=Math.floor((ah-(h||ah))/2)-(sh-ah);x=Math.floor((aw-(w||aw))/2)-(sw-aw)}if(w){a+='width='+w+','}if(h){a+='height='+h+','}a+='screenx='+x+',screeny='+y+',left='+x+',top='+y+',';if(o.scrollbars){a+='scrollbars=1,'}if(o.menubar){a+='menubar=1,'}if(o.locationbar){a+='location=1,'}if(o.resizable){a+='resizable=1,'}this.name=n;return window.open(u,n,a)},window:function(element){element=I(element);return element.contentWindow||element.defaultView||element.parentWindow||window},document:function(element){element=I(element);element=element.contentWindow||element.defaultView||element.contentDocument||element.document||document;return element.document||element},focus:function(element){if((element=I(element)).contentWindow){element.contentWindow.focus()}else{element.focus()}}};var Cookie={set:function(name,value,expire,path,domain,secure,httponly){if(!(expire instanceof Date)){expire=new Date(expire*1000)}document.cookie=name+'='+escape(value||'')+'; expires='+expire.toGMTString()+(path?'; path='+path:'')+(domain?'; domain='+domain:'')+(domain?'; secure':'')+(httponly?'; HttpOnly':'')},getAll:function(){for(var e=document.cookie.split(';'),i=0,l=e.length,r={};i<l;i++){c=e[i].split('=');r[c[0]]=unescape(c[1])}return r},get:function(n){return((n=document.cookie.match((new RegExp('(^|;)\\s*'+n+'=([^;]*)'))))&&(n=n[2]))?unescape(n):null},unset:function(o){(o||(o={})).expire=-30000000;Cookie.set(o)}};function Cinematic(f,o){this._init(f,o)}Cinematic.prototype={_interval:null,_func:'',_stepTime:0,step:0,wait:0,_init:function(oFr,options){if(typeof onFrame!='function'){options=oFr||{};oFr=options.onFrame}options=options||{};oFr=oFr||Function.empty;var t=options.time||1,fps=options.fps||25,st=Math.floor(t*fps),i=0,effect=options.effect||EE.linear,ff,self=this,args,tg=options.target||this,oSt=options.onStart||Function.empty,oCh=options.onChange||Function.empty,oFi=options.onFinish||Function.empty;this.loop=options.loop;this.wait=options.wait||0;this._func=function(){var t=self.step,res=effect(t,0,1,st),args=[t,st,res,self];if(t==0){oSt.apply(tg,args)}if(oFr.apply(tg,args)){oCh.apply(tg,args)}if(self.step>=st){if(self.loop){self.step=0}else{clearInterval(self._interval)}oFi.apply(tg,args);return}self.step++};this._stepTime=(1000/fps).round()},start:function(){var self=this,wait=this.step==0?this.wait:0;setTimeout(function(){self._interval=setInterval(self._func,self._stepTime)},wait*1000)},pause:function(){clearInterval(this._interval)},stop:function(){this.pause();this.reset()},reset:function(){this.step=0},oneStep:function(){this._func()}};function Point(x,y){this.set(x,y)}Point.prototype={x:0,y:0,set:function(x,y){switch(getType(x)){case'string':case'element':x=I(x).position(y);case'array':y=x[1];x=x[0];break;case'object':y=x.y;x=x.x;break}this.x=this[0]=x||0;this.y=this[1]=y||0},copy:function(point){return new Point(this)},add:function(point,self){if(self){this.x+=point.x;this.y+=point.y;return this}return new Point(this.x+point.x,this.y+point.y)},sub:function(point,self){if(self){this.x-=point.x;this.y-=point.y;return this}return new Point(this.x-point.x,this.y-point.y)},mul:function(num){if(self){this.x*=num;this.y*=num;return this}return new Point(this.x*num,this.y*num)},div:function(num){if(self){this.x/=num;this.y/=num;return this}return new Point(this.x/num,this.y/num)},toArray:function(){return[this.x,this.y]},toString:function(){return this.x+', '+this.y},distance:function(point){var tx=this.x,ty=this.y,px=point.x,py=point.y;px=px>tx?px-tx:tx-px;py=py>ty?py-ty:ty-py;return Math.sqrt((px*px)+(py*py))},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}};function Template(t){this.variables={};if(t){this.setTemplate(t)}}Template.prototype={openTag:'{$',closeTag:'}',template:'',variables:null,setTemplate:function(t){this.template=''+t},setVariables:function(s,v){var i,c=this.variables;if(typeof s=='string'){c[s]=v||''}else{for(i in s){c[i]=s[i]}}},parse:function(){var t=this.template,v=this.variables,ot=this.openTag,ct=this.closeTag,i;for(i in v){t=t.replace(ot+i+ct,v[i])}return t}};function Url(u,r){this.set(u,r)}Url.prototype={scheme:'',host:'',port:'',user:'',pass:'',path:'',query:'',fragment:'',extension:'',relative:false,set:function(u,r){var t=typeof u,p,h,s;if(t=='string'){if((u=u.match(Url.URL_EREG))){this.scheme=s=u[2]||'';this.user=u[4]||'';this.pass=u[5]||'';this.host=h=u[6]||'';this.port=u[8]||'';this.path=p=u[9]||'';this.query=u[11]||'';this.fragment=u[13]||'';if(!s){this.path=p=h+p;this.host=h=''}if(!h){this.relative=true}if(this.relative&&r){var au=new Url(document.location+''),ps,pp=au.path.split('/'),p0=p.substr(0,1),pl=pp.pop();if(p.substr(0,2)=='..'&&((ps=p.substr(2,1))=='/'||!ps)){if(pl.indexOf('.')!=-1||!pl){pp.pop()}p=p.substr(2)}else if(p0=='.'&&((ps=p.substr(1,1))=='/'||!ps)){p=p.substr(1)}if(p.substr(0,1)!='/'){p='/'+p}p=pp.join('/')+p;if(!h){this.host=au.host}if(!s){this.scheme=au.scheme}this.path=p}if(p){p=p.split('/').pop().split('.').pop();this.extension=p||''}return true}}return false},getDirUrl:function(){var u='',s;if((s=this.scheme)){u+=s=='mailto'?s+':':s+'://'}if((s=this.path)){u+=s}return u},toString:function(){var u='',s;if((s=this.scheme)){u+=s=='mailto'?s+':':s+'://'}if((s=this.user)){u+=s;if((s=this.pass)){u+=':'+s}u+='@'}u+=this.host;if((s=this.port)){u+=':'+s}if((s=this.path)){u+=s}if((s=this.query)){u+='?'+s}if((s=this.fragment)){u+='#'+s}return u},getParams:function(){var query=this.query.split('&'),i=query.length,result={},piece;while(i){if((piece=query[--i])){piece=piece.split('=');result[p[0]]=p[1]||''}}return result}};Url.URL_EREG=/^(([a-z]+):[\/]*)?(([^:]+):?([^@]+)@)?([a-z0-9\.-]+)?(:([0-9]+))?(\/[^\?#]*)(\?([^#]*))?(#(.*))?$/i;Url.isUrl=function(url){return url.match(Url.URL_EREG)};Url.anchors=function(options){var all=options.all,exts=options.extensions,externals=options.externals,internals=options.internals,hosts=options.hosts,schemes=options.schemes,actUrl=new Url(document.location+''),actExt=actUrl.extension,actHost=actUrl.host,actSchema=actUrl.schema,attr=options.attribute||'href';(options.elements||$('a',options.parent)).each(function(a){var href=a.get(attr);if(href){var url=new Url(href,true),ext=url.extension,host=url.host,scheme=url.scheme,func;if(all){all.call(a,url,actUrl)}if(exts&&ext&&(func=exts[ext])){func.call(a,url,actUrl)}if(externals&&host!=actHost){externals.call(a,url,actUrl)}if(internals&&host==actHost){internals.call(a,url,actUrl)}if(hosts&&(func=hosts[host])){func.call(a,url,actUrl)}if(schemes&&(func=schemes[scheme])){func.call(a,url,actUrl)}}})};function Color(c){this.set(c)}Color.prototype={red:0,green:0,blue:0,alpha:1,set:function(c){if(c){var r=0,g=0,b=0,a=1;if(typeof c=='string'){c=c.replace(/[\s]+/g,'');var i,n=Color.names,m;if(c.match(/^[a-z]+$/gi)){c=c.toLowerCase();for(i in n){if(c==i.toLowerCase()){c=n[i];break}}}if(c.match(/^#[0-9A-F]{3,8}$/gi)){a='FF';switch(c.length){case 4:case 5:r=c.substring(1,2);g=c.substring(2,3);b=c.substring(3,4);a=c.substring(4,5);r+=r;g+=g;b+=b;a+=a;break;default:case 7:case 9:r=c.substring(1,3);g=c.substring(3,5);b=c.substring(5,7);a=c.substring(7,9);break}r=r.toInt(16);g=g.toInt(16);b=b.toInt(16);a=(a||'FF').toInt(16)/ 255} else if((m = c.match(/rgb\(([0-9]+%?),([0-9]+%?),([0-9]+%?)\)/i)) || (m = c.match(/rgba\(([0-9]+%?),([0-9]+%?),([0-9]+%?),([0-9\.]+%?)\)/i))){r=m[1];g=m[2];b=m[3];a=m[4];r=r.toInt()*(r.has('%')?2.55:1);g=g.toInt()*(g.has('%')?2.55:1);b=b.toInt()*(b.has('%')?2.55:1);a=(a)?(a.has('%')?a.toInt()*2.55:a.toFloat()):1}else if((m=c.match(/cmyk\(([0-9]+%?),([0-9]+%?),([0-9]+%?),([0-9]+%?)\)/i))||(m=c.match(/cmyka\(([0-9]+%?),([0-9]+%?),([0-9]+%?),([0-9]+%?),([0-9\.]+%?)\)/i))){var y=m[3],k=m[4];c=m[1];m=m[2];c=c.toInt()*(c.has('%')?2.55:1);m=m.toInt()*(m.has('%')?2.55:1);y=y.toInt()*(y.has('%')?2.55:1);k=(255-(k.toInt()*(k.has('%')?2.55:1)))/255;r=(255-c)*k;g=(255-m)*k;b=(255-y)*k;a=(a)?(a.has('%')?a.toInt()*2.55:a.toFloat()):1}else if((m=c.match(/hsl\(([0-9]+),*([0-9]+)%,*([0-9]+)%\)/i))||(m=c.match(/hsla\(([0-9]+),*([0-9]+)%,*([0-9]+)%,([0-9\.]+%?)\)/i))){var h=m[1].toInt()/360,s=m[2].toInt()/ 100, l = m[3].toInt() /100,f=function(m1,m2,h){if(h<0){h=h+1}if(h>1){h=h-1}if(h*6<1){return m1+(m2-m1)*h*6}if(h*2<1){return m2}if(h*3<2){return m1+(m2-m1)*(2/3-h)*6}return m1};s=(l<=0.5)?l*(s+1):l+s-l*s;l=l*2-s;r=f(l,s,h+1/3)*255;g=f(l,s,h)*255;b=f(l,s,h-1/3)*255;a=m[4];a=(a)?(a.has('%')?a.toInt()*2.55:a.toFloat()):1}}else if(c.constructor==Array){r=c[0];g=c[1];b=c[2];a=c[3];if(!is(a)){a=1}}else if(c.red||c.green||c.blue||c.alpha){r=c.red;g=c.green;b=c.blue;a=c.alpha}this.red=(!isNaN(r)?r:255).bound(0,255);this.green=(!isNaN(g)?g:255).bound(0,255);this.blue=(!isNaN(b)?b:255).bound(0,255);this.alpha=(!isNaN(a)?a:1).bound(0,1);return true}return false},media:function(){var a=arguments,l=a.length,i,c,r=0,g=0,b=0;for(i=l-1;i>=0;i--){c=new Color(a[i]);r+=c.red;g+=c.green;b+=c.blue}this.set([r/l,g/ l, b /l])},hex:function(a){var f=function(o){o=o.bound(0,255);return(o<16?'0':'')+o.toString(16)};return('#'+f(this.red)+f(this.green)+f(this.blue)+(a?f(this.alpha*255):'')).toUpperCase()},rgb:function(){return'rgb('+this.red+','+this.green+','+this.blue+')'},rgba:function(){return'rgba('+this.red+','+this.green+','+this.blue+','+this.alpha+')'},sepia:function(){var r=this.red,g=this.green,b=this.blue;return new Color([((r*0.393)+(g*0.769)+(b*0.189)).round(),((r*0.349)+(g*0.686)+(b*0.168)).round(),((r*0.272)+(g*0.534)+(b*0.131)).round(),this.alpha])},negative:function(c){return new Color([255-this.red,255-this.green,255-this.blue,this.alpha])},grayscale:function(f){var a=this.red,b=this.blue,c=this.green,r;switch(f){case 1:case'SimpleAverage':r=[((a+b+c)/3).round(),((a+b+c)/3).round(),((a+b+c)/3).round()];break;case 2:case'WeightAverage':r=[((3*a)+(4*c)+(2*b)/9).round(),((3*a)+(4*c)+(2*b)/9).round(),((3*a)+(4*c)+(2*b)/9).round()];break;case 3:case'CCIRRec709':r=[((0.2125*a)+(0.7154*b)+(0.0721*c)).round(),((0.2125*a)+(0.7154*b)+(0.0721*c)).round(),((0.2125*a)+(0.7154*b)+(0.0721*c)).round()];break;default:case 4:case'NtscPal':r=[((0.299*a)+(0.587*b)+(0.114*c)).round(),((0.299*a)+(0.587*b)+(0.114*c)).round(),((0.299*a)+(0.587*b)+(0.114*c)).round()];break}r[3]=this.alpha;return new Color(r)},colorize:function(f){f=new Color(f);var a=this.red,b=this.green,c=this.blue,x=f.red,y=f.green,z=f.blue;return new Color([((a*(x/255))+(b*(x/ 255)) + (c * (x /255))).round(),((a*(y/255))+(b*(y/ 255)) + (c * (y /255))).round(),((a*(z/255))+(b*(z/ 255)) + (c * (z /255))).round(),this.alpha])},color:function(f){var r=this.red,g=this.green,b=this.blue,a=this.alpha;f=new Color(f);return new Color([r+(r/100*f.red).round(),g+(g/100*f.green).round(),b+(b/100*f.blue).round(),this.alpha])},contrast:function(f){var n=function(v){return(((v/255)-0.5)*(1+(f/100).pow(2))+0.5)*255};return new Color([n(this.red),n(this.green),n(this.blue),this.alpha])},brightness:function(c,f){return new Color([this.red+(255/100*f).round(),this.green+(255/100*f).round(),this.red+(255/100*f).round(),this.alpha])},toString:function(){return this.hex()}};Color.hex=function(color){return(new Color(color)).hex()};Color.isColor=function(s){return s.match(/((rgb|rgba|hsl|hsla|cmyk|cmyka)\([0-9]%?,[\s]*[0-9]+%?,[\s]*[0-9]+%?(,[\s]*[0-9\.]+)?\)|#[0-9A-F]{3,8})/gi)};Color.names={AliceBlue:'#F0F8FF',AntiqueWhite:'#FAEBD7',Aqua:'#00FFFF',Aquamarine:'#7FFFD4',Azure:'#F0FFFF',Beige:'#F5F5DC',Bisque:'#FFE4C4',Black:'#000000',BlanchedAlmond:'#FFEBCD',Blue:'#0000FF',BlueViolet:'#8A2BE2',Brown:'#A52A2A',BurlyWood:'#DEB887',CadetBlue:'#5F9EA0',Chartreuse:'#7FFF00',Chocolate:'#D2691E',Coral:'#FF7F50',CornflowerBlue:'#6495ED',Cornsilk:'#FFF8DC',Crimson:'#DC143C',Cyan:'#00FFFF',DarkBlue:'#00008B',DarkCyan:'#008B8B',DarkGoldenRod:'#B8860B',DarkGray:'#A9A9A9',DarkGrey:'#A9A9A9',DarkGreen:'#006400',DarkKhaki:'#BDB76B',DarkMagenta:'#8B008B',DarkOliveGreen:'#556B2F',Darkorange:'#FF8C00',DarkOrchid:'#9932CC',DarkRed:'#8B0000',DarkSalmon:'#E9967A',DarkSeaGreen:'#8FBC8F',DarkSlateBlue:'#483D8B',DarkSlateGray:'#2F4F4F',DarkSlateGrey:'#2F4F4F',DarkTurquoise:'#00CED1',DarkViolet:'#9400D3',DeepPink:'#FF1493',DeepSkyBlue:'#00BFFF',DimGray:'#696969',DimGrey:'#696969',DodgerBlue:'#1E90FF',FireBrick:'#B22222',FloralWhite:'#FFFAF0',ForestGreen:'#228B22',Fuchsia:'#FF00FF',Gainsboro:'#DCDCDC',GhostWhite:'#F8F8FF',Gold:'#FFD700',GoldenRod:'#DAA520',Gray:'#808080',Grey:'#808080',Green:'#008000',GreenYellow:'#ADFF2F',HoneyDew:'#F0FFF0',HotPink:'#FF69B4',IndianRed:'#CD5C5C',Indigo:'#4B0082',Ivory:'#FFFFF0',Khaki:'#F0E68C',Lavender:'#E6E6FA',LavenderBlush:'#FFF0F5',LawnGreen:'#7CFC00',LemonChiffon:'#FFFACD',LightBlue:'#ADD8E6',LightCoral:'#F08080',LightCyan:'#E0FFFF',LightGoldenRodYellow:'#FAFAD2',LightGray:'#D3D3D3',LightGrey:'#D3D3D3',LightGreen:'#90EE90',LightPink:'#FFB6C1',LightSalmon:'#FFA07A',LightSeaGreen:'#20B2AA',LightSkyBlue:'#87CEFA',LightSlateGray:'#778899',LightSlateGrey:'#778899',LightSteelBlue:'#B0C4DE',LightYellow:'#FFFFE0',Lime:'#00FF00',LimeGreen:'#32CD32',Linen:'#FAF0E6',Magenta:'#FF00FF',Maroon:'#800000',MediumAquaMarine:'#66CDAA',MediumBlue:'#0000CD',MediumOrchid:'#BA55D3',MediumPurple:'#9370D8',MediumSeaGreen:'#3CB371',MediumSlateBlue:'#7B68EE',MediumSpringGreen:'#00FA9A',MediumTurquoise:'#48D1CC',MediumVioletRed:'#C71585',MidnightBlue:'#191970',MintCream:'#F5FFFA',MistyRose:'#FFE4E1',Moccasin:'#FFE4B5',NavajoWhite:'#FFDEAD',Navy:'#000080',OldLace:'#FDF5E6',Olive:'#808000',OliveDrab:'#6B8E23',Orange:'#FFA500',OrangeRed:'#FF4500',Orchid:'#DA70D6',PaleGoldenRod:'#EEE8AA',PaleGreen:'#98FB98',PaleTurquoise:'#AFEEEE',PaleVioletRed:'#D87093',PapayaWhip:'#FFEFD5',PeachPuff:'#FFDAB9',Peru:'#CD853F',Pink:'#FFC0CB',Plum:'#DDA0DD',PowderBlue:'#B0E0E6',Purple:'#800080',Red:'#FF0000',RosyBrown:'#BC8F8F',RoyalBlue:'#4169E1',SaddleBrown:'#8B4513',Salmon:'#FA8072',SandyBrown:'#F4A460',SeaGreen:'#2E8B57',SeaShell:'#FFF5EE',Sienna:'#A0522D',Silver:'#C0C0C0',SkyBlue:'#87CEEB',SlateBlue:'#6A5ACD',SlateGray:'#708090',SlateGrey:'#708090',Snow:'#FFFAFA',SpringGreen:'#00FF7F',SteelBlue:'#4682B4',Tan:'#D2B48C',Teal:'#008080',Thistle:'#D8BFD8',Tomato:'#FF6347',Turquoise:'#40E0D0',Violet:'#EE82EE',Wheat:'#F5DEB3',White:'#FFFFFF',WhiteSmoke:'#F5F5F5',Yellow:'#FFFF00',YellowGreen:'#9ACD32'};var ViewPort={_onOpen:[],_onClose:[],animation:true,config:{},opacity:0.5,effect:null,time:0.2,init:function(c){if(!I('aidajs_viewport')){ViewPort.config=c||{};APPS_LAYER.before(['div',{style:{backgroundColor:'#000000',color:'#FFFFFF',width:'100%',position:'absolute',top:'0px',left:'0px',display:'none',zIndex:'25',opacity:'0'},id:'aidajs_viewport',onclick:function(){ViewPort.close()}}]);ViewPort.setSizes();Event.add(window,'resize',ViewPort.setSizes)}},setStyle:function(o){ViewPort.init();I('aidajs_viewport').css(o);var v;if((v=o.opacity)){this.opacity=v}},setSizes:function(){I('aidajs_viewport').style.height=Env.pageHeight()+'px'},open:function(e){ViewPort.init();var c=ViewPort.config,a=ViewPort._onOpen,v=I('aidajs_viewport');if(!v.hasClass('open')){ViewPort.setSizes();if(this.animation){v.morph({styles:{opacity:[0,(this.opacity||0.5)],display:['block','block']},time:(this.time||0.2),effect:this.effect,fps:20,stop:true})}else{v.css({opacity:(this.opacity||0.5),display:'block'})}a.each(function(f){f[0].call(f[1],e)});v.addClass('open')}},close:function(e){ViewPort.init();var c=ViewPort.config,a=ViewPort._onClose,v=I('aidajs_viewport');if(v.hasClass('open')){$('input, textarea, select, button').each(function(o){if(!o.into(APPS_LAYER)){o.css(o._viewport)}});if(this.animation){v.morph({styles:{opacity:[ACTUAL,0],display:['block','none']},time:(this.time||0.2),effect:this.effect,fps:20,stop:true})}else{v.css({opacity:0,display:'none'})}a.each(function(f){f[0].call(f[1],e)});v.removeClass('open')}},addOpenEvent:function(e,b){ViewPort._onOpen.push([e,b||null])},addCloseEvent:function(e,b){ViewPort._onClose.push([e,b||null])}};var Bezier={lerp:function(a,b,t){var ax=a.x,ay=a.y;return{x:ax+(b.x-ax)*t,y:ay+(b.y-ay)*t}},bezier:function(pt,t){var g=[],i,l=pt.length-1;for(i=0;i<l;i++){g[i]=Bezier.lerp(pt[i],pt[i+1],t)}if(g.length>1){g=Bezier.bezier(g,t)}return g},main:function(pt,ts){var r=[],i,t;for(i=0;i<ts;i++){t=i/(ts-1);r[i]=Bezier.bezier(pt,t)[0]}return r}};var ACTUAL='actual',ORIGINAL='original';(function(){var morphInit=function(element){var morph=Storage.retrieveData(element,'morph'),next;if(morph){next=morph.paused.shift()}else{morph={originals:{},paused:[],cache:[]};Storage.storeData(element,'morph',morph)}morph.wait=null;morph.animation=null;morph.animated=false;morph.locked=false;morph.loop=null;if(next){element.morph(next)}return element},morphCore=function(element,options){var mor=Storage.retrieveData(element,'morph'),styles=options.styles||options.style,style,styleName,styleLength,fps=options.fps||35,frameTime=1000/fps,totalFrames=Math.round((options.time||1)*fps), lastFrame=totalFrames,globalEffect=options.effect||Effects.linear,styleEffect,wait=(options.wait||0)*1000,unit,actualStyle,originalStyle,parsedStyles={},styleType,c=['in','cm','mm','pt','pc','em','ex','px','deg','%'];for(styleName in styles){style=((style=styles[styleName]).constructor!=Array)?[style]:style.copy();actualStyle=element.css(styleName);originalStyle=!is(originalStyle=mor.originals[styleName])?(mor.originals[styleName]=actualStyle):originalStyle;style=style.replace(ACTUAL,actualStyle).replace(ORIGINAL,originalStyle);styleEffect=(typeof style[0]=='function')?style.shift():globalEffect;unit=(c.has(style[0]))?style.shift():'';styleLength=style.length;if(styleName.toLowerCase().has('color')){if(styleLength<2){style=[actualStyle].concat(style);styleLength=2}styleType=1}else if(unit||typeof style[0]=='number'){if(styleLength<2){style=[(actualStyle+'').cleanSize()].concat(style);styleLength=2}styleType=2}else{if(styleLength<2){style=[style[0],style[0]];styleLength=2}styleType=3}parsedStyles[styleName]=[styleType,styleEffect,unit,styleLength,totalFrames/(styleLength-1),style]}mor.wait=setTimeout(function(){var eFu=Function.empty,oSt=options.onStart||eFu,oFi=options.onFinish||eFu,oCh=options.onChange||eFu,oFr=options.onFrame||eFu,frame=0,animation,g,lastStyles={},changedStyles={},newValue,ii,jj,ss,ff,changed=false,stepFrames,styleSteps,frameFunc=function(){if(frame===0){oSt.call(element,changedStyles,frame,totalFrames)}if(changed){element.css(changedStyles);oCh.call(element,changedStyles,frame,totalFrames)}oFr.call(element,changedStyles,frame,totalFrames);if(frame==lastFrame){morphInit(element);clearInterval(animation);oFi.call(element,changedStyles,frame,totalFrames);parsedStyles=lastStyles=changedStyles=element=options=styles=mor=frameFunc=cleanUnit=oSt=oFr=oCh=oFi=void 0}frame++;changedStyles={};changed=false},cleanUnit=function(newValue,unit){if(!isNaN(newValue)){switch(unit){case'em':case'':case'%':newValue=Math.floor(newValue*100)/100;break;default:newValue=Math.floor(newValue);break}return newValue+unit}return false};for(styleName in parsedStyles){style=parsedStyles[styleName];newValue=style[5][0];switch(style[0]){case 1:changedStyles[styleName]=lastStyles[styleName]=new Color(newValue).hex();break;case 2:newValue=cleanUnit(parseFloat(newValue,10),style[2]);if((newValue||newValue===0)){changedStyles[styleName]=lastStyles[styleName]=newValue}break;case 3:changedStyles[styleName]=lastStyles[styleName]=newValue;break}}changed=true;frameFunc();mor.animation=animation=setInterval(function(){for(styleName in parsedStyles){style=parsedStyles[styleName];styleEffect=style[1];stepFrames=style[4];styleSteps=style[5];switch(frame){case lastFrame:newValue=style[5][style[3]-1];switch(style[0]){case 1:changedStyles[styleName]=lastStyles[styleName]=new Color(newValue).hex();break;case 2:newValue=cleanUnit(parseFloat(newValue,10),style[2]);if((newValue||newValue===0)){changedStyles[styleName]=lastStyles[styleName]=newValue}break;case 3:changedStyles[styleName]=lastStyles[styleName]=newValue;break}changed=true;break;default:switch(style[0]){case 1:ii=Math.floor(frame/stepFrames);jj=frame%stepFrames;g=ii>0?stepFrames:stepFrames-1;if(ii>0){jj+=1}ss=new Color(styleSteps[ii]);s0=ss.red;s1=ss.green;s2=ss.blue;ff=new Color(styleSteps[ii+1]);f0=ff.red;f1=ff.green;f2=ff.blue;newValue=(new Color([Math.floor(styleEffect(jj,s0,(f0-s0),g)),Math.floor(styleEffect(jj,s1,(f1-s1),g)),Math.floor(styleEffect(jj,s2,(f2-s2),g))])).rgb();if(newValue!==lastStyles[styleName]){changedStyles[styleName]=lastStyles[styleName]=newValue;changed=true}break;case 2:ii=Math.floor(frame/stepFrames);jj=(frame%stepFrames);g=ii>0?stepFrames:stepFrames-1;if(ii>0){jj+=1}ss=parseFloat(styleSteps[ii],10);ff=parseFloat(styleSteps[ii+1],10);newValue=styleEffect(jj,ss,(ff-ss),g);newValue=cleanUnit(newValue,style[2]);if((newValue||newValue===0)&&newValue!==lastStyles[styleName]){changedStyles[styleName]=lastStyles[styleName]=newValue;changed=true}break;case 3:if(frame%stepFrames===0){changedStyles[styleName]=styleSteps[frame/stepFrames];changed=true}break}break}}frameFunc()},frameTime)},wait);mor.locked=options.locked;mor.animated=true},morphImplements={morph:function(options){var morph=Storage.retrieveData(this,'morph')||morphInit(this);if(options.stop){options.prority='stop'}if(morph.animated){if(options.stop&&!morph.locked){morphCore(this.stopMorph(),options)}else if(!options.cancel){morph.paused.push(options)}}else{morphCore(this,options)}options=null;return this},forceMorph:function(options){options.stop=true;return this.morph(options)},loopMorph:function(options){var onFinish=options.onFinish;options.onFinish=function(){if(onFinish){onFinish.call(this)}this.morph(options)};this.morph(options)},stopMorph:function(){var morph=Storage.retrieveData(this,'morph');if(morph){clearInterval(morph.animation);clearTimeout(morph.wait);morph.paused=[]}morphInit(this);return this},opacityUp:function(options){((options||(options={})).styles||(options.styles={})).opacity=[ACTUAL,1];return this.morph(options)},opacityDown:function(options){((options||(options={})).styles||(options.styles={})).opacity=[ACTUAL,0];return this.morph(options)},opacityShift:function(options){return this[(this.css('opacity')<0.5?'opacityUp':'opacityDown')](options)},opacityPulse:function(options){for(var opacity=[ACTUAL],i=(options||(options={})).hits||3;i>0;i--){opacity=opacity.concat([0,ACTUAL])}(options.styles||(options.styles={})).opacity=opacity;return this.morph(options)},blindInit:function(c){var s=this.style;s.overflow='hidden';s.display='block';if(is(c)){s.height=(c===true?0:c)+'px'}return this},blindUp:function(o){this.blindInit();((o||(o={})).styles||(o.styles={})).height=['px',ACTUAL,o.min||0];if(!o.effect){o.effect=Effects.outCubic}return this.morph(o)},blindDown:function(o){this.blindInit();((o||(o={})).styles||(o.styles={})).height=['px',ACTUAL,this.realHeight()];if(!o.effect){o.effect=Effects.outCubic}return this.morph(o)},blindShift:function(o){return this[(this.blindState(o)>0.5?'blindUp':'blindDown')](o)},blindState:function(o){var n=(o||{}).min||0;return(this.css('height').cleanSize()-n)/(this.realHeight()-n)},foldUp:function(o){var e=(o||(o={})).effect||Effects.outCubic,z=(o.styles||{}),t=(o.time||1)/2,n=this.css('height').cleanSize(),h=this.realHeight();this.blindInit();return this.morph({onStart:o.onStart,styles:{height:['px',ACTUAL,5]},effect:e,time:t}).morph({styles:{width:['px',ACTUAL,0],height:['px',ACTUAL,0]},onFinish:o.finish,effect:e,time:t})},drop:function(o){var s=this.css(['height','position','top']),t=s.top.cleanSize(),h=s.height.cleanSize();if(s.position!='absolute'){this.style.position='relative'}s=(o||(o={})).styles||(o.styles={});if(!o.effect){o.effect=Effects.outCubic}s.opacity=[1,0];s.top=['px',t,t+h];return this.morph(o)},vanish:function(o){var s=this.css(['width','height','marginTop','marginRight','marginBottom','marginLeft','fontSize']),w=s.width.cleanSize(true),h=s.height.cleanSize(true),f=s.fontSize.cleanSize(true);if(f[0]===0){f=[1,'em']}s=(o||(o={})).styles||(o.styles={});if(!o.effect){o.effect=Effects.outCubic}s.opacity=[1,0];s.width=[w[1],w[0],(w[0]*2)];s.height=[h[1],h[0],(h[0]*2)];s.fontSize=[f[1],f[0],(f[0]*2)];o.onFrame=function(){var s=this.css(['width','height']),z=this.style;z.marginTop=z.marginBottom=((h[0]-s.height.cleanSize())/2)+h[1];z.marginLeft=z.marginRight=((w[0]-s.width.cleanSize())/2)+w[1]};this.morph(o)},vclose:function(o){var s=this.css(['height','marginTop','marginBottom','fontSize']),n=s.height.cleanSize(),f=s.fontSize.cleanSize(true),h=this.realHeight(),z=this.style;s=(o||(o={})).styles||(o.styles={});if(!o.effect){o.effect=Effects.outCubic}this.blindInit();h=(h>n)?h:n;if(f[0]===0){f=[1,'em']}s.height=['px',h,0];o.onFrame=function(s){var a=(s.height||this.css('height')).cleanSize();z.marginTop=((h-a)/2)+'px';z.marginBottom=((h-a)/2)+'px'};this.morph(o)},colors:function(){return this.css(['backgroundColor','borderTopColor','borderRightColor','borderBottomColor','borderLeftColor','color'])}};AidaElements.implement(morphImplements);morphImplements=null})();var Effects={blend:function(){var eq=arguments,eqNum=eq.length;return function(t,b,c,d){var i=Math.min(Math.floor((t/d)*eqNum),eqNum-1);d=d/eqNum;t=t/eqNum==d?d:t%d;c=c/eqNum;b=b+(c*i);return eq[i](t,b,c,d)}},repeat:function(eq,times){times=times||2;var args=[];while(times--){args.push(eq)}return Effects.blend.apply(null,args)},linear:function(t,b,c,d){return c*t/d+b},inQuad:function(t,b,c,d){return c*(t/=d)*t+b},outQuad:function(t,b,c,d){return-c*(t/=d)*(t-2)+b},inOutQuad:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b}return-c/2*((--t)*(t-2)-1)+b},inCubic:function(t,b,c,d){return c*(t/=d)*t*t+b},outCubic:function(t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},inOutCubic:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t+b}return c/2*((t-=2)*t*t+2)+b},inQuart:function(t,b,c,d){return c*(t/=d)*t*t*t+b},outQuart:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},inOutQuart:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b}return-c/2*((t-=2)*t*t*t-2)+b},inQuint:function(t,b,c,d){return c*(t/=d)*t*t*t*t+b},outQuint:function(t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},inOutQuint:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t*t+b}return c/2*((t-=2)*t*t*t*t+2)+b},inSine:function(t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},outSine:function(t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},inOutSine:function(t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},inExpo:function(t,b,c,d){return(t===0)?b:c*Math.pow(2,10*(t/d-1))+b},outExpo:function(t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},inOutExpo:function(t,b,c,d){if(t===0){return b}if(t==d){return b+c}if((t/=d/2)<1){return c/2*Math.pow(2,10*(t-1))+b}return c/2*(-Math.pow(2,-10*--t)+2)+b},inCirc:function(t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},outCirc:function(t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},inOutCirc:function(t,b,c,d){if((t/=d/2)<1){return-c/2*(Math.sqrt(1-t*t)-1)+b}return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},inElastic:function(t,b,c,d,a,p){if(t===0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(!a){a=0}var s;if(a<Math.abs(c)){a=c;s=p/4}else{s=p/(2*Math.PI)*Math.asin(c/a)}return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},outElastic:function(t,b,c,d,a,p){if(t===0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(!a){a=0}var s;if(a<Math.abs(c)){a=c;s=p/4}else{s=p/(2*Math.PI)*Math.asin(c/a)}return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},inOutElastic:function(t,b,c,d,a,p){if(t===0){return b}if((t/=d/2)==2){return b+c}if(!p){p=d*(0.3*1.5)}if(!a){a=0}var s;if(a<Math.abs(c)){a=c;s=p/4}else{s=p/(2*Math.PI)*Math.asin(c/a)}if(t<1){return-0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b}return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b},inBack:function(t,b,c,d,s){if(s===undefined){s=1.70158}return c*(t/=d)*t*((s+1)*t-s)+b},outBack:function(t,b,c,d,s){if(s===undefined){s=1.70158}return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},inOutBack:function(t,b,c,d,s){if(s===undefined){s=1.70158}if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b}return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},inBounce:function(t,b,c,d){return c-Effects.outBounce(d-t,0,c,d)+b},outBounce:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b}},inOutBounce:function(t,b,c,d){if(t<d/2){return Effects.inBounce(t*2,0,c,d)*0.5+b}return Effects.outBounce(t*2-d,0,c,d)*0.5+c*0.5+b},circleY:function(t,b,c,d){return(c*Math.sin(t/d*2*Math.PI))+b},circleX:function(t,b,c,d){return(c*Math.cos(t/d*2*Math.PI))+b},outSpiralY:function(t,b,c,d){return((c/d*t)*Math.sin(t/d*2*Math.PI))+b},outSpiralX:function(t,b,c,d){return((c/d*t)*Math.cos(t/d*2*Math.PI))+b},inSpiralY:function(t,b,c,d){return((c/d*(d-t))*Math.sin(t/d*2*Math.PI))+b},inSpiralX:function(t,b,c,d){return((c/d*(d-t))*Math.cos(t/d*2*Math.PI))+b}},EE=Effects;(function(){var _DRAG_ACTIVE=null,_DRAG_INIT=false,_DROP_INIT=false,_DROP_DRAGGING=false,dragStore={},boxes={},dragged=null,initDropEvent=function(){if(!_DROP_INIT){Event.add(document,'mousemove',function(event){if(_DROP_DRAGGING){var p=event.mousePosition(),i,boxEl,box;for(i in boxes){box=boxes[i];boxEl=box.element;if(boxEl.at(p[0],p[1])){if(!box.focus){box.onFocusIn.call(boxEl,event);box.focus=true}else{box.onFocus.call(boxEl,event)}}else if(box.focus){box.onFocusOut.call(boxEl,event);box.focus=false}}}});_DROP_INIT=true}},drop=function(event,group){var p=event.mousePosition(),i,boxEl,box;for(i in boxes){box=boxes[i];boxEl=box.element;if(box.group==group&&boxEl.at(p[0],p[1])){box.onDrop.call(boxEl,event);box.onFocusOut.call(boxEl,event);box.focus=false;return boxEl}}return false};var initDrag=function(){Event.add(document,'mousemove',function(event){if(_DRAG_ACTIVE){if(!_DRAG_ACTIVE.disabled){var ev=event.event,x=parseInt(ev.clientX,10),y=parseInt(ev.clientY,10),oMo=_DRAG_ACTIVE.onMove,xD=x-_DRAG_ACTIVE.xS,yD=y-_DRAG_ACTIVE.yS,mD;_DRAG_ACTIVE.xS=x;_DRAG_ACTIVE.yS=y;if(oMo){var xO=_DRAG_ACTIVE.xO,xV,yO=_DRAG_ACTIVE.yO,yV;if(xO!=0){xV=_DRAG_ACTIVE.xO+xD;if((xO<0&&xV>=0)||(xO>0&&xV<=0)){xD=xV;_DRAG_ACTIVE.xO=0}else{xD=0;_DRAG_ACTIVE.xO=xV}}if(yO!=0){yV=_DRAG_ACTIVE.yO+yD;if((yO<0&&yV>=0)||(yO>0&&yV<=0)){yD=yV;_DRAG_ACTIVE.yO=0}else{yD=0;_DRAG_ACTIVE.yO=yV}}mD=Math.sqrt((xD*xD)+(yD*yD));var res=oMo.call(_DRAG_ACTIVE.element,event,xD,yD,mD)||[0,0];_DRAG_ACTIVE.xO+=res[0];_DRAG_ACTIVE.yO+=res[1]}}return event.stop()}});Event.add(document,'mouseup',function(event){if(_DRAG_ACTIVE){if(!_DRAG_ACTIVE.disabled){var oFi=_DRAG_ACTIVE.onFinish;_DRAG_ACTIVE.dragging=false;_DRAG_ACTIVE.xO=0;_DRAG_ACTIVE.yO=0;if(oFi){oFi.call(_DRAG_ACTIVE.element,event)}_DRAG_ACTIVE=null}}return event.stop()})};var dragImplements={enableDrag:function(){var drag=Storage.retrieveData(this,'drag');if(drag){drag.disabled=false}return this},disableDrag:function(){var drag=Storage.retrieveData(this,'drag');if(drag){drag.disabled=true}return this},makeDraggable:function(options){if(typeof options=='function'){options={onMove:options}}var drag={xS:0,yS:0,xO:0,yO:0,dragging:false,onStart:options.onStart,onMove:options.onMove,onFinish:options.onFinish,disabled:false,element:this};Storage.storeData(this,'drag',drag);if(!_DRAG_INIT){initDrag()}Event.add(this,'mousedown',function(event){if(!drag.disabled){var oSt=drag.onStart,ev=event.event;drag.xS=parseInt(ev.clientX,10);drag.yS=parseInt(ev.clientY,10);drag.dragging=true;if(oSt){oSt.call(this,event)}_DRAG_ACTIVE=drag}return event.stop()});this.disableSelect()},makeDropBox:function(o){initDropEvent();var m=Function.empty,group=o.group||'',id=this.getId();boxes['dropbox '+id+' '+group]={element:this,onFocus:o.onFocus||m,onFocusIn:o.onFocusIn||m,onFocusOut:o.onFocusOut||m,onDrop:o.onDrop||m,group:group,focus:false}},makeDroppable:function(o){var dragEl,boxEl,group=o.group||'',oDr=o.onDrop;this.disableSelect();this.makeDraggable({onStart:function(){var p=this.position(),s=this.sizes();dragEl=I(this.cloneNode(true));dragEl.css({position:'absolute',left:p[0]+'px',top:p[1]+'px',width:s[0]+'px',height:s[1]+'px'});APPS_LAYER.append(dragEl);_DROP_DRAGGING=true},onMove:function(e,xD,yD){var styles=dragEl.css(['left','top']);dragEl.css({left:(parseInt(styles.left,10)+xD)+'px',top:(parseInt(styles.top,10)+yD)+'px'})},onFinish:function(event){if(oDr&&(boxEl=drop(event,group))){oDr.call(this,event,boxEl)}dragEl.remove();_DROP_DRAGGING=false}})}};AidaElements.implement(dragImplements)})();function Ajax(options){this.reset();this.createRequest();Object.extend(this.options,options||{})}(function(){if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var activeXList=['Microsoft.XMLHTTP','MSXML2.XMLHTTP','MSXML2.XMLHTTP.3.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.7.0'],i=activeXList.length,activeX,activeXObj;while(i){activeX=activeXList[--i];try{activeXObj=new ActiveXObject(activeX)}catch(e){activeXObj=null}}return activeXObj}}Ajax.prototype={resetData:function(){this.xhr=null;this.GETs={};this.POSTs={};this.HEADs={};this.data=null;this.path='';this.response={text:'',XML:null,headers:{}};this.status={code:0,text:'Unknown',type:'Unknown'};this.timeout=0;this.escapeCache=true;this.escapeCacheName='_Escape_Cache_';this.encoding='utf-8';this.async=true;this.type=null},resetFunctions:function(){this.onRequest=this.onLoaded=this.onInteractive=this.onSuccess=this.onFailure=this.onFinish=this.onTimeout=this.onAbort=this.onException=Function.empty},reset:function(){this.resetFunctions();this.resetData()},createRequest:function(){var xhr=null;try{xhr=new XMLHttpRequest()}catch(e){xhr=null;this.onException(e,c)}this.xhr=xhr;return xhr?true:false},addGETparams:function(key,value){var GETs=this.GETs;if(typeof key=='object'){for(var i in key){GETs[i]=key[i]}}else{GETs[key]=value}},addPOSTparams:function(key,value){var POSTs=this.POSTs;if(typeof key=='object'){for(var i in key){POSTs[i]=key[i]}}else{POSTs[key]=value}},setHeaders:function(key,value){var HEADs=this.HEADs;if(typeof key=='object'){for(var i in key){HEADs[i]=key[i]}}else{HEADs[key]=value}},urlPath:function(url){this.path=url.split('?')[0]},urlParameters:function(url){url=url.split('?')[1];if(url){var params=url.replace('&amp;','&').split('&'),i=params.length,param,GETs=this.GETs;while(i){param=params[--i].split('=');GETs[param[0]]=param[1]}}},url:function(url){this.urlPath(url);this.urlParameters(url)},abort:function(){if(this.running){this.running=false;var xhr=this.xhr;xhr.onreadystatechange=Function.empty;xhr.abort();this.createRequest();this.onAbort()}},getHeaders:function(){var result={},headers=this.xhr.getAllResponseHeaders().split(/(\n)/gmi),i=headers.length,header;while(i){if((header=headers[--i].trim())){header=header.split(/:[\s]+/gmi);result[header[0]]=header[1]}}return result},getStatus:function(){var xhr=this.xhr,status=xhr.status,text=xhr.statusText,type;if(status){if(!text){text=Ajax.getStatusText(status)}type=Ajax.getStatusType(status)}return{code:status,text:text||'Unknown',type:type||'Unknown'}},run:function(){if(this.xhr&&!this.runnig){var self=this,response=this.response,xhr=this.xhr,timeout=this.timeout,timer,encoding=this.encoding,HEADs=this.HEADs,GETs=this.GETs,POSTs=this.POSTs,method=(this.method||this.type||'').toUpperCase(),data=this.data;if(this.escapeCache){GETs[this.escapeCacheName]=new Date().getTime()}var GETquery=Object.params(GETs),POSTquery=Object.params(POSTs)||null,url=this.path+(GETquery?'?'+GETquery:''),i;if(!method){method=POSTquery||data?'POST':'GET'}xhr.onreadystatechange=function(){if(timeout>0&&!timer){timeout=new Date().getTime()+(timeout*1000);(function(){if(new Date().getTime()>=timeout){self.abort();self.onTimeout()}else{timer=setTimeout(arguments.callee,100)}})()}switch(xhr.readyState){case 1:self.onRequest();break;case 2:self.onLoaded();break;case 3:self.onInteractive();break;case 4:if(timer){clearTimeout(timer)}var responseText,responseXML,resporseHeaders,status;responseText=response.text=xhr.responseText;responseXML=response.XML=xhr.responseXML;resporseHeaders=response.headers=self.getHeaders();self.status=status=self.getStatus();self.runnig=false;self[(status.type=='Success'?'onSuccess':'onFailure')](responseText,responseXML,resporseHeaders,status);self.onFinish(responseText,responseXML,resporseHeaders,status);var polling=self.polling;if(polling){self._pollingTimeout=setTimeout(function(){self.run()},polling*1000)}break}};HEADs['Connection']='close';HEADs['X-Ajax-Request']='AIDA-JS';HEADs['Accept']='text/javascript, text/html, application/xml, text/xml, */*';if(!HEADs['Content-type']&&method=='POST'){HEADs['Content-type']='application/x-www-form-urlencoded'+(encoding?'; charset='+encoding:'')}this.running=true;if(this.username){xhr.open(method,url,this.async,this.username,this.password)}else{xhr.open(method,url,this.async)}for(i in HEADs){try{xhr.setRequestHeader(i,HEADs[i])}catch(e){this.onException(e,i,HEADs[i])}}xhr.send(data||POSTquery)}},_pollingTimeout:null,stopPolling:function(){clearTimeout(this._pollingTimeout);this.polling=null},runPolling:function(time){this.stopPolling();this.polling=time;this.run()}};Ajax.getStatusText=function(status){switch(status){case 100:return'Continue';case 101:return'Switching Protocols';case 200:return'OK';case 201:return'Created';case 202:return'Accepted';case 203:return'Non-Authoritative Information';case 204:return'No Content';case 205:return'Reset Content';case 206:return'Partial Content';case 207:return'Multi-Status';case 300:return'Multiple Choices';case 301:return'Moved Permanently';case 302:return'Found';case 303:return'See Other';case 304:return'Not Modified';case 305:return'Use Proxy';case 306:return'Switch Proxy';case 307:return'Temporary Redirect';case 400:return'Bad Request';case 401:return'Unauthorized';case 402:return'Payment Required';case 403:return'Forbidden';case 404:return'Not Found';case 405:return'Method Not Allowed';case 406:return'Not Acceptable';case 407:return'Proxy Authentication Required';case 408:return'Request Timeout';case 409:return'Conflict';case 410:return'Gone';case 411:return'Length Required';case 412:return'Precondition Failed';case 413:return'Request Entity Too Large';case 414:return'Request-URI Too Long';case 415:return'Unsupported Media Type';case 416:return'Requested Range Not Satisfiable';case 417:return'Expectation Failed';case 449:return'Retry With';case 500:return'Internal Server Error';case 501:return'Not Implemented';case 502:return'Bad Gateway';case 503:return'Service Unavailable';case 504:return'Gateway Timeout';case 505:return'HTTP Version Not Supported';case 509:return'Bandwidth Limit Exceeded'}};Ajax.getStatusType=function(status){if(status<200){return'Informational'}if(status<300){return'Success'}if(status<400){return'Redirection'}if(status<500){return'Client Error'}if(status<600){return'Server Error'}};var ajaxCache={},historyOrigTitle='',ajaxHistory=[null],cacheKey=function(options){return[options.url,Object.params(options.get||{}),Object.params(options.post||{})].join(' ')},cacheGet=function(options){var key=cacheKey(options),result=ajaxCache[key];if(result){if(result[0]>(new Date().getTime())){return result[1]}delete ajaxCache[key]}return false},cacheAdd=function(options,result){var time=(new Date().getTime())+((options.cacheTime||Infinity)*1000),key=cacheKey(options);ajaxCache[key]=[time,result];return key},historyInit=function(){if(!I('xfa_history_frame')){BODY.innerHTML+='<div style="margin-left: -9000px">'+'<iframe src="./xframe/ajax/foo.html" id="ajax_history_frame" name="ajax_history_frame"></iframe>'+'<form id="ajax_history_form" action="./xframe/ajax/foo.html" method="get" target="ajax_history_frame">'+'<input type="hidden" name="history" id="ajax_history_input" value="none" /></form></div>';Event.add('ajax_history_frame','load',function(){var history=Dom.window('ajax_history_frame').location.search.toString().match(/.*history=([0-9]+)/i);if(history&&(history=parseInt(ajaxHistory[1],10))&&ajaxHistoryActual!=history){historyBack(history)}})}},historyBack=function(history){var historyData=ajaxHistory[history];if(historyData){ajaxHistoryActual=history;Ajax.get(historyData[0],historyData[1])}},historyAdd=function(options,result){var historyLenght=ajaxHistory.length;initHistory();I('ajax_history_input').value=historyLenght;I('ajax_history_form').submit();ajaxCache[historyLenght]=[options,result];ajaxHistoryActual=historyLenght},setTitle=function(title){if(title){if(!is(historyOrigTitle)){historyOrigTitle=document.title}document.title=title}};Ajax.get=function(options,result){var element=I(options.element||options.target),url=options.url,emptyFunc=Function.empty,onSuccess=options.onSuccess||emptyFunc,onFinish=options.onFinish||emptyFunc,cache=options.cache,history=options.history;if(history&&result){return onSuccess.apply(element,result)}if(cache&&(result=cacheGet(options))){onSuccess.apply(element,result);onFinish.apply(element,result);return}var ajax=new Ajax();Object.extend(ajax,options.options||{});ajax.url(url);ajax.addGETparams(options.get||{});ajax.addPOSTparams(options.post||{});ajax.onRequest=options.onRequest||emptyFunc;ajax.onLoaded=options.onLoaded||emptyFunc;ajax.onInteractive=options.onInteractive||emptyFunc;ajax.onAbort=options.onAbort||emptyFunc;ajax.onTimeout=options.onTimeout||emptyFunc;ajax.onFinish=onFinish;ajax.onFailure=options.onFailure||emptyFunc;ajax.onSuccess=function(){if(cache){cacheAdd(options,arguments)}if(history){historyAdd(options,arguments)}onSuccess.apply(element,arguments)};ajax.run();return ajax};Ajax.hiddenFrame=function(options){var i=(options||(options={})).id||String.uniqueId();(I(options.into)||APPS_LAYER).innerHTML+='<div style="margin-left:-9000px;overflow:hidden;height:0px;width:0px;"><iframe src="'+(options.url||'')+'" id="'+i+'" name="'+(options.name||i)+'"></iframe></div>';return I(i)}})();if(!window.JSON){window.JSON={stringify:function(o){var i,v,r,l;switch(getType(o)){case'string':var s={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};return'"'+o.replace(/["\\\x00-\x1f\x7f-\x9f]/g,function(c){return s[c]||'\\u00'+Math.floor(c.charCodeAt()/16).toString(16)+(c.charCodeAt()%16).toString(16)})+'"';case'array':case'arguments':l=o.length;r=[];for(i=0;i<l;i++){v=JSON.stringify(o[i]);if(v){r.push(v)}}return'['+r+']';case'date':var d=function(n){return n<10?'0'+n:n};return o.getUTCFullYear()+'-'+d(o.getUTCMonth()+1)+'-'+d(o.getUTCDate())+'T'+d(o.getUTCHours())+':'+d(o.getUTCMinutes())+':'+d(o.getUTCSeconds())+'Z';case'number':return isFinite(o)&&!isNaN(o)?o+'':'null';case'object':r=[];for(i in o){if((v=JSON.stringify(o[i]))){r.push(JSON.stringify(i)+':'+v)}}return'{'+r+'}';case'null':case'boolean':return o+''}return false},parse:function(string){return string&&(typeof string=='string')?eval('('+string+')'):null}}}JSON.encode=JSON.stringify;JSON.decode=JSON.parse;
