/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.4.0
build: nightly
*/
YUI.add("base-build",function(f){var c=f.Base,a=f.Lang,b="initializer",d="destructor",e;c._build=function(B,p,z,s,t,o){var u=c._build,x=u._ctor(p,o),q=u._cfg(p,o),h=u._mixCust,m=q.aggregates,g=q.custom,k=x._yuibuild.dynamic,w,v,A,j,n,y,r;if(k&&m){for(w=0,v=m.length;w<v;++w){A=m[w];if(p.hasOwnProperty(A)){x[A]=a.isArray(p[A])?[]:{};}}}for(w=0,v=z.length;w<v;w++){j=z[w];n=j.prototype;y=n[b];r=n[d];delete n[b];delete n[d];f.mix(x,j,true,null,1);h(x,j,m,g);if(y){n[b]=y;}if(r){n[d]=r;}x._yuibuild.exts.push(j);}if(s){f.mix(x.prototype,s,true);}if(t){f.mix(x,u._clean(t,m,g),true);h(x,t,m,g);}x.prototype.hasImpl=u._impl;if(k){x.NAME=B;x.prototype.constructor=x;}return x;};e=c._build;f.mix(e,{_mixCust:function(i,h,l,k){if(l){f.aggregate(i,h,true,l);}if(k){for(var g in k){if(k.hasOwnProperty(g)){k[g](g,i,h);}}}},_tmpl:function(g){function h(){h.superclass.constructor.apply(this,arguments);}f.extend(h,g);return h;},_impl:function(m){var p=this._getClasses(),o,h,g,n,q,k;for(o=0,h=p.length;o<h;o++){g=p[o];if(g._yuibuild){n=g._yuibuild.exts;q=n.length;for(k=0;k<q;k++){if(n[k]===m){return true;}}}}return false;},_ctor:function(g,h){var j=(h&&false===h.dynamic)?false:true,k=(j)?e._tmpl(g):g,i=k._yuibuild;if(!i){i=k._yuibuild={};}i.id=i.id||null;i.exts=i.exts||[];i.dynamic=j;return k;},_cfg:function(g,h){var i=[],l={},k,j=(h&&h.aggregates),n=(h&&h.custom),m=g;while(m&&m.prototype){k=m._buildCfg;if(k){if(k.aggregates){i=i.concat(k.aggregates);}if(k.custom){f.mix(l,k.custom,true);}}m=m.superclass?m.superclass.constructor:null;}if(j){i=i.concat(j);}if(n){f.mix(l,h.cfgBuild,true);}return{aggregates:i,custom:l};},_clean:function(o,n,j){var m,h,g,k=f.merge(o);for(m in j){if(k.hasOwnProperty(m)){delete k[m];}}for(h=0,g=n.length;h<g;h++){m=n[h];if(k.hasOwnProperty(m)){delete k[m];}}return k;}});c.build=function(i,g,j,h){return e(i,g,j,null,null,h);};c.create=function(g,j,i,h,k){return e(g,j,i,h,k);};c.mix=function(g,h){return e(null,g,h,null,null,{dynamic:false});};c._buildCfg={custom:{ATTRS:function(l,j,h){j.ATTRS=j.ATTRS||{};if(h.ATTRS){var i=h.ATTRS,k=j.ATTRS,g;for(g in i){if(i.hasOwnProperty(g)){k[g]=k[g]||{};f.mix(k[g],i[g],true);}}}}},aggregates:["_PLUG","_UNPLUG"]};},"3.4.0",{requires:["base-base"]});AUI.add("aui-template",function(A){var Lang=A.Lang,UA=A.UA,LString=Lang.String,isArray=Lang.isArray,isDate=Lang.isDate,isString=Lang.isString,isObject=Lang.isObject,isValue=Lang.isValue,isUndefined=Lang.isUndefined,REGEX_TPL=/<tpl\b[^>]*?((for|if|exec)="([^"]+)")*?>((?:(?=([^<]+))\5|<(?!tpl\b[^>]*>))*?)<\/tpl>/,REGEX_NEWLINE=/\r\n|\n/g,REGEX_QUOTE=/'/g,REGEX_QUOTE_ESCAPED=/\\'/g,REGEX_PREFIX_GLOBAL_REPLACE=/^(?!\$)/,REGEX_TPL_VAR=/\{([\w-.#$]+)(?:\:([\w.]*)(?:\((.*?)?\))?)?(\s?[+\-*\/]\s?[\d.+\-*\/()]+)?\}/g,REGEX_TPL_SCRIPTLET=/\{\[((?:\\\]|.|\n)*?)\]\}/g,STR_BLANK="",STR_COLON=":",STR_COMMA=",",STR_DOT=".",STR_FOR="for",STR_EXEC="exec",STR_IF="if",STR_QUOTE="'",STR_BRACE_OPEN="{",STR_BRACE_CLOSE="}",STR_PAREN_OPEN="(",STR_PAREN_CLOSE=")",STR_GLOBAL_SYMBOL="$",STR_JOIN_OPEN=STR_QUOTE+STR_COMMA,STR_JOIN_CLOSE=STR_COMMA+STR_QUOTE,STR_JOIN_GROUP_OPEN=STR_JOIN_OPEN+STR_PAREN_OPEN,STR_JOIN_GROUP_CLOSE=STR_PAREN_CLOSE+STR_JOIN_CLOSE,STR_COMPILE_TPL_ARGS="values, parent, $index, $i, $count, $last, $ns, $ans, $yns",BUFFER_HTML=["<tpl>",null,"</tpl>"],BUFFER_STR_COMPILE_SUB_TPL=[STR_JOIN_OPEN+"this._compileSubTpl(",null,STR_COMMA+STR_COMPILE_TPL_ARGS+STR_PAREN_CLOSE+STR_JOIN_CLOSE],BUFFER_COMPILED_TPL_FN=["compiledTplFn = function("+STR_COMPILE_TPL_ARGS+") { return ["+STR_QUOTE,null,STR_QUOTE+'].join("");};'],BUFFER_GLOBAL_PROP=['MAP_GLOBALS["',null,'"]'],BUFFER_VALUES_LOOKUP=['values["',null,'"]'],STR_INVOKE_METHOD_NAME_OPEN='this._invokeMethod("',STR_INVOKE_METHOD_NAME_CLOSE='"'+STR_COMMA,STR_UNDEFINED_OUT=' === undefined ? "" : ',STR_REPLACE_NEWLINE="\\n",STR_REPLACE_QUOTE="\\'",STR_VALUES="values",STR_PARENT="parent",STR_SPECIAL_I="$i",STR_SPECIAL_INDEX="$index",STR_SPECIAL_COUNT="$count",STR_SPECIAL_LAST="$last",STR_SPECIAL_ANS="$ans",STR_SPECIAL_NS="$ns",STR_SPECIAL_YNS="$yns",STR_RETURN="return ",STR_WITHVALUES="with(values){ ",STR_WITHCLOSE="; }",STR_LANGSTRING_VAR="LString.",TOKEN_TPL="AUITPL",TOKEN_TPL_LENGTH=TOKEN_TPL.length,TOKEN_PARENT_PROP=STR_PARENT+STR_DOT,TOKEN_THIS_PROP="this.",TOKEN_THIS_PROP_LENGTH=TOKEN_THIS_PROP.length,TOKEN_VALUES_PROP=STR_VALUES+STR_DOT,MAP_TPL_FN={".":new Function(STR_VALUES,STR_PARENT,STR_WITHVALUES+STR_RETURN+STR_VALUES+STR_WITHCLOSE),"..":new Function(STR_VALUES,STR_PARENT,STR_WITHVALUES+STR_RETURN+STR_PARENT+STR_WITHCLOSE)},MAP_TPL_FILTERED_TYPES={"boolean":true,"number":true,"string":true},MAP_TPL_VALUES={".":"this._getValidValues(values)","#":STR_SPECIAL_INDEX,"$index":STR_SPECIAL_INDEX,"$i":STR_SPECIAL_I,"$count":STR_SPECIAL_COUNT,"$last":STR_SPECIAL_LAST,"$ans":STR_SPECIAL_ANS,"$ns":STR_SPECIAL_NS,"$yns":STR_SPECIAL_YNS},MAP_GLOBALS={},SRC_CREATE={},AUI_NS=A.getClassName(STR_BLANK),YUI_NS=A.ClassNameManager.getClassName(STR_BLANK),_INSTANCES={};var Template=function(html,src){var instance=this;var tpl;var fromStaticCall=(src===SRC_CREATE);if(fromStaticCall||A.instanceOf(instance,Template)){if(!fromStaticCall){html=instance._parseArgs(arguments);}tpl=instance._parse(html);}else{html=Template.prototype._parseArgs(arguments);tpl=new Template(html,SRC_CREATE);}return tpl;};Template.prototype={html:function(tpl){var instance=this;var retVal=instance;if(isValue(tpl)){instance._parse(instance._parseArgs(arguments));}else{retVal=instance._html;}return retVal;},parse:function(values){var instance=this;return instance._parentTpl.compiled.call(instance,values,{},1,1,1);},render:function(values,node){var instance=this;var rendered=A.Node.create(instance.parse(values));node=node&&A.one(node);if(node){node.setContent(rendered);}return rendered;},_compile:function(tpl){var instance=this;var compiledTplFn;var fnBody=tpl.tplBody;fnBody=fnBody.replace(REGEX_NEWLINE,STR_REPLACE_NEWLINE);fnBody=fnBody.replace(REGEX_QUOTE,STR_REPLACE_QUOTE);fnBody=fnBody.replace(REGEX_TPL_VAR,instance._compileTpl);fnBody=fnBody.replace(REGEX_TPL_SCRIPTLET,instance._compileCode);BUFFER_COMPILED_TPL_FN[1]=fnBody;var body=BUFFER_COMPILED_TPL_FN.join(STR_BLANK);var $yns=instance.$yns;var $ans=instance.$ans;var $ns=instance.$ns;eval(body);tpl.compiled=function(values,parent,$index,$i,$count,$last){var buffer=[];var subTpl=STR_BLANK;var testFn=tpl.testFn;if(!testFn||testFn.call(instance,values,parent,$index,$i,$count,$last,$ns,$ans,$yns)){var subValues=values;var tplFn=tpl.tplFn;if(tplFn){subValues=tplFn.call(instance,values,parent);parent=values;}if(tplFn&&isArray(subValues)){var length=subValues.length;var execFn=tpl.execFn;for(var i=0;i<length;i++){var index=i+1;var last=(index==length);var subValue=subValues[i];buffer[buffer.length]=compiledTplFn.call(instance,subValue,parent,index,i,length,last,$ns,$ans,$yns);if(execFn){execFn.call(instance,subValues[i]);}}subTpl=buffer.join(STR_BLANK);}else{subTpl=compiledTplFn.call(instance,subValues,parent,$index,$i,$count,$last,$ns,$ans,$yns);}}return subTpl;};return instance;},_compileCode:function(match,code){return STR_JOIN_GROUP_OPEN+code.replace(REGEX_QUOTE_ESCAPED,STR_QUOTE)+STR_JOIN_GROUP_CLOSE;},_compileSubTpl:function(id,values,parent,$index,$i,$count,$last,$ns,$ans,$yns){var instance=this;var length;var tpl=instance.tpls[id];return tpl.compiled.call(instance,values,parent,$index,$i,$count,$last,$ns,$ans,$yns);},_compileTpl:function(match,name,methodName,args,math,offset,str){var compiled;if(name.indexOf(TOKEN_TPL)===0){BUFFER_STR_COMPILE_SUB_TPL[1]=name.substr(TOKEN_TPL_LENGTH);compiled=BUFFER_STR_COMPILE_SUB_TPL.join(STR_BLANK);}else{var value=MAP_TPL_VALUES[name];if(!value){if(name.indexOf(TOKEN_PARENT_PROP)===0){value=name;}else{if(name.indexOf(STR_DOT)>-1){value=TOKEN_VALUES_PROP+name;}else{if(name.indexOf(STR_GLOBAL_SYMBOL)===0&&(name in MAP_GLOBALS)){BUFFER_GLOBAL_PROP[1]=name;value=BUFFER_GLOBAL_PROP.join(STR_BLANK);}else{BUFFER_VALUES_LOOKUP[1]=name;value=BUFFER_VALUES_LOOKUP.join(STR_BLANK);}}}}if(math){value=STR_PAREN_OPEN+value+math+STR_PAREN_CLOSE;}if(methodName){args=args?STR_COMMA+args:STR_BLANK;if(methodName.indexOf(TOKEN_THIS_PROP)!==0){methodName=STR_LANGSTRING_VAR+methodName+STR_PAREN_OPEN;}else{methodName=STR_INVOKE_METHOD_NAME_OPEN+methodName.substr(TOKEN_THIS_PROP_LENGTH)+STR_INVOKE_METHOD_NAME_CLOSE;
args=STR_COMMA+STR_VALUES;}}else{args=STR_BLANK;methodName=STR_PAREN_OPEN+value+STR_UNDEFINED_OUT;}compiled=STR_JOIN_OPEN+methodName+value+args+STR_JOIN_GROUP_CLOSE;}return compiled;},_getValidValues:function(values){var instance=this;var val=STR_BLANK;if(MAP_TPL_FILTERED_TYPES[typeof values]||isDate(values)){val=values;}return val;},_invokeMethod:function(methodName,value,allValues){var instance=this;return instance[methodName](value,allValues);},_parse:function(html){var instance=this;instance._html=html;var match;var id=0;var tpls=[];BUFFER_HTML[1]=html;html=BUFFER_HTML.join(STR_BLANK);while(match=html.match(REGEX_TPL)){var testFn=null;var execFn=null;var tplFn=null;var expression=match[2];var expressionValue=match[3];if(expressionValue){if(expression==STR_FOR){tplFn=MAP_TPL_FN[expressionValue]||new Function(STR_VALUES,STR_PARENT,STR_WITHVALUES+STR_RETURN+expressionValue+STR_WITHCLOSE);}else{expressionValue=LString.unescapeEntities(expressionValue);if(expression==STR_IF){testFn=new Function(STR_VALUES,STR_PARENT,STR_SPECIAL_INDEX,STR_SPECIAL_I,STR_SPECIAL_COUNT,STR_SPECIAL_LAST,STR_SPECIAL_NS,STR_SPECIAL_ANS,STR_SPECIAL_YNS,STR_WITHVALUES+STR_RETURN+expressionValue+STR_WITHCLOSE);}else{if(expression==STR_EXEC){execFn=new Function(STR_VALUES,STR_PARENT,STR_SPECIAL_INDEX,STR_SPECIAL_I,STR_SPECIAL_COUNT,STR_SPECIAL_LAST,STR_SPECIAL_NS,STR_SPECIAL_ANS,STR_SPECIAL_YNS,STR_WITHVALUES+expressionValue+STR_WITHCLOSE);}}}}var tplBody=match[4]||STR_BLANK;html=html.replace(match[0],STR_BRACE_OPEN+TOKEN_TPL+id+STR_BRACE_CLOSE);id=tpls.push({execFn:execFn,id:id,testFn:testFn,tplBody:tplBody,tplFn:tplFn});}var lastIndex=id-1;while(id--){instance._compile(tpls[id]);}instance._parentTpl=tpls[lastIndex];instance.tpls=tpls;return instance;},_parseArgs:function(args){var instance=this;var config;var tpl=args[0];if(isArray(tpl)){if(isObject(tpl[tpl.length-1])){config=tpl.pop();}else{if(isObject(args[1])){config=args[1];}}tpl=tpl.join(STR_BLANK);}else{if(args.length>1){var buffer=[];args=A.Array(args,0,true);var length=args.length;var item;var lastItem=args[length-1];if(isObject(lastItem)){config=args.pop();}for(var i=0;i<length;i++){item=args[i];buffer.push(item);}tpl=buffer.join(STR_BLANK);}}if(config){A.mix(instance,config,true);}return tpl;},$ans:AUI_NS,$yns:YUI_NS};var TEMPLATE_PROTO=Template.prototype;TEMPLATE_PROTO.$ns=AUI_NS;var globalVar=function(key,value){var retVal=null;if(isUndefined(value)&&key){retVal=MAP_GLOBALS[key];}else{if(key){key=String(key).replace(REGEX_PREFIX_GLOBAL_REPLACE,STR_GLOBAL_SYMBOL);if(value!==null){MAP_GLOBALS[key]=value;retVal=value;}else{delete MAP_GLOBALS[key];}}}return retVal;};Template.globalVar=TEMPLATE_PROTO.globalVar=globalVar;Template._GLOBALS=MAP_GLOBALS;var NODE_PROTO=A.Node.prototype;NODE_PROTO.toTPL=function(){return Template.from(this);};NODE_PROTO.renderTPL=function(tpl,data){var instance=this;if(isString(tpl)||isArray(tpl)){tpl=new Template(tpl);}if(tpl&&data){tpl.render(instance,data);}return instance;};A.NodeList.importMethod(NODE_PROTO,["renderTPL"]);A.mix(Template,{from:function(node){node=A.one(node);var content=STR_BLANK;if(node){node=node.getDOM();var nodeName=String(node&&node.nodeName).toLowerCase();if(nodeName!="script"){content=node.value||node.innerHTML;}else{content=node.text||node.textContent||node.innerHTML;}}return new Template(content);},get:function(key){var template=_INSTANCES[key];if(template&&!A.instanceOf(template,Template)){template=new Template(template);_INSTANCES[key]=template;}return template;},parse:function(key,data){var template=Template.get(key);return template&&template.parse(data);},register:function(key,value){var instance=this;var tpl=value;if(!(key in _INSTANCES)&&(Lang.isArray(value)||A.instanceOf(value,Template))){_INSTANCES[key]=value;}return value;},render:function(key,data,node){var template=Template.get(key);return template&&template.render(data,node);},_INSTANCES:_INSTANCES});A.Template=Template;},"1.5.0",{requires:["aui-base"],skinnable:false});AUI.add("aui-carousel",function(q){var e=q.Lang,p=" ",k="carousel",C=q.getClassName,m=C(k,"item"),d=C(k,"item","active"),B=C(k,"item","transition"),b=C(k,"menu","active"),t=C(k,"menu","index"),j=C(k,"menu","item"),c=C(k,"menu","next"),i=C(k,"menu","play"),r=C(k,"menu","pause"),a=C(k,"menu","prev"),w=[j,t].join(p),g=[j,t,b].join(p),s=".",h=s+t,o=s+c,f=s+r,v=s+i,x=[v,f].join(),n=s+a,l=new q.Template("<menu>",'<li><a class="',j," ",i,'"></a></li>','<li><a class="',j," ",a,'"></a></li>','<tpl for="items">','<li><a class="',j,' {[ $i == parent.activeIndex ? "',g,'" : "',w,'" ]}">{$index}</a></li>',"</tpl>",'<li><a class="',j," ",c,'"></a></li>',"</menu>"),z=q.Widget.UI_SRC,y={src:z};var u=q.Component.create({NAME:k,ATTRS:{activeIndex:{value:0,setter:"_setActiveIndex"},animationTime:{value:0.5},intervalTime:{value:0.75},itemSelector:{value:">*"},nodeMenu:{value:null,setter:"_setNodeMenu"},nodeMenuItemSelector:{value:s+j},playing:{value:true}},prototype:{animation:null,nodeSelection:null,nodeMenu:null,initializer:function(){var A=this;A.animation=new q.Anim({duration:A.get("animationTime"),to:{opacity:1}});},renderUI:function(){var A=this;A._updateNodeSelection();A.nodeMenu=A.get("nodeMenu");A._updateMenuNodes();},bindUI:function(){var A=this;A.after({activeIndexChange:A._afterActiveIndexChange,animationTimeChange:A._afterAnimationTimeChange,itemSelectorChange:A._afterItemSelectorChange,intervalTimeChange:A._afterIntervalTimeChange,nodeMenuItemSelector:A._afterNodeMenuItemSelectorChange,playingChange:A._afterPlayingChange});A._bindMenu();if(A.get("playing")===true){A._afterPlayingChange({prevVal:false,newVal:true});}},syncUI:function(){var A=this;A._uiSetActiveIndex(A.get("activeIndex"));},item:function(D){var A=this;A.set("activeIndex",D);},next:function(){var A=this;A._updateIndexNext();},pause:function(){var A=this;A.set("playing",false);},play:function(){var A=this;A.set("playing",true);},prev:function(){var A=this;A._updateIndexPrev();},_afterActiveIndexChange:function(D){var A=this;A._uiSetActiveIndex(D.newVal,{prevVal:D.prevVal,animate:A.get("playing"),src:D.src});},_afterAnimationTimeChange:function(D){var A=this;A.animation.set("duration",D.newVal);},_afterItemSelectorChange:function(D){var A=this;A._updateNodeSelection();},_afterNodeMenuItemSelectorChange:function(D){var A=this;A.nodeMenuItemSelector=D.newVal;A._updateMenuNodes();},_afterIntervalTimeChange:function(D){var A=this;A._clearIntervalRotationTask();A._createIntervalRotationTask();},_afterPlayingChange:function(F){var A=this;var I=A.nodeMenu.one(x);var E=F.newVal;var H=r;var D=i;var G="_clearIntervalRotationTask";if(E){H=i;D=r;G="_createIntervalRotationTask";}A[G]();if(I){I.replaceClass(H,D);}},_bindMenu:function(){var A=this;var D=A.nodeMenu;var E=A.get("nodeMenuItemSelector");D.delegate("click",A._onClickDelegate,E,A);A.nodeMenuItemSelector=E;},_clearIntervalRotationTask:function(){var A=this;clearInterval(A._intervalRotationTask);},_createIndexRandom:function(){var A=this;return Math.ceil(Math.random()*A.nodeSelection.size())-1;},_createIntervalRotationTask:function(){var A=this;A._clearIntervalRotationTask();A._intervalRotationTask=setInterval(function(){A._updateIndexNext({animate:true});},A.get("intervalTime")*1000);},_onAnimationEnd:function(F,G,E,D,H){var A=this;if(E){E.removeClass(B);}G.setStyle("opacity","1");},_onAnimationStart:function(F,G,E,D,H){var A=this;G.addClass(d);if(D){D.addClass(b);}if(E){E.replaceClass(d,B);}if(H){H.removeClass(b);}},_onClickDelegate:function(E){var A=this;E.preventDefault();var F=E.currentTarget;var D;if(F.hasClass(t)){D=A._onMenuItemClick;}else{if(F.hasClass(a)){D=A._updateIndexPrev;}else{if(F.hasClass(c)){D=A._updateIndexNext;}else{if(F.test(x)){D=A._onMenuPlayClick;}}}}if(D){D.apply(A,arguments);}},_onMenuItemClick:function(E){var A=this;E.preventDefault();var D=A.menuNodes.indexOf(E.currentTarget);A.set("activeIndex",D,y);},_onMenuPlayClick:function(D){var A=this;this.set("playing",!this.get("playing"));},_renderMenu:function(){var A=this;var D=l.render({items:A.nodeSelection.getDOM(),activeIndex:A.get("activeIndex")});A.get("contentBox").appendChild(D);return D;},_setActiveIndex:function(D){var A=this;if(D=="rand"){D=A._createIndexRandom();}else{D=Math.max(Math.min(D,A.nodeSelection.size()),-1);}return D;},_setNodeMenu:function(D){var A=this;return q.one(D)||A._renderMenu();},_uiSetActiveIndex:function(E,J){var L=this;var I=null;var G=null;var M=null;var A=null;var K=L.nodeSelection.item(E);var H=L.menuNodes;var D=H.item(E);L.animation.set("node",K);if(J&&!e.isUndefined(J.prevVal)){var F=J.prevVal;K.setStyle("opacity","0");G=H.item(F);I=L.nodeSelection.item(F);I.replaceClass(d,B);L.animation.stop();}else{K.addClass(d);K.setStyle("opacity","1");}M=L.animation.on("start",function(N){L._onAnimationStart(N,K,I,D,G);M.detach();});A=L.animation.on("end",function(N){L._onAnimationEnd(N,K,I,D,G);A.detach();});if(J){if(J.animate){L.animation.run();}else{L.animation.fire("start");L.animation.fire("end");}if(J.src==z&&J.animate){L._createIntervalRotationTask();}}},_updateIndexNext:function(E){var A=this;var D=A.get("activeIndex");var G=A.nodeSelection.size();var F=D+1;if(F>(G-1)){F=0;}if(E){E.src=z;}A.set("activeIndex",F,E);},_updateIndexPrev:function(E){var A=this;var D=A.get("activeIndex");var F=D-1;if(F<0){F=A.nodeSelection.size()-1;}if(E){E.src=z;}A.set("activeIndex",F,E);},_updateMenuNodes:function(){var A=this;A.menuNodes=A.nodeMenu.all(h);},_updateNodeSelection:function(){var A=this;var D=A.get("itemSelector");var E=A.get("contentBox").all(D);E.addClass(m);A.nodeSelection=E;},_intervalRotationTask:null}});q.Carousel=u;},"1.5.0",{skinnable:true,requires:["aui-base","aui-template","anim"]});/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.4.0
build: nightly
*/
YUI.add("anim-xy",function(b){var a=Number;b.Anim.behaviors.xy={set:function(f,d,i,h,c,g,e){f._node.setXY([e(c,a(i[0]),a(h[0])-a(i[0]),g),e(c,a(i[1]),a(h[1])-a(i[1]),g)]);},get:function(c){return c._node.getXY();}};},"3.4.0",{requires:["anim-base","node-screen"]});/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.4.0
build: nightly
*/
YUI.add("anim-scroll",function(b){var a=Number;b.Anim.behaviors.scroll={set:function(f,g,i,j,k,e,h){var d=f._node,c=([h(k,a(i[0]),a(j[0])-a(i[0]),e),h(k,a(i[1]),a(j[1])-a(i[1]),e)]);if(c[0]){d.set("scrollLeft",c[0]);}if(c[1]){d.set("scrollTop",c[1]);}},get:function(d){var c=d._node;return[c.get("scrollLeft"),c.get("scrollTop")];}};},"3.4.0",{requires:["anim-base"]});/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.4.0
build: nightly
*/
YUI.add("anim-node-plugin",function(b){var a=function(c){c=(c)?b.merge(c):{};c.node=c.host;a.superclass.constructor.apply(this,arguments);};a.NAME="nodefx";a.NS="fx";b.extend(a,b.Anim);b.namespace("Plugin");b.Plugin.NodeFX=a;},"3.4.0",{requires:["node-pluginhost","anim-base"]});/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.4.0
build: nightly
*/
YUI.add("anim-easing",function(b){var a={easeNone:function(f,e,h,g){return h*f/g+e;},easeIn:function(f,e,h,g){return h*(f/=g)*f+e;},easeOut:function(f,e,h,g){return -h*(f/=g)*(f-2)+e;},easeBoth:function(f,e,h,g){if((f/=g/2)<1){return h/2*f*f+e;}return -h/2*((--f)*(f-2)-1)+e;},easeInStrong:function(f,e,h,g){return h*(f/=g)*f*f*f+e;},easeOutStrong:function(f,e,h,g){return -h*((f=f/g-1)*f*f*f-1)+e;},easeBothStrong:function(f,e,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+e;}return -h/2*((f-=2)*f*f*f-2)+e;},elasticIn:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j)===1){return e+k;}if(!i){i=j*0.3;}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}return -(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e;},elasticOut:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j)===1){return e+k;}if(!i){i=j*0.3;}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}return f*Math.pow(2,-10*g)*Math.sin((g*j-h)*(2*Math.PI)/i)+k+e;},elasticBoth:function(g,e,k,j,f,i){var h;if(g===0){return e;}if((g/=j/2)===2){return e+k;}if(!i){i=j*(0.3*1.5);}if(!f||f<Math.abs(k)){f=k;h=i/4;}else{h=i/(2*Math.PI)*Math.asin(k/f);}if(g<1){return -0.5*(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e;}return f*Math.pow(2,-10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i)*0.5+k+e;},backIn:function(f,e,i,h,g){if(g===undefined){g=1.70158;}if(f===h){f-=0.001;}return i*(f/=h)*f*((g+1)*f-g)+e;},backOut:function(f,e,i,h,g){if(typeof g==="undefined"){g=1.70158;}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+e;},backBoth:function(f,e,i,h,g){if(typeof g==="undefined"){g=1.70158;}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+e;}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+e;},bounceIn:function(f,e,h,g){return h-b.Easing.bounceOut(g-f,0,h,g)+e;},bounceOut:function(f,e,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+e;}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+e;}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+e;}}}return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+e;},bounceBoth:function(f,e,h,g){if(f<g/2){return b.Easing.bounceIn(f*2,0,h,g)*0.5+e;}return b.Easing.bounceOut(f*2-g,0,h,g)*0.5+h*0.5+e;}};b.Easing=a;},"3.4.0",{requires:["anim-base"]});/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.4.0
build: nightly
*/
YUI.add("anim-curve",function(a){a.Anim.behaviors.curve={set:function(f,c,i,h,b,g,e){i=i.slice.call(i);h=h.slice.call(h);var d=e(b,0,100,g)/100;h.unshift(i);f._node.setXY(a.Anim.getBezier(h,d));},get:function(c,b){return c._node.getXY();}};a.Anim.getBezier=function(f,e){var g=f.length;var d=[];for(var c=0;c<g;++c){d[c]=[f[c][0],f[c][1]];}for(var b=1;b<g;++b){for(c=0;c<g-b;++c){d[c][0]=(1-e)*d[c][0]+e*d[parseInt(c+1,10)][0];d[c][1]=(1-e)*d[c][1]+e*d[parseInt(c+1,10)][1];}}return[d[0][0],d[0][1]];};},"3.4.0",{requires:["anim-xy"]});/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.4.0
build: nightly
*/
YUI.add("anim-color",function(b){var a=Number;b.Anim.behaviors.color={set:function(f,d,i,h,c,g,e){i=b.Color.re_RGB.exec(b.Color.toRGB(i));h=b.Color.re_RGB.exec(b.Color.toRGB(h));if(!i||i.length<3||!h||h.length<3){b.error("invalid from or to passed to color behavior");}f._node.setStyle(d,"rgb("+[Math.floor(e(c,a(i[1]),a(h[1])-a(i[1]),g)),Math.floor(e(c,a(i[2]),a(h[2])-a(i[2]),g)),Math.floor(e(c,a(i[3]),a(h[3])-a(i[3]),g))].join(", ")+")");},get:function(d,c){var e=d._node.getComputedStyle(c);e=(e==="transparent")?"rgb(255, 255, 255)":e;return e;}};b.each(["backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],function(c,d){b.Anim.behaviors[c]=b.Anim.behaviors.color;});},"3.4.0",{requires:["anim-base"]});/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.4.0
build: nightly
*/
YUI.add("anim-base",function(b){var c="running",n="startTime",l="elapsedTime",j="start",i="tween",m="end",d="node",k="paused",o="reverse",h="iterationCount",a=Number;var f={},e;b.Anim=function(){b.Anim.superclass.constructor.apply(this,arguments);b.Anim._instances[b.stamp(this)]=this;};b.Anim.NAME="anim";b.Anim._instances={};b.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;b.Anim.DEFAULT_UNIT="px";b.Anim.DEFAULT_EASING=function(q,p,s,r){return s*q/r+p;};b.Anim._intervalTime=20;b.Anim.behaviors={left:{get:function(q,p){return q._getOffset(p);}}};b.Anim.behaviors.top=b.Anim.behaviors.left;b.Anim.DEFAULT_SETTER=function(s,t,v,w,y,r,u,x){var q=s._node,p=u(y,a(v),a(w)-a(v),r);if(t in q._node.style||t in b.DOM.CUSTOM_STYLES){x=x||"";q.setStyle(t,p+x);}else{if(q._node.attributes[t]){q.setAttribute(t,p);}else{q.set(t,p);}}};b.Anim.DEFAULT_GETTER=function(r,p){var q=r._node,s="";if(p in q._node.style||p in b.DOM.CUSTOM_STYLES){s=q.getComputedStyle(p);}else{if(q._node.attributes[p]){s=q.getAttribute(p);}else{s=q.get(p);}}return s;};b.Anim.ATTRS={node:{setter:function(p){if(p){if(typeof p=="string"||p.nodeType){p=b.one(p);}}this._node=p;if(!p){}return p;}},duration:{value:1},easing:{value:b.Anim.DEFAULT_EASING,setter:function(p){if(typeof p==="string"&&b.Easing){return b.Easing[p];}}},from:{},to:{},startTime:{value:0,readOnly:true},elapsedTime:{value:0,readOnly:true},running:{getter:function(){return !!f[b.stamp(this)];},value:false,readOnly:true},iterations:{value:1},iterationCount:{value:0,readOnly:true},direction:{value:"normal"},paused:{readOnly:true,value:false},reverse:{value:false}};b.Anim.run=function(){var q=b.Anim._instances;for(var p in q){if(q[p].run){q[p].run();}}};b.Anim.pause=function(){for(var p in f){if(f[p].pause){f[p].pause();}}b.Anim._stopTimer();};b.Anim.stop=function(){for(var p in f){if(f[p].stop){f[p].stop();}}b.Anim._stopTimer();};b.Anim._startTimer=function(){if(!e){e=setInterval(b.Anim._runFrame,b.Anim._intervalTime);}};b.Anim._stopTimer=function(){clearInterval(e);e=0;};b.Anim._runFrame=function(){var p=true;for(var q in f){if(f[q]._runFrame){p=false;f[q]._runFrame();}}if(p){b.Anim._stopTimer();}};b.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var g={run:function(){if(this.get(k)){this._resume();}else{if(!this.get(c)){this._start();}}return this;},pause:function(){if(this.get(c)){this._pause();}return this;},stop:function(p){if(this.get(c)||this.get(k)){this._end(p);}return this;},_added:false,_start:function(){this._set(n,new Date()-this.get(l));this._actualFrames=0;if(!this.get(k)){this._initAnimAttr();}f[b.stamp(this)]=this;b.Anim._startTimer();this.fire(j);},_pause:function(){this._set(n,null);this._set(k,true);delete f[b.stamp(this)];this.fire("pause");},_resume:function(){this._set(k,false);f[b.stamp(this)]=this;this._set(n,new Date()-this.get(l));b.Anim._startTimer();this.fire("resume");},_end:function(p){var q=this.get("duration")*1000;if(p){this._runAttrs(q,q,this.get(o));}this._set(n,null);this._set(l,0);this._set(k,false);delete f[b.stamp(this)];this.fire(m,{elapsed:this.get(l)});},_runFrame:function(){var u=this._runtimeAttr.duration,r=new Date()-this.get(n),q=this.get(o),p=(r>=u),s,v;this._runAttrs(r,u,q);this._actualFrames+=1;this._set(l,r);this.fire(i);if(p){this._lastFrame();}},_runAttrs:function(A,z,w){var x=this._runtimeAttr,r=b.Anim.behaviors,y=x.easing,p=z,u=false,q,s,v;if(A>=z){u=true;}if(w){A=z-A;p=0;}for(v in x){if(x[v].to){q=x[v];s=(v in r&&"set" in r[v])?r[v].set:b.Anim.DEFAULT_SETTER;if(!u){s(this,v,q.from,q.to,A,z,y,q.unit);}else{s(this,v,q.from,q.to,p,z,y,q.unit);}}}},_lastFrame:function(){var p=this.get("iterations"),q=this.get(h);q+=1;if(p==="infinite"||q<p){if(this.get("direction")==="alternate"){this.set(o,!this.get(o));}this.fire("iteration");}else{q=0;this._end();}this._set(n,new Date());this._set(h,q);},_initAnimAttr:function(){var w=this.get("from")||{},v=this.get("to")||{},p={duration:this.get("duration")*1000,easing:this.get("easing")},r=b.Anim.behaviors,u=this.get(d),t,s,q;b.each(v,function(A,y){if(typeof A==="function"){A=A.call(this,u);}s=w[y];if(s===undefined){s=(y in r&&"get" in r[y])?r[y].get(this,y):b.Anim.DEFAULT_GETTER(this,y);}else{if(typeof s==="function"){s=s.call(this,u);}}var x=b.Anim.RE_UNITS.exec(s);var z=b.Anim.RE_UNITS.exec(A);s=x?x[1]:s;q=z?z[1]:A;t=z?z[2]:x?x[2]:"";if(!t&&b.Anim.RE_DEFAULT_UNIT.test(y)){t=b.Anim.DEFAULT_UNIT;}if(!s||!q){b.error('invalid "from" or "to" for "'+y+'"',"Anim");return;}p[y]={from:s,to:q,unit:t};},this);this._runtimeAttr=p;},_getOffset:function(q){var s=this._node,t=s.getComputedStyle(q),r=(q==="left")?"getX":"getY",u=(q==="left")?"setX":"setY";if(t==="auto"){var p=s.getStyle("position");if(p==="absolute"||p==="fixed"){t=s[r]();s[u](t);}else{t=0;}}return t;},destructor:function(){delete b.Anim._instances[b.stamp(this)];}};b.extend(b.Anim,b.Base,g);},"3.4.0",{requires:["base-base","node-style"]});