window.lib={version:"1.0",update:"2011/4/12"};window.qiyi={};lib.swf=lib.swf||{};lib.getDomain=function(){var a=window.location.hostname.split("."),a=a.slice(a.length-2);return a.join(".")};lib.SITE_DOMAIN=lib.getDomain();lib.PROJECT_NAME="qiyi";lib.PROJECT_LOGIN_COMPONENT=function(){};lib.TIPS_ICON_NOTICE="http://www.qiyipic.com/common/fix/passport_images/success.gif";lib.TIPS_ICON_ALERT="";lib.TIPS_ICON_CONFIRM="http://www.qiyipic.com/common/fix/passport_images/warning.gif";
lib.swf.canComment=function(){return info&&info.data&&!!info.data.qitanId};lib.swf.scroll2qitan=function(){if(info&&info.data&&info.data.qitanId){if($("#j-gui-qitan"))try{lib.component.scrollTo($("#j-editor-textarea")[0],0)}catch(a){}else(function(){var a="";switch(info.data.qitanId.charAt(0)){case "1":a="m/";break;case "2":a="s/";break;case "3":a="t/";break;case "6":a="r/"}a&&window.open("http://t.qiyi.com/"+a+info.data.qitanId)})();return!0}else return!1};window.lib=window.lib||{version:"1.0",update:"2011/4/12"};
lib.kit={util:{}};lib.swf=lib.swf||{};lib.flash={};lib.ad={};lib.action={};lib.model={};lib.view={};lib.tpl={};lib.msg={};lib.PROJECT_DEBUG=!1;lib.PROJECT_VERSION="20110915153512507";lib.PROJECT_BASE_PATH="http://static.qiyi.com/js/"+lib.PROJECT_NAME+"/";lib._PAGE_START_TIME=(new Date).getTime();
(function(a){var c=lib.PROJECT_VERSION,b=lib.PROJECT_DEBUG;lib.log=b?function(c){a.console?console.log(c):lib.kit.$trace&&lib.kit.$trace(""+c)}:function(){};__loadMainJs=function(a){b?(document.write('<script type="text/javascript" src="'+lib.PROJECT_BASE_PATH+'base.js"><\/script>'),a&&document.write('<script type="text/javascript" src="'+lib.PROJECT_BASE_PATH+"jobs/"+a.toLowerCase()+'.js"><\/script>')):(document.write('<script type="text/javascript" src="'+lib.PROJECT_BASE_PATH+c+'/base.js"><\/script>'),
a&&document.write('<script type="text/javascript" src="'+lib.PROJECT_BASE_PATH+c+"/jobs/"+a.toLowerCase()+'.js"><\/script>'))};__loadSingleJs=function(a){b?a&&document.write('<script type="text/javascript" src="'+lib.PROJECT_BASE_PATH+"/jobs/"+a.toLowerCase()+'.js"><\/script>'):a&&document.write('<script type="text/javascript" src="'+lib.PROJECT_BASE_PATH+c+"/jobs/"+a.toLowerCase()+'.js"><\/script>')};if(lib.SITE_DOMAIN)document.domain=lib.SITE_DOMAIN})(this);
Object.extend=function(a,c){for(var b in c)a[b]=c[b];return a};$reg=function(a,c){for(var b=a.split("."),d=window;b.length>0;){var e=b.shift();typeof d[e]=="undefined"&&(d[e]={});d=d[e]}c()};var Class={create:function(){for(var a=function(){this.initialize.apply(this,arguments)},c=0,b=arguments.length,d;c<b;c++)d=arguments[c],d!=null&&Object.extend(a.prototype,d);return a}};
Object.extend(lib,{guid:1,each:function(a,c){if(a.constructor==Array)for(var b=0,d=a.length;b<d;b++){if(c(a[b],b)===!1)break}else if(a.constructor==Object)for(b in a)if(c(a[b],b)===!1)break},fixEvent:function(a){for(var a=window.event||a,c="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which type".split(" "),
b=a,d={},e=c.length,f;e;)f=c[--e],d[f]=b[f];if(!d.target)d.target=d.srcElement||document;if(d.target.nodeType===3)d.target=d.target.parentNode;d.clientX=a.clientX-document.documentElement.clientLeft-document.body.clientLeft;d.clientY=a.clientY-document.documentElement.clientTop-document.body.clientTop;if(d.pageX==null&&d.clientX!=null)a=document.documentElement,c=document.body,d.pageX=d.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),d.pageY=d.clientY+(a&&a.scrollTop||
c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0);if(!d.which&&d.button!==void 0)d.which=d.button&1?1:d.button&2?3:d.button&4?2:0;if(!d.relatedTarget&&d.fromElement)d.relatedTarget=d.fromElement===d.target?d.toElement:d.fromElement;return d},isNative:function(a){return!!a&&(/\{\s*\[native code\]\s*\}/.test(String(a))||/\{\s*\/\* source code not available \*\/\s*\}/.test(String(a)))}});
lib.Element=Class.create({initialize:function(a){this._els=a;Array.prototype.push.apply(this,this._els);this._events={}}});
Object.extend(lib.Element.prototype,{length:0,get:function(a){return this._els[a]},getAll:function(){return this._els},each:function(a){for(var c=0,b=this._els.length;c<b;c++)a(lib.$(this._els[c]),c)},html:function(){var a=this._els[0],c="",b="";if(a){if(arguments.length==1)return a.innerHTML=arguments[0],this;else if(arguments.length==2)if(b=arguments[0],c=arguments[1],a.insertAdjacentHTML)a.insertAdjacentHTML(b,c);else{var d=null,d=a.ownerDocument.createRange();switch(String(b).toLowerCase()){case "beforebegin":d.setStartBefore(a);
d=d.createContextualFragment(c);a.parentNode.insertBefore(d,a);break;case "afterbegin":d.selectNodeContents(a);d.collapse(!0);d=d.createContextualFragment(c);a.insertBefore(d,a.firstChild);break;case "beforeend":d.selectNodeContents(a);d.collapse(!1);d=d.createContextualFragment(c);a.appendChild(d);break;case "afterend":d.setStartAfter(a),d=d.createContextualFragment(c),a.parentNode.insertBefore(d,a.nextSibling)}}return a.innerHTML}},parent:function(a){var c=this._els[0];if(c)return a?c.nodeName.toLowerCase()==
a?lib.$(c):(this._els[0]=c.parentNode,this.parent(a)):lib.$(c.parentNode)},attr:function(a,c){if(typeof c!="undefined"&&c!=null)return lib.each(this._els,function(b){switch(a){case "class":b.className=c;break;case "style":b.style.cssText=c;break;default:b.setAttribute(a,c)}}),this;else switch(a){case "class":return this._els[0].className;case "style":return this._els[0].style.cssText;default:return this._els[0].getAttribute(a)}},removeAttr:function(a){lib.each(this._els,function(c){c.removeAttribute(a)});
return this},pos:function(a){if(a){if("left"in a)this._els[0].style.left=a.left+"px";if("top"in a)this._els[0].style.top=a.top+"px";if("right"in a)this._els[0].style.right=a.right+"px";if("bottom"in a)this._els[0].style.bottom=a.bottom+"px"}else return lib.box.getPosition(this._els[0])},box:function(){var a=this._els[0],c=this.pos();c.width=a.offsetWidth;c.height=a.offsetHeight;c.bottom=c.top+c.height;c.right=c.left+c.width;return c},val:function(a){var c=this._els[0],b=null;if(a!=void 0)return c.value=
a,this;else{switch(c.tagName.toLowerCase()){case "input":case "textarea":b=c.value;break;case "select":a=c.selectedIndex;if(c.options.length>0)b=c.options[a>-1?a:0].value;break;default:(c=c.getAttribute("data-value"))&&(b=c)}return b}},addClass:function(a){lib.each(this._els,function(c){var b=c.className.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ").split(" ");if(b.indexOf(a)==-1)b.push(a),c.className=b.join(" ")});return this},removeClass:function(a){lib.each(this._els,function(c){var b=c.className.replace(/^\s+|\s+$/g,
"").replace(/\s+/g," ").split(" "),d=b.indexOf(a);if(d>-1)b.splice(d,1),c.className=b.join(" ")}.bind(this));return this},hasClass:function(a){return this._els[0].className.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ").split(" ").include(a)},css:function(a,c){if(typeof c=="undefined"){var b=this._els[0];if(a=="opacity")if(lib.IE){var b=b.style.filter,d=b.toLowerCase();return b&&d.indexOf("opacity=")>=0?parseFloat(d.match(/opacity=([^)]*)/)[1])/100:1}else return b.style.opacity?parseFloat(b.style.opacity):
1;else{d=function(a){return a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})};if(window.getComputedStyle)return window.getComputedStyle(b,null).getPropertyValue(d(a));if(document.defaultView&&document.defaultView.getComputedStyle){var e=document.defaultView.getComputedStyle(b,null);if(e)return e.getPropertyValue(d(a));if(a=="display")return"none"}if(b.currentStyle)return b.currentStyle[a];return b.style[a]}}else return this.each(function(b){if(a=="opacity")if(lib.IE){b[0].style.filter="Alpha(Opacity="+
c*100+");";try{b[0].style.opacity=c==1?"1":""+c}catch(d){}}else b[0].style.opacity=c==1?"1":""+c;else b[0].style[a]=c}),this},append:function(a){this._els[0].appendChild(a._els[0]);return this},elements:function(){return this._els},show:function(){lib.each(this._els,function(a){a.style.display="block"});return this},hide:function(){lib.each(this._els,function(a){a.style.display="none"});return this},focus:function(a){if(typeof a=="function")lib.Event.on(this._els[0],"focus",a);else this._els[0].focus();
return this},blur:function(a){if(typeof a=="function")lib.Event.on(this._els[0],"blur",a);else this._els[0].blur();return this},down:function(a){return lib.$(a,this._els[0])},on:function(a,c){lib.each(this._els,function(b){if(!b._events)b._events={};if(!lib.IE&&(a=="mouseleave"||a=="mouseenter")){a=a=="mouseleave"?"mouseout":"mouseover";var d=c;c=function(a){var c=a.relatedTarget;(c==null||c&&c!=this&&!lib.$(this).contains(c))&&d.apply(this,arguments)}}b._events[a]||(b._events[a]=[]);if(!c.guid)c.guid=
lib.guid++;var e=c._scopeApplied?c:c.bindEvent(b);e.guid=c.guid;e.handler=c;b._events[a].push(e);lib.Event.on(b,a,e)});return this},un:function(a,c){lib.each(this._els,function(b){if(!lib.IE&&(a=="mouseleave"||a=="mouseenter"))a=a=="mouseleave"?"mouseout":"mouseover";var d=b._events,e=0,f;if(d&&(d=d[a]))if(c)for(;e<d.length;e++){if(f=d[e],c.guid===f.guid){d.splice(e--,1);lib.Event.un(b,a,f);break}}else for(f=d.length;e<f;e++)lib.$(b).un(a,d[0].handler)});return this},_delegateList:[],_getDlgParent:function(a){if(!a)return null;
return a.getAttribute&&(a.getAttribute("j-delegate")||a.getAttribute("j-dlg"))?a:this._getDlgParent(a.parentNode)},delegate:function(a,c,b){if(a){var c=c||function(){},b=b||"click",d=this,e=function(b){var b=window.event||b,e=b.target||b.srcElement,h=e.getAttribute("j-delegate")||e.getAttribute("j-dlg");h&&h==a?c({target:e,event:b}):e.getAttribute("j-dlgbubble")!==null&&(e=d._getDlgParent(e),h=e.getAttribute("j-delegate")||e.getAttribute("j-dlg"),e&&h&&h==a&&c({target:e,event:b}))};this._delegateList.push([c,
e]);lib.$(this._els[0]).on(b,e);return this}},prev:function(){var a=this._els[0];if(a&&a.previousElementSibling)return a.previousElementSibling;do a=a.previousSibling;while(a&&a.nodeType!=1);return a},next:function(){var a=this._els[0];do a=a.nextSibling;while(a&&a.nodeType!=1);return a},undelegate:function(a,c,b){for(var a=null,d=this._delegateList,e=d.length,f=0;f<e;f++)d[f][0]===c&&(a=d[f][1]);a&&lib.$(this._els[0]).un(b||"click",a)},remove:function(){this._els.each(function(a){a.parentNode&&a.parentNode.removeChild(a)})},
contains:function(a){a=lib.$(a);if(this._els[0].contains)return this._els[0].contains(a._els[0]);else if(this._els[0].compareDocumentPosition)return this._els[0].compareDocumentPosition(a._els[0])==20;else{for(var c=!1,a=a._els[0];a.parentNode!=null;){if(a.parentNode===this._els[0]){c=!0;break}a=a.parentNode}return c}},fixPostion:function(){var a=this.box().bottom-lib.box.getViewportHeight(),c=lib.box.getPageScrollTop();(c<a||c>this.box().top)&&window.scrollTo(0,a)}});lib.Element.create=function(a){return new lib.Element([document.createElement(a)])};
lib.$=function(a,c){if(typeof a!="string"){if(a.attr){if(!a._els[0])return null;return a}return new lib.Element([a])}var b=lib.find(a,c);if(b&&b.length>0)return new lib.Element(b);return null};if(!lib.NO_CONFLICT)window.$=lib.$;
lib.Template=Class.create({initialize:function(a){this.template=a+"";this.pattern={left:"${",right:"}"};this.regPattern=/(?:^|.|\r|\n)?(\$\{(.*?)\})/g},evaluate:function(a){var c="";if(typeof a=="object")var b=this,c=this.template.replace(this.regPattern,function(c,e,f){if((c=c.split(b.pattern.left)[0])&&c=="\\")return e;return a[f]!=void 0?c+a[f]:c});return c}});
lib.Event={on:function(a,c,b){if(!a||!c||!b)return this;a.addEventListener?a.addEventListener(c,b,!1):a.attachEvent?a.attachEvent("on"+c,b):lib.Event.manager.add(c,eventHandle);return this},unbind:function(a,c,b){for(var d=0,e=b.length;d<e;d++)this.un(a,c,b[d]);a["on"+c]=null;return this},un:function(a,c,b){if(!a||!c)return this;a.removeEventListener?(c==="mouseleave"?c="mouseout":c==="mouseenter"&&(c="mouseover"),a.removeEventListener(c,b,!1)):a.detachEvent?a.detachEvent("on"+c,b):lib.Event.manager.del(c,
b)},stop:function(a){lib.Event.stopPropagation(a);lib.Event.preventDefault(a)},stopPropagation:function(a){a.cancelBubble=!0;a.stopPropagation&&a.stopPropagation()},preventDefault:function(a){try{a.returnValue=!1,a.preventDefault&&a.preventDefault()}catch(c){}},getEvent:function(){if(event)return event;for(var a=arguments.callee.caller,c,b=0;a!=null&&b<40;){if((c=a.arguments[0])&&(c.constructor==Event||c.constructor==MouseEvent))break;b++;a=a.caller}return c}};lib.go=function(a){location.href=a};
lib.base=function(a,c){var b=arguments.callee.caller;if(b.superClass_)return b.superClass_.constructor.apply(a,Array.prototype.slice.call(arguments,1));for(var d=Array.prototype.slice.call(arguments,2),e=!1,f=a.constructor;f;f=f.superClass_&&f.superClass_.constructor)if(f.prototype[c]===b)e=!0;else if(e)return f.prototype[c].apply(a,d);if(a[c]===b)return a.constructor.prototype[c].apply(a,d);else throw Error("lib.base called from a method of one name to a method of a different name");};
lib.inherits=function(a,c){function b(){}b.prototype=c.prototype;a.superClass_=c.prototype;a.prototype=new b;a.prototype.constructor=a};
Object.extend(lib,{Class:function(a,c){if(arguments[0]&&typeof arguments[0]=="object")return Class.create.apply(null,arguments);var b=c.ns||lib;if(b[a])return b[a];var d=c.extend||lib.Object,e=function(){};e.prototype=d.prototype;var f=c.construct||function(){},g=c.properties||{},h=c.methods||{},j=c.statics||{},e=new e,k;for(k in e)e.hasOwnProperty(k)&&delete e[k];for(k in g)e[k]=g[k];for(k in h)e[k]=h[k];e.constructor=f;e.superclass=d;e.__NAME__=a;f.prototype=e;for(k in j)f[k]=j[k];return b[a]=f},
abstractMethod:function(){throw"not implemented";},emptyMethod:function(){},reg:$reg});lib.Class("Object",{extend:Object,methods:{callsuper:function(a){typeof a=="string"?this.constructor.prototype.superclass.prototype[a].apply(this,arguments):arguments.callee.caller.prototype.superclass.apply(this,arguments)}}});
Object.extend(Function.prototype,{bind:function(){for(var a=this,c=arguments[0],b=[],d=1,e=arguments.length;d<e;d++)b.push(arguments[d]);return function(){for(var d=b.concat(),e=0,h=arguments.length;e<h;e++)d.push(arguments[e]);return a.apply(c,d)}},bindEvent:function(){for(var a=this,c=arguments[0],b=[],d=1,e=arguments.length;d<e;d++)b.push(arguments[d]);return function(d){var e=b.concat();e.unshift(d||window.event);return a.apply(c,e)}},method:function(a,c){this[a]=c;return this},inherits:function(a){function c(){}
this.superClass_=c.prototype=a.prototype;this.prototype=new c;this.prototype.constructor=this}});
Object.extend(lib,function(){var a={},c=navigator.userAgent.toLowerCase();a.IE=/msie/.test(c);a.OPERA=/opera/.test(c);a.MOZ=/gecko/.test(c);a.IE6=/msie 6/.test(c);a.IE7=/msie 7/.test(c);a.IE8=/msie 8/.test(c);a.IE9=/msie 9/.test(c);a.SAFARI=/safari/.test(c);a.WEBKIT=/webkit/.test(c);a.winXP=/windows nt 5.1/.test(c);a.winVista=/windows nt 6.0/.test(c);a.CHROME=/chrome/.test(c);a.iphone=/iphone os/.test(c);a.ipod=/ipod\;/.test(c);a.android=/android/.test(c);a.iphone4=/iphone os 4_/.test(c);a.realIpad=
/ipad/.test(c);a.lePad=/lepad_hls/.test(c);a.ipad=a.realIpad||a.iphone4||a.lePad;a.Mac=/macintosh/.test(c);a.TT=/tencenttraveler/.test(c);a.$360=/360se/.test(c);a.ff=/firefox/.test(c);a.ff4=/firefox\/4/.test(c);a.Maxthon=!1;try{a.Maxthon=window.external.max_version?!0:!1}catch(b){}lib.swf.browserVer=function(){if(a.IE6)return"IE6";if(a.IE7)return"IE7";if(a.IE8)return"IE8";if(a.IE9)return"IE9";if(a.ff)return"fireFox";if(a.CHROME)return"chrome";return"none"};a.getOS=function(){var a=navigator.userAgent,
c=navigator.platform=="Win32"||navigator.platform=="Windows",b=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";if(b)return"Mac";if(navigator.platform=="X11"&&!c&&!b)return"Unix";if(c){if(a.indexOf("Windows NT 5.0")>-1||a.indexOf("Windows 2000")>-1)return"Win2000";if(a.indexOf("Windows NT 5.1")>-1||a.indexOf("Windows XP")>-1)return"WinXP";if(a.indexOf("Windows NT 5.2")>-1||a.indexOf("Windows 2003")>-1)return"Win2003";if(a.indexOf("Windows NT 6.0")>
-1||a.indexOf("Windows Vista")>-1)return"WinVista";if(a.indexOf("Windows NT 6.1")>-1||a.indexOf("Windows 7")>-1)return"Win7"}return"None"};a.getBr=function(){var a=navigator.userAgent.toLowerCase(),c=!1;try{var b=window.external;if(c=b.max_version?!0:!1)return"\u50b2\u6e38 "+b.max_version}catch(g){}if(/msie/.test(a))return a.match(/msie [\d.]+/);if(/Firefox/i.test(a))return"firefox "+a.match(/firefox\/([\d.]+)/)[1];if(/360se/.test(a))return"360";if(/tencenttraveler/.test(a))return"TT";if(/chrome\/([\d.]+)/.test(a))return a.match(/chrome\/[\d.]+/);
if(/safari/.test(a))return a.match(/safari\/[\d.]+/);if(/opera/.test(a))return"opera";return"\u975e\u4e3b\u6d41\u6d4f\u89c8\u5668"};return a}());if(lib.IE6)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(e$$18){}
lib.kit.slog={url:"http://jsmsg.video.qiyi.com/m.gif",log:function(a,c){if(c)this.url=c;if(a){var b=new Image,d="slog_"+Math.floor(Math.random()*2147483648).toString(36);lib.kit.slog[d]=b;b.onload=b.onerror=b.onabort=function(){b.onload=b.onerror=b.onabort=null;lib.kit.slog[d]=null;delete lib.kit.slog[d];b=null};params=[];for(d in a)params.push(d+"="+encodeURIComponent(a[d]));b.src=this.url+"?"+params.join("&")}}};
if(lib.PROJECT_DEBUG==!1)window.onerror=function(){lib.IE&&arguments.length==3&&lib.kit.slog.log({flag:"error",msg:arguments[0],file:arguments[1],line:arguments[2],url:window.location.href,ver:lib.PROJECT_VERSION});return!0};var Url=function(a){this.url=a||"";this.query={};this.hrParam={};this.parse()};
(function(a){a.prototype={parse:function(a){if(a)this.url=a;this.parseAnchor();this.parseParam()},parseAnchor:function(){var a=this.url.match(/\#(.*)/);this._anchor=a=a?a[1]:null;if(a!=null)this.anchor=this.getNameValuePair(a),this.url=this.url.replace(/\#.*/,"")},parseParam:function(){var a=this.url.match(/\?([^\?]*)/),a=a?a[1]:null;if(a!=null)this.query=this.getNameValuePair(a),this.hrParam=this.getNameValuePair(a,"-"),this.url=this.url.replace(/\?([^\?]*)/,"")},getNameValuePair:function(a,b){var d=
{},e=b||"&";a.replace(RegExp("([^"+e+"=]*)(?:=([^"+e+"]*))?","gim"),function(a,b,c){if(b=="")return d;d[b]=c||""});return d},getParam:function(a){return this.query[a]||""},getHrParam:function(a){return this.hrParam[a]||""},clearParam:function(){this.query={}},setParam:function(a,b){if(a==null||a==""||typeof a!="string")throw Error("no param name set");this.query=this.query||{};this.query[a]=b},setParams:function(a){this.query=a},serialize:function(a){var b=[],d;for(d in a)a[d]==null||a[d]==""?b.push(d+
"="):b.push(d+"="+a[d]);return b.join("&")},toString:function(){var a=this.serialize(this.query);return this.url+(a.length>0?"?"+a:"")+(this.anchor?"#"+this.serialize(this.anchor):"")},getHashStr:function(a){return this.anchor?"#"+this.serialize(this.anchor):a?"#":""}}})(Url);$reg("lib.kit.Url",function(){lib.kit.Url=Url});lib.kit.util=lib.kit.util||{};lib.kit.util.jsLoad={};
(function(){function a(a,b){var c;try{if(typeof b!="undefined")for(c in a)b[c]&&(a[c]=b[c])}finally{return a}}function c(a,c){b(a,c);var d=a.urls,h=document.createElement("script");h.src=d.url;h.charset=d.charset;h.onload=h.onerror=h.onreadystatechange=function(){if(!h||!h.readyState||!(h.readyState!="loaded"&&h.readyState!="complete"))c.script_loaded_num++,h.onload=h.onreadystatechange=h.onerror=null,h.src="",h.parentNode.removeChild(h),h=null};document.getElementsByTagName("head")[0].appendChild(h)}
function b(a,b){var c=a.urls,d,j,k;if(typeof a.CACHE!="undefiend"){var l=a.CACHE;j=c.url;for(d in l)d=="varname"?k=l[d]:j+=l[d]+"/";c.url=j.toString()}if(typeof a.GET!="undefined"){j=new lib.kit.Url(c.url);l=a.GET;for(d in l)d=="cb"&&(k=l[d]),j.setParam(d,encodeURIComponent(l[d]));c.url=j.toString()}b.script_var_arr.push(k);c.charset=a.charset||"utf-8"}function d(b,d){var g={urls:[],charset:"utf-8",timeout:-1,CACHE:d.CACHE,GET:d.GET,onSuccess:function(){},onError:function(){}},h={script_loaded_num:0,
is_timeout:!1,is_loadcomplete:!1,script_var_arr:[]};g.urls=typeof b=="string"?{url:b}:b;a(g,d);c(g,h);(function(){if(!(g.noreturn==!0&&g.onComplete==null)){var a,b=[];if(h.script_loaded_num==1){if(h.is_loadcomplete=!0,g.onSuccess!=null){for(a=0;a<h.script_var_arr.length;a++){var c=h.script_var_arr[a].trim(),c=c.indexOf(".")!=-1?eval(c):window[c];b.push(c)}if(h.script_var_arr.length<2)if(typeof b[0]!="undefined"&&(!b[0].code||b[0].code=="A00000"))g.onSuccess(typeof b[0].data=="undefined"?b[0]:b[0].data);
else g.onError(b[0]);else if(!b.code||b.code=="A00000")g.onSuccess(typeof b.data=="undefined"?b:b.data);else g.onError(b)}}else h.is_timeout!=!0&&setTimeout(arguments.callee,50)}})();g.timeout>0&&setTimeout(function(){if(!h.is_loadcomplete){if(g.onError)g.onError();h.is_timeout=!0}},g.timeout)}lib.kit.util.jsLoad.request=function(a,b){new d(a,b)}})();
lib.action.loadVV=function(a){var c=new Image,b=[];b.push("http://msg.video.qiyi.com/t72.gif?flag=startplay");b.push("user_type=''");b.push("user_rid=''");typeof info!="undefined"&&(typeof info.videoId!="undefined"?b.push("vid="+info.videoId):b.push("vid=''"),typeof info.pid!="undefined"?b.push("pid="+info.pid):b.push("pid=''"),typeof info.ptype!="undefined"?b.push("ptype="+info.ptype):b.push("ptype=''"),typeof info.albumId!="undefined"?b.push("albumId="+info.albumId):b.push("albumId=''"),typeof info.tvId!=
"undefined"?b.push("tvId="+info.tvId):b.push("tvId=''"));b.push("dpi="+window.screen.width+"X"+window.screen.height);b.push("version=''");b.push("come_url="+document.location.href);b.push("level=''");b.push("from=''");b.push("to=''");b.push("time=''");b.push("user=''");b.push("size=''");b.push("err_type=''");b.push("errorcode=''");b.push("flv=''");b.push("ip="+a);b.push("ad_play=''");b.push("v_play=''");b.push("ad=''");b.push("target_type=''");b.push("userid=''");b.push("cdn_area=''");b.push("tag=''");
b.push("visits="+this.getVisits());b.push("copyright=''");b.push("platform="+this.getPlatform());c.src=b.join("&")};lib.action.getVisits=function(){var a=lib.cookie.get("__qta"),a=a.split(".");return[a[1],".",a[a.length-1]].join("")};lib.action.getPlatform=function(){if(lib.realIpad)return"21";if(lib.iphone4)return"31"};var hexcase=0,b64pad="",chrsz=8;function hex_md5(a){return binl2hex(core_md5(str2binl(a),a.length*chrsz))}
function b64_md5(a){return binl2b64(core_md5(str2binl(a),a.length*chrsz))}function str_md5(a){return binl2str(core_md5(str2binl(a),a.length*chrsz))}function hex_hmac_md5(a,c){return binl2hex(core_hmac_md5(a,c))}function b64_hmac_md5(a,c){return binl2b64(core_hmac_md5(a,c))}function str_hmac_md5(a,c){return binl2str(core_hmac_md5(a,c))}function md5_vm_test(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}
function core_md5(a,c){a[c>>5]|=128<<c%32;a[(c+64>>>9<<4)+14]=c;for(var b=1732584193,d=-271733879,e=-1732584194,f=271733878,g=0;g<a.length;g+=16)var h=b,j=d,k=e,l=f,b=md5_ff(b,d,e,f,a[g+0],7,-680876936),f=md5_ff(f,b,d,e,a[g+1],12,-389564586),e=md5_ff(e,f,b,d,a[g+2],17,606105819),d=md5_ff(d,e,f,b,a[g+3],22,-1044525330),b=md5_ff(b,d,e,f,a[g+4],7,-176418897),f=md5_ff(f,b,d,e,a[g+5],12,1200080426),e=md5_ff(e,f,b,d,a[g+6],17,-1473231341),d=md5_ff(d,e,f,b,a[g+7],22,-45705983),b=md5_ff(b,d,e,f,a[g+8],7,
1770035416),f=md5_ff(f,b,d,e,a[g+9],12,-1958414417),e=md5_ff(e,f,b,d,a[g+10],17,-42063),d=md5_ff(d,e,f,b,a[g+11],22,-1990404162),b=md5_ff(b,d,e,f,a[g+12],7,1804603682),f=md5_ff(f,b,d,e,a[g+13],12,-40341101),e=md5_ff(e,f,b,d,a[g+14],17,-1502002290),d=md5_ff(d,e,f,b,a[g+15],22,1236535329),b=md5_gg(b,d,e,f,a[g+1],5,-165796510),f=md5_gg(f,b,d,e,a[g+6],9,-1069501632),e=md5_gg(e,f,b,d,a[g+11],14,643717713),d=md5_gg(d,e,f,b,a[g+0],20,-373897302),b=md5_gg(b,d,e,f,a[g+5],5,-701558691),f=md5_gg(f,b,d,e,a[g+
10],9,38016083),e=md5_gg(e,f,b,d,a[g+15],14,-660478335),d=md5_gg(d,e,f,b,a[g+4],20,-405537848),b=md5_gg(b,d,e,f,a[g+9],5,568446438),f=md5_gg(f,b,d,e,a[g+14],9,-1019803690),e=md5_gg(e,f,b,d,a[g+3],14,-187363961),d=md5_gg(d,e,f,b,a[g+8],20,1163531501),b=md5_gg(b,d,e,f,a[g+13],5,-1444681467),f=md5_gg(f,b,d,e,a[g+2],9,-51403784),e=md5_gg(e,f,b,d,a[g+7],14,1735328473),d=md5_gg(d,e,f,b,a[g+12],20,-1926607734),b=md5_hh(b,d,e,f,a[g+5],4,-378558),f=md5_hh(f,b,d,e,a[g+8],11,-2022574463),e=md5_hh(e,f,b,d,a[g+
11],16,1839030562),d=md5_hh(d,e,f,b,a[g+14],23,-35309556),b=md5_hh(b,d,e,f,a[g+1],4,-1530992060),f=md5_hh(f,b,d,e,a[g+4],11,1272893353),e=md5_hh(e,f,b,d,a[g+7],16,-155497632),d=md5_hh(d,e,f,b,a[g+10],23,-1094730640),b=md5_hh(b,d,e,f,a[g+13],4,681279174),f=md5_hh(f,b,d,e,a[g+0],11,-358537222),e=md5_hh(e,f,b,d,a[g+3],16,-722521979),d=md5_hh(d,e,f,b,a[g+6],23,76029189),b=md5_hh(b,d,e,f,a[g+9],4,-640364487),f=md5_hh(f,b,d,e,a[g+12],11,-421815835),e=md5_hh(e,f,b,d,a[g+15],16,530742520),d=md5_hh(d,e,f,
b,a[g+2],23,-995338651),b=md5_ii(b,d,e,f,a[g+0],6,-198630844),f=md5_ii(f,b,d,e,a[g+7],10,1126891415),e=md5_ii(e,f,b,d,a[g+14],15,-1416354905),d=md5_ii(d,e,f,b,a[g+5],21,-57434055),b=md5_ii(b,d,e,f,a[g+12],6,1700485571),f=md5_ii(f,b,d,e,a[g+3],10,-1894986606),e=md5_ii(e,f,b,d,a[g+10],15,-1051523),d=md5_ii(d,e,f,b,a[g+1],21,-2054922799),b=md5_ii(b,d,e,f,a[g+8],6,1873313359),f=md5_ii(f,b,d,e,a[g+15],10,-30611744),e=md5_ii(e,f,b,d,a[g+6],15,-1560198380),d=md5_ii(d,e,f,b,a[g+13],21,1309151649),b=md5_ii(b,
d,e,f,a[g+4],6,-145523070),f=md5_ii(f,b,d,e,a[g+11],10,-1120210379),e=md5_ii(e,f,b,d,a[g+2],15,718787259),d=md5_ii(d,e,f,b,a[g+9],21,-343485551),b=safe_add(b,h),d=safe_add(d,j),e=safe_add(e,k),f=safe_add(f,l);return[b,d,e,f]}function md5_cmn(a,c,b,d,e,f){return safe_add(bit_rol(safe_add(safe_add(c,a),safe_add(d,f)),e),b)}function md5_ff(a,c,b,d,e,f,g){return md5_cmn(c&b|~c&d,a,c,e,f,g)}function md5_gg(a,c,b,d,e,f,g){return md5_cmn(c&d|b&~d,a,c,e,f,g)}
function md5_hh(a,c,b,d,e,f,g){return md5_cmn(c^b^d,a,c,e,f,g)}function md5_ii(a,c,b,d,e,f,g){return md5_cmn(b^(c|~d),a,c,e,f,g)}function core_hmac_md5(a,c){var b=str2binl(a);b.length>16&&(b=core_md5(b,a.length*chrsz));for(var d=Array(16),e=Array(16),f=0;f<16;f++)d[f]=b[f]^909522486,e[f]=b[f]^1549556828;b=core_md5(d.concat(str2binl(c)),512+c.length*chrsz);return core_md5(e.concat(b),640)}function safe_add(a,c){var b=(a&65535)+(c&65535);return(a>>16)+(c>>16)+(b>>16)<<16|b&65535}
function bit_rol(a,c){return a<<c|a>>>32-c}function str2binl(a){for(var c=[],b=(1<<chrsz)-1,d=0;d<a.length*chrsz;d+=chrsz)c[d>>5]|=(a.charCodeAt(d/chrsz)&b)<<d%32;return c}function binl2str(a){for(var c="",b=(1<<chrsz)-1,d=0;d<a.length*32;d+=chrsz)c+=String.fromCharCode(a[d>>5]>>>d%32&b);return c}function binl2hex(a){for(var c=hexcase?"0123456789ABCDEF":"0123456789abcdef",b="",d=0;d<a.length*4;d++)b+=c.charAt(a[d>>2]>>d%4*8+4&15)+c.charAt(a[d>>2]>>d%4*8&15);return b}
function binl2b64(a){for(var c="",b=0;b<a.length*4;b+=3)for(var d=(a[b>>2]>>8*(b%4)&255)<<16|(a[b+1>>2]>>8*((b+1)%4)&255)<<8|a[b+2>>2]>>8*((b+2)%4)&255,e=0;e<4;e++)c+=b*8+e*6>a.length*32?b64pad:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>6*(3-e)&63);return c}
for(var plainText="Rebellious subjects, enemies to peace,\n    Profaners of this neighbour-stained steel,--\n    Will they not hear? What, ho! you men, you beasts,\n    That quench the fire of your pernicious rage\n    With purple fountains issuing from your veins,\n    On pain of torture, from those bloody hands\n    Throw your mistemper'd weapons to the ground,\n    And hear the sentence of your moved prince.\n    Three civil brawls, bred of an airy word,\n    By thee, old Capulet, and Montague,\n    Have thrice disturb'd the quiet of our streets,\n    And made Verona's ancient citizens\n    Cast by their grave beseeming ornaments,\n    To wield old partisans, in hands as old,\n    Canker'd with peace, to part your canker'd hate:\n    If ever you disturb our streets again,\n    Your lives shall pay the forfeit of the peace.\n    For this time, all the rest depart away:\n    You Capulet; shall go along with me:\n    And, Montague, come you this afternoon,\n    To know our further pleasure in this case,\n    To old Free-town, our common judgment-place.\n    Once more, on pain of death, all men depart.",i=
0;i<4;i++)plainText+=plainText;var md5Output=hex_md5(plainText);lib.md5=hex_md5;lib.swf=lib.swf||{};lib.swf.playerLoaded=function(){lib._PLAYER_LOADED_TIME=(new Date).getTime()};lib.swf.startAcc=function(){window.location.href="qiyiacc:\\StartMethod=1;WebBrowser="+lib.swf.browserVer()};
var isWin=navigator.appVersion.toLowerCase().indexOf("win")!=-1?!0:!1,authUrl="http://serv.vip.qiyi.com/services/padw_auth.action",video=lib.kit.video={controlVersion:function(){var a,c;try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),a=c.GetVariable("$version")}catch(b){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"),a="Player 3,0,18,0"}catch(d){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),a="Player 2,0,0,11"}catch(e){a=-1}return(a+"").replace(/\,/g,".")},
getSwfVer:function(){var a=-1;if(navigator.plugins&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var a=navigator.plugins["Shockwave Flash"+(navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"")].description.split(" "),c=a[2].split("."),b=c[0],c=c[1],d=a[3];d==""&&(d=a[4]);d[0]=="d"?d=d.substring(1):d[0]=="r"&&(d=d.substring(1),d.indexOf("d")>0&&(d=d.substring(0,d.indexOf("d"))));a=b+"."+c+"."+d}}else navigator.userAgent.match(/webtv\/2.6/i)?
a=4:navigator.userAgent.match(/webtv\/2.5/i)?a=3:navigator.userAgent.match(/webtv/i)?a=2:lib.IE&&isWin&&!lib.OPERA&&(a=this.controlVersion());return a},html5video:function(a){var c=this,b=this._getVid(a);if(!b&&a.flashVars){var d=a.flashVars.match(/vid=(\d*)&/);d&&(b=d[1])}lib.kit.util.jsLoad.request("http://cache.vip.qiyi.com/ip4j/",{CACHE:{vid:b,varname:"ipLimit"},onSuccess:function(b){var d=typeof b.ipLimit!="undefined"?b.ipLimit:0;lib.kit.util.jsLoad.request("http://data.video.qiyi.com/v.ts",
{CACHE:{varname:"videoUrl"},onSuccess:function(g){typeof g.l=="undefined"||g.l==""?(lib.$("#flashbox").html("\u5bf9\u4e0d\u8d77\uff0c\u6b64\u89c6\u9891\u6682\u65f6\u4e0d\u652f\u6301ipad\u89c2\u770b\u3002"),lib.$("#flashbox").css("color","#fff"),lib.$("#flashbox").css("font-size","16px")):g.t.match(/oversea/ig)&&d==1?(lib.$("#flashbox").html('\u7531\u4e8e\u7248\u6743\u53d7\u9650\uff0c\u60a8\u8bbf\u95ee\u7684\u89c6\u9891\u53ea\u80fd\u5728\u4e2d\u56fd\u5927\u9646\u8303\u56f4\u5185\u89c2\u770b\uff01<br/><span style="font-size:12px">\u5982\u679c\u60a8\u6240\u5728\u533a\u57df\u4e3a\u4e2d\u56fd\u5927\u9646\uff0c<a href="http://www.qiyi.com/common/helpandsuggest.html?entry=banquan" target="_blank" class="fWhite">\u8bf7\u544a\u77e5\u6211\u4eec</a> \u6211\u4eec\u5c06\u5c3d\u5feb\u67e5\u627e\u539f\u56e0\u3002'),
lib.$("#flashbox").css("color","#fff"),lib.$("#flashbox").css("font-size","16px")):(b.ip=g.l,window.info=window.info||{},window.info.ipad=b,window.location.host==="vip."+lib.SITE_DOMAIN?c._getVip(a,function(b){c._renderVideo(a,b)}):c._getQiyi(a,function(b){c._renderVideo(a,b)}))},onError:function(){lib.$("#"+a.wrapper).html("\u5bf9\u4e0d\u8d77\uff0c\u6b64\u89c6\u9891\u6682\u65f6\u4e0d\u652f\u6301ipad\u89c2\u770b\u3002");lib.$("#"+a.wrapper).css("color","#fff");lib.$("#"+a.wrapper).css("font-size",
"16px")}})},onError:function(b){b&&b.code=="Q00201"?lib.$("#"+a.wrapper).html("\u5bf9\u4e0d\u8d77\uff0c\u6b64\u89c6\u9891\u56e0\u7248\u6743\u65b9\u7684\u8981\u6c42\uff0c\u6682\u65f6\u53ea\u652f\u6301\u5728PC\u4e0a\u64ad\u653e\u3002"):lib.$("#"+a.wrapper).html("\u5bf9\u4e0d\u8d77\uff0c\u6b64\u89c6\u9891\u6682\u65f6\u4e0d\u652f\u6301ipad\u89c2\u770b\u3002");lib.$("#"+a.wrapper).css("color","#fff");lib.$("#"+a.wrapper).css("font-size","16px")}})},_renderVideo:function(a,c){a.wrapper=a.wrapper||"flashbox";
var b=[];b.push('<video id="video"  width="'+a.width+'" height="'+a.height+'" controls="controls" autoplay="autoplay" x-webkit-airplay="allow"');typeof a.flashVars!="undefined"&&typeof a.flashVars!="undefined"&&a.flashVars.match(/\&flvPic=(.*?)\&/g)&&b.push("poster = "+RegExp.$1);b.push(">");b.push("<source src="+c.url+'  type="video/mp4"/>');b.push("</video>");lib.$("#"+a.wrapper).html(b.join(""));document.getElementById("video")&&(document.getElementById("video").load(),(typeof a.autoplay=="undefined"||
a.autoplay==!0)&&document.getElementById("video").play(),lib.action.loadVV(window.info.ipad.ip.replace("http://","").split("/")[0]))},_getQiyi:function(a,c){a.wrapper=a.wrapper||"flashbox";var b=this._getVid(a);if(!b&&a.flashVars){var d=a.flashVars.match(/vid=(\d*)&/);d&&(b=d[1])}lib.kit.util.jsLoad.request("http://cache.video.qiyi.com/m/",{CACHE:{tvid:b,varname:"ipadUrl"},onSuccess:function(a){c({url:a.url})},onError:function(b){b&&b.code=="Q00201"?lib.$("#"+a.wrapper).html("\u5bf9\u4e0d\u8d77\uff0c\u6b64\u89c6\u9891\u56e0\u7248\u6743\u65b9\u7684\u8981\u6c42\uff0c\u6682\u65f6\u53ea\u652f\u6301\u5728PC\u4e0a\u64ad\u653e\u3002"):
lib.$("#"+a.wrapper).html("\u5bf9\u4e0d\u8d77\uff0c\u6b64\u89c6\u9891\u6682\u65f6\u4e0d\u652f\u6301ipad\u89c2\u770b\u3002");lib.$("#"+a.wrapper).css("color","#fff");lib.$("#"+a.wrapper).css("font-size","16px")}})},_getVip:function(a,c){a.wrapper=a.wrapper||"flashbox";var b=info.albumId,d=this._getVid(a),e=(new Date).getTime()+"",f=parseInt(e.substring(0,2))*parseInt(e.substring(e.length-3))+100;lib.kit.util.jsLoad.request(authUrl,{GET:{aid:b,platform:"b85da1cf3ae44351",cid:"afbe8fd3d73448c9",vid:d,
ut:e,utt:f,v:lib.md5([b,"afbe8fd3d73448c9",d,e,f,"2385461878"].join("_")),cb:"cb_"+Math.floor(Math.random()*2147483648).toString(36)},onSuccess:function(a){c({url:"http://cache.vip.qiyi.com/m/u/"+d+"/afbe8fd3d73448c9/"+a.t+"/"+a.pt+".m3u8"})},onError:function(){}})},_getVid:function(a){if(a.flashVars&&a.flashVars.indexOf("vid=")!==-1)var a=a.flashVars,c=a.indexOf("vid=")+4,b=a.indexOf("&",c),a=a.substring(c,b)||info.videoId;else a=info.videoId;return a},detectFlashVer:function(a,c,b){var d=this.getSwfVer(),
e,c=c||"0",b=b||"0";if(d==-1)return!1;else if(d!=0){lib.IE&&isWin&&!lib.OPERA&&(d=d.split(" "),d=d[1]);e=d.split(".");var d=parseFloat(e[0]),f=parseFloat(e[1]);e=e[2];if(d>parseFloat(a))return!0;else if(d==parseFloat(a))if(f>parseFloat(c))return!0;else if(f==parseFloat(c)&&e>=parseFloat(b))return!0;return!1}},render:function(){var a=this.AC_GetArgs(arguments,"");if(a.embedAttrs.ipad&&lib.ipad)return this.html5video(a.embedAttrs);if(!this.detectFlashVer(10,0,0)&&a.embedAttrs.hint)return isWin?lib.IE?
document.write("\u4f60\u9700\u8981\u5347\u7ea7FLASH\u64ad\u653e\u5668\u7248\u672c\u81f310.0+,\u8bf7<a class='fWhite' href='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' target='_blank'>\u4e0b\u8f7d</a>"):document.write("\u4f60\u9700\u8981\u5347\u7ea7FLASH\u64ad\u653e\u5668\u7248\u672c\u81f310.0+,\u8bf7<a href='http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe' class='fWhite' target='_blank'>\u4e0b\u8f7d</a>"):document.write("\u4f60\u9700\u8981\u5347\u7ea7FLASH\u64ad\u653e\u5668\u7248\u672c\u81f310.0+,\u8bf7<a href='http://get.adobe.com/flashplayer/otherversions/' class='fWhite' target='_blank'>\u4e0b\u8f7d</a>"),
!1;if(a.isPopup!="true")lib.$(window).on("beforeunload",function(){var c=lib.$("#"+a.objAttrs.id);if(c&&c[0].windowClose)try{c[0].windowClose()}catch(b){}});return this.AC_Generateobj(a.objAttrs,a.params,a.embedAttrs,a.isStr,a.nocache)},AC_GetArgs:function(a){for(var c={embedAttrs:{},params:{},objAttrs:{}},b=0;b<a.length;b+=2)switch(a[b].toLowerCase()){case "src":c.embedAttrs.src=a[b+1];c.params.movie=a[b+1];break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblclick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":case "id":c.objAttrs[a[b]]=
a[b+1];c.embedAttrs[a[b]]=a[b+1];break;case "width":case "height":case "align":case "vspace":case "hspace":case "class":case "title":case "accesskey":case "tabindex":c.embedAttrs[a[b]]=c.objAttrs[a[b]]=a[b+1];break;case "isstr":c.isStr=a[b+1];break;case "ispopup":c.isPopup=a[b+1];break;case "nocache":c.nocache=a[b+1];break;default:c.embedAttrs[a[b]]=c.params[a[b]]=a[b+1]}return c},AC_Generateobj:function(a,c,b,d,e){var f=[];if(lib.IE&&isWin&&!lib.OPERA){f.push('<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"');
f.push('classid ="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');for(var g in a)f.push(g+'="'+a[g]+'" ');f.push(">");f.push('<param name="quality" value="high" /> ');f.push('<param name="loop" value="true" /> ');f.push('<param name="play" value="true" /> ');f.push('<param name="DeviceFont" value="false" /> ');f.push('<param name="allowFullScreen" value="true" /> ');f.push('<param name="menu" value="true" /> ');for(g in c){if((lib.TT||lib.$360||lib.Maxthon)&&g.match(/src|movie/))c[g]+=!e?"?"+Math.random():
"";f.push('<param name="'+g+'" value="'+c[g]+'" /> ')}f.push('<param name="allowScriptAccess" value="always" /> ');f.push("</object>")}else{f.push('<embed pluginspage="http://www.macromedia.com/go/getflashplayer" ');f.push('loop = "true"');f.push('play = "true"');f.push('quality = "hight"');f.push('scale = "showall"');f.push('DeviceFont= "false"');f.push('allowFullScreen="true"');f.push('menu="true"');f.push('type="application/x-shockwave-flash"');for(g in b)f.push(g+'="'+b[g]+'" ');f.push('allowScriptAccess="always"');
f.push("> </embed>")}if(d)return f.join("");document.write(f.join(""))}};Object.extend(window,{GetSwfVer:video.getSwfVer.bind(video),AC_FL_RunContent:video.render.bind(video),DetectFlashVer:video.detectFlashVer.bind(video)});window.videoPlayStart=function(){if(document.getElementById("flash")&&document.getElementById("flash").setVisits){var a=lib.cookie.get("qtsid"),c,a=a.split(".");c=a.length;document.getElementById("flash").setVisits([a[1],".",a[c-1]].join(""))}};lib.cookie=lib.cookie||{};
lib.cookie.remove=function(a,c,b){document.cookie=a+"=;expires=Fri, 31 Dec 1999 23:59:59 GMT;path="+(c||"/")+";domain="+b};lib.cookie.get=function(a){a=a.replace(/([\.\[\]\$])/g,"\\$1");return(a=(document.cookie+";").match(RegExp(a+"=([^;]*)?;","i")))?decodeURIComponent(a[1])||"":""};
lib.cookie.set=function(a,c,b,d,e,f){var g=[];g.push(a+"="+encodeURIComponent(c));b&&(a=new Date,b=a.getTime()+b*36E5,a.setTime(b),g.push("expires="+a.toGMTString()));d&&g.push("path="+d);e&&g.push("domain="+e);f&&g.push(f);document.cookie=g.join(";")};
(function(a,c){function b(a,b){var g=Object.prototype.toString,h=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,j=[],k={ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/},l={attr:function(a,b){for(var c=[],d=a.match(k.ATTR),e=a.slice(0,a.indexOf("[")),e=b.getElementsByTagName(e),f=0,g=e.length;f<g;f++)e[f].getAttribute(d[1])&&(e[f].getAttribute(d[1])==d[4]||d[4]==
"")&&c.push(e[f]);return c},filter:function(a,b){for(var c=[],d=0;d<a.length;d++)b.contains(a[d])&&c.push(a[d]);return c.length==0?null:c}};c.querySelectorAll?(j=c.querySelectorAll(a),b&&(j=l.filter(j,lib.$(b)))):(h=a.match(h),j=h.length==1?l.attr(a,b||c):l.attr(h[1],c.getElementById(h[0].slice(1))));return g.call(j)=="[object Array]"?j:d(j)}function d(a){if(a){for(var b=[],c=a.length,d=0;d<c;d++)b[d]=a[d];return b}}a.lib=a.lib||{};lib.find=function(a,d){if(typeof a=="object"){if(a._els)return[a._els[0]];
if(a.getAttribute)return[a];return null}var g="*",h={},d=d||c.body,h=a.match(/(#[\w-_]+)?([\w-_*]+)?(\.[\w-_]+)?(\s+.+)?(\[\w(=\w)?])?/i);if(!h)return null;var h={id:h[1],tag:h[2],cls:h[3],child:h[4]?h[4].replace(/(^[\s\n]+|[\s\n]+$)/g,""):""},a=a.replace(/(^[\s\n]+|[\s\n]+$)/g,""),j=a.match(/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/);if(j&&j.length>0)return b(a,d);if(h.child){var k=lib.find(a.split(" ")[0],d),g=[];if(k.length)for(var j=0,l=k.length;j<l;j++){var n=lib.find(h.child,
k[j]);if(n.length)for(var m=0,o=n.length;m<o;m++)g.push(n[m]);n.innerHTML&&g.push(n)}k.innerHTML&&g.push(k);return g.length>0?g:null}if(h.id)return h.child?lib.find(child,lib.find(h.id)):(h=c.getElementById(h.id.replace("#","")))?[h]:null;if(h.tag&&(g=h.tag,!h.cls))if(h=d.getElementsByTagName(g),g=[],h){m=0;for(o=h.length;m<o;m++)g.push(h[m]);return g}else return null;if(h.cls){m=lib.find(g,d);g=[];if(m){h=RegExp("(^| )"+h.cls.replace(".","")+"( |$)");j=0;for(l=m.length;j<l;j++)m[j].className.match(h)&&
g.push(m[j]);return g}return null}}})(window,document);
(function(){var a=Array.prototype;lib.each({each:function(a){this.forEach(a);return this},include:function(a){return this.index(a)!=-1},index:function(a){for(var b=0,d=this.length;b<d;b++)if(this[b]==a)return b;return-1},unique:function(){for(var a=0;a<this.length;a++)for(var b=this[a],d=this.length-1;d>a;d--)this[d]==b&&this.splice(d,1);return this},del:function(a){a=this.index(a);a>=0&&a<this.length&&this.splice(a,1);return this},insert:function(a,b){return this.slice(0,a).concat(b,this.slice(a))},
remove:function(a){var b=this.slice(0,a),a=this.slice(a+1);return b.concat(a)},indexOf:function(a,b){b||(b=0);var d=this.length;for(b<0&&(b=d+b);b<d;b++)if(this[b]===a)return b;return-1},lastIndexOf:function(a,b){var b=isNaN(b)?this.length:(b<0?this.length+b:b)+1,d=this.slice(0,b).reverse().indexOf(a);return d<0?d:b-d-1},every:function(a,b){var d=this.length;if(typeof a!="function")throw new TypeError;for(var e=0;e<d;e++)if(e in this&&!a.call(b,this[e],e,this))return!1;return!0},filter:function(a,
b){var d=this.length;if(typeof a!="function")throw new TypeError;for(var e=[],f=0;f<d;f++)if(f in this){var g=this[f];a.call(b,g,f,this)&&e.push(g)}return e},forEach:function(a){var b=this.length;if(typeof a!="function")throw new TypeError;for(var d=0;d<b;d++)d in this&&a(this[d],d)},map:function(a,b){var d=this.length;if(typeof a!="function")throw new TypeError;for(var e=Array(d),f=0;f<d;f++)f in this&&(e[f]=a.call(b,this[f],f,this));return e},some:function(a,b){var d=this.length;if(typeof a!="function")throw new TypeError;
for(var e=0;e<d;e++)if(e in this&&a.call(b,this[e],e,this))return!0;return!1}},function(c,b){lib.isNative(a[b])||(a[b]=c)})})(window,document);lib.box=lib.box||{version:"1.0.0",toString:function(){return"[Object lib.box(version "+this.version+")]"}};
Object.extend(lib.box,{getDocumentHeight:function(a){var a=a||window,c=a.document;return Math.max(c.compatMode!="CSS1Compat"?c.body.scrollHeight:c.documentElement.scrollHeight,this.getViewportHeight(a))},getDocumentWidth:function(a){var a=a||window,c=a.document;return Math.max(c.compatMode!="CSS1Compat"?c.body.scrollWidth:c.documentElement.scrollWidth,this.getViewportWidth(a))},getViewportHeight:function(a){var a=a||window,c=a.document,b=c.documentElement;return a.innerHeight||b&&b.clientHeight+(b.style.borderTopWidth==
""?0:b.style.borderTopWidth)+(b.style.borderBottomWidth==""?0:b.style.borderBottomWidth)||c.body.clientHeight},getViewportWidth:function(a){var a=a||window,c=a.document,b=c.documentElement;return a.innerWidth||b&&b.clientWidth+(b.style.borderLeftWidth==""?0:b.style.borderLeftWidth)+(b.style.borderRightWidth==""?0:b.style.borderRightWidth)||c.body.clientWidth},getPageScrollTop:function(a){var a=a||window,c=a.document,b=c.documentElement;return a.pageYOffset||b&&b.scrollTop||c.body.scrollTop},getPageScrollLeft:function(a){var a=
a||window,c=a.document,b=c.documentElement;return a.pageXOffset||b&&b.scrollLeft||c.body.scrollLeft},getPosition:function(a){try{var c=a.getBoundingClientRect()}catch(b){return lib.log("getPosition failed."),{top:9999,left:9999}}var d=a.ownerDocument,a=d.body,d=d.documentElement;return{top:c.top+(self.pageYOffset||d.scrollTop||a.scrollTop)-(d.clientTop||a.clientTop||0),left:c.left+(self.pageXOffset||d.scrollLeft||a.scrollLeft)-(d.clientLeft||a.clientLeft||0)}}});window.lib=window.lib||{};
lib.KEY={};Object.extend(lib.KEY,{BACKSPACE:8,TAB:9,RETURN:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34,pointerX:function(a){return a.pageX||a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)},pointerY:function(a){return a.pageY||a.clientY+(document.documentElement.scrollTop||document.body.scrollTop)}});lib.eventTarget=function(){this.handlers={}};
lib.eventTarget.prototype={constructor:lib.eventTarget,on:function(a,c){typeof this.handlers[a]=="undefined"&&(this.handlers[a]=[]);this.handlers[a].push(c)},fire:function(a){if(!a.target)a.target=this;if(this.handlers[a.type]instanceof Array)for(var c=this.handlers[a.type],b=0,d=c.length;b<d;b++)c[b](a)},un:function(a,c){if(this.handlers[a]instanceof Array){for(var b=this.handlers[a],d=0,e=b.length;d<e;d++)if(b[d]===c)break;b.splice(d,1)}}};
Object.extend(Date.prototype,{format:function(a){var c=this.getFullYear(),b=this.getMonth()+1,b=b>9?b:"0"+b,d=this.getDate()>9?this.getDate():"0"+this.getDate(),e=this.getHours(),f=this.getMinutes()>9?this.getMinutes():"0"+this.getMinutes(),g=this.getSeconds()>9?this.getSeconds():"0"+this.getSeconds();return a.replace(/(y{2,4})/,c).replace("MM",b).replace("dd",d).replace("hh",e).replace("mm",f).replace("ss",g)}});lib.date={};
Object.extend(lib.date,{getHours:function(a){var c=a>3600?Math.floor(a/3600):0,b=a%3600>60?Math.floor(a%3600/60):0,b=b>=10?b:"0"+b,a=b>0?a%3600%60:a,a=a>=10?a:"0"+a;return c>0?(c>9?c:"0"+c)+":"+b+":"+a:b+":"+a},formatTime:function(a,c){var a=parseInt(a),b=Math.floor(a/3600),d=Math.floor((a-b*3600)/60),e=a-b*3600-d*60,f=0;return c.indexOf("d")==0?(f=Math.floor(b/24),b%=24,{d:f,h:b,m:d,s:e}):{h:b,m:d,s:e}},isLeap:function(a){return a%400?a%100?a%4?!1:!0:!1:!0}});
$reg("lib.net",function(){lib.net.Ajax={request:function(a,b){var d=this._getTransport(),b=Object.extend({method:"get",async:!0},b||{});if(b.method=="get"&&typeof b.data=="string"&&b.data.length>0)a+=(a.indexOf("?")==-1?"?":"&")+b.data,b.data=null;d.open(b.method,a,b.async);b.method=="post"&&d.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=UTF-8");d.onreadystatechange=this._onStateChange.bind(this,d,a,b);d.send(b.data||null);return d},text:function(a,b){b.format="text";
return this.request(a,b)},json:function(a,b){b.format="json";return this.request(a,b)},xml:function(a,b){b.format="xml";return this.request(a,b)},_getTransport:function(){if(window.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(b){return!1}}},_onStateChange:function(a,b,d){if(a.readyState==4)if(a.onreadystatechange=function(){},b=a.status,typeof b=="number"&&b>=200&&b<300){if(typeof d.success==
"function"){b=a;if(typeof d.format=="string")switch(d.format){case "text":b=a.responseText;break;case "json":try{b=eval("("+a.responseText+")")}catch(e){window.console&&console.error&&console.error(e)}break;case "xml":b=a.responseXML}d.success(b)}}else if(!window.closed&&typeof d.failure=="function"){b={status:a.status,statusText:a.statusText};if(a.readyState==4&&(a.status==0||a.status==12030))b.status=-1;d.failure(b)}}};lib.net.SUCCESS="A00000";lib.net.jsLoad=function(a){var b=Object.extend({url:"",
onComplete:function(){},onError:function(){},charset:!1,doc:document,timeout:1E4},a),d=!1,e=!1,f=b.doc.createElement("script");f.language="javascript";f.type="text/javascript";b.charset&&(f.charset=b.charset);f.onload=f.onreadystatechange=function(){if(!e&&(!f.readyState||"loaded"==f.readyState||"complete"==f.readyState))d=!0,b.onComplete(),f.onload=f.onreadystatechange=null};setTimeout(function(){d||(e=!0,b.onError())},b.timeout);f.src=b.url;document.getElementsByTagName("head")[0].appendChild(f)};
var a={js:lib.PROJECT_BASE_PATH||"http://static.qiyi.com/js/qitan/"};lib.getPath=function(c){if(!a.js)a.js="";var b=a.js.substr(a.js.length-1,1),c=c.trim().toLowerCase();return a.js+(b=="/"?"":"/")+c.split(".").join("/")+".js"};lib._loadQueue={_queue:[],enqueue:function(a){this._queue.push(a)},dequeue:function(){return this._queue.splice(0,1)},get:function(){return this._queue[0]},isEmpty:function(){return this._queue.length===0}};lib._loadStack={_stack:[],_loaded:{},_running:!1,start:function(){this._running||
this.pull()},push:function(a){this._stack.push(a)},pull:function(){this._running=!0;if(this._stack.length==0){lib._loadQueue.dequeue();if(lib._loadQueue.isEmpty()){this._running=!1;return}this.push(lib._loadQueue.get())}var a=this._stack[this._stack.length-1];if(a.scripts.length==0)a.fn&&a.fn(),this._stack.splice(this._stack.length-1,1),this.pull();else if(a=a.scripts.shift(),this._loaded[a.toLowerCase()])this.pull();else{this._loaded[a.toLowerCase()]=!0;var a=lib.getPath(a),b=this;lib.net.jsLoad({url:a,
onComplete:function(){b.pull()},onError:function(){}})}}};lib.require=function(){var a,b,d;arguments.length==2?(a=arguments[0],b=arguments[1]):arguments.length==3?(a=arguments[0],d=arguments[1],b=arguments[2]):a=arguments[0];b=b||function(){};a={scripts:a?a.split(","):[],fn:b};d?(lib._loadQueue.isEmpty()&&lib._loadStack.push(a),lib._loadQueue.enqueue(a)):lib._loadStack.push(a);lib._loadStack.start()}});lib.reg=$reg;
window.Ijax=lib.net.Ijax={arrTaskLists:[],createLoadingIframe:function(){if(this.loadFrames!=null)return!1;var a="loadingIframe_thread"+Math.ceil(Math.random()*1E4);this.loadFrames=a;var a=['<iframe id="'+a+'" name="'+a+'" class="invisible"',' scrolling="no" src="http://www.qiyi.com/common/crosspost.html" allowTransparency="true" style="display:none;" frameborder="0" ></iframe>'].join(""),c=document.createElement("div");c.id="ijax_iframes";c.innerHTML=a;document.body.appendChild(c);if(document.getElementById(this.loadFrames)!=
null)loadTimer=null,this.loadingIframe={container:document.getElementById(this.loadFrames),isBusy:!1},this.loadByList()},isIjaxReady:function(){if(typeof this.loadingIframe=="undefined")return!1;if(this.loadingIframe.isBusy==!1)return this.loadingIframe.isBusy=!0,this.loadingIframe;return!1},request:function(a,c){var b={};b.url=a;b.option=c||{};this.arrTaskLists.push(b);this.loadFrames==null?this.createLoadingIframe():this.loadByList()},loadByList:function(){if(this.arrTaskLists.length==0)return!1;
var a=this.isIjaxReady();if(a==!1)return!1;var c=this.arrTaskLists[0],b=this;setTimeout(function(){b.loadData(c.url,c.option,a)},10);this.arrTaskLists.shift()},destory:function(){if(!(this.arrTaskLists.length>0)){document.getElementById(this.loadFrames).callback=null;document.body.removeChild(document.getElementById("ijax_iframes"));if(document.getElementById("IjaxForm"))document.getElementById("IjaxForm").action="",document.getElementById("IjaxForm").target="",document.body.removeChild(document.getElementById("IjaxForm"));
this.loadFrames=null}},loadData:function(a,c,b){var d=b.container,e=this,f="",g=!1,h=!1,j;d.callback=function(a){h=!0;if(!g){a=typeof a=="string"&&/\s*{/.test(a)?eval("("+a+")"):a;if(a.code=="A00000"&&c.onSuccess)c.onSuccess(a.data);else c.onError(a);e.destory();b.isBusy=!1;e.loadByList()}};isNaN(c.timeout)||setTimeout(function(){h||(g=!0,c.onError(),e.destory())},c.timeout);if(c.CACHE){var f=a,k;for(k in c.CACHE)f+=c.CACHE[k]+"/"}else{f=new lib.kit.Url(a);if(c.GET)for(k in c.GET)f.setParam(k,encodeURIComponent(c.GET[k]));
if(c.POST){a=window.correctArea||{};a.ip&&a.ip.html();document.getElementById("IjaxForm")?document.getElementById("IjaxForm").innerHTML="":(a=document.createElement("form"),document.body.appendChild(a),a.id="IjaxForm",a.method="post",a.target=d.id);document.getElementById("IjaxForm").action=f;for(var l in c.POST)a=document.createElement("input"),a.type="hidden",a.name=l,a.value=c.POST[l],document.getElementById("IjaxForm").appendChild(a);j=setTimeout(function(){clearTimeout(j);d.readyState=="complete"||
!lib.IE?document.getElementById("IjaxForm").submit():j=setTimeout(arguments.callee,100)},100)}}c.POST||d.contentWindow.location.replace(f)}};
lib.net.crossDomain={Request:function(a,c){this._url=a;this.option={prefix:"cb_",charset:"utf-8",queryField:"cb",callbackName:"cb_"+Math.floor(Math.random()*2147483648).toString(36),timeout:1E4};Object.extend(this.option,c);this._getParams=function(){var a="t="+(new Date).getTime();return this.option.data==""?a:this.option.data+"&"+a};this.get=function(){var a=this.option.callbackName,c=this._url+"?"+this.option.queryField+"="+a+"&"+this._getParams(),e=this;lib.net.jsLoad({timeout:this.option.timeout,
url:c,onComplete:function(){if(window[a])try{e.option.success.apply(window,[window[a]])}finally{try{delete window[a]||(window[a]=null)}catch(c){}}},onError:function(){}})};this.post=function(){var a=this,c=this.option.data;c[this.option.queryField]=this.option.callbackName;lib.net.Ijax.request(this._url,{onSuccess:function(c){a.option.success.apply(window,[{code:"A00000",data:c}])},onError:function(c){a.option.failure.apply(window,[c])},POST:c,timeout:this.option.timeout})}},request:function(a,c){var b=
c.method.toLowerCase(),d=new lib.net.crossDomain.Request(a,c);b=="get"&&d.get();b=="post"&&d.post()},_error:function(){}};
lib.net.formRequest={request:function(a,c){this.option=c||{};if(lib.$("#order_form"))var b=lib.$("#order_form");else b=lib.Element.create("form"),b.attr("id","order_form"),b.attr("action",a),b.attr("method",this.option.method||"GET"),lib.$(document.body).append(b);var d=this.option.param||{},e;for(e in d){var f;if(!(f=lib.$("#"+e)))f=lib.Element.create("input"),f.attr("type","hidden"),f.attr("id",e),f.attr("name",e),b.append(f);f.val(d[e])}b[0].submit()},_error:function(){}};
lib.reg("qitan.model.request",function(){var a=qitan.model.request;qitan.model.SUCCESS="A00000";lib.net.isLogin=a.isLogin=function(){return lib.cookie&&lib.cookie.get("P00002")!==""&&lib.cookie.get("P00003")!==""};lib.net.showLogin=function(a){var b=lib.PROJECT_LOGIN_COMPONENT||qitan.component.login.init;b.show?b.show(a||function(){}):b()};a.core=Class.create({initialize:function(a){this.opt=a;this._initActions()},_initActions:function(){for(var a in this.opt.actions)this[a]=this._action.bind(this,
a)},_action:function(a,b,d){var a=this.opt.actions[a],e=(this.opt.url||"")+(a.url||"");a.data=this._getParams(a,b,e);a.success=this._success.bind(this,a.format,d);a.failure=this._failure.bind(this,d);a.passport&&!lib.net.isLogin()?(this.__request=this._request.bind(this,e,a),this.__request.isTemp=!0,lib.net.showLogin(this.__request)):this._request(e,a)},_request:function(a,b){var d=null;if(arguments.length>=3&&arguments[2].nickname&&(d=arguments[2],b.data.indexOf("userId=undefined")!==-1))b.data=
b.data.replace("userId=undefined","userId="+d.uid);this.isCrossDomain(a)?lib.net.crossDomain.request(a,b):lib.net.Ajax.request(a+"?t="+(new Date).getTime(),b)},isCrossDomain:function(a){var b=/http:\/\/(.*?)\//,a=a.match(b)[0],b=location.href.match(b)[0];return this.opt.crossDomain===void 0?a!==b:this.opt.crossDomain},_success:function(a,b,d){a=="json"?d.code==qitan.model.SUCCESS?b.success&&b.success(d.data):b.failure&&b.failure(d):b.success(d)},_failure:function(a,b){a.failure&&a.failure(b)},_getParams:function(a,
b,d){var d=this.isCrossDomain(d),e=[],f={},g;for(g in b)a.params.include(g)&&(!d&&a.encode||d&&a.encode&&a.method=="get"?e.push(g+"="+encodeURIComponent(b[g])):d&&a.method=="post"?f[g]=b[g]:e.push(g+"="+b[g]));if(d&&a.method=="post")return f;return e.join("&")}});lib.model=qitan.request=function(a){return new qitan.model.request.core(a)}});
(function(){var a=String.prototype;lib.each({trimLeft:function(){return this.replace(/^(\u3000|\s|\t)*/gi,"")},trimRight:function(){return this.replace(/(\u3000|\s|\t)*$/gi,"")},trim:function(){return this.trimLeft().trimRight()},trimHtml:function(){return this.replace(/<\/?[^>]+(>|$)/g,"")},format:function(){var a=arguments;return this.replace(/{(\d+)(:([0-9a-z]+))?}/gi,function(b,d){var e=a[parseInt(d)];if(typeof e==="undefined")return b;return e})},getLen:function(){if(typeof this=="undefined")return 0;
var a=this.match(/[^\x00-\x80]/g);return this.length+(!a?0:a.length)},divideNumber:function(){for(var a="",b=Math.ceil(this.length/3);b>0;b--)left=this.length-(b-1)*3<=0?0:this.length-(b-1)*3,a+=","+this.substring(left,this.length-b*3);return a=a.substring(1,a.length)},filter:function(){return this.replace(/[^a-z0-9A-Z\u4e00-\u9fa5]/g," ")},trancate:function(a,b){var d=this;typeof b=="undefined"&&(b="..");if(d.getLen()<=a)return d;var e=d.replace(/\*/g," ").replace(/[^\x00-\xff]/g,"**"),d=d.slice(0,
e.slice(0,a).replace(/\*\*/g," ").replace(/\*/g,"").length);return d=d.slice(0,d.length-(b===""?0:1))+b}},function(c,b){lib.isNative(a[b])||(a[b]=c)})})(window,document);
(function(){$reg("lib.ui",function(){});lib.ui.viewCenter=function(a,c){c=c||"absolute";if(a){var b=a.offsetWidth,d=a.offsetHeight,e=lib.box.getViewportWidth(),f=lib.box.getViewportHeight();if(!b||!d)throw"zero width or height.";b={left:(e-b)/2+lib.box.getPageScrollLeft(),top:(f-d)/2+lib.box.getPageScrollTop()};a.style.position=c;$(a).pos(b)}}})();
if(!window.JSON)window.JSON=window.JSON||{},JSON.parse=function(a){return(new Function("return "+a))()},JSON.stringify=function(){function a(a){/["\\\x00-\x1f]/.test(a)&&(a=a.replace(/["\\\x00-\x1f]/g,function(a){var d=b[a];if(d)return d;d=a.charCodeAt();return"\\u00"+Math.floor(d/16).toString(16)+(d%16).toString(16)}));return'"'+a+'"'}function c(a){return a<10?"0"+a:a}var b={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return function(b){switch(typeof b){case "undefined":return"undefined";
case "number":return isFinite(b)?String(b):"null";case "string":return a(b);case "boolean":return String(b);default:if(b===null)return"null";else if(b instanceof Array){var e=["["],f=b.length,g,h,j;for(h=0;h<f;h++)switch(j=b[h],typeof j){case "undefined":case "function":case "unknown":break;default:g&&e.push(","),e.push(JSON.stringify(j)),g=1}e.push("]");return e.join("")}else if(b instanceof Date)return'"'+b.getFullYear()+"-"+c(b.getMonth()+1)+"-"+c(b.getDate())+"T"+c(b.getHours())+":"+c(b.getMinutes())+
":"+c(b.getSeconds())+'"';else{g=["{"];f=JSON.stringify;for(key in b)if(b.hasOwnProperty(key))switch(h=b[key],typeof h){case "undefined":case "unknown":case "function":break;default:e&&g.push(","),e=1,g.push(f(key)+":"+f(h))}g.push("}");return g.join("")}}}}();var lib=lib||{};function Jobs(){this._jobTable=[]}
Jobs.prototype={_registedJobTable:{},initialize:function(){},_registJob:function(a,c){this._registedJobTable[a]=c;return this},add:function(a,c){this._jobTable.push({name:a,param:c});return this},start:function(){for(var a=this._registedJobTable;this._jobTable.length>0;){var c=this._jobTable[0].name,b=this._jobTable[0].param,d=a[c];if(typeof d=="undefined")this._jobTable.shift();else try{d.call(null,b),this._jobTable.shift()}catch(e){lib.log("Job["+c+"] failed!!!"),_try=!1,lib.log("job start  msg: "+
e.message),lib.log("job start file: "+e.fileName),lib.log("job start line: "+e.lineNumber),this._jobTable.shift()}}},call:function(a,c){typeof this._registedJobTable[a]!="undefined"?this._registedJobTable[a].apply(this,c):lib.log("Job["+a+"] is undefined!!!")}};$newJob=lib.kit.newJob=function(a,c){Jobs.prototype._registJob(a,c)};lib.kit.$callJob=function(a){var c=[];arguments.length>1&&(arguments.foreach(function(a,d){c[d]=a}),c.shift());Jobs.prototype.call(a,c)};lib._PAGE_JOB=new Jobs;
$reg("lib.kit.Monitor",function(){lib.kit.Monitor=Class.create({initialize:function(a,c){this._fn=a;this._opt={time:10};Object.extend(this._opt,c)},start:function(){var a=this;this._timer=setTimeout(function(){if(a._fn.call()===!1)a._timer=setTimeout(arguments.callee,a._opt.time)},this._opt.time)},stop:function(){this._timer&&clearTimeout(this._timer)}})});

