(function(){var c=this,f=c.JUI,e=c.$,b=1,d=JUI=c.JUI=c.$=function(g,h){if(g==c){return d.Window?new d.Window(g):c}if(d.Element){return new d.Element(g,false)}return document.getElementById(g)};var a={initialize:function(l){l=l||{};var h=l.initialize;var g=l.legacy;var k=l.name||JUI.name;var j=h||g;var i=l.protect;var m=l.afterImplement||function(){};j.constructor=this.initialize;j.$family=k.toLowerCase();if(g&&h){j.prototype=g.prototype}j.prototype.constructor=j;j.prototype.$family=j.$family;var n=function(q,o,r,p){if(!i||p||!q.prototype[o]){q.prototype[o]=r}m.call(q,o,r);return q};j.alias=function(q,o,r){if(typeof q=="string"){if((q=this.prototype[q])){return n(this,o,q,r)}}for(var p in q){this.alias(p,q[p],o)}return this};j.genericize=function(p,o){if(typeof p=="string"){if((!o||!this[p])&&typeof this.prototype[p]=="function"){this[p]=function(){var r=Array.prototype.slice.call(arguments);return this.prototype[p].apply(r.shift(),r)}}return}for(var q=0;q<p.length;q++){this.genericize(p[q],o)}return this};j.implement=function(q,o,s){if(typeof q=="string"){return n(this,q,o,s)}for(var r in q){n(this,r,q[r],o)}return this}},genericize:function(g,h){g&&g.genericize(h)},implement:function(i,h){var g=i.length;while(g--){i[g].implement(h)}}};d.Native=a;(function(){var h={Array:Array,Boolean:Boolean,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String,JUI:d};for(var m in h){a.initialize({name:m,initialize:h[m],protect:true})}var l={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 k in l){for(var j=l[k].length;j--;){a.genericize(c[k],l[k])}}})();d.name="jui";d.version="1.0.0.0";d.expando="_JUI_"+new Date,d.type=function(g){if(g==undefined){return false}if(g.$family){return(g.$family=="number"&&!isFinite(g))?false:g.$family}if(g.nodeName){switch(g.nodeType){case 1:return"element";case 3:return(/\S/).test(g.nodeValue)?"textnode":"whitespace"}}else{if(typeof g.length=="number"){if(g.callee){return"arguments"}else{if(g.item){return"collection"}}}}return typeof g};d.empty=function(){};d.noConfilict=function(){c.$=e;return this};d.extend=function(k,i){if(!i){throw"Failed! Inherit from a null object"}var g=i.prototype,j=function(){};j.prototype=g;var h=new j();k.prototype=h;h.constructor=k;k.superclass=g;if(i!=Object&&g.constructor==Object.prototype.constructor){g.constructor=i}return k};d.now=function(){return +new Date};d.getUid=(c.ActiveXObject)?function(g){return(g[d.expando]||(g[d.expando]=[b++]))[0]}:function(g){return g[d.expando]||(g[d.expando]=b++)}})();(function(b){var a=function(e){if(e&&!e.$family){var c=a.prototype;for(var d in c){e[d]=c[d]}}return e};b.Native.initialize({name:"Window",legacy:window.Window?window.Window:null,initialize:a,afterImplement:function(d,c){window[d]=a.prototype[d]=c}});a.implement({dimension:function(e){var d=0,c=0;if(typeof(window.innerWidth)=="number"){d=window.innerWidth;c=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){d=document.documentElement.clientWidth;c=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){d=document.body.clientWidth;c=document.body.clientHeight}}}if(!e){return{width:d,height:c}}if(e.width!==undefined&&e.height!==undefined){window.resizeTo(e.width,e.height)}else{if(e.width===undefined&&e.height!==undefined){window.resizeTo(d,e.height)}else{if(e.width!==undefined&&e.height===undefined){window.resizeTo(e.width,c)}}}return this},scrollPos:function(e){var d=0,c=0;if(typeof(window.pageYOffset)=="number"){c=window.pageYOffset;d=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){c=document.body.scrollTop;d=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){c=document.documentElement.scrollTop;d=document.documentElement.scrollLeft}}}if(!e){return{width:ww,height:wh}}if(e.x!==undefined&&e.y!==undefined){window.resizeTo(e.x,e.y)}else{if(e.x===undefined&&e.y!==undefined){window.resizeTo(d,e.y)}else{if(e.x!==undefined&&e.y===undefined){window.resizeTo(e.x,c)}}}return this}});new a(window);b.Window=a})(JUI);(function(b){var a=(function(){var s={},l={},k={},e={"class":"className"},d=/^(?:(?:([-]?\d*)(n{1}))?([-+]?\d*)|(odd|even))$/,r=/((?:[_a-zA-Z][\w-]*)|\*)|(?:#([\w-]+))|(?:\.([\w-]+))|(?:\[([a-z]+\w*)+([~\|\^\$\*!]?=)?['"]?([^\]]*?)["']?\])|(?::([\-\w]+)(?:\(['"]?(.+?)["']?\))*)|(?:\s*((?:[>+~\s,])|$)\s*)/g;(function(){var w=document.createElement("div"),x=(new Date()).getTime();w.innerHTML='<a name="'+x+'" class="€ b"></a>';l.qsa=!!(w.querySelectorAll&&w.querySelectorAll(".€").length)})();function v(x){var w=b.getUid(x);return(s[w])?null:(s[w]=true)}function p(w){return true}function f(w){return w.replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&")}function m(w){return{combinator:w||" ",tag:"*",id:null,classes:[],attributes:[]}}function q(z){if(k[z]){return k[z]}var y=[],C=[],w,x,B,A=sli=ci=ai=pi=0;w=m();r.lastIndex=0;while(x=r.exec(z)){if(x[1]){w.tag=x[1].toUpperCase()}else{if(x[2]){w.id=x[2]}else{if(x[3]){w.classes[ci++]=x[3]}else{if(x[4]){w.attributes[ai++]={key:x[4],op:x[5],value:x[6]}}else{if(x[9]){C[A++]=w;if(x[9]==","){y[sli++]=C;C=[];A=0;B=null}else{B=x[9]}w=m(B);ci=ai=pi=0}else{break}}}}}}C[A++]=w;y[sli++]=C;return k[z]=y}var t={" ":function(x,y,A,C){var z,D,B=0,w=A.length;z=y.getElementsByTagName(x);if(C){while(D=z[B++]){D.nodeType==1&&C(D)&&(A[w++]=D)}}else{while(D=z[B++]){D.nodeType==1&&(A[w++]=D)}}return A}};var i={" ":function(x,w){while(x=x.parentNode){if(x==w||(w==document&&x.documentElement)){return true}}return false}};var h={"=":function(w){return w},"~=":function(w){return new RegExp("(?:^|\\s+)"+f(w)+"(?:\\s+|$)")},"!=":function(w){return w},"^=":function(w){return new RegExp("^"+f(w))},"$=":function(w){return new RegExp(f(w)+"$")},"*=":function(w){return new RegExp(f(w))},"|=":function(w){return new RegExp("^"+f(w)+"-?")}};var o={"=":function(w,x){return w==x},"~=":function(w,x){return x.test(w)},"!=":function(w,x){return w!=x},"^=":function(w,x){return x.test(w)},"$=":function(w,x){return x.test(w)},"*=":function(w,x){return x.test(w)},"|=":function(w,x){return x.test(w)}};var n={klass:function(w,x){var C,z=0,y=[],A=0,B;B=new RegExp("(?:^|\\s+)"+f(x)+"(?:\\s+|$)");while(C=w[z++]){B.test(C.className)&&(y[A++]=C)}return y},attribute:function(x,B){var y,z=0,A=[],w=0,D,E=e[B.key]||B.key,C=/^(?:src|href|action)$/.test(E)?2:0;if(B.op){D=h[B.op](B.value);while(y=x[z++]){o[B.op](y[E]||y.getAttribute(E,C),D)&&(A[w++]=y)}}else{while(y=x[z++]){((y[E]||y.getAttribute(E,C))!=null)&&(A[w++]=y)}}return A}};function u(A,C){var E=[],F,D=0,G,I=v,x=A.combinator,w=A.id,H=A.tag,z=A.classes,B=A.attributes;if(w){var y=document.getElementById(w);if(H=="*"||y.tagName==H){while(cxt=C[D++]){if(i[x](y,cxt)){E=[y];break}}}}else{if(H){D=0;s={};if(C.length==1){I=false}while(cxt=C[D++]){E=t[x](H,cxt,E,I)}}}if(z.length>(D=0)){while(G=z[D++]){E=n.klass(E,G)}}if(B.length>(D=0)){while(G=B[D++]){E=n.attribute(E,G)}}return E}function j(y,z){var x=0,w;s={};nthNodesCache={};while(w=y[x++]){z=u(w,z)}return z}function g(w,B){var z=[],y=0,A,x=q(w);while(A=x[y++]){if(z.length>0){z=j(A,B).concat(z)}else{z=j(A,B)}}return z}function c(B,x){var z=0,A,y,C,w;x=x[0][0];if(x.id&&x.id!=B.id){return false}if(x.classes.length>(z=0)){while(A=x.classes[z++]){if(!(new RegExp("(?:^|\\s+)"+f(A)+"(?:\\s+|$)")).test(B.className)){return false}}}if(x.attributes.length>(z=0)){while(A=x.attributes[z++]){y=e[A.key];w=/^(?:src|href|action)$/.test(y)?2:0;y=B[y]||B.getAttribute(y,w);if(A.op){if(!o[A.op](y,h[A.op](A.value))){return false}}else{if(y==null){return false}}}}return true}return function(w,x){if(!w||typeof w!=="string"){return[]}x=x||document;if(x.nodeType!==1&&x.nodeType!==9){return[]}if(l.qsa){try{return x.querySelectorAll(w)}catch(y){return g(w,[x])}}else{return g(w,[x])}}})();b.Selector=a})(JUI);(function(e){var k={};(function(){var n=document.createElement("div"),p="_jui_"+(new Date()).getTime(),m;n.innerHTML='   <link/><table></table><a name="'+p+'" class="€ b" href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select>';k={opacity:(typeof n.style.opacity)!=="undefined"?true:false,innerText:(typeof n.innerText)!==undefined?true:false,leadingWhitespace:n.firstChild&&n.firstChild.nodeType==3,cssFloat:!(n.style.cssFloat===undefined),cloneEvent:false,tbody:false,htmlSerialize:false};if(n.getElementsByTagName){k.tbody=!!n.getElementsByTagName("tbody").length;k.htmlSerialize=!!n.getElementsByTagName("link").length}if(n.attachEvent&&n.fireEvent){n.attachEvent("onclick",function o(){k.cloneEvent=true;n.detachEvent("onclick",o)});n.cloneNode(true).fireEvent("onclick")}})();function i(m){return m.replace(/-\D/g,function(n){return n.charAt(1).toUpperCase()})}function d(m){return m.replace(/[A-Z]/g,function(n){return("-"+n.charAt(0).toLowerCase())})}var f={"class":"className","for":"htmlFor","float":k.cssFloat?"cssFloat":"styleFloat"},j={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:"@"},h={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};(function(){var z=["Top","Right","Bottom","Left"],q="margin",n="padding",y="border",s=z.length,v;while(v=z[--s]){var x=q+v,w=n+v,u=y+v;h[q][x]=j[x]="@px";h[n][w]=j[w]="@px";h[y][u]=j[u]="@px @ rgb(@, @, @)";var r=u+"Width",t=u+"Style",o=u+"Color";h[u]={};h.borderWidth[r]=h[u][r]=j[r]="@px";h.borderStyle[t]=h[u][t]=j[t]="@";h.borderColor[o]=h[u][o]=j[o]="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 c=function(m,q){if(q!==false){var p=l(document.createElement(m));if(q&&q.style){p.css(q.style);delete q.style}p.attr(q);return p}if(e.type(m)!=="string"){return l(m)}var p,n,o=/^#([\w-]+)$/;if(o.test(m)||!e.Selector){return l(document.getElementById(m.replace("#","")))}else{n=e.Selector(m);return new a(n,false)}};var a=function(n){if(n&&n.$family!=="elements"){var m=0,r=[];while((r[m]=l(n[m++]))){}r.length--;var o=a.prototype;for(var q in o){r[q]=o[q]}n=r}return n};function l(m){if(m&&!m.$family&&!(/^object|embed$/i).test(m.tagName)){var n=c.prototype;for(var o in n){m[o]=n[o]}}return m}e.Native.initialize({name:"Element",initialize:c,protect:true,afterImplement:function(m,n){if(Array[m]){return}a.implement(m,function(){var o=[],s=true;for(var q=0,p=this.length;q<p;q++){var r=this[q][m].apply(this[q],arguments);o.push(r);if(s){s=(e.type(r)=="element")}}return(s)?new a(o,false):o})}});e.Native.initialize({name:"Elements",initialize:a,protect:true});function g(s){var t=/^<(\w+)\s*\/?>$/.exec(s);if(t){return document.createElement(t[1])}var u=[],p=[],m=document.createElement("div");s=s.replace(/(<(\w+)[^>]*?)\/>/g,function(x,y,w){return w.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?x:y+"></"+w+">"});var v=s.replace(/^\s+/,"").substring(0,10).toLowerCase();var o=!v.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!v.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||v.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!v.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!v.indexOf("<td")||!v.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!v.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!k.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];m.innerHTML=o[1]+s+o[2];while(o[0]--){m=m.lastChild}if(k.tbody){var n=/<tbody/i.test(s),r=!v.indexOf("<table")&&!n?m.firstChild&&m.firstChild.childNodes:o[1]=="<table>"&&!n?m.childNodes:[];for(var q=r.length-1;q>=0;--q){if((r[q].tagName=="TBODY")&&!r[q].childNodes.length){r[q].parentNode.removeChild(r[q])}}}if(!k.leadingWhitespace&&/^\s/.test(s)){m.insertBefore(document.createTextNode(s.match(/^\s*/)[0]),m.firstChild)}return m.firstChild}c.implement({setStyle:function(q,r){if(q=="opacity"){r=parseFloat(r);if(k.opacity){this.style.opacity=r}else{this.style.filter=(this.style.filter||"").replace(/alpha\([^)]*\)/,"")+(r+""=="NaN"?"":"alpha(opacity="+r*100+")");this.zoom=1}if(opacity==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"}}else{if(this.style.visibility!="visible"){this.style.visibility="visible"}}return}q=f[q]||i(q);var p=e.type(r);if(p!="string"){r=(p!="array"&&p!="arguments")?[r]:r;var m=(j[q]||"@").split(" "),o=m.length,n;while(o--){n=r[o];if(!(n===0||n)){m[o]=""}else{m[o]=e.type(n)=="number"?m[o].replace("@",Math.round(n)):n}}r=m.join(" ")}else{if(r==""+Number(r)){r=Math.round(r)}}try{this.style[q]=r}catch(s){}return this},getStyle:function(p){if(p=="opacity"){if(k.opacity){return this.style.opacity}else{return this.style.filter&&this.style.filter.indexOf("opacity=")>=0?(parseFloat(this.style.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}}p=f[p]||i(p);var m=this.style[p];if(!(m===0||m)){m=[];for(var n in h){if(p!=n){continue}for(var o in h[n]){m.push(this.getStyle(o))}return m.join(" ")}if(this.currentStyle){return this.currentStyle[p]}var q=this.getDocument().defaultView.getComputedStyle(this,null);return(q)?q.getPropertyValue([d(p)]):null}return m},css:function(m,n){if(e.type(m)=="object"){for(var o in m){this.setStyle(o,m[o])}return this}if(n===undefined){return this.getStyle(m)}else{this.setStyle(m,n);return this}},getProperty:function(m){var n=f[m];var o=(n)?this[n]:this.getAttribute(m,2);return(b[m])?!!o:(n)?o:o||null},setProperty:function(m,o){var n=f[m];if(n&&b[m]){o=!!o}n?this[n]=o:this.setAttribute(m,""+o);return this},attr:function(m,o){if(e.type(m)=="object"){for(var n in m){this.setProperty(n,m[n])}return this}if(o===undefined){return this.getProperty(m)}else{this.setProperty(m,o);return this}},dimension:function(m){if(!(m===0||m)){return{width:this.offsetWidth,height:this.offsetHeight}}if(m.width!==undefined){this.css("width",m.width)}if(m.height!==undefined){this.css("height",m.height)}return this},position:function(q){if(q===undefined){if(this.parentNode===null||this.style.display=="none"){return false}if(this.getBoundingClientRect){box=this.getBoundingClientRect();var n=Math.max(document.documentElement.scrollTop,document.body.scrollTop);var o=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);return{x:box.left+o,y:box.top+n}}else{if(document.getBoxObjectFor){box=document.getBoxObjectFor(this);var m=(this.style.borderLeftWidth)?parseInt(this.style.borderLeftWidth):0;var p=(this.style.borderTopWidth)?parseInt(this.style.borderTopWidth):0;q=[box.x-m,box.y-p]}else{q=[this.offsetLeft,this.offsetTop];parent=this.offsetParent;if(parent!=this){while(parent){q[0]+=parent.offsetLeft;q[1]+=parent.offsetTop;parent=parent.offsetParent}}if(this.style.position=="absolute"){q[0]-=document.body.offsetLeft;q[1]-=document.body.offsetTop}}}if(this.parentNode){parent=this.parentNode}else{parent=null}while(parent&&parent.tagName!="BODY"&&parent.tagName!="HTML"){q[0]-=parent.scrollLeft;q[1]-=parent.scrollTop;if(parent.parentNode){parent=parent.parentNode}else{parent=null}}return{x:q[0],y:q[1]}}if(q.x!==undefined){this.css("left",q.x)}if(q.y!==undefined){this.css("top",q.y)}return this}});c.implement({getDocument:function(){return this.ownerDocument},getElement:function(m){var n=[];if(e.Selector){n=e.Selector(m,this)}else{n=this.getElementsByTagName(m)}return n[0]?new c(n[0],false):null},getElements:function(m){if(e.Selector){return new a(e.Selector(m,this),false)}else{return new a(this.getElementsByTagName(m),false)}}});c.implement({txt:function(m){if(m===undefined){return this[k.innerText?"innerText":"textContent"]}else{this.html(m.escapeHTML());return m}},html:function(m){if(m!==undefined){this.innerHTML=m}return this.innerHTML},clone:function(n){n=n!==false;if(k.cloneEvent){var m=this.outerHTML;if(!m){var o=this.ownerDocument.createElement("div");o.appendChild(this.cloneNode(n));m=o.innerHTML}return new c(g(m.replace(new RegExp(e.expando+'="(?:\d+|null)"',"g"),"").replace(/^\s*/,"")),false)}else{return new c(this.cloneNode(n),false)}},prependTo:function(m){m.insertBefore(this,m.firstChild);return this},appendTo:function(m){m.appendChild(this);return this},inject:function(m,n){if(n=="top"){this.prependTo(m)}else{this.appendTo(m)}return this},insert:function(m,n){if(n=="after"){this.after(m)}else{this.before(m)}return this},before:function(m){m.parentNode.insertBefore(this,m);return this},after:function(m){var n=m.parentNode;if(m.nextSibling){n.insertBefore(this,m.nextSibling)}else{n.appendChild(this)}return this},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this},empty:function(){var o,n=this.childNodes,m=0;while(o=n[m++]){o.destroy()}return this},destroy:function(){this.empty();this.dispose();this.removeEvents();return null}});c.alias({dispose:"remove"});e.Element=c;e.Elements=a})(JUI);(function(c){var d=[],a={};c.Element&&d.push(c.Element);c.Window&&d.push(c.Window);function b(e,g){var f=e.length;while(f){if(e[f--]==g){return true}}return false}c.Native.implement(d,{data:function(e,g){var f=c.getUid(this);if(e&&!a[f]){a[f]={}}if(g!==undefined){a[f][e]=g;return g}return e?a[f][e]:f},erase:function(e){var f=c.getUid(this);if(e){if(a[f]){delete a[f][e];e="";for(e in a[f]){break}(!e)&&this.erase()}}else{delete a[f]}return this}});c.Native.implement(d,{addEvent:function(i,h,k,j){var f=this.data("events")||this.data("events",{});k=k?k:this;f[i]=f[i]||{keys:[],values:[]};if(!j&&b(f[i].keys,h)){return this}var g=function(l){if(c.Event){l=new c.Event(l)}h.call(k,l)};if(i=="unload"){var e=g;g=function(){self.removeListener("unload",g);e()}}if(this.addEventListener){this.addEventListener(i,g,false)}else{this.attachEvent("on"+i,g)}f[i].keys.push(h);f[i].values.push(g);return this},removeEvent:function(k,j){var h=this.data("events");if(!h||!h[k]){return this}if(!j){var g=0,e=h[k].keys;while(j=e[g++]){this.removeEvent(k,j)}delete h[k];k="";for(k in h){break}if(!k){this.erase()}else{this.data("events",h)}return this}var m=-1,g=0,l;while(l=h[k].keys[g]){if(l==j){m=g;break}g++}if(m==-1){return this}h[k].keys.splice(m,1);j=h[k].values.splice(m,1)[0];if(this.removeEventListener){this.removeEventListener(k,j,false)}else{this.detachEvent("on"+k,j)}return this},addEvents:function(e){for(var f in e){this.addEvent(f,e[f])}return this},removeEvents:function(e){if(c.type(e)=="object"){for(var g in e){this.removeEvent(g,e[g])}return this}var f=this.data("events");if(!f){return this}if(!e){for(var g in f){this.removeEvent(g)}this.erase("events")}else{this.removeEvent(e)}return this},fireEvent:function(j,h,f){var n=this.data("events");if(!n||!n[j]){return this}var e=0,l=n[j],k,g,m=this;while(k=l[e++]){g=function(i){return function(){i.apply(m,h)}};setTimeout(g(k),f)}return this}})})(JUI);(function(b){var a=function(c){this.events=[];this.name=c};b.Native.initialize({name:"CustomEvent",initialize:a,protect:true});a.implement({fire:function(){var d=[];for(var e=0;e<arguments.length;e++){d.push(arguments[e])}for(var e=0,c=this.events.length;e<c;e++){var f=this.events[e];f[0].call(f[1],this.name,d)}},subscribe:function(d,c){this.events.push([d,c])},clear:function(){this.events=[]}});b.CustomEvent=a})(JUI);(function(c){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(d){if(d.$family==="event"){return d}var n=document,i=window,m=d.type;var j=d.target||d.srcElement;while(j&&j.nodeType==3){j=j.parentNode}if(/key/.test(m)){var e=d.which||d.keyCode;var o=b[e];if(m=="keydown"){var g=e-111;if(g>0&&g<13){o="f"+g}}o=o||String.fromCharCode(e).toLowerCase()}else{if(m.match(/(click|mouse|menu)/i)){n=(!n.compatMode||n.compatMode=="CSS1Compat")?n.documentElement:n.body;var l={x:d.pageX||d.clientX+n.scrollLeft,y:d.pageY||d.clientY+n.scrollTop};var f={x:(d.pageX)?d.pageX-i.pageXOffset:d.clientX,y:(d.pageY)?d.pageY-i.pageYOffset:d.clientY};if(m.match(/DOMMouseScroll|mousewheel/)){var k=(d.wheelDelta)?d.wheelDelta/120:-(d.detail||0)/3}var h=(d.which==3)||(d.button==2)}}return(function(r,q){for(var s in q){r[s]=q[s]}return r})(this,{event:d,type:m,page:l,client:f,rightClick:h,wheel:k,target:j,code:e,key:o,shift:d.shiftKey,control:d.ctrlKey,alt:d.altKey,meta:d.metaKey})};c.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}});c.Event=a})(JUI);(function($){var special={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function replaceChars(chr){return special[chr]||"\\u00"+Math.floor(chr.charCodeAt()/16).toString(16)+(chr.charCodeAt()%16).toString(16)}var JSON={decode:function(s){if($.type(s)!="string"||!s.length){return null}return eval("("+s+")")},encode:function(obj){var s=[];switch($.type(obj)){case"undefined":return"undefined";break;case"null":return"null";break;case"number":case"boolean":case"date":case"function":return obj.toString();break;case"string":return'"'+obj.replace(/[\x00-\x1f\\"]/g,replaceChars)+'"';break;case"array":for(var i=0,l=obj.length;i<l;i++){s.push($.JSON.encode(obj[i]))}return"["+s.join(",")+"]";break;case"error":case"object":for(var p in obj){s.push('"'+p.replace(/[\x00-\x1f\\"]/g,replaceChars)+'":'+$.JSON.encode(obj[p]))}return"{"+s.join(",")+"}";break;default:return"";break}}};$.JSON=JSON})(JUI);(function(d){var a={encode:false,decode:false,path:false,domain:false,duration:false,secure:false,document:document};function c(e){for(var f in e){a[f]=e[f]}}var b={write:function(g,h,f){c(f);if(a.encode){h=encodeURIComponent(h)}if(a.domain){h+="; domain="+a.domain}if(a.path){h+="; path="+a.path}if(a.duration){var e=new Date();e.setTime(e.getTime()+a.duration*24*3600000);h+="; expires="+e.toGMTString()}if(a.secure){h+="; secure"}a.document.cookie=g+"="+h;return this},read:function(f,e){var g=a.document.cookie.match("(?:^|;)\\s*"+f.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")+"=([^;]*)");if(a.decode){return(g)?decodeURIComponent(g[1]):null}else{return(g)?g[1]:null}},remove:function(f,e){c(e);a.duration=-1;b.write(f,"");return this}};d.Cookie=b})(JUI);(function(e){var g={},a,c=1,b="jui_cb_";var f=function(h){a=h;return this};e.Native.initialize({name:"Loader",initialize:f,protect:true});function d(q){q=q||a||{};var h,j,o="js",p=e.empty,k,n,i;h=q.url;o=q.type;j=q.charset;p=q.callback;n=q.bind;k=q.param;i=q.cache;if(!h||h==""){return}try{if(k&&p){e.Loader[b+c]=function(){p.apply(n,arguments)};if(h.indexOf("?")>-1){h=h+"&cb=JUI.Loader."+b+c}else{h=h+"?cb=JUI.Loader."+b+c}if(!i){h=h+"&r="+Math.random()}c++}var l;if(o=="css"){l=document.createElement("link");l.rel="stylesheet";l.type="text/css";l.href=h}else{l=document.createElement("script");l.src=h;l.type="text/javascript"}j&&(l.charset=j);if(!k&&p){l.onload=function(){p.apply(n,[h,true])};l.onerror=function(){p.apply(n,[h,false])};l.onreadystatechange=function(){if(l.readyState=="loaded"){p.apply(n,[h,true])}}}g[h]=l;document.getElementsByTagName("head")[0].appendChild(l)}catch(m){p(h,false)}}f.implement({load:function(k){if(!k){k=[a]}else{if(e.type(k)!="array"){k=Array.prototype.slice.call(arguments,0)}}var h=0,j;while(j=k[h++]){d(j)}return this},chain:function(j){if(e.type(j)!="array"){j=Array.prototype.slice.call(arguments,0)}if(!j||j.length==0){return}var i=j.shift(),h=this;cb=function(k,m){m.callback(m.url);h.chain(k)};this.load({url:i.url,type:i.type,callback:cb(j,i)})},cancel:function(h){if(!g[h]){return}document.removeChild(g[h]);delete g[h]}});e.Loader=f})(JUI);(function(c){function a(f,g){for(var e in g){f[e]=g[e]}return f}function b(e){return e.replace(/\b[a-z]/g,function(f){return f.toUpperCase()})}var d=function(n){var l={onStart:c.empty,onComplete:c.empty,onCancel:c.empty,onEnterFrame:c.empty,fps:50,duration:500,unit:false,link:"ignore",effect:false},e=20,h=null,m=0,i=0,f=0,j=function(o){return o},k=this;l=a(l,n);function g(){var o=(c.now()-m)/l.duration;if(o>=1){k.stopTimer();o=1}o=j(o);k.change(o);l.onEnterFrame(o)}this.change=function(o){return o};this.startTimer=function(o){l=a(l,o);e=Math.round(1000/l.fps);if(l.effect&&c.Fx.Transitions){var p=l.effect.split(":");j=c.Fx.Transitions;j=j[b(p[0])];if(p[1]){j=j["ease"+b(p[1])+(p[2]?b(p[2]):"")]}}m=c.now();try{clearInterval(h)}catch(q){}h=setInterval(g,e);l.onStart()};this.stopTimer=function(){clearInterval(h);l.onComplete()};this.cancelTimer=function(){clearInterval(h);l.onCancel()};return this};c.Native.initialize({name:"Fx",initialize:d,protect:false});c.Fx=d})(JUI);(function(d){var e={Linear:function(f){return f},Pow:function(g,f){return Math.pow(g,f||6)},Expo:function(f){return Math.pow(2,8*(f-1))},Circ:function(f){return 1-Math.sin(Math.acos(f))},Sine:function(f){return 1-Math.sin((1-f)*Math.PI/2)},Back:function(g,f){f=f||1.618;return Math.pow(g,2)*((f+1)*g-f)},Bounce:function(i){var h;for(var g=0,f=1;1;g+=f,f/=2){if(i>=(7-4*g)/11){h=f*f-Math.pow((11-6*g-11*i)/4,2);break}}return h},Elastic:function(g,f){return Math.pow(2,10*--g)*Math.cos(20*g*Math.PI*(f||1)/3)}};var c=["Quad","Cubic","Quart","Quint"],b=0,a;while(a=c[b]){e[a]=function(f){return Math.pow(f,b+2)};b++}d.Fx.Transitions={};for(a in e){d.Fx.Transitions[a]=(function(f){return{easeIn:function(h,g){return e[f](h,g)},easeOut:function(h,g){return 1-e[f](1-h,g)},easeInOut:function(h,g){return(h<=0.5)?e[f](2*h,g)/2:(2-e[f](2*(1-h),g))/2}}})(a)}})(JUI);(function(b){var a=function(f,d){var e={},c={},g=b(f);this.constructor.superclass.constructor.apply(this,[d]);this.change=function(i){for(var h in e){g.setStyle(h,Math.round(e[h]+i*c[h]))}};this.start=function(i,h){if(!i){return}for(var j in i){if(b.type(i[j])!=="array"||i[j].length===1||i[j][0]===undefined){e[j]=parseFloat(g.getStyle(j));e[j]=isNaN(e[j])?0:e[j];c[j]=parseFloat(i[j][0]===undefined?i[j]:i[j][1]);c[j]=(isNaN(c[j])?0:c[j])-e[j]}else{e[j]=parseFloat(i[j][0]);e[j]=isNaN(e[j])?0:e[j];c[j]=parseFloat(i[j][1]);c[j]=(isNaN(c[j])?0:c[j])-e[j]}}this.startTimer()}};a=b.extend(a,b.Fx);b.Native.initialize({name:"Fx.Morph",initialize:a,protect:false});b.Fx.Morph=a})(JUI);(function(c){function a(e,f){for(var d in f){e[d]=f[d]}return e}var b=function(i){var d=c(document),e=i,h={},k=this;function j(){e.addEvent("mousedown",g)}function m(){e.removeEvent("mousedown",g)}function g(n){if(n.rightClick){return}h=n.page;k.onStart(n);if(e.setCapture){e.setCapture()}else{if(window.captureEvents){window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP)}}d.addEvents({mousemove:f,mouseup:l})}function l(n){if(e.releaseCapture){e.releaseCapture()}else{if(window.captureEvents){window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP)}}d.removeEvents({mousemove:f,mouseup:l});k.onStop(n)}function f(n){var o=n.page;k.onDrag(n,{x:o.x-h.x,y:o.y-h.y})}this.onStart=function(n){return n};this.onDrag=function(n,o){return n};this.onStop=function(n){return n};this.detach=function(){m();return this};this.attach=function(){j();return this};j()};c.Native.initialize({name:"Drag",initialize:b,protect:true});c.Drag=b})(JUI);(function(c){function a(e,f){for(var d in f){e[d]=f[d]}return e}var b=function(g,m){var j=c(g),l={onStart:c.empty,onSnap:c.empty,onDrag:c.empty,onStop:c.empty,limit:false,handle:false,modifiers:{x:"width",y:"height"}},d,i,k,f={},h={};l=a(l,m);d=l.handle;i=l.limit;k=l.modifiers;if(c.type(d)==="array"){d=new c.Elements(d)}else{if(d){d=c(d)}else{d=j}}this.constructor.superclass.constructor.apply(this,[d]);function e(o,n){if(c.check(n[0])&&o<n[0]){o=n[0]}if(c.check(n[1])&&o>n[1]){o=n[1]}return o}this.onDrag=function(n,o){h.x=f.width+o.x;h.y=f.height+o.y;if(i){i.x&&(h.x=e(h.x,i.x));i.y&&(h.y=e(h.y,i.y))}for(var q in k){j.setStyle(k[q],h[q])}l.onDrag(n,o)};this.onStart=function(n){f=j.dimension();l.onStart(n)};this.onStop=function(n){l.onStop(n)}};c.Native.initialize({name:"Drag.Resize",initialize:b,protect:true});b=c.extend(b,c.Drag);c.Drag.Resize=b})(JUI);(function(b){function a(e,f){for(var d in f){e[d]=f[d]}return e}var c=function(g,m){var j=b(g),l={onStart:b.empty,onSnap:b.empty,onDrag:b.empty,onStop:b.empty,limit:false,handle:false,modifiers:{x:"left",y:"top"}},d,i,k,f={},h={};l=a(l,m);d=l.handle;i=l.limit;k=l.modifiers;if(b.type(d)==="array"){d=new b.Elements(d)}else{if(d){d=b(d)}else{d=j}}this.constructor.superclass.constructor.apply(this,[d]);function e(o,n){if(b.check(n[0])&&o<n[0]){o=n[0]}if(b.check(n[1])&&o>n[1]){o=n[1]}return o}this.onDrag=function(n,o){h.x=f.x+o.x;h.y=f.y+o.y;if(i){i.x&&(h.x=e(h.x,i.x));i.y&&(h.y=e(h.y,i.y))}for(var q in k){j.setStyle(k[q],h[q])}l.onDrag(n,o)};this.onStart=function(n){f=j.position();l.onStart(n)};this.onStop=function(n){l.onStop(n)};j.setStyle("position","absolute")};b.Native.initialize({name:"Drag.Move",initialize:c,protect:true});c=b.extend(c,b.Drag);b.Drag.Move=c})(JUI);(function(){if(!IkanPlayerOCX){return}var s={width:480,height:360};var m="normal";var n=$("#playbox_w");var f=$("#playbox");var c=$("#playbox_pp");var z=$("#playbox_title");var l=f.getElements("tr");var d=l[0];var x=l[1].getElements("td")[0];var t=l[1].getElements("td")[2];var o=l[2];var a=f.getElement("td.bg_4 span");var r=0;var k=$("#playbox_b4");var u=$("#playbox_b4a");var q=$("#playbox_b4span");function j(D,B){var C=k.offsetWidth-u.offsetWidth-16;var A=C/100*D;q.css("width",A);u.css("margin-left",A);if(IkanPlayerOCX.player!=null&&!B){IkanPlayerOCX.player.Volume=D}}function h(A){doxnX=A.client.x-u.position().x;$(document).addEvent("mousemove",p);$(document).addEvent("mouseup",g)}function p(C){var D=k.offsetWidth-u.offsetWidth-16;var A=Math.max(0,C.client.x-k.position().x-16-r);A=Math.min(A,D);var B=Math.floor(A/D*100);j(B)}function g(A){$(document).removeEvent("mousemove",p);$(document).removeEvent("mouseup",g)}u.addEvent("mousedown",h);if(IkanPlayerOCX.player!=null){j(IkanPlayerOCX.player.Volume,false)}new $.Drag.Move(f,{handle:d});new $.Drag.Resize(c,{handle:a});var e=new $.Fx.Morph(c,{duration:500,effect:"Linear:in:out",onComplete:function(){d.css("display","");o.css("display","");x.css("display","");t.css("display","")}});var b=new $.Fx.Morph(f,{duration:500,effect:"Linear:in:out"});$("#playbox_btn_close").addEvent("mousedown",function(A){IkanPlayerOCX.setMode();A.stop()},this);$(document).addEvent("keydown",function(A){if(A.key=="esc"&&m=="cinema"){IkanPlayerOCX.setMode();A.stop()}},this);$("#playbox_btn_mode").addEvent("click",function(A){A.stop();this.blur();IkanPlayerOCX.setMode()});var y=$("#playbox_bg");function w(){var A=document.documentElement.scrollWidth;var B=document.documentElement.scrollHeight;y.css({width:A,height:B})}$(window).addEvent("resize",w);function v(){y.css("display","");w()}function i(){y.css("display","none")}IkanPlayerOCX.setMode=function(){m=m=="normal"?"cinema":"normal";if(m=="normal"){i();z.className="";f.css("background-color","");d.css("display","none");o.css("display","none");x.css("display","none");t.css("display","none");c.css({width:s.width,height:s.height});f.css({left:"50%","margin-left":-280,top:187})}else{v();z.className="no_bg";f.css("background-color","#000");var E=n.position();f.css({left:E.x,"margin-left":"",top:E.y});var B=document.documentElement.clientWidth;var D=document.documentElement.clientHeight;var A=B/100*80;var C=Math.max(0,D/100*80-60);e.start({width:A,height:C});b.start({left:Math.max(0,(B-A)/2),top:Math.max(0,(D-C)/2)})}}})();(function(d){var c="pplive.com";if(document.domain.toLowerCase().indexOf("pptv.com")!=-1){c="pptv.com"}var e={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 f=false,b=true;var a={onLogined:new d.CustomEvent("onLogined"),onlogouted:new d.CustomEvent("onlogouted"),userInfo:{Gender:"",PpNum:"",ExpNum:"",LevelName:"",NextLevelName:"",NextLevelExpNum:"",Area:"",Subscribe:"",UnreadNotes:"",HeadPic:"",Email:"",OnlineTime:"",UserName:""},tryReadUserInfo:function(){var l=d.Cookie.read("UDI");var j=d.Cookie.read("PPName");if(l==null||j==null){this.onlogouted.fire();return}var h=j.split("$");this.userInfo.UserName=decodeURIComponent(h[0]);var i=l.split("$");var g=0;for(var k in this.userInfo){if(k=="UserName"){break}this.userInfo[k]=decodeURIComponent(i[g]);g++}f=true;this.onLogined.fire(this.userInfo)},wirteUserInfo:function(i){var g={domain:c,path:"/",duration:7};for(var h in i){d.Cookie.write(h,i[h],g)}},logout:function(){var g={domain:c,path:"/"};d.Cookie.remove("PPKey",g);d.Cookie.remove("UDI",g);d.Cookie.remove("PPName",g);f=false;this.onlogouted.fire()},login:function(i,j){var g=this;var h=e.login+"username="+i+"&password="+j;new d.Loader({url:h,type:"js",callback:function(k,l){g.loginFnc(k,l)},param:true}).load()},loginFnc:function(g,h){if(g==0){alert(h);return}if(g==1){this.usernameel.value="";this.userpwdel.value="";this.hideLoginBox();this.wirteUserInfo(h)}this.tryReadUserInfo()},checkLogined:function(){return f},showLoginBox:function(h){if(b){b=false;this.boxel=d("#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="";d(document).addEvent("click",function(j){if(j.target.getAttribute("stopdocumentclick")==null){this.hideLoginBox()}},this);this.boxel.addEvent("click",function(j){if(j.target.tagName!="A"){j.stop()}});this.btnpostel.addEvent("click",function(j){this.checkLoginForm()},this);this.usernameel.addEvent("keydown",function(j){if(j.key=="enter"){this.checkLoginForm()}},this);this.userpwdel.addEvent("keydown",function(j){if(j.key=="enter"){this.checkLoginForm()}},this)}this.boxel.css({display:"block"});var g=0;var i=0;g=h.x;i=h.y;this.boxel.css({top:i,left:g});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(j,i,k,g){var h=(j=="add"?e.addFavor:e.favorCheck)+"type="+i+"&id="+k;new d.Loader({url:h,type:"js",callback:function(l){g(l)},param:true}).load()},like:function(k,i,l,j,g){var h=(k=="add"?e.like:e.likeCheck)+"type="+i+"&id="+l+"&attitude="+j;new d.Loader({url:h,type:"js",callback:function(m){g(m)},param:true}).load()}};if(typeof d.IKan=="undefined"){d.IKan={}}d.IKan.User2=a})(JUI);(function(d){function h(j,i){for(var k in j){if(typeof i[k]!="undefined"){j[k]=i[k]}}}function a(k){var i=[];for(var j in k){i.push(j+"="+encodeURIComponent(k[j]))}return i.join("&")}var g={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 c="pplive.com";if(b!=""){c=b.indexOf("pptv.com")!=-1?"pptv.com":c}for(var f in g){g[f]=g[f].replace("{0}",c)}var e={isOneGetCheckCode:true,replyId:null,listCount:0,pageCount:0,onPost:new d.CustomEvent("onPost"),timeLine:0,episodeId:"",rebind:function(i){this.cnf={type:null,id:null,num:20,ipage:1};h(this.cnf,i);this.getList()},init:function(k,l,j){this.cnf={type:null,id:null,num:20,ipage:1};h(this.cnf,l);this.ops={contentMaxLength:100,pageNumSplit:" | "};if(j){h(this.ops,j)}d.IKan.User2.onLogined.subscribe(this.onLogined,this);d.IKan.User2.onlogouted.subscribe(this.onlogouted,this);this.lsboxel=k.getElement("div.CommentList");this.count_els=k.getElements(".CommentCount");this.pageNumInfo_els=k.getElements(".PageNum .AllNum");this.pageList_els=k.getElements(".PageNum .PageList");this.btnRef_els=k.getElements(".btnRef");var i=k.getElement("div.inquote");this.lsItemQuoteTp=i.html();i.innerHTML="{Replies_HTML}";this.lsItemTp=this.lsboxel.html();this.lsboxel.html("");this.form_btnLogout_el=k.getElement("a.btnLogout");this.form_btnLogin_el=k.getElement("a.btnLogin");this.form_userName_el=k.getElement("a.userName");this.form_ckNotUser_el=k.getElement("input.ckNotUser");this.form_txtContent_el=k.getElement("textarea.txtContent");this.form_btnPost_el=k.getElement("input.btnPost");this.form_txtCheckCode_el=k.getElement("input.txtCheckCode");this.form_imgCheckCode_el=k.getElement("img.imgCheckCode");this.form_refCheckCode_el=k.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()},onLogined:function(k,j){var i=j[0];this.form_ckNotUser_el.checked=false;this.form_userName_el.html(i.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(j,i){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(i){this.refCheckCodeImg();this.form_txtCheckCode_el.focus();this.form_txtCheckCode_el.select();i.stop()},this);this.form_txtCheckCode_el.addEvent("focus",function(){if(this.isOneGetCheckCode){this.refCheckCodeImg()}},this);this.form_txtContent_el.addEvent("keydown",function(i){if(i.key=="enter"&&i.control){this.post();i.stop()}},this);this.form_txtCheckCode_el.addEvent("keydown",function(i){if(i.key=="enter"&&i.control){this.post();i.stop()}},this);this.form_btnPost_el.addEvent("click",function(i){this.post();i.stop()},this);this.form_btnLogin_el.addEvent("click",function(i){var j=this.position();d.IKan.User2.showLoginBox(j);i.stop()});this.form_btnLogout_el.addEvent("click",function(i){d.IKan.User2.logout()});this.btnRef_els.addEvent("click",function(i){this.getList();i.stop()},this)},post:function(){var i=this;var l=this.form_txtContent_el.value;var m=false;var k=l.match(/\[回复 \S* 的发言\]/g);if(k){l=l.replace(k,"");if(this.replyId!=null){m=true}}if(l.length==0){this.form_txtContent_el.focus();return}if(this.form_txtCheckCode_el.value.length==0){this.form_txtCheckCode_el.focus();return}var n={notbkuser:this.form_ckNotUser_el.checked?1:0,content:l.substring(0,this.ops.contentMaxLength),checkcode:this.form_txtCheckCode_el.value};this.onPost.fire();if(m){n.cid=this.replyId}else{n.timeline=this.timeLine;n.episodeid=this.episodeId}var j=g.post+a(this.cnf)+"&"+a(n);this.timeLine=0;this.episodeId="";new d.Loader({url:j,type:"js",callback:function(o){i.postFnc(o)},param:true}).load()},postFnc:function(i){if(i.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(i.Msg)}},refCheckCodeImg:function(){this.isOneGetCheckCode=false;this.form_imgCheckCode_el.src=g.checkCodeImg+"?v="+Math.random()},getList:function(){this.lsboxel.html("评论加载中...");var i=this;var j=g.getList+a(this.cnf);new d.Loader({url:j,type:"js",callback:function(k){i.fillList(k)},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 n=1;var k=this.pageCount;n=l-3;k=l+3;if(n<1){n=1;k=this.pageCount>7?7:this.pageCount}if(k>this.pageCount){n=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(n<1){n=1}for(var m=n;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(i){if(i==-1){this.cnf.ipage--}else{if(i==-2){this.cnf.ipage++}else{this.cnf.ipage=i}}this.getList()},parseItem:function(r){var n=[];if(r.Replies.length>0){for(var l=0,m=r.Replies.length;l<m;l++){n.push(this.parseItemQuote(r.Replies[l]))}r.quote_begin="";r.quote_end=""}else{r.quote_begin="<!--";r.quote_end="-->"}r.Replies_HTML=n.join("");var o=r.UserName;var k=r.UserFace;var q=this.checkLoginUser(o);if(q){r.UserName_HTML='<span><a href="'+g.userHome+o+'" target="_blank">'+o+"</a></span>";r.UserFace_HTML='<a href="'+g.userHome+o+'" target="_blank"><img src="'+k+'" width="40" height="40" /></a>'}else{r.UserName_HTML=o;r.UserFace_HTML='<img src="'+k+'" width="40" height="40" />'}var t=this.lsItemTp;for(var j in r){t=t.replace(new RegExp("\\{(\\w*)\\}","g"),function(){var i=arguments[1];if(typeof r[i]=="undefined"){return arguments[0]}return r[i]})}return t},parseItemQuote:function(k){var j=this.lsItemQuoteTp;var l=k.UserName;var i=k.UserFace;var n=this.checkLoginUser(l);if(n){k.UserName_HTML='<span><a href="'+g.userHome+l+'" target="_blank">'+l+"</a></span>";k.UserFace_HTML='<a href="'+g.userHome+l+'" target="_blank"><img src="'+i+'" width="20" height="20" /></a>'}else{k.UserName_HTML=l;k.UserFace_HTML='<img src="'+i+'" width="20" height="20" />'}for(var m in k){j=j.replace(new RegExp("\\{(\\w*)\\}","g"),function(){var o=arguments[1];if(typeof k[o]=="undefined"){return arguments[0]}return k[o]})}return j},checkLoginUser:function(i){return i.match(/\d*.\d.*/g)?false:true},ref:function(){this.getList()},reply:function(j,i){this.replyId=j;this.form_txtContent_el.value="xxx";this.form_txtContent_el.focus();this.form_txtContent_el.value="[回复 "+i+" 的发言]\n";this.form_txtContent_el.focus()},report:function(i){window.open(g.report+this.cnf.type+"/"+this.cnf.id+"/"+i)},up:function(l,k){var i=this;var j=g.up+"type="+this.cnf.type+"&cid="+l;new d.Loader({url:j,type:"js",callback:function(m){if(m.Status==1){if(k!=null){k.html(parseInt(k.html())+1);k.css("color","red")}}else{alert(m.Msg)}},param:true}).load()}};if(typeof d.IKan=="undefined"){d.IKan={}}d.IKan.Comment=e})(JUI);(function(f){var e="ikan.pplive.com";if(document.domain.toLowerCase().indexOf("ikan.pptv.com")!=-1){e="ikan.pptv.com"}var d=10;var g="pptv_history";function c(){var i=f.Cookie.read(g);if(i==null){return[]}var h=[];try{h=f.JSON.decode(decodeURIComponent(i))}catch(j){}return h}function a(h){var j={domain:e,path:"/",duration:365};var i=encodeURIComponent(f.JSON.encode(h));f.Cookie.write(g,i,j)}var b={onClear:new f.CustomEvent("onClear"),write:function(m){var j=c();var l=[];for(var k=0,h=j.length;k<h;k++){if(m.link!=j[k].link){l.push(j[k])}}m.time=(new Date()).getTime();l.push(m);if(l.length>d){l.shift()}a(l)},read:function(l){var k=c();if(l){var h=[];var n=0,j=k.length;if(k.length>l){n=k.length-l}for(var m=n;m<j;m++){h.push(k[m])}return h}return k},remove:function(l){var j=this.read();for(var k=0,h=j.length;k<h;k++){if(j[k].link==l){j.splice(k,1);break}}a(j)},clear:function(){var h={domain:e,path:"/"};f.Cookie.remove(g,h);this.onClear.fire()}};if(typeof f.IKan=="undefined"){f.IKan={}}f.IKan.History=b})(JUI);(function(c){var b="pplive.com";if(document.domain!=""){b=document.domain.indexOf("pptv.com")!=-1?"pptv.com":b}var a=function(f,e,d){this.inputel=f;this.btnel=e;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(d);this.init()};c.Native.initialize({name:"SearchTips",initialize:a,protect:true});a.implement({mergeOptions:function(d){for(var e in d){this.ops[e]=d[e]}},truncate:function(e,d,h){var f=0,k=[],j=e.length;for(var g=0;g<j;g++){if(e.charCodeAt(g)>255){f+=2}else{f++}if(f>d){break}}return(h&&g<j)?e.substring(0,g)+"...":e.substring(0,g)},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(d){this.inputel.value=d?d:"";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);c(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(d){if(this.tipsLis.length==0){return}if(this.selectedIx==-1){this.selectedIx=0}else{this.tipsLis[this.selectedIx].className="";this.selectedIx+=d}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;this.inputel.value=this.tipsLis[this.selectedIx].getElementsByTagName("a")[0].innerHTML},showTipBox:function(){this.gotourl="";var d=this.inputel.position();this.tipboxel.style.top=d.y+24+"px";this.tipboxel.style.left=d.x+"px";this.tipboxel.style.display="block"},hideTipBox:function(){this.gotourl="";this.tipboxel.style.display="none"},getSuggestList:function(){var d=this;var e=new c.Loader({url:this.ops.searchSuggestUrl+encodeURIComponent(this.getText()),type:"js",callback:function(f){d.fillList.call(d,f)},param:true});e.load()},input_key_up:function(e){if(e.key=="up"||e.key=="down"){return}if(this.getText()==""){this.hideTipBox()}if(this.getText()!=""&&this.getText()!=this.ops.defaultTex&&this.prevText!=this.getText()){var d=this;clearTimeout(this.tid);this.tid=setTimeout(function(){d.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(d){switch(d.key){case"enter":d.stop();if(this.gotourl!=""){window.location.href=this.gotourl}else{this.btn_click()}break;case"up":d.stop();this.setSelectedItem(-1);break;case"down":d.stop();this.setSelectedItem(1);break}}});if(typeof c.IKan=="undefined"){c.IKan={}}c.IKan.SearchTips=a})(JUI);(function(b){var a=function(f,e,c,d){this.onChangePage=new b.CustomEvent("onChangePage");this.ops={btnTriggerEvent:"click",autoSwitchTime:5000,direction:"horizontal",onChangePage:null};this.mergeOptions(d);if(this.ops.onChangePage!=null){this.onChangePage.subscribe(this.ops.onChangePage)}this.pageCount=0;this.selectedPageNum=0;this.width=e;this.height=c;this.tpEl=f;this.init()};b.Native.initialize({name:"PhotoSlide",initialize:a,protect:true});a.implement({mergeOptions:function(c){for(var d in c){this.ops[d]=c[d]}},beginAutoSwitch:function(){if(this.ops.autoSwitchTime<1||this.pageCount<2){return}clearInterval(this.sid);var c=this;this.sid=setInterval(function(){var d=0;if(c.selectedPageNum<c.pageCount-1){d=c.selectedPageNum+1}c.changePage(d)},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(c){this.stopAutoSwitch()},this);this.tpEl.addEvent("mouseout",function(c){this.beginAutoSwitch()},this);this.fnc()},fnc:function(){this.infos=[];var f=this.picsMoveEl.getElements("div");this.pageCount=f.length;if(this.pageCount==0){return}var d=this.width;var j=this.height;if(this.ops.direction=="horizontal"){d=this.pageCount*this.width}else{j=this.pageCount*this.height}this.picsMoveEl.css({width:d,height:j,overflow:"hidden"});var g=[];for(var e=0,c=this.pageCount;e<c;e++){f[e].css({width:this.width,height:this.height,overflow:"hidden","float":"left"});g.push(['<a href="javascript:;">',e+1,"</a>"].join(""));var l=f[e].getElements("a");if(l.length>0){this.infos.push({title:l[0].attr("title"),link:l[0].attr("href")})}else{this.infos.push({title:"No Text",link:""})}}if(this.btnsEl!=null){this.btnsEl.html(g.join(""));var k=this.btnsEl.getElements("a");k.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(c){if(this.btnsEl!=null){var d=this.btnsEl.getElements("a");d[this.selectedPageNum].className="";d[c].className="now"}if(this.titleEl!=null){var e=this.infos[c];this.titleEl.html(e.title);this.titleEl.attr("href",e.link)}this.selectedPageNum=c;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 myHistoryInit(d){var a=$("#myhistory_view"),b=$("#myhistory_label_num");$("#myhistory_btn_ce").addEvent("click",function(){this.blur();if(this.className=="type_1"){this.className="type_2";a.css("display","none")}else{this.className="type_1";a.css("display","")}});$("#myhistory_btn_clear").addEvent("click",function(){$.IKan.History.clear()});function c(){var k=$.IKan.History.read(5);b.html(k.length);if(k.length==0){a.html('<span style="padding:10px;">暂时没有记录</span>');return}var n=[],e=true,g=1000*60*60*24,f=Math.floor((new Date()).getTime()/g);var m,l,j;for(var h=k.length-1;h>-1;h--){m=k[h];l="";j=f-Math.floor(m.time/g);if(j==0){l="今天"}else{if(j==1){l="昨天"}else{l=j+"天前"}}n.push(['<dl class="c_b',(e?" now":""),'">',"<dt>",l," 看过</dt>","<dd>",'<a href="',m.link,'" class="txt">',m.title,"</a>",'<a href="',m.link,'" class="img"><img src="',m.img,'" width="60" height="80" alt="',m.title,'" /></a>',"</dd>","</dl>"].join(""));e=false}a.html(n.join(""))}$.IKan.History.write(d);$.IKan.History.onClear.subscribe(function(f,e){c()});c()}function myUserInit(f){var a=$("div.la_miniTopNav .login span");var j=a[0].getElements("a")[0];var g=a[0].getElements("a")[1];g.addEvent("click",function(){$.IKan.User2.logout()});$.IKan.User2.onLogined.subscribe(function(l,k){j.html(k[0].UserName);a[0].css("display","");a[1].css("display","none")});$.IKan.User2.onlogouted.subscribe(function(l,k){a[0].css("display","none");a[1].css("display","")});var h=f.type;var b=f.id;var i=$("#play_btn_like");var c=$("#play_btn_favor");function e(k){if(k){i.className="btn_1 btn_1_select";i.html("我喜欢")}else{i.className="btn_1";i.html("喜欢")}}function d(k){if(k){c.className="btn_2 btn_2_select";c.html("已收藏")}else{c.className="btn_2";c.html("收藏")}}$.IKan.User2.onLogined.subscribe(function(l,k){$.IKan.User2.like("check",h,b,1,function(m){e(m.Status==1?true:false)});$.IKan.User2.favor("check",h,b,function(m){d(m.Status==1?true:false)})});$.IKan.User2.onlogouted.subscribe(function(l,k){e(false);d(false)});i.addEvent("click",function(k){k.stop();if(!$.IKan.User2.checkLogined()){$.IKan.User2.showLoginBox(this.position());return}if(i.className!="btn_1"){return}$.IKan.User2.like("add",h,b,1,function(l){e(l.Status==1?true:false)})});c.addEvent("click",function(k){k.stop();if(!$.IKan.User2.checkLogined()){$.IKan.User2.showLoginBox(this.position());return}if(c.className!="btn_2"){return}$.IKan.User2.favor("add",h,b,function(l){d(l.Status==1?true:false)})});$.IKan.User2.tryReadUserInfo()}(function(){var a,b=[];function d(){var g=0,e=b.length,h,j,f;for(;g<e;g++){h=b[g];j=h.pos.position();h.src.css({left:j.x,top:j.y});f=h.src.dimension();f.height=f.height>0?f.height:1;h.pos.css({height:f.height})}}function c(e,f){e=$(e);f=$(f);b.push({src:e,pos:f});if(!a){a=setInterval(d,1000)}e.css({position:"absolute",display:"block"});d()}window.$ma=c})();