(function(){var d=this,h=d.JUI,g=d.$,b=1,f="_JUI_"+new Date,e=JUI=d.JUI=d.$=function(i,j){if(i==d){return e.Window?new e.Window(i):d}if(e.Element){return e.Element(i,false)}return document.getElementById(i)};var a={initialize:function(o){o=o||{};var j=o.initialize;var i=o.legacy;var m=o.name||JUI.name;var l=j||i;var k=o.protect;var p=o.afterImplement||function(){};l.constructor=this.initialize;l.$family={name:m.toLowerCase()};if(i&&j){l.prototype=i.prototype}l.prototype.constructor=l;l.prototype.$family=l.$family;var q=function(u,r,v,s){if(!k||s||!u.prototype[r]){u.prototype[r]=v}p.call(u,r,v);return u};l.alias=function(u,r,v){if(typeof u=="string"){if((u=this.prototype[u])){return q(this,r,u,v)}}for(var s in u){this.alias(s,u[s],r)}return this};l.genericize=function(s,r){if(typeof s=="string"){if((!r||!this[s])&&typeof this.prototype[s]=="function"){this[s]=function(){var v=Array.prototype.slice.call(arguments);return this.prototype[s].apply(v.shift(),v)}}return}for(var u=0;u<s.length;u++){this.genericize(s[u],r)}return this};l.implement=function(s,r,v){if(typeof s=="string"){return q(this,s,r,v)}for(var u in s){q(this,u,s[u],r)}return this}},genericize:function(i,j){i&&i.genericize(j)},implement:function(k,j){var i=k.length;while(i--){k[i].implement(j)}}};e.Native=a;(function(){var j={Array:Array,Boolean:Boolean,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String,JUI:e};for(var o in j){a.initialize({name:o,initialize:j[o],protect:true})}var m={Array:["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],String:["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]};for(var l in m){for(var k=m[l].length;k--;){a.genericize(d[l],m[l])}}})();e.name="jui";e.version="1.0.2.0";e.type=function(i){if(i==undefined){return false}if(i.$family){return(i.$family.name=="number"&&!isFinite(i))?false:i.$family.name}if(i.nodeName){switch(i.nodeType){case 1:return"element";case 3:return(/\S/).test(i.nodeValue)?"textnode":"whitespace"}}else{if(typeof i.length=="number"){if(i.callee){return"arguments"}else{if(i.item){return"collection"}}}}return typeof i};e.empty=function(){};e.noConfilict=function(i){d.$=g;i&&(d.JUI=h);return this};e.extend=function(m,k){if(!k){throw"Failed! Inherit from a null object"}var i=k.prototype,l=function(){};l.prototype=i;var j=new l();m.prototype=j;j.constructor=m;m.superclass=i;if(k!=Object&&i.constructor==Object.prototype.constructor){i.constructor=k}return m};e.now=function(){return +new Date};e.getUid=(d.ActiveXObject)?function(i){return(i[f]||(i[f]=[b++]))[0]}:function(i){return i[f]||(i[f]=b++)}})();(function(b){var a=(function(){var A={},q={},o={},g={"class":"className"},e=/^(?:(?:([-]?\d*)(n{1}))?([-+]?\d*)|(odd|even))$/,z=/((?:[_a-zA-Z][\w-]*)|\*)|(?:#([\w-]+))|(?:\.([\w-]+))|(?:\[([a-z]+\w*)+([~\|\^\$\*!]?=)?['"]?([^\]]*?)["']?\])|(?::([\-\w]+)(?:\(['"]?(.+?)["']?\))*)|(?:\s*((?:[>+~\s,])|$)\s*)/g;(function(){var F=document.createElement("div"),G=(new Date()).getTime();F.innerHTML='<a name="'+G+'" class="€ b"></a>';q.qsa=!!(F.querySelectorAll&&F.querySelectorAll(".€").length)})();function E(G){var F=b.getUid(G);return(A[F])?null:(A[F]=true)}function h(F){return F.replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&")}function r(F){return{combinator:F||" ",tag:"*",id:null,classes:[],attributes:[],pseudos:[]}}function y(I){if(o[I]){return o[I]}var H=[],L=[],F,G,K,J=sli=ci=ai=pi=0;F=r();z.lastIndex=0;while(G=z.exec(I)){if(G[1]){F.tag=G[1].toUpperCase()}else{if(G[2]){F.id=G[2]}else{if(G[3]){F.classes[ci++]=G[3]}else{if(G[4]){F.attributes[ai++]={key:G[4],op:G[5],value:G[6]}}else{if(G[7]){F.pseudos[pi++]={key:G[7],value:G[8]}}else{if(G[9]){L[J++]=F;if(G[9]==","){H[sli++]=L;L=[];J=0;K=null}else{K=G[9]}F=r(K);ci=ai=pi=0}else{break}}}}}}}L[J++]=F;H[sli++]=L;return o[I]=H}var B={" ":function(G,H,J,L){var I,M,K=0,F=J.length;I=H.getElementsByTagName(G);if(L){while(M=I[K++]){M.nodeType==1&&L(M)&&(J[F++]=M)}}else{while(M=I[K++]){M.nodeType==1&&(J[F++]=M)}}return J},">":function(G,H,J){var I,L,K=0,F=J.length;I=H.getElementsByTagName(G);while(L=I[K++]){L.parentNode==H&&(J[F++]=L)}return J},"+":function(G,H,I,J){var F=I.length;while(H=H.nextSibling){if(H.nodeType==1){H.tagName==G&&J(H)&&(I[F++]=H);break}}return I},"~":function(G,H,I,J){var F=I.length;while(H=H.nextSibling){if(H.nodeType==1){if(!J(H)){break}H.tagName==G&&(I[F++]=H)}}return I}};var l={" ":function(G,F){while(G=G.parentNode){if(G==F||(F==document&&G.documentElement)){return true}}return false},">":function(G,F){return G.parentNode==F},"+":function(G,F){while(G=G.previousSibling){if(G.nodeType!=1){continue}if(G==F){return true}else{if(G.tagName==G.tagName){return false}}}return false},"~":function(G,F){while(n=n.previousSibling){if(n==F){return true}}return false}};var k={"=":function(F){return F},"~=":function(F){return new RegExp("(?:^|\\s+)"+h(F)+"(?:\\s+|$)")},"!=":function(F){return F},"^=":function(F){return new RegExp("^"+h(F))},"$=":function(F){return new RegExp(h(F)+"$")},"*=":function(F){return new RegExp(h(F))},"|=":function(F){return new RegExp("^"+h(F)+"-?")}};var u={"=":function(F,G){return F==G},"~=":function(F,G){return G.test(F)},"!=":function(F,G){return F!=G},"^=":function(F,G){return G.test(F)},"$=":function(F,G){return G.test(F)},"*=":function(F,G){return G.test(F)},"|=":function(F,G){return G.test(F)}};var s={},v={};function w(I){if(s[I]){return s[I]}var G,H,F;G=I.match(e);switch(G[4]){case"even":H=2;F=0;break;case"odd":H=2;F=1;break;default:H=parseInt(G[1],10);H=isNaN(H)?(G[2]?1:0):H;F=parseInt(G[3],10);isNaN(F)&&(F=0);break}return(s[I]={a:H,b:F})}function j(G,K,M,N){var J,H,L,F,I=1;J=b.getUid(G);H=b.getUid(G.parentNode);F=v[H]||(v[H]={});if(!F[J]){while((G=G[M])){if(G.nodeType!=1||(N&&G.tagName!=N)){continue}L=F[b.getUid(G)];if(L){I=L+I;break}I++}F[J]=I}return K.a?F[J]%K.a==K.b:K.b==F[J]}function x(I,F){var H=I;while((H=H.previousSibling)){if(H.nodeType===1&&(!F||H.tagName==F)){return false}}var G=I;while((G=G.nextSibling)){if(G.nodeType===1&&(!F||G.tagName==F)){return false}}return true}var f={root:function(F){return F===F.ownerDocument.documentElement},"nth-child":function(G,F){return(F.a==1&&!F.b)?true:j(G,F,"previousSibling",false)},"nth-last-child":function(G,F){return(F.a==1&&!F.b)?true:j(G,F,"previousSibling",false)},"nth-of-type":function(G,F){return j(G,F,"previousSibling",G.tagName)},"nth-last-of-type":function(G,F){return j(G,F,"nextSibling",G.tagName)},"first-child":function(G){var F=G.parentNode.firstChild;while(F.nodeType!=1){F=F.nextSibling}return G===F},"last-child":function(F){while((F=F.nextSibling)){if(F.nodeType===1){return false}}return true},"first-of-type":function(H){var G=H.parentNode.firstChild,F=H.tagName;while(G.nodeType!=1||G.tagName!=F){G=G.nextSibling}return H===G},"last-of-type":function(G){var F=G.tagName;while((G=G.nextSibling)){if(G.nodeType==1&&G.tagName==F){return false}}return true},"only-child":function(F){return x(F)},"only-of-type":function(F){return x(F,F.tagName)},empty:function(F){return !F.firstChild},parent:function(F){return !!F.firstChild},enabled:function(){return node.disabled===false&&node.type!=="hidden"},disabled:function(){return node.disabled===true},checked:function(F){return F.checked===true},selected:function(F){F.parentNode.selectedIndex;return F.selected===true},visible:function(F){return F.offsetWidth>0||F.offsetHeight>0},hidden:function(F){return F.offsetWidth===0||F.offsetHeight===0},not:function(F,G){return !d(F,G)},contains:function(G,F){return F.test(G.innerText||G.textContent||"")},odd:function(F){return},even:function(F){return}};f.nth=f["nth-child"];f.index=f["nth-child"];var C={t:function(F){return y(F)},n:function(F){return new RegExp(h(F))},h:function(F){return w(F)}};var p={klass:function(F,G){var L,I=0,H=[],J=0,K;K=new RegExp("(?:^|\\s+)"+h(G)+"(?:\\s+|$)");while(L=F[I++]){K.test(L.className)&&(H[J++]=L)}return H},attribute:function(G,K){var H,I=0,J=[],F=0,M,N=g[K.key]||K.key,L=/^(?:src|href|action)$/.test(N)?2:0;if(K.op){M=k[K.op](K.value);while(H=G[I++]){u[K.op](H[N]||H.getAttribute(N,L),M)&&(J[F++]=H)}}else{while(H=G[I++]){((H[N]||H.getAttribute(N,L))!=null)&&(J[F++]=H)}}return J},pseudo:function(G,H){var F=H.value,K=H.key,M,J=0,I=[],L=0;F&&(F=C[K.charAt(2)](F));while(M=G[J++]){f[K](M,F)&&(I[L++]=M)}return I}};function D(J,L){var N=[],O,M=0,Q,S=E,G=J.combinator,F=J.id,R=J.tag,I=J.classes,K=J.attributes,P=J.pseudos;if(F){var H=document.getElementById(F);if(R=="*"||H.tagName==R){while(cxt=L[M++]){if(l[G](H,cxt)){N=[H];break}}}}else{if(R){M=0;A={};if(L.length==1){S=false}while(cxt=L[M++]){N=B[G](R,cxt,N,S)}}}if(I.length>(M=0)){while(Q=I[M++]){N=p.klass(N,Q)}}if(K.length>(M=0)){while(Q=K[M++]){N=p.attribute(N,Q)}}if(P.length>(M=0)){while(Q=P[M++]){N=p.pseudo(N,Q)}}return N}function m(H,I){var G=0,F;A={};v={};while(F=H[G++]){I=D(F,I)}return I}function i(F,K){var I=[],H=0,J,G=y(F);while(J=G[H++]){if(I.length>0){I=m(J,K).concat(I)}else{I=m(J,K)}}return I}function d(K,G){var I=0,J,H,L,F;G=G[0][0];if(G.id&&G.id!=K.id){return false}if(G.classes.length>(I=0)){while(J=G.classes[I++]){if(!(new RegExp("(?:^|\\s+)"+h(J)+"(?:\\s+|$)")).test(K.className)){return false}}}if(G.attributes.length>(I=0)){while(J=G.attributes[I++]){H=g[J.key];F=/^(?:src|href|action)$/.test(H)?2:0;H=K[H]||K.getAttribute(H,F);if(J.op){if(!u[J.op](H,k[J.op](J.value))){return false}}else{if(H==null){return false}}}}if(G.pseudos.length>(I=0)){while(J=G.pseudos[I++]){(L=J.value)&&(L=C[J.key.charAt(2)](L));if(!f[J.key](K,L)){return false}}}return true}return function(F,G){if(!F||typeof F!=="string"){return[]}G=G||document;if(G.nodeType!==1&&G.nodeType!==9){return[]}if(q.qsa){try{return G.querySelectorAll(F)}catch(H){return i(F,[G])}}else{return i(F,[G])}}})();b.Selector=a})(JUI);(function(f){var l={};(function(){var p=document.createElement("div"),r="_jui_"+(new Date()).getTime(),o;p.innerHTML='   <link/><table></table><a name="'+r+'" class="€ b" href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select>';l={opacity:(typeof p.style.opacity)!=="undefined"?true:false,innerText:(typeof p.innerText)!==undefined?true:false,leadingWhitespace:p.firstChild&&p.firstChild.nodeType==3,cssFloat:!(p.style.cssFloat===undefined),cloneEvent:false,tbody:false,htmlSerialize:false};if(p.getElementsByTagName){l.tbody=!!p.getElementsByTagName("tbody").length;l.htmlSerialize=!!p.getElementsByTagName("link").length}if(p.attachEvent&&p.fireEvent){p.attachEvent("onclick",function q(){l.cloneEvent=true;p.detachEvent("onclick",q)});p.cloneNode(true).fireEvent("onclick")}})();function j(o){return o.replace(/-\D/g,function(p){return p.charAt(1).toUpperCase()})}function e(o){return o.replace(/[A-Z]/g,function(p){return("-"+p.charAt(0).toLowerCase())})}var g={"class":"className","for":"htmlFor","float":l.cssFloat?"cssFloat":"styleFloat",text:l.innerText?"innerText":"textContent"},k={left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"},i={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};(function(){var B=["Top","Right","Bottom","Left"],r="margin",o="padding",A="border",u=B.length,x;while(x=B[--u]){var z=r+x,y=o+x,w=A+x;i[r][z]=k[z]="@px";i[o][y]=k[y]="@px";i[A][w]=k[w]="@px @ rgb(@, @, @)";var s=w+"Width",v=w+"Style",q=w+"Color";i[w]={};i.borderWidth[s]=i[w][s]=k[s]="@px";i.borderStyle[v]=i[w][v]=k[v]="@";i.borderColor[q]=i[w][q]=k[q]="rgb(@, @, @)"}})();var b={compact:true,nowrap:true,ismap:true,declare:true,noshade:true,checked:true,disabled:true,readonly:true,multiple:true,selected:true,noresize:true,defer:true};var d=function(o,w){if(w!==false){if(f.type(o)!=="string"){var q=[];for(var v in o){q.push(new d(v,o[v]))}return new a(q)}var u=m(document.createElement(o));if(w){if(w.style){u.css(w.style);delete w.style}if(w.html){u.html(w.html)}}u.attr(w);return u}if(f.type(o)!=="string"){return f.type(o)=="collection"?new a(o,false):m(o)}var u,r,s=/^#([\w-]+)$/;if(s.test(o)||!f.Selector){return m(document.getElementById(o.replace("#","")))}else{r=f.Selector(o);return new a(r,false)}};var a=function(q){if(q&&q.$family!=="elements"){var o=0,u=[];while((u[o]=m(q[o++]))){}u.length--;var r=a.prototype;for(var s in r){u[s]=r[s]}q=u}return q};function m(o){if(o&&!o.$family&&!(/^object|embed$/i).test(o.tagName)){var q=d.prototype;for(var r in q){o[r]=q[r]}}return o}f.Native.initialize({name:"Element",initialize:d,protect:true,afterImplement:function(o,p){if(Array[o]){return}a.implement(o,function(){var q=[],v=true;for(var s=0,r=this.length;s<r;s++){var u=this[s][o].apply(this[s],arguments);q.push(u);if(v){v=(f.type(u)=="element")}}return(v)?new a(q,false):q})}});f.Native.initialize({name:"Elements",initialize:a,protect:true});function h(v){var w=/^<(\w+)\s*\/?>$/.exec(v);if(w){return document.createElement(w[1])}var x=[],r=[],o=document.createElement("div");v=v.replace(/(<(\w+)[^>]*?)\/>/g,function(A,B,z){return z.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?A:B+"></"+z+">"});var y=v.replace(/^\s+/,"").substring(0,10).toLowerCase();var q=!y.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!y.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||y.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!y.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!y.indexOf("<td")||!y.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!y.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!l.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];o.innerHTML=q[1]+v+q[2];while(q[0]--){o=o.lastChild}if(l.tbody){var p=/<tbody/i.test(v),u=!y.indexOf("<table")&&!p?o.firstChild&&o.firstChild.childNodes:q[1]=="<table>"&&!p?o.childNodes:[];for(var s=u.length-1;s>=0;--s){if((u[s].tagName=="TBODY")&&!u[s].childNodes.length){u[s].parentNode.removeChild(u[s])}}}if(!l.leadingWhitespace&&/^\s/.test(v)){o.insertBefore(document.createTextNode(v.match(/^\s*/)[0]),o.firstChild)}return o.firstChild}d.implement({hasClass:function(o){return(" "+this.className+" ").indexOf(" "+o+" ")>-1},addClass:function(o){if(!this.hasClass(o)){this.className=this.className===""?o:(this.className+" "+o)}return this},removeClass:function(o){this.className=this.className.replace(new RegExp("(^|\\s)"+o+"(?:\\s|$)","g"),"$1");return this},setStyle:function(s,u){if(s=="opacity"){if(l.opacity){this.style.opacity=u/100}else{this.style.filter=(this.style.filter||"").replace(/alpha\([^)]*\)/,"")+(u+""=="NaN"?"":"alpha(opacity="+u+")");this.zoom=1}return}s=g[s]||j(s);var r=f.type(u);if(r!="string"){u=(r!="array"&&r!="arguments")?[u]:u;var o=(k[s]||"@").split(" "),q=o.length,p;while(q--){p=u[q];if(!(p===0||p)){o[q]=""}else{o[q]=f.type(p)=="number"?o[q].replace("@",Math.round(p)):p}}u=o.join(" ")}else{if(u==""+Number(u)){u=Math.round(u)}}try{this.style[s]=u}catch(w){}return this},getStyle:function(r){if(r=="opacity"){if(l.opacity){return(this.style.opacity=="")?100:this.style.opacity*100}else{return this.style.filter&&this.style.filter.indexOf("opacity=")>=0?parseFloat(this.style.filter.match(/opacity=([^)]*)/)[1]):100}}r=g[r]||j(r);var o=this.style[r];if(!(o===0||o)){o=[];for(var p in i){if(r!=p){continue}for(var q in i[p]){o.push(this.getStyle(q))}return o.join(" ")}if(this.currentStyle){return this.currentStyle[r]}var u=this.getDocument().defaultView.getComputedStyle(this,null);return(u)?u.getPropertyValue([e(r)]):null}return o},css:function(o,q){if(f.type(o)=="object"){for(var r in o){this.setStyle(r,o[r])}return this}if(q===undefined){return this.getStyle(o)}else{this.setStyle(o,q);return this}},getProperty:function(o){var p=g[o]||o;var q=(this[p]===undefined)?this.getAttribute(o,2):this[p];return(b[o])?!!q:(p)?q:q||null},setProperty:function(o,r){var q=g[o]||o;if(q&&b[q]){r=!!r}var p=/href|src|style/.test(q);(q in this&&!p)?this[q]=r:this.setAttribute(o,""+r);return this},attr:function(o,q){if(f.type(o)=="object"){for(var p in o){this.setProperty(p,o[p])}return this}if(q===undefined){return this.getProperty(o)}else{this.setProperty(o,q);return this}},dimension:function(o){if(!(o===0||o)){return{width:this.offsetWidth,height:this.offsetHeight}}if(o.width!==undefined){this.css("width",o.width)}if(o.height!==undefined){this.css("height",o.height)}return this},position:function(s){if(s===undefined){if(this.parentNode===null||this.style.display=="none"){return false}if(this.getBoundingClientRect){box=this.getBoundingClientRect();var p=Math.max(document.documentElement.scrollTop,document.body.scrollTop);var q=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);return{x:box.left+q,y:box.top+p}}else{if(document.getBoxObjectFor){box=document.getBoxObjectFor(this);var o=(this.style.borderLeftWidth)?parseInt(this.style.borderLeftWidth):0;var r=(this.style.borderTopWidth)?parseInt(this.style.borderTopWidth):0;s=[box.x-o,box.y-r]}else{s=[this.offsetLeft,this.offsetTop];parent=this.offsetParent;if(parent!=this){while(parent){s[0]+=parent.offsetLeft;s[1]+=parent.offsetTop;parent=parent.offsetParent}}if(this.style.position=="absolute"){s[0]-=document.body.offsetLeft;s[1]-=document.body.offsetTop}}}if(this.parentNode){parent=this.parentNode}else{parent=null}while(parent&&parent.tagName!="BODY"&&parent.tagName!="HTML"){s[0]-=parent.scrollLeft;s[1]-=parent.scrollTop;if(parent.parentNode){parent=parent.parentNode}else{parent=null}}return{x:s[0],y:s[1],left:s[0],top:s[1]}}if(s.x!==undefined){this.css("left",s.x)}if(s.y!==undefined){this.css("top",s.y)}return this}});d.implement({getDocument:function(){return this.ownerDocument},getElement:function(o){var p=[];if(f.Selector){p=f.Selector(o,this)}else{p=this.getElementsByTagName(o)}return p[0]?new d(p[0],false):null},getElements:function(o){if(f.Selector){return new a(f.Selector(o,this),false)}else{return new a(this.getElementsByTagName(o),false)}}});d.implement({txt:function(o){if(o===undefined){return this[l.innerText?"innerText":"textContent"]}else{this.html(o.escapeHTML());return o}},html:function(o){if(o!==undefined){this.innerHTML=o}return this.innerHTML},clone:function(p){p=p!==false;if(l.cloneEvent){var o=this.outerHTML;if(!o){var q=this.ownerDocument.createElement("div");q.appendChild(this.cloneNode(p));o=q.innerHTML}return new d(h(o.replace(new RegExp(f.expando+'="(?:\d+|null)"',"g"),"").replace(/^\s*/,"")),false)}else{return new d(this.cloneNode(p),false)}},prepend:function(o){o=o.clone();if(this.firstChild){this.insertBefore(o,this.firstChild)}else{this.appendChild(o)}return this},append:function(o){this.appendChild(o.clone());return this},inject:function(o,p){if(p=="top"){this.prependTo(o)}else{this.appendTo(o)}return this},insert:function(o,p){if(p=="after"){this.after(o)}else{this.before(o)}return this},before:function(o){this.parentNode.insertBefore(o.clone(),this);return this},after:function(o){o=o.clone();var q=this.parentNode;if(this.nextSibling){q.insertBefore(o,this.nextSibling)}else{q.appendChild(o)}return this},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this},empty:function(){var p=this.childNodes,o;for(var o=p.length;o>0;o--){p[o]&&f(p[o]).destroy()}return this},destroy:function(){this.empty();this.dispose();this.removeEvents();return null}});d.alias({dispose:"remove"});f.Element=d;f.Elements=a})(JUI);(function(a){String.implement({toCamelCase:function(){return this.replace(/-\D/g,function(b){return b.charAt(1).toUpperCase()})},trim:function(b){switch(b){case"l":case"left":return this.replace(/^\s+/gm,"");case"r":case"right":return this.replace(/\s+$/gm,"");default:return this.replace(/(^\s+)|(\s+$)/gm,"")}},startsWith:function(b){return(this.indexOf(b)==0)},truncate:function(b,f){var d=0,h=[],g=this.length;for(var e=0;e<g;e++){if(this.charCodeAt(e)>255){d+=2}else{d++}if(d>b){break}}return(f&&e<g)?this.substring(0,e)+"...":this.substring(0,e)},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},escapeHTML:function(){var b=["&~&amp;","<~&lt;",">~&gt;"],f,e=this;for(var d=0;d<b.length;d++){f=b[d].split("~");e=e.replace(new RegExp(f[0],"g"),f[1])}return e},unescapeHTML:function(){var b=["&~&amp;","<~&lt;",">~&gt;"],f,e=this;for(var d=b.length-1;d>=0;d--){f=b[d].split("~");e=e.replace(new RegExp(f[1],"g"),f[0])}return e},format:function(){var d=this;for(var b=0;b<arguments.length;b++){d=d.replace(new RegExp("\\{"+b+"\\}","g"),arguments[b])}return d},formatBy:function(d,b){b=b||{};return this.replace(/\$\{([^\}]+)\}/g,function(g,e){var k=e.split(":");var j=k[0].split("|");if(j.length==1){if(j[0] in d){return k[1]?d[j[0]].truncate(parseInt(k[1])):d[j[0]]}}else{var i=j[1].trim();if((i in b)&&(j[0] in d)){var h=b[i](d[j[0]]);return k[1]?h.truncate(parseInt(k[1])):h}}return g})}})})(JUI);(function(b){var a=function(f){if(f&&!f.$family){var d=a.prototype;for(var e in d){f[e]=d[e]}}return f};b.Native.initialize({name:"Window",legacy:window.Window?window.Window:null,initialize:a,afterImplement:function(e,d){window[e]=a.prototype[e]=d}});a.implement({dimension:function(f){var e=document.documentElement.clientWidth||document.body.clientWidth||window.innerWidth,d=document.documentElement.clientHeight||document.body.clientHeight||window.innerHeight;if(f){e=f.width===undefined?e:f.width;d=f.height===undefined?d:f.height;window.resizeTo(e,d);return this}return{width:e,height:d}},scrollPos:function(f){if(f){(f.x!==undefined)&&(window.scrollLeft=f.x);(f.y!==undefined)&&(window.scrollTop=f.y);return this}var e=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop;return{x:e,y:d}}});b.Window=a})(JUI);(function(d){var e=[],a={};d.Element&&e.push(d.Element);d.Window&&e.push(d.Window);function b(f,h){var g=f.length;while(g){if(f[g--]==h){return true}}return false}d.Native.implement(e,{cache:function(f,h){var g=d.getUid(this);if(f&&!a[g]){a[g]={}}if(h!==undefined){a[g][f]=h;return h}return f?a[g][f]:g},erase:function(f){var g=d.getUid(this);if(f){if(a[g]){delete a[g][f];f="";for(f in a[g]){break}(!f)&&this.erase()}}else{delete a[g]}return this}});d.Native.implement(e,{addEvent:function(j,i,l,k){var g=this.cache("events")||this.cache("events",{});l=l?l:this;g[j]=g[j]||{keys:[],values:[]};if(!k&&b(g[j].keys,i)){return this}var h=function(m){if(d.Event){m=new d.Event(m)}i.call(l,m)};if(j=="unload"){var f=h;h=function(){self.removeListener("unload",h);f()}}if(this.addEventListener){this.addEventListener(j,h,false)}else{this.attachEvent("on"+j,h)}g[j].keys.push(i);g[j].values.push(h);return this},removeEvent:function(l,k){var j=this.cache("events");if(!j||!j[l]){return this}if(!k){var h=0,g=j[l].keys;while(k=g[h++]){this.removeEvent(l,k)}delete j[l];l="";for(l in j){break}if(!l){this.erase()}else{this.cache("events",j)}return this}var o=-1,h=0,m;while(m=j[l].keys[h]){if(m==k){o=h;break}h++}if(o==-1){return this}j[l].keys.splice(o,1);k=j[l].values.splice(o,1)[0];if(this.removeEventListener){this.removeEventListener(l,k,false)}else{this.detachEvent("on"+l,k)}return this},addEvents:function(f){for(var g in f){this.addEvent(g,f[g])}return this},removeEvents:function(f){if(d.type(f)=="object"){for(var h in f){this.removeEvent(h,f[h])}return this}var g=this.cache("events");if(!g){return this}if(!f){for(var h in g){this.removeEvent(h)}this.erase("events")}else{this.removeEvent(f)}return this},fireEvent:function(k,j,g){var p=this.cache("events");if(!p||!p[k]){return this}var f=0,m=p[k].keys,l,h,o=this;while(l=m[f++]){h=function(i){return function(){i.apply(o,j)}};setTimeout(h(l),g)}return this}})})(JUI);(function(d){var b={"8":"backspace","9":"tab","13":"enter","27":"esc","32":"space","38":"up","40":"down","37":"left","39":"right","46":"delete"};var a=function(e){if(e.$family==="event"){return e}var p=document,j=window,o=e.type;var k=e.target||e.srcElement;while(k&&k.nodeType==3){k=k.parentNode}if(/key/.test(o)){var f=e.which||e.keyCode;var q=b[f];if(o=="keydown"){var h=f-111;if(h>0&&h<13){q="f"+h}}q=q||String.fromCharCode(f).toLowerCase()}else{if(o.match(/(click|mouse|menu)/i)){p=(!p.compatMode||p.compatMode=="CSS1Compat")?p.documentElement:p.body;var m={x:e.pageX||e.clientX+p.scrollLeft,y:e.pageY||e.clientY+p.scrollTop};var g={x:(e.pageX)?e.pageX-j.pageXOffset:e.clientX,y:(e.pageY)?e.pageY-j.pageYOffset:e.clientY};if(o.match(/DOMMouseScroll|mousewheel/)){var l=(e.wheelDelta)?e.wheelDelta/120:-(e.detail||0)/3}var i=(e.which==3)||(e.button==2)}}return(function(s,r){for(var u in r){s[u]=r[u]}return s})(this,{event:e,type:o,page:m,client:g,rightClick:i,wheel:l,target:k,code:f,key:q,shift:e.shiftKey,control:e.ctrlKey,alt:e.altKey,meta:e.metaKey})};d.Native.initialize({name:"Event",initialize:a,protect:true});a.implement({stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation()}else{this.event.cancelBubble=true}return this},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{this.event.returnValue=false}return this}});d.Event=a})(JUI);(function(b){var a=function(d){this.events=[];this.name=d};b.Native.initialize({name:"CustomEvent",initialize:a,protect:true});a.implement({fire:function(){var e=[];for(var f=0;f<arguments.length;f++){e.push(arguments[f])}for(var f=0,d=this.events.length;f<d;f++){var g=this.events[f];g[0].call(g[1],this.name,e)}},subscribe:function(e,d){this.events.push([e,d])},clear:function(){this.events=[]}});b.CustomEvent=a})(JUI);(function(f){var h={},a,d=1,b="jui_cb_";var g=function(i){a=i;return this};f.Native.initialize({name:"Loader",initialize:g,protect:true});function e(s){s=s||a||{};var i,k,q="js",r=f.empty,l,p,j;i=s.url;q=s.type;k=s.charset;r=s.callback;p=s.bind;l=s.param;j=s.cache;if(!i||i==""){return}try{if(l&&r){f.Loader[b+d]=function(){r.apply(p,arguments)};if(i.indexOf("?")>-1){i=i+"&cb=JUI.Loader."+b+d}else{i=i+"?cb=JUI.Loader."+b+d}if(!j){i=i+"&r="+Math.random()}d++}var m;if(q=="css"){m=document.createElement("link");m.rel="stylesheet";m.type="text/css";m.href=i}else{m=document.createElement("script");m.src=i;m.type="text/javascript"}k&&(m.charset=k);if(!l&&r){m.onload=function(){r.apply(p,[i,true])};m.onerror=function(){r.apply(p,[i,false])};m.onreadystatechange=function(){if(m.readyState=="loaded"){r.apply(p,[i,true])}}}h[i]=m;document.getElementsByTagName("head")[0].appendChild(m)}catch(o){r(i,false)}}g.implement({load:function(l){if(!l){l=[a]}else{if(f.type(l)!="array"){l=Array.prototype.slice.call(arguments,0)}}var j=0,k;while(k=l[j++]){e(k)}return this},chain:function(k){if(f.type(k)!="array"){k=Array.prototype.slice.call(arguments,0)}if(!k||k.length==0){return}var j=k.shift(),i=this;cb=function(m,o){o.callback(o.url);i.chain(m)};this.load({url:j.url,type:j.type,callback:cb(k,j)})},cancel:function(i){if(!h[i]){return}document.removeChild(h[i]);delete h[i]}});f.Loader=g})(JUI);(function(e){function a(i,j){for(var h in j){i[h]=j[h]}return i}function d(j){var h=[];for(var i in j){h.push(encodeURIComponent(i)+"="+encodeURIComponent(j[i]))}return h.join("&")}function g(){var o,h=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],j=0,m;try{return new XMLHttpRequest()}catch(l){while(m=h[j++]){try{o=new ActiveXObject(m);return o}catch(k){}}}throw"can not initialize XMLHttpRequest"}function f(p){var l=p.getAllResponseHeaders(),j={},q=l.split("\n"),k=0,r;while(r=q[k++]){if(r.length==0){continue}var m=r.indexOf(":"),h=r.substring(0,m).replace(/^\s*|\s*$/,""),o=r.substring(m+1).replace(/^\s*|\s*$/,"");j[h]=o}return j}var b=function(i){var h={url:null,method:"GET",data:null,async:true,encoding:"utf-8",encode:true,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},timeout:120,cache:false,link:"ignore",type:"xhr",bind:null,onStateChange:e.empty,onTimeout:e.empty,onStart:e.empty,onEnd:e.empty,onSuccess:e.empty,onFailure:e.empty,onCancel:e.empty};i=i||{};if(i.headers){i.headers=a(h.headers,i.headers)}h=a(h,i);this.options=h;this.xhr=g();this.running=false;this.timeoutId=null;this.timeouted=false;return this};e.Native.initialize({name:"Ajax",initialize:b,protect:true});b.implement({setHeader:function(h,i){this.options.headers[h]=i;return this},setHeaders:function(h){this.options.headers=a(this.options.headers,h);return this},send:function(v){if(e.type(v)=="string"){v={url:v}}v=v||{};if(v.headers){v.headers=a(this.options.headers,v.headers)}this.options=a(this.options,v);if(arguments.length==2&&typeof arguments[1]=="string"){this.options.type=arguments[1]}var s=this.options;var o=s.data,j=s.url,i=s.method.toUpperCase(),u=false;if(!j||j==""){throw"url is empty"}this.running=true;u=j.indexOf("?")>-1;o=d(o);if(o!=""&&i=="GET"){j=j+(u?"&":(u=true,"?"))+o;o=null}if(!s.cache){j=j+(u?"&":"?")+new Date().getTime()}if(s.encode&&i=="POST"){var k=(s.encoding)?"; charset="+s.encoding:"";s.headers["Content-type"]="application/x-www-form-urlencoded"}this.xhr.open(i,j,s.async);var r=s.headers;for(var p in r){try{this.xhr.setRequestHeader(p,r[p])}catch(q){}}function m(){if(this.timeouted){s.onTimeout.call(s.bind,j)}if(this.xhr.readyState==4){try{clearTimeout(this.timeoutId)}catch(w){}this.status=this.xhr.status;try{if(s.type=="header"||s.type=="headers"){s.onSuccess.call(s.bind,f(this.xhr))}else{if(this.xhr.status==200){var h=this.xhr;switch(s.type){case"text":case"html":h=this.xhr.responseText;break;case"json":h=window["eval"]("("+this.xhr.responseText+")");break;case"xml":h=this.xhr.responseXML;break}s.onSuccess.call(s.bind,h)}else{s.onFailure.call(s.bind,this.xhr.status)}}}catch(w){s.onFailure.call(s.bind,-1)}s.onEnd.call(s.bind,j)}s.onStateChange(this.xhr,j)}var l=(function(h){return function(){m.call(h)}})(this);this.xhr.onreadystatechange=l;this.timeoutId=setTimeout((function(h){return function(){h.timeouted=true;h.xhr.abort();h.running=false;h.xhr.onreadystatechange=e.empty}})(this),s.timeout*1000);s.onStart.call(s.bind,j);this.xhr.send(o);if(!s.async){l()}return this},get:function(h){this.send(h,"xhr");return this},post:function(h){this.send(h,"xhr");return this},json:function(h){this.send(h,"json");return this},text:function(h){this.send(h,"text");return this},xml:function(h){this.send(h,"xml");return this},headers:function(h){this.send(h,"headers");return this},cancel:function(){if(!this.running){return this}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=e.empty;return this}});e.Ajax=b})(JUI);(function(d){var b={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(f){return b[f]||"\\u00"+Math.floor(f.charCodeAt()/16).toString(16)+(f.charCodeAt()%16).toString(16)}var e={decode:function(f){if(d.type(f)!="string"||!f.length){return null}return(new Function("return "+f+";"))()},encode:function(k){var h=[];switch(d.type(k)){case"undefined":return"undefined";break;case"null":return"null";break;case"number":case"boolean":case"date":case"function":return k.toString();break;case"string":return'"'+k.replace(/[\x00-\x1f\\"]/g,a)+'"';break;case"array":for(var g=0,f=k.length;g<f;g++){h.push(d.JSON.encode(k[g]))}return"["+h.join(",")+"]";break;case"error":case"object":for(var j in k){h.push('"'+j.replace(/[\x00-\x1f\\"]/g,a)+'":'+d.JSON.encode(k[j]))}return"{"+h.join(",")+"}";break;default:return"";break}}};d.JSON=e})(JUI);(function(e){var a={encode:false,decode:false,path:false,domain:false,duration:false,secure:false,document:document};function d(f){for(var g in f){a[g]=f[g]}}var b={write:function(h,i,g){d(g);if(a.encode){i=encodeURIComponent(i)}if(a.domain){i+="; domain="+a.domain}if(a.path){i+="; path="+a.path}if(a.duration){var f=new Date();f.setTime(f.getTime()+a.duration*24*3600000);i+="; expires="+f.toGMTString()}if(a.secure){i+="; secure"}a.document.cookie=h+"="+i;return this},read:function(g,f){d(f);var h=a.document.cookie.match("(?:^|;)\\s*"+g.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")+"=([^;]*)");if(a.decode){return(h)?decodeURIComponent(h[1]):null}else{return(h)?h[1]:null}},remove:function(g,f){d(f);a.duration=-1;b.write(g,"");return this}};e.Cookie=b})(JUI);(function(a){a.browser={};(function(){a.browser={ie:0,opera:0,gecko:0,webkit:0,mobile:null};var d=navigator.userAgent,b;if((/KHTML/).test(d)){a.browser.webkit=1}b=d.match(/AppleWebKit\/([^\s]*)/);if(b&&b[1]){a.browser.webkit=parseFloat(b[1]);if(/ Mobile\//.test(d)){a.browser.mobile="Apple"}else{b=d.match(/NokiaN[^\/]*/);if(b){a.browser.mobile=b[0]}}}if(!a.browser.webkit){b=d.match(/Opera[\s\/]([^\s]*)/);if(b&&b[1]){a.browser.opera=parseFloat(b[1]);b=d.match(/Opera Mini[^;]*/);if(b){a.browser.mobile=b[0]}}else{b=d.match(/MSIE\s([^;]*)/);if(b&&b[1]){a.browser.ie=parseFloat(b[1])}else{b=d.match(/Gecko\/([^\s]*)/);if(b){a.browser.gecko=1;b=d.match(/rv:([^\s\)]*)/);if(b&&b[1]){a.browser.gecko=parseFloat(b[1])}}}}}})()})(JUI);(function(d){function a(g,h){for(var f in h){g[f]=h[f]}return g}function b(f){return f.replace(/\b[a-z]/g,function(g){return g.toUpperCase()})}var e=function(p){var m={onStart:d.empty,onComplete:d.empty,onCancel:d.empty,onEnterFrame:d.empty,fps:50,duration:500,unit:false,link:"ignore",effect:false},f=20,i=null,o=0,j=0,g=0,k=function(q){return q},l=this;m=a(m,p);function h(){var q=(d.now()-o)/m.duration;if(q>=1){l.stopTimer();q=1}q=k(q);l.change(q);m.onEnterFrame(q)}this.change=function(q){return q};this.startTimer=function(q){m=a(m,q);f=Math.round(1000/m.fps);if(m.effect&&d.Fx.Transitions){var r=m.effect.split(":");k=d.Fx.Transitions;k=k[b(r[0])];if(r[1]){k=k["ease"+b(r[1])+(r[2]?b(r[2]):"")]}}o=d.now();try{clearInterval(i)}catch(s){}i=setInterval(h,f);m.onStart()};this.stopTimer=function(){clearInterval(i);m.onComplete()};this.cancelTimer=function(){clearInterval(i);m.onCancel()};return this};d.Native.initialize({name:"Fx",initialize:e,protect:false});d.Fx=e})(JUI);(function(b){var a=function(g,e){var f={},d={},h=b(g);this.constructor.superclass.constructor.apply(this,[e]);this.change=function(j){for(var i in f){h.setStyle(i,Math.round(f[i]+j*d[i]))}};this.start=function(j,i){if(!j){return}for(var k in j){if(b.type(j[k])!=="array"||j[k].length===1||j[k][0]===undefined){f[k]=parseFloat(h.getStyle(k));f[k]=isNaN(f[k])?0:f[k];d[k]=parseFloat(j[k][0]===undefined?j[k]:j[k][1]);d[k]=(isNaN(d[k])?0:d[k])-f[k]}else{f[k]=parseFloat(j[k][0]);f[k]=isNaN(f[k])?0:f[k];d[k]=parseFloat(j[k][1]);d[k]=(isNaN(d[k])?0:d[k])-f[k]}}this.startTimer()}};a=b.extend(a,b.Fx);b.Native.initialize({name:"Fx.Morph",initialize:a,protect:false});b.Fx.Morph=a})(JUI);(function(e){var f={Linear:function(g){return g},Pow:function(h,g){return Math.pow(h,g||6)},Expo:function(g){return Math.pow(2,8*(g-1))},Circ:function(g){return 1-Math.sin(Math.acos(g))},Sine:function(g){return 1-Math.sin((1-g)*Math.PI/2)},Back:function(h,g){g=g||1.618;return Math.pow(h,2)*((g+1)*h-g)},Bounce:function(j){var i;for(var h=0,g=1;1;h+=g,g/=2){if(j>=(7-4*h)/11){i=g*g-Math.pow((11-6*h-11*j)/4,2);break}}return i},Elastic:function(h,g){return Math.pow(2,10*--h)*Math.cos(20*h*Math.PI*(g||1)/3)},Vibration:function(g){return -Math.pow(Math.E,-5*g)*Math.cos(g/18*500)+1},Swing:function(g){return -Math.cos(g*Math.PI)/2+0.5}};var d=["Quad","Cubic","Quart","Quint"],b=0,a;while(a=d[b]){f[a]=function(g){return Math.pow(g,b+2)};b++}e.Fx.Transitions={};for(a in f){e.Fx.Transitions[a]=(function(g){return{easeIn:function(i,h){return f[g](i,h)},easeOut:function(i,h){return 1-f[g](1-i,h)},easeInOut:function(i,h){return(i<=0.5)?f[g](2*i,h)/2:(2-f[g](2*(1-i),h))/2}}})(a)}})(JUI);(function(b){var a=function(g,f,d,e){this.onChangePage=new b.CustomEvent("onChangePage");this.ops={btnTriggerEvent:"click",autoSwitchTime:5000,direction:"horizontal",onChangePage:null};this.mergeOptions(e);if(this.ops.onChangePage!=null){this.onChangePage.subscribe(this.ops.onChangePage)}this.pageCount=0;this.selectedPageNum=0;this.width=f;this.height=d;this.tpEl=g;this.init()};b.Native.initialize({name:"PhotoSlide",initialize:a,protect:true});a.implement({mergeOptions:function(d){for(var e in d){this.ops[e]=d[e]}},beginAutoSwitch:function(){if(this.ops.autoSwitchTime<1||this.pageCount<2){return}clearInterval(this.sid);var d=this;this.sid=setInterval(function(){var e=0;if(d.selectedPageNum<d.pageCount-1){e=d.selectedPageNum+1}d.changePage(e)},this.ops.autoSwitchTime)},stopAutoSwitch:function(){clearInterval(this.sid)},init:function(){this.picsEl=this.tpEl.getElement("div.pics");this.picsEl.css({width:this.width,height:this.height,overflow:"hidden"});this.picsMoveEl=this.picsEl.getElement("div");this.fx=new b.Fx.Morph(this.picsMoveEl,{duration:500,effect:"Quad:in:out"});this.titleEl=this.tpEl.getElement("div.info .title");this.btnsEl=this.tpEl.getElement("div.info .btns");this.tpEl.addEvent("mouseover",function(d){this.stopAutoSwitch()},this);this.tpEl.addEvent("mouseout",function(d){this.beginAutoSwitch()},this);this.fnc()},fnc:function(){this.infos=[];var g=this.picsMoveEl.getElements("div");this.pageCount=g.length;if(this.pageCount==0){return}var e=this.width;var k=this.height;if(this.ops.direction=="horizontal"){e=this.pageCount*this.width}else{k=this.pageCount*this.height}this.picsMoveEl.css({width:e,height:k,overflow:"hidden"});var j=[];for(var f=0,d=this.pageCount;f<d;f++){g[f].css({width:this.width,height:this.height,overflow:"hidden","float":"left"});j.push(['<a href="javascript:;">',f+1,"</a>"].join(""));var m=g[f].getElements("a");if(m.length>0){this.infos.push({title:m[0].attr("title"),link:m[0].attr("href")})}else{this.infos.push({title:"No Text",link:""})}}if(this.btnsEl!=null){this.btnsEl.html(j.join(""));var l=this.btnsEl.getElements("a");l.addEvent(this.ops.btnTriggerEvent,function(i){var h=parseInt(b(i.target).html())-1;this.changePage(h)},this)}this.changePage(0);this.beginAutoSwitch()},changePage:function(d){if(this.btnsEl!=null){var e=this.btnsEl.getElements("a");e[this.selectedPageNum].className="";e[d].className="now"}if(this.titleEl!=null){var f=this.infos[d];this.titleEl.html(f.title);this.titleEl.attr("href",f.link)}this.selectedPageNum=d;this.onChangePage.fire(this.selectedPageNum);if(this.ops.direction=="horizontal"){this.fx.start({"margin-left":-(this.selectedPageNum*this.width)})}else{this.fx.start({"margin-top":-(this.selectedPageNum*this.height)})}}});b.PhotoSlide=a})(JUI);(function(b){var a=function(j,e,g,k){if(j.length!=e.length){alert("JUI:TabView  参数 [tabs] [views] 包含的element.length不相等");return}this.ops={tabTriggerEvent:"mouseover"};this.mergeOptions(k);for(var h=0,d=j.length;h<d;h++){j[h].attr("jsvalue",h)}this.selectedTabIx=0;var f=this;this.changeTab=function(i){g(j[f.selectedTabIx],j[i]);e[f.selectedTabIx].css("display","none");f.selectedTabIx=i;e[f.selectedTabIx].css("display","block")};j.addEvent(this.ops.tabTriggerEvent,function(l){var i=parseInt(this.attr("jsvalue"));f.changeTab(i)})};b.Native.initialize({name:"TabView",initialize:a,protect:true});a.implement({mergeOptions:function(d){for(var e in d){this.ops[e]=d[e]}}});b.TabView=a})(JUI);(function(e){function i(k,j){for(var l in k){if(typeof j[l]!="undefined"){k[l]=j[l]}}}function a(l){var j=[];for(var k in l){j.push(k+"="+encodeURIComponent(l[k]))}return j.join("&")}var h={checkCodeImg:"http://bk.{0}/checkcode/",getList:"http://bk.{0}/xihttp/ikan2/comment/json/get/?",post:"http://bk.{0}/xihttp/ikan2/comment/json/post/?",up:"http://bk.{0}/xihttp/ikan2/comment/json/post/up/?",report:"http://bk.{0}/addreport/",userHome:"http://home.pptv.com/callerhome/"};var b=document.domain;var d="pplive.com";if(b!=""){d=b.indexOf("pptv.com")!=-1?"pptv.com":d}for(var g in h){h[g]=h[g].replace("{0}",d)}var f={isOneGetCheckCode:true,replyId:null,listCount:0,pageCount:0,onPost:new e.CustomEvent("onPost"),timeLine:0,episodeId:"",setUrls:function(j){i(h,j)},rebind:function(j){this.cnf={type:null,id:null,num:20,ipage:1};i(this.cnf,j);this.getList()},init:function(l,m,k){this.cnf={type:null,id:null,num:20,ipage:1};i(this.cnf,m);this.ops={contentMaxLength:100,pageNumSplit:" | "};if(k){i(this.ops,k)}e.IKan.User2.onLogined.subscribe(this.onLogined,this);e.IKan.User2.onlogouted.subscribe(this.onlogouted,this);this.el=l;this.lsboxel=l.getElement("div.CommentList");this.count_els=l.getElements(".CommentCount");this.pageNumInfo_els=l.getElements(".PageNum .AllNum");this.pageList_els=l.getElements(".PageNum .PageList");this.btnRef_els=l.getElements(".btnRef");var j=l.getElement("div.inquote");this.lsItemQuoteTp=j.html();j.innerHTML="{Replies_HTML}";this.lsItemTp=this.lsboxel.html();this.lsboxel.html("");this.form_btnLogout_el=l.getElement("a.btnLogout");this.form_btnLogin_el=l.getElement("a.btnLogin");this.form_userName_el=l.getElement("a.userName");this.form_ckNotUser_el=l.getElement("input.ckNotUser");this.form_txtContent_el=l.getElement("textarea.txtContent");this.form_btnPost_el=l.getElement("input.btnPost");this.form_txtCheckCode_el=l.getElement("input.txtCheckCode");this.form_imgCheckCode_el=l.getElement("img.imgCheckCode");this.form_refCheckCode_el=l.getElement("a.refCheckCode");this.form_userName_el.css("display","none");this.form_btnLogout_el.css("display","none");this.form_ckNotUser_el.checked=true;this.form_ckNotUser_el.css("display","none");this.form_txtContent_el.value="";this.form_txtCheckCode_el.value="";this.bindEvent();this.getList();this.el.style.display="block";this.el.style.visibility="visible";this.lsboxel.style.display="block";this.lsboxel.style.visibility="visible"},onLogined:function(l,k){var j=k[0];this.form_ckNotUser_el.checked=false;this.form_userName_el.html(j.UserName);this.form_userName_el.css("display","");this.form_btnLogout_el.css("display","");this.form_ckNotUser_el.css("display","");this.form_btnLogin_el.css("display","none")},onlogouted:function(k,j){this.form_ckNotUser_el.checked=true;this.form_userName_el.css("display","none");this.form_btnLogout_el.css("display","none");this.form_ckNotUser_el.css("display","none");this.form_btnLogin_el.css("display","")},bindEvent:function(){this.form_refCheckCode_el.addEvent("click",function(j){this.refCheckCodeImg();this.form_txtCheckCode_el.focus();this.form_txtCheckCode_el.select();j.stop()},this);this.form_txtCheckCode_el.addEvent("focus",function(){if(this.isOneGetCheckCode){this.refCheckCodeImg()}},this);this.form_txtContent_el.addEvent("keydown",function(j){if(j.key=="enter"&&j.control){this.post();j.stop()}},this);this.form_txtCheckCode_el.addEvent("keydown",function(j){if(j.key=="enter"&&j.control){this.post();j.stop()}},this);this.form_btnPost_el.addEvent("click",function(j){this.post();j.stop()},this);this.form_btnLogin_el.addEvent("click",function(j){var k=this.position();e.IKan.User2.showLoginBox(k);j.stop()});this.form_btnLogout_el.addEvent("click",function(j){e.IKan.User2.logout()});this.btnRef_els.addEvent("click",function(j){this.getList();j.stop()},this)},post:function(){var j=this;var m=this.form_txtContent_el.value;var p=false;var l=m.match(/\[回复 \S* 的发言\]/g);if(l){m=m.replace(l,"");if(this.replyId!=null){p=true}}if(m.length==0){this.form_txtContent_el.focus();return}if(this.form_txtCheckCode_el.value.length==0){this.form_txtCheckCode_el.focus();return}var q={notbkuser:this.form_ckNotUser_el.checked?1:0,content:m.substring(0,this.ops.contentMaxLength),checkcode:this.form_txtCheckCode_el.value};this.onPost.fire();if(p){q.cid=this.replyId}else{q.timeline=this.timeLine;q.episodeid=this.episodeId}var k=h.post+a(this.cnf)+"&"+a(q);this.timeLine=0;this.episodeId="";new e.Loader({url:k,type:"js",callback:function(o){j.postFnc(o)},param:true}).load()},postFnc:function(j){if(j.Status==1){this.refCheckCodeImg();this.form_txtCheckCode_el.value="";this.form_txtContent_el.value="";this.replyId=null;this.cnf.ipage=1;this.getList()}else{alert(j.Msg)}},refCheckCodeImg:function(){this.isOneGetCheckCode=false;this.form_imgCheckCode_el.src=h.checkCodeImg+"?v="+Math.random()},getList:function(){this.lsboxel.html("评论加载中...");var j=this;var k=h.getList+a(this.cnf);new e.Loader({url:k,type:"js",callback:function(l){j.fillList(l)},param:true}).load()},fillList:function(m){if(m.Status==0){this.lsboxel.html("");return}if(this.count_els.length>0){this.count_els.html(m.Data.CommentCount)}this.listCount=m.Data.CommentCount;var l=[];for(var k=0,j=m.Data.Comments.length;k<j;k++){l.push(this.parseItem(m.Data.Comments[k]))}this.lsboxel.html(l.join(""));this.updatePagePanel()},updatePagePanel:function(){if(this.pageNumInfo_els.length>0){this.pageNumInfo_els.html("第"+((this.cnf.ipage-1)*this.cnf.num)+"-"+(this.cnf.ipage*this.cnf.num)+"条 共"+this.listCount+"条")}if(this.pageList_els.length==0){return}this.pageCount=Math.ceil(this.listCount/this.cnf.num);var j=[];var l=this.cnf.ipage;var o=1;var k=this.pageCount;o=l-3;k=l+3;if(o<1){o=1;k=this.pageCount>7?7:this.pageCount}if(k>this.pageCount){o=this.pageCount-6;k=this.pageCount}if(l!=1){j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange(-1);return false;">上一页</a>')}if(l>4&&this.pageCount>7){j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange(1);return false;">1</a>');j.push("...")}if(o<1){o=1}for(var m=o;m<=k;m++){if(l==m){j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange('+m+');return false;" class="now" style="font-weight:bold;color:orange;">'+m+"</a>")}else{j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange('+m+');return false;">'+m+"</a>")}}if(l<this.pageCount-3&&this.pageCount>7){j.push("...");j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange('+this.pageCount+');return false;">'+this.pageCount+"</a>")}if(l!=this.pageCount&&this.pageCount!=0){j.push('<a href="javascript:;" onclick="$.IKan.Comment.pageChange(-2);return false;">下一页</a>')}this.pageList_els.html(j.join(this.ops.pageNumSplit))},pageChange:function(j){if(j==-1){this.cnf.ipage--}else{if(j==-2){this.cnf.ipage++}else{this.cnf.ipage=j}}this.getList()},parseItem:function(u){var o=[];if(u.Replies.length>0){for(var l=0,m=u.Replies.length;l<m;l++){o.push(this.parseItemQuote(u.Replies[l]))}u.quote_begin="";u.quote_end=""}else{u.quote_begin="<!--";u.quote_end="-->"}u.Replies_HTML=o.join("");var q=u.UserName;var k=u.UserFace;var r=this.checkLoginUser(q);if(r){u.UserName_HTML='<span><a href="'+h.userHome+q+'" target="_blank">'+q+"</a></span>";u.UserFace_HTML='<a href="'+h.userHome+q+'" target="_blank"><img src="'+k+'" width="40" height="40" /></a>'}else{u.UserName_HTML=q;u.UserFace_HTML='<img src="'+k+'" width="40" height="40" />'}var v=this.lsItemTp;for(var j in u){v=v.replace(new RegExp("\\{(\\w*)\\}","g"),function(){var p=arguments[1];if(typeof u[p]=="undefined"){return arguments[0]}return u[p]})}return v},parseItemQuote:function(l){var k=this.lsItemQuoteTp;var m=l.UserName;var j=l.UserFace;var q=this.checkLoginUser(m);if(q){l.UserName_HTML='<span><a href="'+h.userHome+m+'" target="_blank">'+m+"</a></span>";l.UserFace_HTML='<a href="'+h.userHome+m+'" target="_blank"><img src="'+j+'" width="20" height="20" /></a>'}else{l.UserName_HTML=m;l.UserFace_HTML='<img src="'+j+'" width="20" height="20" />'}for(var o in l){k=k.replace(new RegExp("\\{(\\w*)\\}","g"),function(){var p=arguments[1];if(typeof l[p]=="undefined"){return arguments[0]}return l[p]})}return k},checkLoginUser:function(j){return j.match(/\d*.\d.*/g)?false:true},ref:function(){this.getList()},reply:function(k,j){this.replyId=k;this.form_txtContent_el.value="xxx";this.form_txtContent_el.focus();this.form_txtContent_el.value="[回复 "+j+" 的发言]\n";this.form_txtContent_el.focus()},report:function(j){window.open(h.report+this.cnf.type+"/"+this.cnf.id+"/"+j)},up:function(m,l){var j=this;var k=h.up+"type="+this.cnf.type+"&cid="+m;new e.Loader({url:k,type:"js",callback:function(o){if(o.Status==1){if(l!=null){l.html(parseInt(l.html())+1);l.css("color","red")}alert("支持成功!")}else{alert(o.Msg)}},param:true}).load()}};if(typeof e.IKan=="undefined"){e.IKan={}}e.IKan.Comment=f})(JUI);(function(d){var b="pplive.com";if(document.domain!=""){b=document.domain.indexOf("pptv.com")!=-1?"pptv.com":b}var a=function(g,f,e){this.inputel=g;this.btnel=f;this.ops={defaultText:"-- 请输入关键字 --",defaultTextColor:"#999999",textColor:"#000000",tipBoxWidth:"182px",strLength:26,searchSuggestUrl:"http://ikan."+b+"/search/suggest/?kw=",searchUrl:"http://ikan."+b+"/search/?kw="};this.mergeOptions(e);this.init()};d.Native.initialize({name:"SearchTips",initialize:a,protect:true});a.implement({mergeOptions:function(e){for(var f in e){this.ops[f]=e[f]}},truncate:function(f,e,j){var g=0,l=[],k=f.length;for(var h=0;h<k;h++){if(f.charCodeAt(h)>255){g+=2}else{g++}if(g>e){break}}return(j&&h<k)?f.substring(0,h)+"...":f.substring(0,h)},getText:function(){return this.inputel.value.replace(/(^\s+)|(\s+$)/gm,"")},setDefaultState:function(){this.inputel.value=this.ops.defaultText;this.inputel.css("color",this.ops.defaultTextColor)},setNormalState:function(e){this.inputel.value=e?e:"";this.inputel.css("color",this.ops.textColor)},init:function(){this.tipsLis=[];this.selectedIx=-1;this.prevText="";this.gotourl="";this.setDefaultState();this.tipboxel=document.createElement("ul");this.tipboxel.className="sm_search_tips";this.tipboxel.style.overflow="hidden";this.tipboxel.style.position="absolute";this.tipboxel.style.zIndex=1000;this.tipboxel.style.width=this.ops.tipBoxWidth;this.tipboxel.style.display="none";document.documentElement.getElementsByTagName("body")[0].appendChild(this.tipboxel);this.inputel.addEvent("focus",this.input_focus,this);this.inputel.addEvent("blur",this.input_blur,this);this.inputel.addEvent("keydown",this.input_key_down,this);this.inputel.addEvent("keyup",this.input_key_up,this);this.btnel.addEvent("click",this.btn_click,this);d(document).addEvent("click",function(){this.hideTipBox()},this)},fillList:function(h){this.tipsLis=[];this.selectedIx=-1;this.prevText=this.getText();if(h.length==0){this.hideTipBox();return}var g=[];for(var f=0,e=h.length;f<e;f++){g.push(['<li><a href="',h[f].link,'">',this.truncate(h[f].name,this.ops.strLength),"</a></li>"].join(""))}this.tipboxel.innerHTML=g.join("");this.tipsLis=this.tipboxel.getElementsByTagName("li");this.showTipBox()},setSelectedItem:function(e){if(this.tipsLis.length==0){return}if(this.selectedIx==-1){this.selectedIx=0}else{this.tipsLis[this.selectedIx].className="";this.selectedIx+=e}if(this.selectedIx<0){this.selectedIx=this.tipsLis.length-1}if(this.selectedIx>=this.tipsLis.length){this.selectedIx=0}this.tipsLis[this.selectedIx].className="current";this.gotourl=this.tipsLis[this.selectedIx].getElementsByTagName("a")[0].href},showTipBox:function(){this.gotourl="";var e=this.inputel.position();this.tipboxel.style.top=e.y+24+"px";this.tipboxel.style.left=e.x+"px";this.tipboxel.style.display="block"},hideTipBox:function(){this.gotourl="";this.tipboxel.style.display="none"},getSuggestList:function(){var e=this;var f=new d.Loader({url:this.ops.searchSuggestUrl+encodeURIComponent(this.getText()),type:"js",callback:function(g){e.fillList.call(e,g)},param:true});f.load()},input_key_up:function(){if(this.getText()==""){this.hideTipBox()}if(this.getText()!=""&&this.getText()!=this.ops.defaultTex&&this.prevText!=this.getText()){var e=this;clearTimeout(this.tid);this.tid=setTimeout(function(){e.getSuggestList()},400)}},input_focus:function(){if(this.getText()==this.ops.defaultText){this.setNormalState()}},input_blur:function(){if(this.getText()==""){this.setDefaultState()}},btn_click:function(){if(this.getText()!=""&&this.getText()!=this.ops.defaultText){window.location.href=this.ops.searchUrl+encodeURIComponent(this.getText())}},input_key_down:function(e){switch(e.key){case"enter":if(this.gotourl!=""){window.location.href=this.gotourl}else{this.btn_click()}break;case"up":this.setSelectedItem(-1);break;case"down":this.setSelectedItem(1);break}}});if(typeof d.IKan=="undefined"){d.IKan={}}d.IKan.SearchTips=a})(JUI);(function(e){var d="pplive.com";if(document.domain.toLowerCase().indexOf("pptv.com")!=-1){d="pptv.com"}var f={login:"http://passport.pptv.com/weblogin.do?",addFavor:"http://bk.pptv.com/xihttp/ikan2/favor/json/post/?",favorCheck:"http://bk.pptv.com/xihttp/ikan2/favor/json/check/?",like:"http://bk.pptv.com/xihttp/ikan2/score/json/post/?",likeCheck:"http://bk.pptv.com/xihttp/ikan2/score/json/check/?"};var g=false,b=true;var a={onLogined:new e.CustomEvent("onLogined"),onlogouted:new e.CustomEvent("onlogouted"),userInfo:{Gender:"",PpNum:"",ExpNum:"",LevelName:"",NextLevelName:"",NextLevelExpNum:"",Area:"",Subscribe:"",UnreadNotes:"",HeadPic:"",Email:"",OnlineTime:"",UserName:""},tryReadUserInfo:function(){var m=e.Cookie.read("UDI");var k=e.Cookie.read("PPName");if(m==null||k==null){this.onlogouted.fire();return}var i=k.split("$");this.userInfo.UserName=decodeURIComponent(i[0]);var j=m.split("$");var h=0;for(var l in this.userInfo){if(l=="UserName"){break}this.userInfo[l]=decodeURIComponent(j[h]);h++}g=true;this.onLogined.fire(this.userInfo)},wirteUserInfo:function(j){var h={domain:d,path:"/",duration:7};for(var i in j){e.Cookie.write(i,j[i],h)}},logout:function(){var h={domain:d,path:"/"};e.Cookie.remove("PPKey",h);e.Cookie.remove("UDI",h);e.Cookie.remove("PPName",h);g=false;this.onlogouted.fire()},login:function(j,k){var h=this;var i=f.login+"username="+j+"&password="+k;new e.Loader({url:i,type:"js",callback:function(l,m){h.loginFnc(l,m)},param:true}).load()},loginFnc:function(h,i){if(h==0){alert(i);return}if(h==1){this.usernameel.value="";this.userpwdel.value="";this.hideLoginBox();this.wirteUserInfo(i)}this.tryReadUserInfo()},checkLogined:function(){return g},showLoginBox:function(i){if(b){b=false;this.boxel=e("#loginBox");this.btnpostel=this.boxel.getElement(".btnPost");this.usernameel=this.boxel.getElement(".userName");this.userpwdel=this.boxel.getElement(".userPwd");this.usernameel.value="";this.userpwdel.value="";e(document).addEvent("click",function(k){if(k.target.getAttribute("stopdocumentclick")==null){this.hideLoginBox()}},this);this.boxel.addEvent("click",function(k){if(k.target.tagName!="A"){k.stop()}});this.btnpostel.addEvent("click",function(k){this.checkLoginForm()},this);this.usernameel.addEvent("keydown",function(k){if(k.key=="enter"){this.checkLoginForm()}},this);this.userpwdel.addEvent("keydown",function(k){if(k.key=="enter"){this.checkLoginForm()}},this)}this.boxel.css({display:"block"});var h=0;var j=0;h=i.x;j=i.y;this.boxel.css({top:j,left:h});this.usernameel.focus()},hideLoginBox:function(){this.boxel.css("display","none")},checkLoginForm:function(){if(this.usernameel.value.length==0){this.usernameel.focus();return}if(this.userpwdel.value.length==0){this.userpwdel.focus();return}this.login(this.usernameel.value,this.userpwdel.value)},favor:function(k,j,l,h){var i=(k=="add"?f.addFavor:f.favorCheck)+"type="+j+"&id="+l;new e.Loader({url:i,type:"js",callback:function(m){h(m)},param:true}).load()},like:function(l,j,m,k,h){var i=(l=="add"?f.like:f.likeCheck)+"type="+j+"&id="+m+"&attitude="+k;new e.Loader({url:i,type:"js",callback:function(o){h(o)},param:true}).load()}};if(typeof e.IKan=="undefined"){e.IKan={}}e.IKan.User2=a})(JUI);window.jui_ext=window.$$={};window.DEBUG=true;window.Txt={copySuccess:"复制成功！",copyFail:"被浏览器拒绝！\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'",OK:"确定"};window.log=function(a){if(window.console&&window.console.log&&DEBUG){window.console.log(a)}};window.warn=function(a){if(window.console&&window.console.warn&&DEBUG){window.console.warn(a)}};window.info=function(a){if(window.console&&window.console.info&&DEBUG){window.console.info(a)}};window.err=function(a){if(window.console&&window.console.error&&DEBUG){window.console.error(a)}};window.group=function(b,a){if(window.console&&window.console.group&&a&&DEBUG){window.console.group(b)}else{if(window.console&&window.console.groupCollapsed&&!a&&DEBUG){window.console.groupCollapsed(b)}}};window.groupEnd=function(){if(window.console&&window.console.groupEnd&&DEBUG){window.console.groupEnd()}};(function(b){b.Ajax.__ajax=new b.Ajax();b.Loader.__loader=new b.Loader();b.post=function(e,h,i,f){var d={url:e,method:"POST",data:h,onSuccess:i};var g=b.Ajax.__ajax;switch(f){case"json":g.json(d);break;default:g.text(d)}};var a=function(f){var d=[];for(var e in f){d.push(encodeURIComponent(e)+"="+encodeURIComponent(f[e]))}return d.join("&")};b.load=function(d,e,f){b.Loader.__loader.load({url:d+"?"+a(e),callback:f,param:true})};b.postJSON=function(d,e,f){b.post(d,e,f,"json")}})(JUI);(function(a){a.Window.implement({width:function(b){if(b){this.dimension({width:b})}else{return this.dimension().width}},height:function(b){if(b){this.dimension({height:b})}else{return this.dimension().height}},scroll_left:function(b){if(b){this.scrollPos({x:b})}else{return this.scrollPos().x}},scroll_top:function(b){if(b){this.dimension({y:b})}else{return this.scrollPos().y}}});a.Element.implement({pd:function(f,e,d,b){return this.css({left:f,top:e,width:d,height:b})},w:function(b){if(b){this.dimension({width:b})}else{return this.dimension().width}},h:function(b){if(b){this.dimension({height:b})}else{return this.dimension().height}}})})(JUI);(function(a){a.format=a.empty;a.Element.implement({format:function(e,d){var b=[].slice.call(arguments,0);b.shift();if(a.format[e]){a.format[e].apply(this,b)}else{err("[NOT IMPLEMENT] $.format."+e+"();")}return this}})})(JUI);(function(a){a.format.borderRadius=function(h){var i=this;if(mozilla){return i.css("-moz-border-radius",h+"px")}else{if(webkit){return i.css("-webkit-border-radius",h+="px")}else{if(opera){return i.css("-khtml-border-radius",h+="px")}else{if(msie){var d=parseInt(i.w())-parseInt(i.css("border-width"));var k=parseInt(i.h())-parseInt(i.css("border-width"));var f=document.createElement("v:roundrect");var e=a(f).attr({arcsize:h/Math.min(d,k),id:i.attr("id"),fillcolor:(i.css("background-color")==""?"transparent":i.css("background-color"))}).css({width:d,height:k,padding:0,border:0,background:"transparent",left:i.css("left"),top:i.css("top"),position:"absolute"});if(parseInt(i.css("border-width"))>0){e.attr("strokecolor",i.css("border-color"));e.attr("strokeweight",i.css("border-width"));e.css({left:(i.css("left")=="auto"?0:i.css("left"))+parseInt(parseInt(i.css("border-width"))/2),top:(i.css("top")=="auto"?0:i.css("left"))+parseInt(parseInt(i.css("border-width"))/2)})}else{e.attr("stroked","false")}var g=i.css("opacity");if(g&&g<=1){f.appendChild(document.createElement("<v:fill opacity="+i.css("opacity")+"></v:fill>"))}var b=document.createElement("div");var j=a(b).css({padding:i.css("padding"),margin:i.css("border-width")}).html(i.html());f.appendChild(b);return i.replaceWith(f)}else{return i.css("border-radius",h+="px")}}}}}})(JUI);$.format.photo=function(){var e=this;var a=parseInt(e.css("width"));var d=parseInt(e.css("height"));var b=e.getElement("img");var f=function(){var g=this.width;var j=this.height;if(g==1&&j==1){return}var i=g/j;if(a<d){var k=a/i;if(k>d){b.height=d;var l=d*i;b.width=l;b.css("margin-left",(a-l)/2)}else{b.width=a;b.height=k;b.css("margin-top",(d-k)/2)}}else{var l=d*i;if(l>a){b.width=a;var k=a/i;b.height=k;b.css("margin-top",(d-k)/2)}else{b.height=d;b.width=l;b.css("margin-left",(a-l)/2)}}e.css("overflow","hidden");b.css({visibility:"visible",display:"block"})};b.onload=f;b.src=b.alt;return e};(function(a){a.format.rotate=function(i){var f=this;i=parseInt(i);var d=f.w();var g=f.h();var b=parseInt(f.css("left"));var e=parseInt(f.css("top"));switch(i){case 0:break;case 90:f.css({transform:"rotate(270deg)","transform-origin":"0 0","-moz-transform":"rotate(270deg)","-moz-transform-origin":"0 0","-webkit-transform":"rotate(270deg)","-webkit-transform-origin":"0 0","-o-transform":"rotate(270deg)","-o-transform-origin":"0 0",filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)",top:msie?e:e+d});break;case 180:f.css({transform:"rotate(180deg)","transform-origin":"0 0","-moz-transform":"rotate(180deg)","-moz-transform-origin":"0 0","-webkit-transform":"rotate(180deg)","-webkit-transform-origin":"0 0","-o-transform":"rotate(180deg)","-o-transform-origin":"0 0",filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)",top:msie?e:e+g,left:msie?b:b+d});break;case 270:f.css({transform:"rotate(90deg)","transform-origin":"0 0","-moz-transform":"rotate(90deg)","-moz-transform-origin":"0 0","-webkit-transform":"rotate(90deg)","-webkit-transform-origin":"0 0","-o-transform":"rotate(90deg)","-o-transform-origin":"0 0",filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)",left:msie?b:b+g});break;default:err("[PARAM ERROR] (rotate) deg only support: 0, 90, 180, 270");break}return f}})(JUI);(function(a){a.format.shadow=function(i,p){switch(i){case"box":var b=p.split(" ");var m=b[0];var k=b[1];var f=b[2];if(f.length==4){c=f.split("");f=[c[0],c[1],c[1],c[2],c[2],c[3],c[3]].join("")}this.css({MozBoxShadow:p,webkitBoxShadow:p,boxShadow:p,filter:"progid:DXImageTransform.Microsoft.dropshadow(offx="+parseInt(m)+", offy="+parseInt(k)+", color="+f+")"});break;case"text":var b=p.split(" ");var m=b[0];var k=b[1];var f=b[2];if(f.length==4){c=f.split("");f=[c[0],c[1],c[1],c[2],c[2],c[3],c[3]].join("")}this.css({textShadow:p,filter:"progid:DXImageTransform.Microsoft.dropshadow(offx="+parseInt(m)+", offy="+parseInt(k)+", color="+f+")"});break;case"boxGlow":var b=p.split(" ");var d=b[0];var f=b[1];if(f.length==4){c=f.split("");f=[c[0],c[1],c[1],c[2],c[2],c[3],c[3]].join("")}var e=parseInt(this.css("left"));var o=parseInt(this.css("top"));var j=this.w();var g=this.h();this.css({MozBoxShadow:"0px 0px "+d+" "+p,webkitBoxShadow:"0px 0px "+d+" "+p,boxShadow:"0px 0px "+d+" "+p,filter:"progid:DXImageTransform.Microsoft.glow(color="+f+",strength="+parseInt(d)+")",left:ie?e-parseInt(d):e,top:ie?o-parseInt(d):o});break;case"textGlow":var b=p.split(" ");var d=b[0];var f=b[1];if(f.length==4){c=f.split("");f=[c[0],c[1],c[1],c[2],c[2],c[3],c[3]].join("")}this.css({textShadow:"0px 0px "+p,filter:"progid:DXImageTransform.Microsoft.glow(color="+f+", strength="+parseInt(d)/2+")"});break;default:err('[PARAM ERROR] (shadow) type only support: "box"')}}})(JUI);(function(a){a.format.listVideo=function(b){switch(b){case"1.8":default:a.format.listVideo.v1_8.call(this)}};a.format.listVideo.v1_8=function(){var j=this;var f=j.getElement(".desc");if(f.html().trim()==""){f.hide()}var e=j.getElement(".text");if(!msie){f.css("line-height",20);e.css("padding","2px 4px")}j.hover(function(){this.addClass("hover")},function(){this.removeClass("hover")});var h=IkanPlayer_playList;var g=j.attr("_url");var i=j.attr("_playlink");var d=parseInt(j.attr("_linktype"));if(d!=1){j.click(function(){window.open(g)})}else{var b=h.push({title:j.title,link:i});j.click(function(){if(window.IkanPlayer){IkanPlayer.play(b-1);a(".listVideo li").removeClass("now");this.addClass("now")}})}}})(JUI);(function(a){a.Element.implement({show:function(){var d=this.cache("__display__");return this.css("display",d&&d!="none"?d:"block")},hide:function(){this.cache("__display__",this.css("display"));return this.css("display","none")},slideDown:function(g,j,i){if(!g){g=1000}this.show().stop();var d=this.css("height");if(parseInt(d)==0){this.css("height","auto");var d=this.css("height")}var d=this.h();var e=parseInt(this.css("padding-top"));var f=parseInt(this.css("padding-bottom"));this.css({height:0,overflow:"hidden"}).animate({height:d-e-f},g,j,i)},slideUp:function(g,j,i){if(!g){g=1000}this.show().stop();this.css("height","auto");var d=this.h();var e=parseInt(this.css("padding-top"));var f=parseInt(this.css("padding-bottom"));this.css({height:d-e-f,overflow:"hidden"}).animate({height:0},g,j,function(){log(this)})},stop:function(){var d=this.cache("__animate__");if(d){d.stopTimer()}return this},animate:function(e,h,j,i){switch(arguments.length){case 2:j="Swing:in";i=a.empty;break;case 3:if(typeof j=="string"){i=a.empty}else{i=j;j="Swing:in"}break;case 4:break;default:err("PARAM ERROR - .animate(properties, duration[, easing[, callback]])");break}var g={};for(var d in e){g[d]=[this.css(d),e[d]]}var f=new a.Fx.Morph(this,{fps:100,duration:h,effect:j,onComplete:i});f.start(g);this.cache("__animate__",f);return this}});var b={Vibration:function(d){return -Math.pow(Math.E,-5*d)*Math.cos(d/18*500)+1},Swing:function(d){return -Math.cos(d*Math.PI)/2+0.5}};for(t in b){a.Fx.Transitions[t]=(function(d){return{easeIn:function(f,e){return b[d](f,e)},easeOut:function(f,e){return 1-b[d](1-f,e)},easeInOut:function(f,e){return(f<=0.5)?b[d](2*f,e)/2:(2-b[d](2*(1-f),e))/2}}})(t)}})(JUI);(function(f){var d=["mouseover","mousedown","mouseup","click","dblclick","mouseout","mousemove","keypress","keyup","keydown"];var a={};var e=function(i){return function(j){return this.addEvent(i,j)}};for(var b=0;b<d.length;b++){var h=d[b];a[h]=e(h)}f.Element.implement(a);f.Window.implement(a);var g=function(j){if(!j.target){j.target=j.srcElement||document}if(!j.relatedTarget&&j.fromElement){j.relatedTarget=j.fromElement===j.target?j.toElement:j.fromElement}var i=j.relatedTarget;try{while(i&&i!==this){i=i.parentNode}}catch(k){}return !!i};f.Element.implement({mouseenter:function(i){this.mouseover(function(j){if(!this.cache("__mouseenter__")){j.type="mouseenter";i.call(this,j);this.cache("__mouseenter__",true)}});return this},mouseleave:function(i){this.mouseout(function(j){if(!g.call(this,j.event)){j.type="mouseleave";i.call(this,j);this.cache("__mouseenter__",false)}});return this},hover:function(i,j){return this.mouseenter(i).mouseleave(j||i)}});f.bind=function(){var k=arguments[0];switch(arguments.length){case 2:var l={};var j=arguments[1];break;case 3:var l=arguments[1];var j=arguments[2];break;default:return}var i=arguments.callee._events;if(!i[k]){i[k]=[]}var m={data:l,fn:j};i[k].push(m);return m};f.trigger=function(k,l){if(!l){var l=[]}var o=f.bind._events[k];if(!o){return}for(var j=0;j<o.length;j++){var m={data:o[j].data};l.unshift(m);o[j].fn.apply(null,l)}return o.length};f.bind._events={}})(JUI);(function(a){a.Element.implement({replaceWith:function(b){this.parentNode.replaceChild(b,this);return this}})})(JUI);(function(a){a.Element.implement({each:function(b){b.call(this)}})})(JUI);(function(d){var b={msie:d.browser.ie>0,msie6:d.browser.ie==6,msie7:d.browser.ie==7,msie8:d.browser.ie==8,mozilla:!!d.browser.gecko,opera:!!d.browser.opera,webkit:!!d.browser.webkit};for(var a in b){window[a]=b[a]}})(JUI);(function(a){a.random=function(d,b){var e=Math.random;switch(arguments.length){case 0:return e();case 1:return e()*arguments[0];case 2:return e()*(arguments[1]-arguments[0])+arguments[0]}};a.initArray=function(f,d){var b=new Array(f);for(var e=0;e<f;e++){b[e]=d}return b};a.pick=function(b){return b[Math.floor(a.random(b.length))]}})(jui_ext);(function(b){b.Dtm=b.DateTime=function(i){switch(arguments.length){case 0:this._dtm=new Date();break;case 1:switch(i.length){case 10:var f=i.split("-");this._dtm=new Date(f[0],f[1]-1,f[2]);break;case 19:var f=i.split(" ");var h=f[0].split("-");var g=f[1].split(":");this._dtm=new Date(h[0],h[1]-1,h[2],g[0],g[1],g[2]);break}break}};var a={toString:function(){return this._dtm.toString()},valueOf:function(){return this._dtm.valueOf()},getYear:function(){return this._dtm.getFullYear()},getMonth:function(){return this._dtm.getMonth()+1},getDay:function(){return this._dtm.getDate()},getDay_Week:function(){return this._dtm.getDay()},getHour:function(){return this._dtm.getHours()},getMinute:function(){return this._dtm.getMinutes()},getSecond:function(){return this._dtm.getSeconds()},getMs:function(){return this._dtm.getMilliseconds()},toDBDateString:function(){var g=this.getMonth().toString();var f=this.getDay().toString();return[this.getYear(),(g.length==2?"":0)+g,(f.length==2?"":0)+f].join("-")},toDBTimeString:function(){var f=this.getHour().toString();var h=this.getMinute().toString();var g=this.getSecond().toString();return[(f.length==2?"":0)+f,(h.length==2?"":0)+h,(g.length==2?"":0)+g].join(":")},toDBDateTimeString:function(){return this.toDBDateString()+" "+this.toDBTimeString()},toDBDateTimeMsString:function(){var f=this.getMs().toString();switch(f.length){case 1:f="00"+f;break;case 2:f="0"+f;break;default:break}return this.toDBDateTimeString()+"."+f}};for(var d in a){var e=a[d];b.DateTime.prototype[d]=e}})(jui_ext);$$.copyClip=function(k,i,b){if(!i){i=function(){alert(Txt.copySuccess)}}if(!b){b=function(){alert(Txt.copyFail)}}if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",k);i();return true}else{if(navigator.userAgent.indexOf("Opera")!=-1){window.location=k;i();return true}else{if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(h){b();return false}var f=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!f){return false}var l=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!l){return false}l.addDataFlavor("text/unicode");var j={};var g={};var j=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);var d=k;j.data=d;l.setTransferData("text/unicode",j,d.length*2);var a=Components.interfaces.nsIClipboard;if(!f){return false}f.setData(l,null,a.kGlobalClipboard);i();return true}}}};$$.Image=function(z){var w=z.img[0];var m=z.img[1];var u=z.img[2];var q=z.parent;if(z.rect){var F=z.rect[0];var E=z.rect[1];var K=z.rect[2];var r=z.rect[3]}else{var F=0;var E=0;var K=m;var r=u}if(z.pos){var j=z.pos[0];var h=z.pos[1];var p=z.pos[2]}else{var j=0;var h=0;var p=0}var C=z.rot?z.rot:0;var D=z.scale?z.scale:1;if(z.c){var s=z.c[0];var B=z.c[1]}else{var s=K/2;var B=r/2}var g=new Image();g.src=w;var o=-C;o=o%360;var N=((o>=0)?o:(360+o))*Math.PI/180;var I=Math.cos(N);var v=Math.sin(N);var H=K/2-s;var G=r/2-B;var e=(H*I-G*v)*D;var d=(H*v+G*I)*D;var i=j-H-s;var k=h-G-B;if(ie){var L=F/m;var M=E/u;var P=(m-K-F)/m;var f=(u-r-E)/u;i+=(K-K*D)/2+e;k+=(r-r*D)/2+d;var a=K*D;var b=r*D;var J=document.createElement("v:image");var A=$(J).attr({src:g.src,cropleft:L,croptop:M,cropright:P,cropbottom:f}).css({left:Math.round(i),top:Math.round(k),width:Math.round(a),height:Math.round(b),rotation:o,position:"absolute",zIndex:p});q.appendChild(J)}else{var a=(Math.abs(I*K)+Math.abs(v*r))*D;var b=(Math.abs(I*r)+Math.abs(v*K))*D;i+=(K-a)/2+e;k+=(r-b)/2+d;var l=document.createElement("canvas");$(l).css({left:Math.round(i),top:Math.round(k),position:"absolute",zIndex:p});l.width=Math.round(a);l.height=Math.round(b);var O=l.getContext("2d");O.save();if(N<=0.5*Math.PI){O.translate(v*(r*D),0)}else{if(N<=Math.PI){O.translate(a,-I*(r*D))}else{if(N<=1.5*Math.PI){O.translate(-I*(K*D),b)}else{O.translate(0,-v*(K*D))}}}O.rotate(N);g.onload=function(){O.drawImage(g,F,E,K,r,0,0,K*D,r*D);O.restore();q.appendChild(l)}}};$$.modal=function(g,d){if(!$$.modal.self){$$.modal.self=true;var e=document.body.offsetWidth;var i=document.body.offsetHeight;var a=$$.modal._w=d.width;var f=$$.modal._h=d.height;var j=document.createElement("div");document.body.appendChild(j);var b=document.createElement("div");document.body.appendChild(b);j=$$.modal._b=$(j).css({position:"absolute",zIndex:9995,cursor:"default",height:i+(msie?$(window).scroll_top():0),width:e+(msie?$(window).scroll_left():0),opacity:0.5,background:"#000",left:0,top:0});var b=$$.modal._m=$(b).css({left:(e-a)/2+$(window).scroll_left(),position:"absolute",top:-f,width:a,height:f,zIndex:9997}).animate({left:(e-a)/2+$(window).scroll_left(),top:100+$(window).scroll_top()},200);b.html(g)}};$$.modal.self=false;$$.modal.reposition=function(){if($$.modal.self){var a=document.body.offsetWidth;var b=document.body.offsetHeight;$$.modal._m.animate({top:100+$(window).scroll_top(),left:(a-$$.modal._w)/2+$(window).scroll_left()},500);$$.modal._b.css({height:b+(msie?$(window).scroll_top():0),width:a+(msie?$(window).scroll_left():0)})}};$$.modal.close=function(){var b=document.body.offsetWidth;var e=document.body.offsetHeight;var a=$$.modal._w;var d=$$.modal._h;$$.modal._m.animate({top:-d},200,function(){$$.modal._m.remove()});$$.modal._b.remove();$$.modal.self=false};$(window).addEvent("scroll",$$.modal.reposition);$(window).addEvent("resize",$$.modal.reposition);$$.alert=function(b,d){var a="    <div style='border: solid 1px #333; background: #ccc; padding: 10px; color: #000;'>    <p>"+b+"</p>    <p style='text-align: center; margin-top: 10px;'><input onclick='$$.alert.close();' style='width: 75px;' type='button' value='"+Txt.OK+"' /></p>    </div>";$$.alert._cb=d?d:$.empty;$$.modal(a,{width:300,height:70})};$$.alert.close=function(){$$.modal.close();$$.alert._cb()};$$.tabView=function(d,b,e,f){switch(arguments.length){case 2:e="click";f=0;break;case 3:if(isNaN(e)){f=0}else{f=e;e="click"}break;case 4:break;default:err("PARAM ERROR - $$.tabView(tabs, views, type, n)");break}var a=new $.TabView(d,b,function(h,g){h.removeClass("now");g.addClass("now")},{tabTriggerEvent:e});a.changeTab(f)};
