if(typeof LMI==="undefined"){window.LMI={}}if(typeof DS==="undefined"){window.DS={}}(function(){function B(H,E,G){G=G||window;var D=H.indexOf(".");if(D<0){if(H in G){return G[H]}else{if(E){return(G[H]={})}}}else{var C=H.substring(0,D);var F=H.substring(D+1);if(C){if(!(C in G)&&E){G[C]={}}return B(F,E,G[C])}}return null}var A=B("LMI.Lang",true);A.getObject=B;A.extend=function(E,C){function D(){}D.prototype=C.prototype;E.prototype=new D();E.prototype.constructor=E;E.superclass=C.prototype};A.importFunctions=function(D,C){if(typeof C.ExportFunctions!="undefined"){for(var E in C.ExportFunctions){if(C.ExportFunctions.hasOwnProperty(E)){D.prototype[E]=C.ExportFunctions[E]}}}};A.useObject=function(D,C){var E=(typeof (D)==="object"?D:A.getObject(D));if(typeof (E)==="object"){C(E)}};A.forEach=function(G,F,E){var D,C;if(G.forEach){G.forEach(F,E)}else{for(D=0,C=G.length;D<C;++D){F.call(E,G[D],D,G)}}};A.filter=function(G,F){var E,D=G.length,C=[];for(E=0;E<D;++E){if(F(G[E])){C.push(G[E])}}return C};A.some=function(F,E){var D,C=F.length;for(D=0;D<C;++D){if(E(F[D])){return true}}return false};A.indexOf=function(F,E,G){G=G||0;var D=G,C=F.length;for(;D<C;++D){if(F[D]===E){return D}}return -1};A.mergeObjects=function(E,D){var C;if(E&&D){for(C in D){if(D.hasOwnProperty(C)){E[C]=D[C]}}}return E};A.removeFromArray=function(F,E,D){var C=F.slice((D||E)+1||F.length);F.length=E<0?F.length+E:E;return F.push.apply(F,C)};A.curry=function(){var C=[].slice.call(arguments),E=C.shift(),D=C.shift()||window;return function(){E.apply(D,C.concat([].slice.call(arguments)))}};A.isArray=function(C){return Object.prototype.toString.call(C)==="[object Array]"};A.isObject=function(C){return C&&(typeof C=="object"||A.isFunction(C))};A.isFunction=function(C){return typeof C=="function"}})();LMI.Event=function(){this.events={}};LMI.Event.prototype=(function(){var A={registerEvent:function(B){if(typeof this.events[B]!=="undefined"){throw ("Attempt to re-register event type: "+B)}else{this.events[B]=[]}},triggerEvent:function(D,B,E){if(typeof this.events[D]==="undefined"){throw ("Unknown event: "+D)}if(typeof B!=="object"||B===null){B={}}B.eventType=D;for(var C=0;C<this.events[D].length;++C){if(this.events[D][C](B,E)===false){return false}}return true},addListener:function(B,C){if(typeof this.events[B]==="undefined"){throw ("attempt to listen to unknown event type: "+B)}else{this.events[B].push(C)}return new LMI.Event.Token(null,B,C)},bind:function(C,F,D,B){var E=function(G,H){D.call(F,G,H,B)};return this.addListener(C,E)},removeListener:function(D,F){var C=D,E=F;if(typeof D.type!=="undefined"&&typeof D.func!=="undefined"){C=D.type;E=D.func}if(this.events[C]){for(var B=0;B<this.events[C].length;++B){if(this.events[C][B]===E){this.events[C].splice(B,1);break}}}},getListeners:function(B){return this.events[B]||[]}};return A})();LMI.Event.ExportFunctions=(function(){var A="__LMIEvents__";return{initEvents:function(){if(!this[A]){this[A]=new LMI.Event()}for(var B=0;B<arguments.length;++B){this[A].registerEvent(arguments[B])}},addEventListener:function(B,C){return this[A].addListener(B,C)},removeEventListener:function(B,C){return this[A].removeListener(B,C)},bindEvent:function(C,E,D,B){return this[A].bind(C,E,D,B)},triggerEvent:function(C,B,D){this[A].triggerEvent(C,B,D)},getListeners:function(B){return this[A].getListeners(B)}}})();LMI.Event.Token=function(C,A,B){this.elem=C;this.type=A;this.func=B};LMI.BrowserEventObject=function(C,A,B){this.event=C||A;this.el=B.element};LMI.BrowserEventObject.prototype=(function(){return{getRelatedTarget:function(){var B=this.event,A=B.relatedTarget;if(!A){if(B.type=="mouseout"){A=B.toElement}else{if(B.type=="mouseover"){A=B.fromElement}}}return A},getType:function(){return this.event.type},getKeyCode:function(){return this.event.keyCode},getCharCode:function(){return this.event.charCode},getCtrlKey:function(){return this.event.ctrlKey},getAltKey:function(){return this.event.altKey},getShiftKey:function(){return this.event.shiftKey},getMetaKey:function(){return this.event.metaKey},getMouseButton:function(){var A=this.event.button,C=LMI.Browser;if(C.browser==="Explorer"||C.browser==="Safari"){return(A>=4)?1:(A>=2)?2:0}return A},getPageX:function(){if(this.event.pageX){return this.event.pageX}if(LMI.Browser.browser==="Explorer"){if(document.documentElement&&document.documentElement.scrollLeft>0){return this.event.clientX+document.documentElement.scrollLeft}else{if(document.body&&document.body.scrollLeft>0){return this.event.clientX+document.body.scrollLeft}else{return this.event.clientX}}}else{return this.event.clientX}},getPageY:function(A){if(this.event.pageY){return this.event.pageY}if(LMI.Browser.browser==="Explorer"){if(document.documentElement&&document.documentElement.scrollTop>0){return this.event.clientY+document.documentElement.scrollTop}else{if(document.body&&document.body.scrollTop>0){return this.event.clientY+document.body.scrollTop}else{return this.event.clientY}}}else{return this.event.clientY}},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{if("returnValue" in this.event){this.event.returnValue=false}}},stopPropagation:function(){if("stopPropagation" in this.event){this.event.stopPropagation()}else{if("cancelBubble" in this.event){this.event.cancelBubble=true}}},getTarget:function(){return this.event.target?this.event.target:(this.event.srcElement?this.event.srcElement:null)},getCurrentTarget:function(){return this.event.currentTarget?this.event.currentTarget:this.el}}})();LMI.BrowserEvent=(function(){var A={addListener:function(C,B,D){if(C.addEventListener&&!(LMI.Browser.browser==="Safari"&&B==="dbclick")){C.addEventListener(B,D,false)}else{if(!C["on"+B]){C["on"+B]=function(G){if(!G){G=window.event}var F=C[B+"Handlers"];for(var E=0;E<F.length;++E){if(typeof F[E]==="function"){F[E](G)}}}}if(!C[B+"Handlers"]){C[B+"Handlers"]=[];C[B+"Handlers"].element=C}C[B+"Handlers"].push(D)}return new LMI.Event.Token(C,B,D)},removeListener:function(D,C,F){if(D.removeEventListener&&!(LMI.Browser.browser==="Safari"&&C==="dbclick")){D.removeEventListener(C,F,false)}else{var E=D[C+"Handlers"];if(E){for(var B=0;B<E.length;++B){if(E[B]===F){E.splice(B,1)}}if(E.length===0){D[C+"Handlers"]=null;D["on"+C]=null}}}},bind:function(E,C,G,D,B){var F=function(H){var I=new LMI.BrowserEventObject(H,window.event,this);D.call(G,I,B)};return A.addListener(E,C,F)},remove:function(B){A.removeListener(B.elem,B.type,B.func)},add:function(B){A.addListener(B.elem,B.type,B.func);return B},preventEvent:function(C,B){return A.addListener(C,B,LMI.BrowserEvent.killEvent)},killEvent:function(B){var C=new LMI.BrowserEventObject(B,window.event,this);C.stopPropagation();C.preventDefault()}};return A})();
/*
 * Sizzle CSS Selector Engine - v1.0
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var O=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,H=0,D=Object.prototype.toString,M=false;var B=function(d,T,a,V){a=a||[];var Q=T=T||document;if(T.nodeType!==1&&T.nodeType!==9){return[]}if(!d||typeof d!=="string"){return a}var b=[],c,Y,g,f,Z,S,R=true,W=N(T);O.lastIndex=0;while((c=O.exec(d))!==null){b.push(c[1]);if(c[2]){S=RegExp.rightContext;break}}if(b.length>1&&I.exec(d)){if(b.length===2&&E.relative[b[0]]){Y=F(b[0]+b[1],T)}else{Y=E.relative[b[0]]?[T]:B(b.shift(),T);while(b.length){d=b.shift();if(E.relative[d]){d+=b.shift()}Y=F(d,Y)}}}else{if(!V&&b.length>1&&T.nodeType===9&&!W&&E.match.ID.test(b[0])&&!E.match.ID.test(b[b.length-1])){var h=B.find(b.shift(),T,W);T=h.expr?B.filter(h.expr,h.set)[0]:h.set[0]}if(T){var h=V?{expr:b.pop(),set:A(V)}:B.find(b.pop(),b.length===1&&(b[0]==="~"||b[0]==="+")&&T.parentNode?T.parentNode:T,W);Y=h.expr?B.filter(h.expr,h.set):h.set;if(b.length>0){g=A(Y)}else{R=false}while(b.length){var U=b.pop(),X=U;if(!E.relative[U]){U=""}else{X=b.pop()}if(X==null){X=T}E.relative[U](g,X,W)}}else{g=b=[]}}if(!g){g=Y}if(!g){throw"Syntax error, unrecognized expression: "+(U||d)}if(D.call(g)==="[object Array]"){if(!R){a.push.apply(a,g)}else{if(T&&T.nodeType===1){for(var e=0;g[e]!=null;e++){if(g[e]&&(g[e]===true||g[e].nodeType===1&&G(T,g[e]))){a.push(Y[e])}}}else{for(var e=0;g[e]!=null;e++){if(g[e]&&g[e].nodeType===1){a.push(Y[e])}}}}}else{A(g,a)}if(S){B(S,Q,a,V);B.uniqueSort(a)}return a};B.uniqueSort=function(R){if(C){M=false;R.sort(C);if(M){for(var Q=1;Q<R.length;Q++){if(R[Q]===R[Q-1]){R.splice(Q--,1)}}}}};B.matches=function(Q,R){return B(Q,null,null,R)};B.find=function(X,Q,Y){var W,U;if(!X){return[]}for(var T=0,S=E.order.length;T<S;T++){var V=E.order[T],U;if((U=E.match[V].exec(X))){var R=RegExp.leftContext;if(R.substr(R.length-1)!=="\\"){U[1]=(U[1]||"").replace(/\\/g,"");W=E.find[V](U,Q,Y);if(W!=null){X=X.replace(E.match[V],"");break}}}}if(!W){W=Q.getElementsByTagName("*")}return{set:W,expr:X}};B.filter=function(a,Z,d,T){var S=a,f=[],X=Z,V,Q,W=Z&&Z[0]&&N(Z[0]);while(a&&Z.length){for(var Y in E.filter){if((V=E.match[Y].exec(a))!=null){var R=E.filter[Y],e,c;Q=false;if(X==f){f=[]}if(E.preFilter[Y]){V=E.preFilter[Y](V,X,d,f,T,W);if(!V){Q=e=true}else{if(V===true){continue}}}if(V){for(var U=0;(c=X[U])!=null;U++){if(c){e=R(c,V,U,X);var b=T^!!e;if(d&&e!=null){if(b){Q=true}else{X[U]=false}}else{if(b){f.push(c);Q=true}}}}}if(e!==undefined){if(!d){X=f}a=a.replace(E.match[Y],"");if(!Q){return[]}break}}}if(a==S){if(Q==null){throw"Syntax error, unrecognized expression: "+a}else{break}}S=a}return X};var E=B.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(Q){return Q.getAttribute("href")}},relative:{"+":function(X,Q,W){var U=typeof Q==="string",Y=U&&!/\W/.test(Q),V=U&&!Y;if(Y&&!W){Q=Q.toUpperCase()}for(var T=0,S=X.length,R;T<S;T++){if((R=X[T])){while((R=R.previousSibling)&&R.nodeType!==1){}X[T]=V||R&&R.nodeName===Q?R||false:R===Q}}if(V){B.filter(Q,X,true)}},">":function(W,R,X){var U=typeof R==="string";if(U&&!/\W/.test(R)){R=X?R:R.toUpperCase();for(var S=0,Q=W.length;S<Q;S++){var V=W[S];if(V){var T=V.parentNode;W[S]=T.nodeName===R?T:false}}}else{for(var S=0,Q=W.length;S<Q;S++){var V=W[S];if(V){W[S]=U?V.parentNode:V.parentNode===R}}if(U){B.filter(R,W,true)}}},"":function(T,R,V){var S=H++,Q=P;if(!R.match(/\W/)){var U=R=V?R:R.toUpperCase();Q=L}Q("parentNode",R,S,T,U,V)},"~":function(T,R,V){var S=H++,Q=P;if(typeof R==="string"&&!R.match(/\W/)){var U=R=V?R:R.toUpperCase();Q=L}Q("previousSibling",R,S,T,U,V)}},find:{ID:function(R,S,T){if(typeof S.getElementById!=="undefined"&&!T){var Q=S.getElementById(R[1]);return Q?[Q]:[]}},NAME:function(S,V,W){if(typeof V.getElementsByName!=="undefined"){var R=[],U=V.getElementsByName(S[1]);for(var T=0,Q=U.length;T<Q;T++){if(U[T].getAttribute("name")===S[1]){R.push(U[T])}}return R.length===0?null:R}},TAG:function(Q,R){return R.getElementsByTagName(Q[1])}},preFilter:{CLASS:function(T,R,S,Q,W,X){T=" "+T[1].replace(/\\/g,"")+" ";if(X){return T}for(var U=0,V;(V=R[U])!=null;U++){if(V){if(W^(V.className&&(" "+V.className+" ").indexOf(T)>=0)){if(!S){Q.push(V)}}else{if(S){R[U]=false}}}}return false},ID:function(Q){return Q[1].replace(/\\/g,"")},TAG:function(R,Q){for(var S=0;Q[S]===false;S++){}return Q[S]&&N(Q[S])?R[1]:R[1].toUpperCase()},CHILD:function(Q){if(Q[1]=="nth"){var R=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(Q[2]=="even"&&"2n"||Q[2]=="odd"&&"2n+1"||!/\D/.test(Q[2])&&"0n+"+Q[2]||Q[2]);Q[2]=(R[1]+(R[2]||1))-0;Q[3]=R[3]-0}Q[0]=H++;return Q},ATTR:function(U,R,S,Q,V,W){var T=U[1].replace(/\\/g,"");if(!W&&E.attrMap[T]){U[1]=E.attrMap[T]}if(U[2]==="~="){U[4]=" "+U[4]+" "}return U},PSEUDO:function(U,R,S,Q,V){if(U[1]==="not"){if(U[3].match(O).length>1||/^\w/.test(U[3])){U[3]=B(U[3],null,null,R)}else{var T=B.filter(U[3],R,S,true^V);if(!S){Q.push.apply(Q,T)}return false}}else{if(E.match.POS.test(U[0])||E.match.CHILD.test(U[0])){return true}}return U},POS:function(Q){Q.unshift(true);return Q}},filters:{enabled:function(Q){return Q.disabled===false&&Q.type!=="hidden"},disabled:function(Q){return Q.disabled===true},checked:function(Q){return Q.checked===true},selected:function(Q){Q.parentNode.selectedIndex;return Q.selected===true},parent:function(Q){return !!Q.firstChild},empty:function(Q){return !Q.firstChild},has:function(S,R,Q){return !!B(Q[3],S).length},header:function(Q){return/h\d/i.test(Q.nodeName)},text:function(Q){return"text"===Q.type},radio:function(Q){return"radio"===Q.type},checkbox:function(Q){return"checkbox"===Q.type},file:function(Q){return"file"===Q.type},password:function(Q){return"password"===Q.type},submit:function(Q){return"submit"===Q.type},image:function(Q){return"image"===Q.type},reset:function(Q){return"reset"===Q.type},button:function(Q){return"button"===Q.type||Q.nodeName.toUpperCase()==="BUTTON"},input:function(Q){return/input|select|textarea|button/i.test(Q.nodeName)}},setFilters:{first:function(R,Q){return Q===0},last:function(S,R,Q,T){return R===T.length-1},even:function(R,Q){return Q%2===0},odd:function(R,Q){return Q%2===1},lt:function(S,R,Q){return R<Q[3]-0},gt:function(S,R,Q){return R>Q[3]-0},nth:function(S,R,Q){return Q[3]-0==R},eq:function(S,R,Q){return Q[3]-0==R}},filter:{PSEUDO:function(W,S,T,X){var R=S[1],U=E.filters[R];if(U){return U(W,T,S,X)}else{if(R==="contains"){return(W.textContent||W.innerText||"").indexOf(S[3])>=0}else{if(R==="not"){var V=S[3];for(var T=0,Q=V.length;T<Q;T++){if(V[T]===W){return false}}return true}}}},CHILD:function(Q,T){var W=T[1],R=Q;switch(W){case"only":case"first":while(R=R.previousSibling){if(R.nodeType===1){return false}}if(W=="first"){return true}R=Q;case"last":while(R=R.nextSibling){if(R.nodeType===1){return false}}return true;case"nth":var S=T[2],Z=T[3];if(S==1&&Z==0){return true}var V=T[0],Y=Q.parentNode;if(Y&&(Y.sizcache!==V||!Q.nodeIndex)){var U=0;for(R=Y.firstChild;R;R=R.nextSibling){if(R.nodeType===1){R.nodeIndex=++U}}Y.sizcache=V}var X=Q.nodeIndex-Z;if(S==0){return X==0}else{return(X%S==0&&X/S>=0)}}},ID:function(R,Q){return R.nodeType===1&&R.getAttribute("id")===Q},TAG:function(R,Q){return(Q==="*"&&R.nodeType===1)||R.nodeName===Q},CLASS:function(R,Q){return(" "+(R.className||R.getAttribute("class"))+" ").indexOf(Q)>-1},ATTR:function(V,T){var S=T[1],Q=E.attrHandle[S]?E.attrHandle[S](V):V[S]!=null?V[S]:V.getAttribute(S),W=Q+"",U=T[2],R=T[4];return Q==null?U==="!=":U==="="?W===R:U==="*="?W.indexOf(R)>=0:U==="~="?(" "+W+" ").indexOf(R)>=0:!R?W&&Q!==false:U==="!="?W!=R:U==="^="?W.indexOf(R)===0:U==="$="?W.substr(W.length-R.length)===R:U==="|="?W===R||W.substr(0,R.length+1)===R+"-":false},POS:function(U,R,S,V){var Q=R[2],T=E.setFilters[Q];if(T){return T(U,S,R,V)}}}};var I=E.match.POS;for(var K in E.match){E.match[K]=new RegExp(E.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var A=function(R,Q){R=Array.prototype.slice.call(R);if(Q){Q.push.apply(Q,R);return Q}return R};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){A=function(U,T){var R=T||[];if(D.call(U)==="[object Array]"){Array.prototype.push.apply(R,U)}else{if(typeof U.length==="number"){for(var S=0,Q=U.length;S<Q;S++){R.push(U[S])}}else{for(var S=0;U[S];S++){R.push(U[S])}}}return R}}var C;if(document.documentElement.compareDocumentPosition){C=function(R,Q){var S=R.compareDocumentPosition(Q)&4?-1:R===Q?0:1;if(S===0){M=true}return S}}else{if("sourceIndex" in document.documentElement){C=function(R,Q){var S=R.sourceIndex-Q.sourceIndex;if(S===0){M=true}return S}}else{if(document.createRange){C=function(T,R){var S=T.ownerDocument.createRange(),Q=R.ownerDocument.createRange();S.selectNode(T);S.collapse(true);Q.selectNode(R);Q.collapse(true);var U=S.compareBoundaryPoints(Range.START_TO_END,Q);if(U===0){M=true}return U}}}}(function(){var R=document.createElement("div"),S="script"+(new Date).getTime();R.innerHTML="<a name='"+S+"'/>";var Q=document.documentElement;Q.insertBefore(R,Q.firstChild);if(!!document.getElementById(S)){E.find.ID=function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?T.id===U[1]||typeof T.getAttributeNode!=="undefined"&&T.getAttributeNode("id").nodeValue===U[1]?[T]:undefined:[]}};E.filter.ID=function(V,T){var U=typeof V.getAttributeNode!=="undefined"&&V.getAttributeNode("id");return V.nodeType===1&&U&&U.nodeValue===T}}Q.removeChild(R)})();(function(){var Q=document.createElement("div");Q.appendChild(document.createComment(""));if(Q.getElementsByTagName("*").length>0){E.find.TAG=function(R,V){var U=V.getElementsByTagName(R[1]);if(R[1]==="*"){var T=[];for(var S=0;U[S];S++){if(U[S].nodeType===1){T.push(U[S])}}U=T}return U}}Q.innerHTML="<a href='#'></a>";if(Q.firstChild&&typeof Q.firstChild.getAttribute!=="undefined"&&Q.firstChild.getAttribute("href")!=="#"){E.attrHandle.href=function(R){return R.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var Q=B,S=document.createElement("div");S.innerHTML="<p class='TEST'></p>";if(S.querySelectorAll&&S.querySelectorAll(".TEST").length===0){return }B=function(W,V,T,U){V=V||document;if(!U&&V.nodeType===9&&!N(V)){try{return A(V.querySelectorAll(W),T)}catch(X){}}return Q(W,V,T,U)};for(var R in Q){B[R]=Q[R]}})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var Q=document.createElement("div");Q.innerHTML="<div class='test e'></div><div class='test'></div>";if(Q.getElementsByClassName("e").length===0){return }Q.lastChild.className="e";if(Q.getElementsByClassName("e").length===1){return }E.order.splice(1,0,"CLASS");E.find.CLASS=function(R,S,T){if(typeof S.getElementsByClassName!=="undefined"&&!T){return S.getElementsByClassName(R[1])}}})()}function L(R,W,V,a,X,Z){var Y=R=="previousSibling"&&!Z;for(var T=0,S=a.length;T<S;T++){var Q=a[T];if(Q){if(Y&&Q.nodeType===1){Q.sizcache=V;Q.sizset=T}Q=Q[R];var U=false;while(Q){if(Q.sizcache===V){U=a[Q.sizset];break}if(Q.nodeType===1&&!Z){Q.sizcache=V;Q.sizset=T}if(Q.nodeName===W){U=Q;break}Q=Q[R]}a[T]=U}}}function P(R,W,V,a,X,Z){var Y=R=="previousSibling"&&!Z;for(var T=0,S=a.length;T<S;T++){var Q=a[T];if(Q){if(Y&&Q.nodeType===1){Q.sizcache=V;Q.sizset=T}Q=Q[R];var U=false;while(Q){if(Q.sizcache===V){U=a[Q.sizset];break}if(Q.nodeType===1){if(!Z){Q.sizcache=V;Q.sizset=T}if(typeof W!=="string"){if(Q===W){U=true;break}}else{if(B.filter(W,[Q]).length>0){U=Q;break}}}Q=Q[R]}a[T]=U}}}var G=document.compareDocumentPosition?function(R,Q){return R.compareDocumentPosition(Q)&16}:function(R,Q){return R!==Q&&(R.contains?R.contains(Q):true)};var N=function(Q){return Q.nodeType===9&&Q.documentElement.nodeName!=="HTML"||!!Q.ownerDocument&&Q.ownerDocument.documentElement.nodeName!=="HTML"};var F=function(Q,X){var T=[],U="",V,S=X.nodeType?[X]:X;while((V=E.match.PSEUDO.exec(Q))){U+=V[0];Q=Q.replace(E.match.PSEUDO,"")}Q=E.relative[Q]?Q+"*":Q;for(var W=0,R=S.length;W<R;W++){B(Q,S[W],T)}return B.filter(U,T)};window.Sizzle=B})();LMI.Element=(function(){var A={create:function(F,E,I){var D,B,H;I=I||{};F=F||I.elType||"text";delete I.elType;if(F==="text"){D=document.createTextNode(I.textValue)}else{if(F=="input"&&I.name){try{D=document.createElement("<input type='"+I.type+"' name='"+I.name+"'>")}catch(C){}}if(!D){D=document.createElement(F)}for(var G in I){switch(G){case"children":LMI.Lang.forEach(I[G],function(J){A.create(null,D,J)});break;case"class":case"className":LMI.Lang.forEach(I[G].split(" "),function(J){LMI.StyleSheet.addClass(D,J)});break;case"colspan":D.colSpan=I[G];break;case"textValue":D.appendChild(document.createTextNode(I[G]));break;case"src":H=I[G];break;case"maxlength":D.setAttribute("maxLength",I[G]);break;case"browserEvents":for(B in I[G]){LMI.BrowserEvent.addListener(D,B,I[G][B])}break;case"style":if(document.all&&!window.opera){D.style.cssText=I[G];break}case"type":if(navigator.userAgent.indexOf("MSIE")>=8){D.type=I[G];break}default:D.setAttribute(G,I[G])}}}if(H){A.setImageSrc(D,H)}if(E){E.appendChild(D)}return D},getAll:function(B,C){if(typeof Sizzle==="undefined"){throw new Error("Sizzle must be loaded before getAll is called")}return Sizzle(B,C)},getOne:function(D,B){var C;if(typeof Sizzle==="undefined"){throw new Error("Sizzle must be loaded before getOne is called")}if(typeof D==="string"){C=Sizzle(D,B);if(LMI.Lang.isArray(C)){return C[0]}else{return null}}else{return D}},getImageSrc:function(C){var B,D;if(LMI.Browser.browser==="Explorer"&&LMI.Browser.version<7){B="DXImageTransform.Microsoft.AlphaImageLoader";D=C.filters[B];if(D){return D.src}else{if(C){return C.src}}}else{if(C){return C.src}}return""},setAlphaImageLoader:function(C,E,B){var D=B?', sizingMethod="'+B+'"':"";C.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+E+'"'+D+")";C.src=LMI.Urls.getImg("pixel_trans.gif")},setImageSrc:function(C,D,B){if(LMI.Browser.browser==="Explorer"&&LMI.Browser.version<7){if(D.match(/\.png(;|$)/)&&!C.className.match(/notTransparent/)){A.setAlphaImageLoader(C,D,B)}else{if(C.src!=D){C.src=D}}}else{if(C){C.src=D}}},getOffsets:function(B){var C={x:0,y:0,w:B.offsetWidth,h:B.offsetHeight};while(B){C.x+=B.offsetLeft;C.y+=B.offsetTop;B=B.offsetParent}return C},createImage:function(B,K,E,I,H,D,L,G,J){var C="position: absolute;";if(typeof E!=="undefined"){C+="left:    "+E+"px;"}if(typeof I!=="undefined"){C+="top:     "+I+"px;"}if(typeof H!=="undefined"){C+="z-index: "+H+";"}var F=A.create("img",K,{galleryImg:"no",style:C,title:(J?J:""),alt:(G?G:"")});A.setImageSrc(F,B);if(D!==undefined){F.width=D}if(L!==undefined){F.height=L}return F},purgeDOMFunctions:function(C){var D,B=C.attributes;if(B){for(i=0;i<B.length;++i){D=B[i].name;if(typeof C[D]==="function"){C[D]=null}}}},walkTree:function(B,E,C){var D=B.firstChild;while(D){if(C||D.nodeType!==3){A.walkTree(D,E,C)}D=D.nextSibling}E(B)},destroy:function(B){A.walkTree(B,A.purgeDOMFunctions);if(B.parentNode){B.parentNode.removeChild(B)}},truncate:function(B){while(B&&B.firstChild){A.destroy(B.firstChild)}},changeLinkText:function(B,C){if(B&&B.firstChild&&B.firstChild.nodeValue){B.firstChild.nodeValue=C}},blink:function(C,B){if(C){if(typeof (C)!=="object"){C=A.getAll(C)}if(typeof (C)==="object"&&C!==null){if(!C instanceof Array){C=[C]}LMI.Lang.forEach(C,function(E){var D=YAHOO.util.Dom.getStyle(E,"display");if(D){E.style.display="none";if(typeof (B)!=="undefined"){window.setTimeout(function(){E.style.display=D},B)}else{E.style.display=D}}})}}}};return A})();LMI.StyleSheet=(function(){var A={getStyle:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(C,B){return document.defaultView.getComputedStyle(C,"").getPropertyValue(B)}}else{if(document.documentElement.currentStyle){return function(C,B){B=B.replace(/\-(\w)/g,function(D,E){return E.toUpperCase()});return C.currentStyle[B]}}else{return function(C,B){B=B.replace(/\-(\w)/g,function(D,E){return E.toUpperCase()});return C.style[B]}}}})(),setOpacity:function(C,B){if(typeof C.style.filter!=="undefined"){C.style.filter="alpha(opacity:"+B+")"}else{C.style.opacity=B/100}},setCursor:function(B,D){try{B.style.cursor=D}catch(C){if(D==="pointer"){B.style.cursor="hand"}}},isClass:function(D,C){if(!D){return false}var B=D.className;return(B&&B.match("\\b"+C+"\\b")==C)},addClass:function(D,B){for(var C=1;C<arguments.length;C++){if(!A.isClass(D,arguments[C])){D.className=(D.className?D.className+" "+arguments[C]:arguments[C])}}return D},removeClass:function(C,B){C.className=C.className.replace(new RegExp("\\b"+B+"\\b"),"")},editStyleValue:function(C,B,D){switch(B){case"cursor":try{C.style.cursor=D}catch(E){if(D==="pointer"){C.style.cursor="hand"}}break;default:C.style[B]=D}}};return A})();LMI.Init=(function(){var D,A=false,B=[],C={addFunction:function(G,F){F=F||50;var E=B.length-1;while(E>=0&&B[E][1]>F){--E}B.splice(E+1,0,[G,F])},init:function(){if(A){return }A=true;var F=null;for(var E=0;E<B.length;++E){try{B[E][0]()}catch(G){if(!F){F=G}}}B=null;if(F){throw (F)}}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",C.init,null)}else{if(document.all&&!window.opera){document.write('<script id="_lm_init_check" defer="true" src="//:"><\/script>');D=document.getElementById("_lm_init_check");if(D){D.onreadystatechange=function(){if(4===this.readyState){D.parentNode.removeChild(D);C.init()}}}}}return C})();window.onload=LMI.Init.init;if(typeof LMI==="undefined"){window.LMI={}}LMI.Browser=(function(){var G={},C,E=[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}],F=[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}];function A(H){var B=H.indexOf(C);if(B===-1){return null}return parseFloat(H.substring(B+C.length+1))}function D(J){for(var B=0;B<J.length;++B){var H=J[B].string;var I=J[B].prop;C=J[B].versionSearch||J[B].identity;if(H){if(H.indexOf(J[B].subString)!==-1){return J[B].identity}}else{if(I){return J[B].identity}}}return null}G.toString=function(){return"LMI.Browser{ browser='"+G.browser+"'; version='"+G.version+"'; OS='"+G.OS+"' }"};G.browser=D(F)||"An unknown browser";G.version=A(navigator.userAgent)||A(navigator.appVersion)||"an unknown version";G.OS=D(E)||"an unknown OS";return G})();LMI.XHR=(function(){var getXHRObject,msXHRClass,msxhr=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];if(window.XMLHttpRequest){getXHRObject=function(){return new XMLHttpRequest()}}else{if(window.ActiveXObject&&navigator.userAgent.indexOf("Mac")===-1){getXHRObject=function(){var i,len,xhr;if(msXHRClass){return new ActiveXObject(msXHRClass)}else{for(i=0,len=msxhr.length;i<len;++i){try{xhr=new ActiveXObject(msxhr[i]);msXHRClass=msxhr[i];return xhr}catch(ex){}}}return null}}else{getXHRObject=function(){return null}}}function getStateChangeFunc(req){return function(){var reply;if(req.xhr.readyState===4){reply=req.xhr.responseText;req.callback(eval(reply))}}}function makeXHRRequest(url,type,callback){var req={xhr:getXHRObject(),callback:callback};if(req.xhr){req.xhr.onreadystatechange=getStateChangeFunc(req);req.xhr.open(type,url,true);req.xhr.send(null)}}return{makeXHRRequest:makeXHRRequest}})();(function(){LMI.Animation=function(){this.init()};LMI.Animation.prototype={init:function(){this.thread=null;this.currentFrame=0;this.totalFrames=0;this.fps=24;this.duration=1;this.delay=1;this.initEvents("tween","end")},setDuration:function(A){this.duration=A},start:function(){if(this.thread===null){this.totalFrames=Math.ceil(this.fps*this.duration);this.currentFrame=0;this.skip=false;this.droppedFrames=0;var A=this;this.thread=setInterval(function(){A.run()},A.delay);this.start=new Date().getTime()}},stop:function(){if(this.thread!==null){clearInterval(this.thread);this.thread=null;var A=this.getEventObject();this.triggerEvent("end",A,this)}},skipToEnd:function(){this.skip=true},catchUp:function(){var E=new Date().getTime()-this.start,D=0,F=this.duration*1000,A=this.totalFrames,C=this.currentFrame;var B=A*(E/F);if(E>F||this.skip){D=A-C}else{if(B>C){D=Math.ceil(B-C)}}if(D>0){D=this.currentFrame+D<A?D:A-C;this.droppedFrames+=D;this.currentFrame+=D}},run:function(){if(this.currentFrame<this.totalFrames){this.catchUp();this.doFrame();this.currentFrame++}else{this.doFrame();this.stop()}},doFrame:function(){this.triggerEvent("tween",{currentFrame:this.currentFrame,totalFrames:this.totalFrames},this)},getEventObject:function(){return{dropped:this.droppedFrames,endedEarly:this.skip}}};LMI.Lang.importFunctions(LMI.Animation,LMI.Event)})();(function(){LMI.Animation.Motion=function(E,F,D){this.init(E,F,D)};LMI.Lang.extend(LMI.Animation.Motion,LMI.Animation);var A=LMI.Animation.Motion,B=A.prototype,C=A.superclass;B.init=function(E,F,D){C.init.call(this);this.element=E;this.startPos=F;this.endPos=D;this.easingMethod=LMI.Animation.Easing.easeOutStrong};B.setEasingMethod=function(D){this.easingMethod=D};B.doFrame=function(){var E=this.easingMethod(this.currentFrame,0,100,this.totalFrames)/100;var D=LMI.Animation.Bezier.getPosition([this.startPos,this.endPos],E);this.setProperties(D);C.doFrame.call(this)};B.setProperties=function(D){this.element.style.left=Math.floor(D.x)+"px";this.element.style.top=Math.floor(D.y)+"px"}})();(function(){LMI.Animation.Size=function(D,E,C){this.init(D,E,C)};LMI.Lang.extend(LMI.Animation.Size,LMI.Animation.Motion);var A=LMI.Animation.Size,B=A.prototype;B.setProperties=function(C){if(C.x>=0){this.element.style.width=Math.floor(C.x)+"px"}if(C.y>=0){this.element.style.height=Math.floor(C.y)+"px"}}})();(function(){LMI.Animation.Fade=function(E,F,D){this.init(E,{x:F,y:0},{x:D,y:0})};LMI.Lang.extend(LMI.Animation.Fade,LMI.Animation.Motion);var A=LMI.Animation.Fade,B=A.prototype,C=A.superclass;B.setProperties=function(D){LMI.StyleSheet.setOpacity(this.element,D.x)}})();LMI.Animation.Bezier=(function(){return{getPosition:function(E,C){var B,A,F=E.length,D=[];for(B=0;B<F;++B){D.push({x:E[B].x,y:E[B].y})}for(A=1;A<F;++A){for(B=0;B<F-A;++B){D[B].x=(1-C)*D[B].x+C*D[B+1].x;D[B].y=(1-C)*D[B].y+C*D[B+1].y}}return D[0]}}})();LMI.Animation.Easing=(function(){return{easeOut:function(B,A,D,C){return -D*(B/=C)*(B-2)+A},easeOutStrong:function(B,A,D,C){return -D*((B=B/C-1)*B*B*B-1)+A},easeBothStrong:function(B,A,D,C){if((B/=C/2)<1){return D/2*B*B*B*B+A}return -D/2*((B-=2)*B*B*B-2)+A},bounceOut:function(B,A,D,C){if((B/=C)<(1/2.75)){return D*(7.5625*B*B)+A}else{if(B<(2/2.75)){return D*(7.5625*(B-=(1.5/2.75))*B+0.75)+A}else{if(B<(2.5/2.75)){return D*(7.5625*(B-=(2.25/2.75))*B+0.9375)+A}else{return D*(7.5625*(B-=(2.625/2.75))*B+0.984375)+A}}}},elasticOut:function(C,A,G,F,B,E){if(C===0){return A}if((C/=F)==1){return A+G}if(!E){E=F*0.5}if(!B||B<Math.abs(G)){B=G;var D=E/4}else{D=E/(2*Math.PI)*Math.asin(G/B)}return B*Math.pow(2,-10*C)*Math.sin((C*F-D)*(2*Math.PI)/E)+G+A}}})();(function(){var M=LMI.StyleSheet,H=LMI.BrowserEvent,O=LMI.Element,G=O.getOne,N=O.getAll,E,D,C;origX=0,origY=0,pageName=LMI.Data.state.pageName,pageType=LMI.Data.state.pageType.toLowerCase();function L(R){var Q=R.target||R.srcElement;if(Q.nodeName==="DIV"&&Q.className.match(/\b[arrowBubble, bubble]\b/)){LMI.StyleSheet.addClass(Q,"zindexBoost")}else{if(Q.nodeName==="A"&&Q.parentNode.nodeName==="DIV"&&Q.parentNode.className.match(/\b(?:arrowBubble|bubble)\b/)){LMI.StyleSheet.addClass(Q.parentNode,"zindexBoost")}}}function F(R){var Q=R.target||R.srcElement;if(Q.nodeName==="DIV"&&Q.className.match(/\b[arrowBubble, bubble]\b/)){LMI.StyleSheet.removeClass(Q,"zindexBoost")}else{if(Q.nodeName==="A"&&Q.parentNode.nodeName==="DIV"&&Q.parentNode.className.match(/\b(?:arrowBubble|bubble)\b/)){LMI.StyleSheet.removeClass(Q.parentNode,"zindexBoost")}}}function B(){if(E.keepTime){E.keepTime=false}else{E.keepTime=true;var R,Q=N("#buzz div"),S=G("#buzz");LMI.Lang.forEach(Q,function(T){if(T){opacity=T.style.opacity;if(opacity==undefined){opacity=T.style.filter.replace(/[^\d\.]/g,"")}else{opacity*=100}R=new LMI.Animation.Fade(T,opacity,0);R.setDuration(3);R.start();M.addClass(T,"delete")}})}}function P(){if(E.keepTime){E.buzzTimer()}C=window.setTimeout(P,1000)}function I(){if(E.keepTime){E.processBuzz()}D=E.randomizeFreq(2,4)*500;C=window.setTimeout(I,D)}function K(){E=new LMI.BuzzMe();H.addListener(G("#buzz"),"mouseover",L);H.addListener(G("#buzz"),"mouseout",F);P();I()}function A(){var Q=N(".invisible");LMI.Lang.forEach(Q,function(R){if(R){M.removeClass(R,"invisible")}})}function J(Q){var T=N(".invisible"),U,R=N(".trans"),S=new LMI.BrowserEventObject(Q,window.event,this);if(navigator.userAgent.indexOf("MSIE")>=0){if(origX===0){origX=S.getPageX();origY=S.getPageY()}if(S.getPageX()!==origX||S.getPageY()!==origY){H.removeListener(G("body"),"mousemove",J);LMI.Lang.forEach(R,function(V){if(V){U=new LMI.Animation.Fade(V,0,100);U.setDuration(5);U.start()}});window.setTimeout(function(){A()},200)}}else{H.removeListener(G("body"),"mousemove",J);LMI.Lang.forEach(R,function(V){if(V){U=new LMI.Animation.Fade(V,0,100);U.setDuration(5);U.start()}})}if(pageName==="home"&&pageType==="yellow"){K()}}LMI.Init.addFunction(function(){H.addListener(G("body"),"mousemove",J);if(pageName==="home"&&pageType==="yellow"){H.addListener(G("#buzzWrapper #playpause"),"click",B)}})})();LMI.BuzzMe=(function(){var H=LMI.Element,D=H.getOne,B=H.getAll,F,A,C,E;function G(){this.buzz=null;this.activeBuzz=[];this.i=0;this.keepTime=true;this.fetchBuzz()}G.prototype={buzzTimer:function(){var K=D("#buzzWrapper #time"),I=new Date(),M,J,L,N;M=I.getHours();J=I.getMinutes();L=I.getSeconds();N=this.verifyDigits(M)+":"+this.verifyDigits(J)+":"+this.verifyDigits(L);K.innerHTML=N},verifyDigits:function(I){if(I<10){I="0"+I}return I},setBuzz:function(I){if(this.buzz===null){this.buzz=I}else{this.buzz=this.buzz.concat(I)}},setInc:function(I){this.i=I+1},randomizeFreq:function(J,I){var K,L;L=(I-J+1)*2;K=Math.floor(Math.random()*L)+J;return K},unplotBuzz:function(M){var L,J=100,N=this,K,P,I,O=document.getElementById("buzz");I=B("#buzz div");LMI.Lang.forEach(I,function(Q){if(Q){J=Q.style.opacity;if(J==undefined){J=Q.style.filter.replace(/[^\d\.]/g,"")}if(LMI.StyleSheet.isClass(Q,"delete")&&J==0){O.removeChild(Q)}}});K=this.activeBuzz[0];P=document.getElementById(this.activeBuzz[0].id);if(this.keepTime&&P){J=P.style.opacity;if(J==undefined){J=P.style.filter.replace(/[^\d\.]/g,"")}else{J*=100}L=new LMI.Animation.Fade(P,J,0);L.setDuration(3);L.start();L.addEventListener("end",function(){LMI.StyleSheet.addClass(P,"delete")})}this.activeBuzz.shift()},plotBuzz:function(){var L=D("#buzz"),P=LMI.Data.buzzmeTimeout*1000,J,K,R,S="arrowBubble",M,Q,N,O=this,T,I=LMI.Data.yellowUrl;K=this.buzz[this.i].key.toLowerCase();K=K.replace(/ /gi,"_");K=K.replace(/ç/gi,"c");K=K.replace(/é/gi,"e");K=K.replace(/ú/gi,"u");K=K.replace(/ã/gi,"a");M=K;K+="_"+this.i;this.activeBuzz.push({key:this.buzz[this.i].key,value:this.buzz[this.i].value,id:K,remove:true});N=B("#buzz ."+M);LMI.Lang.forEach(N,function(U){if(U){if(LMI.StyleSheet.isClass(U,"bubble")||LMI.StyleSheet.isClass(U,"viana_do_castelo")){U.style.display="none"}else{LMI.StyleSheet.removeClass(U,"arrowBubble");LMI.StyleSheet.addClass(U,"bubble");U.style.top=U.offsetTop-32+"px"}}});if(LMI.Browser.OS=="Mac"&&LMI.Browser.browser=="Firefox"){S+=" ffMac"}else{if(LMI.Browser.OS=="Mac"&&(LMI.Browser.browser=="Safari"||LMI.Browser.browser=="Mozilla")){S+=" webkitMac"}}R=H.create("div",L,{id:K,"class":S+" "+M,children:[{elType:"img",alt:"",src:I+"/img/spacer.gif"},{elType:"a",textValue:this.buzz[this.i].value,href:I+"/search/"+encodeURIComponent(this.buzz[this.i].key)+"/"+encodeURIComponent(this.buzz[this.i].value)+".html"}]});this.setInc(this.i);L.appendChild(R);Q=new LMI.Animation.Fade(R,0,100);Q.setDuration(2);Q.start();Q.addEventListener("end",function(){T=O;window.setTimeout(function(){return T.unplotBuzz.call(T)},P)})},processBuzz:function(){if(this.buzz!=null){if(this.i<this.buzz.length){this.plotBuzz();if(this.i>=(this.buzz.length-5)){this.fetchBuzz()}}}},fetchBuzz:function(){var I=LMI.Data.Urls.buzzmeUrl,J=this;LMI.XHR.makeXHRRequest(I,"get",function(K){J.setBuzz(K)})}};return G})();