var _evalReturn=function(str){return eval(str)}(function(A){var B={};(function(){function F(L){return L<10?"0"+L:L}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(L){return this.getUTCFullYear()+"-"+F(this.getUTCMonth()+1)+"-"+F(this.getUTCDate())+"T"+F(this.getUTCHours())+":"+F(this.getUTCMinutes())+":"+F(this.getUTCSeconds())+"Z"}}var E=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,G=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,I,D,K={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},J;function C(L){G.lastIndex=0;return G.test(L)?'"'+L.replace(G,function(M){var N=K[M];if(typeof N==="string"){return N}return"\\u"+("0000"+M.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+L+'"'}function H(S,P){var N,M,T,L,Q=I,O,R=P[S];if(R&&typeof R==="object"&&typeof R.toJSON==="function"){R=R.toJSON(S)}if(typeof J==="function"){R=J.call(P,S,R)}switch(typeof R){case"string":return C(R);case"number":return isFinite(R)?String(R):"null";case"boolean":case"null":return String(R);case"object":if(!R){return"null"}I+=D;O=[];if(typeof R.length==="number"&&!R.propertyIsEnumerable("length")){L=R.length;for(N=0;N<L;N+=1){O[N]=H(N,R)||"null"}T=O.length===0?"[]":I?"[\n"+I+O.join(",\n"+I)+"\n"+Q+"]":"["+O.join(",")+"]";I=Q;return T}if(J&&typeof J==="object"){L=J.length;for(N=0;N<L;N+=1){M=J[N];if(typeof M==="string"){T=H(M,R);if(T){O.push(C(M)+(I?": ":":")+T)}}}}else{for(M in R){if(Object.hasOwnProperty.call(R,M)){T=H(M,R);if(T){O.push(C(M)+(I?": ":":")+T)}}}}T=O.length===0?"{}":I?"{\n"+I+O.join(",\n"+I)+"\n"+Q+"}":"{"+O.join(",")+"}";I=Q;return T}}if(typeof B.stringify!=="function"){B.stringify=function(O,M,N){var L;I="";D="";if(typeof N==="number"){for(L=0;L<N;L+=1){D+=" "}}else{if(typeof N==="string"){D=N}}J=M;if(M&&typeof M!=="function"&&(typeof M!=="object"||typeof M.length!=="number")){throw new Error("JSON.stringify")}return H("",{"":O})}}if(typeof B.parse!=="function"){B.parse=function(O,L){var N;function M(S,R){var Q,P,T=S[R];if(T&&typeof T==="object"){for(Q in T){if(Object.hasOwnProperty.call(T,Q)){P=M(T,Q);if(P!==undefined){T[Q]=P}else{delete T[Q]}}}}return L.call(S,R,T)}E.lastIndex=0;if(E.test(O)){O=O.replace(E,function(P){return"\\u"+("0000"+P.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(O.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){N=_evalReturn("("+O+")");return typeof L==="function"?M({"":N},""):N}return null}}})();A.extend(A,{isUndefined:function(C){return typeof C=="undefined"},isString:function(C){return typeof C=="string"},isElement:function(C){return C&&C.nodeType==1},isObject:function(C){return typeof C=="object"},isArray:function(C){return C!==null&&typeof C=="object"&&"splice" in C&&"join" in C},isNumber:function(C){return typeof C=="number"},isChinese:function(C){var D=/[^\u4e00-\u9fa5]/;if(D.test(C)){return false}return true},isUrl:function(C){return/^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"])*$/.test(C)},isEmail:function(C){return/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(C)},toString:function(D,C,E){return A.isObject(D)?B.stringify(D,C,E):D.toString()},toJSON:function(D,C,E){return B.parse(D,C,E)},substring:function(C,J,H){var E=0,D=[],I=C.split(""),G=I.length;for(var F=0;F<G;F++){if(E>=H||E<J){break}else{if(I[F].charCodeAt(0)>255){E+=2}else{E++}D.push(I[F])}}return D.join("")},size:function(C,E){if(A.isArray(C)){return C.length}if(A.isString(C)){if(!E){return C.length}var F=0;for(var D=0;D<C.length;D++){if(C.charCodeAt(D)>255){F+=2}else{F++}}return F}if(A.isObject(C)){var G=0;A.each(C,function(){G++});return G}return -1},log:function(C){if(!window.console){A("#log").html(C);return false}else{console.log(arguments[0]);return false}}});A.lang=function(D,C){str=A.lang.data[D];if(A.isUndefined(str)){str=D}if(C){for(var E in C){str=str.replace("{"+E+"}",C[E])}}return str};A.lang.data=[];A.lang.add=function(C,F){var C=arguments[0];var F=arguments[1];var E=(typeof C).toLowerCase();switch(E){case"object":for(var D in C){A.lang.data[D]=C[D]}break;case"string":A.lang.data[C]=F;break}};A.objectEvent={_initEvent:function(){if(!this.element){this.element=A("<div>")}A.data(this.element[0],"objectEvent",this)},element:null,trigger:function(C,D,E){E=E||A.event.fix({type:C,target:this.element[0]});this.element.triggerHandler(C,[E,D,this],this.options[C]);return this},one:function(C,E,D){this.element.one(C,E,D);return this},bind:function(C,E,D){this.element.bind(C,E,D);return this},unbind:function(C,D){this.element.unbind(C,D);return this}}})(jQuery);(function(D){var C=D.fn.remove;D.fn.remove=function(){D("*",this).add(this).triggerHandler("remove");return C.apply(this,arguments)};function B(E){function G(H){var I=H.style;return(I.display!="none"&&I.visibility!="hidden")}var F=G(E);(F&&D.each(D.dir(E,"parentNode"),function(){return(F=G(this))}));return F}D.extend(D.expr[":"],{data:function(F,G,E){return D.data(F,E[3])},tabbable:function(F,G,E){var H=F.nodeName.toLowerCase();return(F.tabIndex>=0&&(("a"==H&&F.href)||(/input|select|textarea|button/.test(H)&&"hidden"!=F.type&&!F.disabled))&&B(F))}});D.keyCode={BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38};function A(H,I,J,G){function F(L){var K=D[H][I][L]||[];return(typeof K=="string"?K.split(/,?\s+/):K)}var E=F("getter");if(G.length==1&&typeof G[0]=="string"){E=E.concat(F("getterSetter"))}return(D.inArray(J,E)!=-1)}D.widget=function(F,E){var G=F.split(".")[0];F=F.split(".")[1];D.fn[F]=function(K){var I=(typeof K=="string"),J=Array.prototype.slice.call(arguments,1);if(I&&K.substring(0,1)=="_"){return this}if(I&&A(G,F,K,J)){var H=D.data(this[0],F);return(H?H[K].apply(H,J):undefined)}return this.each(function(){var L=D.data(this,F);(!L&&!I&&D.data(this,F,new D[G][F](this,K)));(L&&I&&D.isFunction(L[K])&&L[K].apply(L,J))})};D[G][F]=function(J,I){var H=this;this.widgetName=F;this.widgetEventPrefix=D[G][F].eventPrefix||F;this.widgetBaseClass=G+"-"+F;this.options=D.extend({},D.widget.defaults,D[G][F].defaults,D.metadata&&D.metadata.get(J)[F],I);this.element=D(J).bind("setData."+F,function(M,K,L){return H._setData(K,L)}).bind("getData."+F,function(L,K){return H._getData(K)}).bind("remove",function(){return H.destroy()});this._init()};D[G][F].prototype=D.extend({},D.widget.prototype,E);D[G][F].getterSetter="option"};D.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName)},option:function(G,H){var F=G,E=this;if(typeof G=="string"){if(H===undefined){return this._getData(G)}F={};F[G]=H}D.each(F,function(I,J){E._setData(I,J)})},_getData:function(E){return this.options[E]},_setData:function(E,F){this.options[E]=F;if(E=="disabled"){this.element[F?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(F,H,G){var E=(F==this.widgetEventPrefix?F:this.widgetEventPrefix+F);H=H||D.event.fix({type:E,target:this.element[0]});return this.element.triggerHandler(E,[H,G],this.options[F])}};D.widget.defaults={disabled:false};D.ui={plugin:{add:function(F,G,I){var H=D.ui[F].prototype;for(var E in I){H.plugins[E]=H.plugins[E]||[];H.plugins[E].push([G,I[E]])}},call:function(E,G,F){var I=E.plugins[G];if(!I){return }for(var H=0;H<I.length;H++){if(E.options[I[H][0]]){I[H][1].apply(E.element,F)}}}},cssCache:{},css:function(E){if(D.ui.cssCache[E]){return D.ui.cssCache[E]}var F=D('<div class="ui-gen">').addClass(E).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");D.ui.cssCache[E]=!!((!(/auto|default/).test(F.css("cursor"))||(/^[1-9]/).test(F.css("height"))||(/^[1-9]/).test(F.css("width"))||!(/none/).test(F.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(F.css("backgroundColor"))));try{D("body").get(0).removeChild(F.get(0))}catch(G){}return D.ui.cssCache[E]},disableSelection:function(E){return D(E).attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},enableSelection:function(E){return D(E).attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},hasScroll:function(H,F){if(D(H).css("overflow")=="hidden"){return false}var E=(F&&F=="left")?"scrollLeft":"scrollTop",G=false;if(H[E]>0){return true}H[E]=1;G=(H[E]>0);H[E]=0;return G}};D.ui.mouse={_mouseInit:function(){var E=this;this.element.bind("mousedown."+this.widgetName,function(F){return E._mouseDown(F)});if(D.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(D.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(G){(this._mouseStarted&&this._mouseUp(G));this._mouseDownEvent=G;var F=this,H=(G.which==1),E=(typeof this.options.cancel=="string"?D(G.target).parents().add(G.target).filter(this.options.cancel).length:false);if(!H||E||!this._mouseCapture(G)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){F.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(G)&&this._mouseDelayMet(G)){this._mouseStarted=(this._mouseStart(G)!==false);if(!this._mouseStarted){G.preventDefault();return true}}this._mouseMoveDelegate=function(I){return F._mouseMove(I)};this._mouseUpDelegate=function(I){return F._mouseUp(I)};D(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},_mouseMove:function(E){if(D.browser.msie&&!E.button){return this._mouseUp(E)}if(this._mouseStarted){this._mouseDrag(E);return false}if(this._mouseDistanceMet(E)&&this._mouseDelayMet(E)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,E)!==false);(this._mouseStarted?this._mouseDrag(E):this._mouseUp(E))}return !this._mouseStarted},_mouseUp:function(E){D(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._mouseStop(E)}return false},_mouseDistanceMet:function(E){return(Math.max(Math.abs(this._mouseDownEvent.pageX-E.pageX),Math.abs(this._mouseDownEvent.pageY-E.pageY))>=this.options.distance)},_mouseDelayMet:function(E){return this.mouseDelayMet},_mouseStart:function(E){},_mouseDrag:function(E){},_mouseStop:function(E){},_mouseCapture:function(E){return true}};D.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();(function(A){A.flash=function(){};A.flash.version=swfobject.getFlashPlayerVersion();A.fn.flash=function(B){var C=B;return this.each(function(){var E=A(this);var F=E.attr("id");if(!F){F="flash-"+A.data(this);E.attr("id",F)}var D=A.extend({vars:null,atts:null,params:null,expressInstall:"http://site.tongxue.com/v5/build/images/flash/expressInstall.swf",version:"9.0.0",width:E.attr("width")||E.wdith(),height:E.attr("height")||E.height(),url:E.attr("href")},C);swfobject.embedSWF(D.url,F,D.width,D.height,D.version,D.expressInstall,D.vars,D.params,D.attrs)})}})(jQuery);jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+(L.path):"";var G=L.domain?"; domain="+(L.domain):"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};(function(C){var A=C.scrollTo=function(F,E,D){C(window.ATTACHBODY?window.ATTACHBODY:document).scrollTo(F,E,D)};A.defaults={axis:"y",duration:1};A.window=function(D){return C(window).scrollable()};C.fn.scrollable=function(){return this.map(function(){var G=this.parentWindow||this.defaultView,E=this.nodeName=="#document"?G.frameElement||G:this,F=E.contentDocument||(E.contentWindow||E).document,D=E.setInterval;return E.nodeName=="IFRAME"||D&&C.browser.safari?F.body:D?F.documentElement:this})};C.fn.scrollTo=function(F,E,D){if(typeof E=="object"){D=E;E=0}if(typeof D=="function"){D={onAfter:D}}D=C.extend({},A.defaults,D);E=E||D.speed||D.duration;D.queue=D.queue&&D.axis.length>1;if(D.queue){E/=2}D.offset=B(D.offset);D.over=B(D.over);return this.scrollable().each(function(){var M=this,K=C(M),L=F,J,H={},N=K.is("html,body");switch(typeof L){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(L)){L=B(L);break}L=C(L,this);case"object":if(L.is||L.style){J=(L=C(L)).offset()}}C.each(D.axis.split(""),function(R,S){var T=S=="x"?"Left":"Top",V=T.toLowerCase(),Q="scroll"+T,O=M[Q],P=S=="x"?"Width":"Height",U=P.toLowerCase();if(J){H[Q]=J[V]+(N?0:O-K.offset()[V]);if(D.margin){H[Q]-=parseInt(L.css("margin"+T))||0;H[Q]-=parseInt(L.css("border"+T+"Width"))||0}H[Q]+=D.offset[V]||0;if(D.over[V]){H[Q]+=L[U]()*D.over[V]}}else{H[Q]=L[V]}if(/^\d+$/.test(H[Q])){H[Q]=H[Q]<=0?0:Math.min(H[Q],G(P))}if(!R&&D.queue){if(O!=H[Q]){I(D.onAfterFirst)}delete H[Q]}});I(D.onAfter);function I(O){K.animate(H,E,D.easing,O&&function(){O.call(this,F,D)})}function G(P){var O="scroll"+P,Q=M.ownerDocument;return N?Math.max(Q.documentElement[O],Q.body[O]):M[O]}}).end()};function B(D){return typeof D=="object"?D:{top:D,left:D}}})(jQuery);(function(A){A.fn.pngfix=function(B){var E=this;var C=A.extend({imageFixSrc:false,sizingMethod:false},B);if(!A.browser.msie||(A.browser.msie&&A.browser.version>=7)){return(E)}function D(H,J,K){var G=H.attr("filters");var I="DXImageTransform.Microsoft.AlphaImageLoader";if(G[I]){G[I].enabled=true;G[I].src=J;G[I].sizingMethod=K}else{H.css("filter","progid:"+I+'(enabled="true", sizingMethod="'+K+'", src="'+J+'")')}}function F(G){if(G.css("width")=="auto"&G.css("height")=="auto"){G.css("width",G.attr("offsetWidth")+"px")}}return(E.each(function(){var I=A(this);if(I.attr("tagName").toUpperCase()=="IMG"&&(/\.png/i).test(I.attr("src"))){if(!C.imageFixSrc){I.wrap("<span></span>");var H=I.parent();H.css({height:I.height(),width:I.width(),display:"inline-block"}).attr("title",I.attr("title"));D(H,I.attr("src"),"scale");I.remove()}else{if((/\.gif/i).test(C.imageFixSrc)){F(I);D(I,I.attr("src"),"image");I.attr("src",C.imageFixSrc)}}}else{var G=new String(I.css("backgroundImage"));var J=G.match(/^url\((.*)\)$/);if(J&&J.length){F(I);I.css("backgroundImage","none");var K="crop";if(C.sizingMethod){K=C.sizingMethod}D(I,J[1],K);I.find("a").each(function(){A(this).css("position","relative")})}}}))}})(jQuery);(function(B){B.fn.ajaxSubmit=function(L){if(!this.length){A("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof L=="function"){L={success:L}}L=B.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},L||{});var N={};this.trigger("form-pre-serialize",[this,L,N]);if(N.veto){A("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}var H=this.formToArray(L.semantic);if(L.data){L.extraData=L.data;for(var E in L.data){H.push({name:E,value:L.data[E]})}}if(L.beforeSubmit&&L.beforeSubmit(H,this,L)===false){A("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[H,this,L,N]);if(N.veto){A("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var D=B.param(H);if(L.type.toUpperCase()=="GET"){L.url+=(L.url.indexOf("?")>=0?"&":"?")+D;L.data=null}else{L.data=D}var M=this,G=[];if(L.resetForm){G.push(function(){M.resetForm()})}if(L.clearForm){G.push(function(){M.clearForm()})}if(!L.dataType&&L.target){var J=L.success||function(){};G.push(function(O){B(L.target).html(O).each(J,arguments)})}else{if(L.success){G.push(L.success)}}L.success=function(R,P){for(var Q=0,O=G.length;Q<O;Q++){G[Q](R,P,M)}};var C=B("input:file",this).fieldValue();var K=false;for(var F=0;F<C.length;F++){if(C[F]){K=true}}if(L.iframe||K){if(B.browser.safari&&L.closeKeepAlive){B.get(L.closeKeepAlive,I)}else{I()}}else{B.ajax(L)}this.trigger("form-submit-notify",[this,L]);return this;function I(){var S=M[0];if(B(":input[@name=submit]",S).length){alert('Error: Form elements must not be named "submit".');return }var Q=B.extend({},B.ajaxSettings,L);var R="jqFormIO"+(new Date().getTime());var X=B('<iframe id="'+R+'" name="'+R+'" />');var Z=X[0];if(B.browser.msie||B.browser.opera){Z.src='javascript:false;document.write("");'}X.css({position:"absolute",top:"-1000px",left:"-1000px"});var b={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var Y=Q.global;if(Y&&!B.active++){B.event.trigger("ajaxStart")}if(Y){B.event.trigger("ajaxSend",[b,Q])}var P=0;var U=0;var O=S.clk;if(O){var T=O.name;if(T&&!O.disabled){L.extraData=L.extraData||{};L.extraData[T]=O.value;if(O.type=="image"){L.extraData[name+".x"]=S.clk_x;L.extraData[name+".y"]=S.clk_y}}}setTimeout(function(){var f=M.attr("target"),c=M.attr("action");M.attr({target:R,encoding:"multipart/form-data",enctype:"multipart/form-data",method:"POST",action:Q.url});if(Q.timeout){setTimeout(function(){U=true;V()},Q.timeout)}var d=[];try{if(L.extraData){for(var g in L.extraData){d.push(B('<input type="hidden" name="'+g+'" value="'+L.extraData[g]+'" />').appendTo(S)[0])}}X.appendTo("body");Z.attachEvent?Z.attachEvent("onload",V):Z.addEventListener("load",V,false);S.submit()}finally{M.attr("action",c);f?M.attr("target",f):M.removeAttr("target");B(d).remove()}},10);function V(){if(P++){return }Z.detachEvent?Z.detachEvent("onload",V):Z.removeEventListener("load",V,false);var d=0;var f=true;try{if(U){throw"timeout"}var g,k;k=Z.contentWindow?Z.contentWindow.document:Z.contentDocument?Z.contentDocument:Z.document;if(k.body==null&&!d&&B.browser.opera){d=1;P--;setTimeout(V,100);return }b.responseText=k.body?k.body.innerHTML:null;b.responseXML=k.XMLDocument?k.XMLDocument:k;b.getResponseHeader=function(m){var l={"content-type":Q.dataType};return l[m]};if(Q.dataType=="json"||Q.dataType=="script"){var c=k.getElementsByTagName("textarea")[0];b.responseText=c?c.value:b.responseText}else{if(Q.dataType=="xml"&&!b.responseXML&&b.responseText!=null){b.responseXML=W(b.responseText)}}g=B.httpData(b,Q.dataType)}catch(h){f=false;B.handleError(Q,b,"error",h)}if(f){Q.success(g,"success");if(Y){B.event.trigger("ajaxSuccess",[b,Q])}}if(Y){B.event.trigger("ajaxComplete",[b,Q])}if(Y&&!--B.active){B.event.trigger("ajaxStop")}if(Q.complete){Q.complete(b,f?"success":"error")}setTimeout(function(){X.remove();b.responseXML=null},100)}function W(c,d){if(window.ActiveXObject){d=new ActiveXObject("Microsoft.XMLDOM");d.async="false";d.loadXML(c)}else{d=(new DOMParser()).parseFromString(c,"text/xml")}return(d&&d.documentElement&&d.documentElement.tagName!="parsererror")?d:null}}};B.fn.ajaxForm=function(C){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){B(this).ajaxSubmit(C);return false}).each(function(){B(":submit,input:image",this).bind("click.form-plugin",function(E){var D=this.form;D.clk=this;if(this.type=="image"){if(E.offsetX!=undefined){D.clk_x=E.offsetX;D.clk_y=E.offsetY}else{if(typeof B.fn.offset=="function"){var F=B(this).offset();D.clk_x=E.pageX-F.left;D.clk_y=E.pageY-F.top}else{D.clk_x=E.pageX-this.offsetLeft;D.clk_y=E.pageY-this.offsetTop}}}setTimeout(function(){D.clk=D.clk_x=D.clk_y=null},10)})})};B.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){B(":submit,input:image",this).unbind("click.form-plugin")})};B.fn.formToArray=function(N){var M=[];if(this.length==0){return M}var D=this[0];var H=N?D.getElementsByTagName("*"):D.elements;if(!H){return M}for(var I=0,K=H.length;I<K;I++){var E=H[I];var F=E.name;if(!F){continue}if(N&&D.clk&&E.type=="image"){if(!E.disabled&&D.clk==E){M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y})}continue}var O=B.fieldValue(E,true);if(O&&O.constructor==Array){for(var G=0,C=O.length;G<C;G++){M.push({name:F,value:O[G]})}}else{if(O!==null&&typeof O!="undefined"){M.push({name:F,value:O})}}}if(!N&&D.clk){var J=D.getElementsByTagName("input");for(var I=0,K=J.length;I<K;I++){var L=J[I];var F=L.name;if(F&&!L.disabled&&L.type=="image"&&D.clk==L){M.push({name:F+".x",value:D.clk_x},{name:F+".y",value:D.clk_y})}}}return M};B.fn.formSerialize=function(C){return B.param(this.formToArray(C))};B.fn.fieldSerialize=function(D){var C=[];this.each(function(){var H=this.name;if(!H){return }var F=B.fieldValue(this,D);if(F&&F.constructor==Array){for(var G=0,E=F.length;G<E;G++){C.push({name:H,value:F[G]})}}else{if(F!==null&&typeof F!="undefined"){C.push({name:this.name,value:F})}}});return B.param(C)};B.fn.fieldValue=function(H){for(var G=[],E=0,C=this.length;E<C;E++){var F=this[E];var D=B.fieldValue(F,H);if(D===null||typeof D=="undefined"||(D.constructor==Array&&!D.length)){continue}D.constructor==Array?B.merge(G,D):G.push(D)}return G};B.fieldValue=function(C,I){var E=C.name,N=C.type,O=C.tagName.toLowerCase();if(typeof I=="undefined"){I=true}if(I&&(!E||C.disabled||N=="reset"||N=="button"||(N=="checkbox"||N=="radio")&&!C.checked||(N=="submit"||N=="image")&&C.form&&C.form.clk!=C||O=="select"&&C.selectedIndex==-1)){return null}if(O=="select"){var J=C.selectedIndex;if(J<0){return null}var L=[],D=C.options;var G=(N=="select-one");var K=(G?J+1:D.length);for(var F=(G?J:0);F<K;F++){var H=D[F];if(H.selected){var M=B.browser.msie&&!(H.attributes.value.specified)?H.text:H.value;if(G){return M}L.push(M)}}return L}return C.value};B.fn.clearForm=function(){return this.each(function(){B("input,select,textarea",this).clearFields()})};B.fn.clearFields=B.fn.clearInputs=function(){return this.each(function(){var D=this.type,C=this.tagName.toLowerCase();if(D=="text"||D=="password"||C=="textarea"){this.value=""}else{if(D=="checkbox"||D=="radio"){this.checked=false}else{if(C=="select"){this.selectedIndex=-1}}}})};B.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};B.fn.enable=function(C){if(C==undefined){C=true}return this.each(function(){this.disabled=!C})};B.fn.select=function(C){if(C==undefined){C=true}return this.each(function(){var D=this.type;if(D=="checkbox"||D=="radio"){this.checked=C}else{if(this.tagName.toLowerCase()=="option"){var E=B(this).parent("select");if(C&&E[0]&&E[0].type=="select-one"){E.find("option").select(false)}this.selected=C}}})};function A(){if(B.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}}})(jQuery);(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{getHandle:function(C){var B=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==C.target){B=true}});return B},createHelper:function(){var C=this.options;var B=A.isFunction(C.helper)?A(C.helper.apply(this.element[0],[e])):(C.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((C.appendTo=="parent"?this.element[0].parentNode:C.appendTo))}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute")}return B},_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},_mouseCapture:function(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false}this.handle=this.getHandle(B);if(!this.handle){return false}return true},_mouseStart:function(D){var E=this.options;this.helper=this.createHelper();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:D.pageX-this.offset.left,top:D.pageY-this.offset.top};this.cacheScrollParents();this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&A.browser.mozilla){B={top:0,left:0}}this.offset.parent={top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};if(this.cssPosition=="relative"){var C=this.element.position();this.offset.relative={top:C.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollTopParent.scrollTop(),left:C.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollLeftParent.scrollLeft()}}else{this.offset.relative={top:0,left:0}}this.originalPosition=this._generatePosition(D);this.cacheHelperProportions();if(E.cursorAt){this.adjustOffsetFromHelper(E.cursorAt)}A.extend(this,{PAGEY_INCLUDES_SCROLL:(this.cssPosition=="absolute"&&(!this.scrollTopParent[0].tagName||(/(html|body)/i).test(this.scrollTopParent[0].tagName))),PAGEX_INCLUDES_SCROLL:(this.cssPosition=="absolute"&&(!this.scrollLeftParent[0].tagName||(/(html|body)/i).test(this.scrollLeftParent[0].tagName))),OFFSET_PARENT_NOT_SCROLL_PARENT_Y:this.scrollTopParent[0]!=this.offsetParent[0]&&!(this.scrollTopParent[0]==document&&(/(body|html)/i).test(this.offsetParent[0].tagName)),OFFSET_PARENT_NOT_SCROLL_PARENT_X:this.scrollLeftParent[0]!=this.offsetParent[0]&&!(this.scrollLeftParent[0]==document&&(/(body|html)/i).test(this.offsetParent[0].tagName))});if(E.containment){this.setContainment()}this._propagate("start",D);this.cacheHelperProportions();if(A.ui.ddmanager&&!E.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,D)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(D);return true},cacheScrollParents:function(){this.scrollTopParent=function(B){do{if(/auto|scroll/.test(B.css("overflow"))||(/auto|scroll/).test(B.css("overflow-y"))){return B}B=B.parent()}while(B[0].parentNode);return A(document)}(this.helper);this.scrollLeftParent=function(B){do{if(/auto|scroll/.test(B.css("overflow"))||(/auto|scroll/).test(B.css("overflow-x"))){return B}B=B.parent()}while(B[0].parentNode);return A(document)}(this.helper)},adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},setContainment:function(){var E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}},_convertPositionTo:function(C,D){if(!D){D=this.position}var B=C=="absolute"?1:-1;return{top:(D.top+this.offset.relative.top*B+this.offset.parent.top*B-(this.cssPosition=="fixed"||this.PAGEY_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_Y?0:this.scrollTopParent.scrollTop())*B+(this.cssPosition=="fixed"?A(document).scrollTop():0)*B+this.margins.top*B),left:(D.left+this.offset.relative.left*B+this.offset.parent.left*B-(this.cssPosition=="fixed"||this.PAGEX_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_X?0:this.scrollLeftParent.scrollLeft())*B+(this.cssPosition=="fixed"?A(document).scrollLeft():0)*B+this.margins.left*B)}},_generatePosition:function(E){var F=this.options;var B={top:(E.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||this.PAGEY_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_Y?0:this.scrollTopParent.scrollTop())-(this.cssPosition=="fixed"?A(document).scrollTop():0)),left:(E.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||this.PAGEX_INCLUDES_SCROLL||this.OFFSET_PARENT_NOT_SCROLL_PARENT_X?0:this.scrollLeftParent.scrollLeft())-(this.cssPosition=="fixed"?A(document).scrollLeft():0))};if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left>this.containment[2]){B.left=this.containment[2]}if(B.top>this.containment[3]){B.top=this.containment[3]}}if(F.grid){var D=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/F.grid[1])*F.grid[1];B.top=this.containment?(!(D<this.containment[1]||D>this.containment[3])?D:(!(D<this.containment[1])?D-F.grid[1]:D+F.grid[1])):D;var C=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/F.grid[0])*F.grid[0];B.left=this.containment?(!(C<this.containment[0]||C>this.containment[2])?C:(!(C<this.containment[0])?C-F.grid[0]:C+F.grid[0])):C}return B},_mouseDrag:function(B){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");this.position=this._propagate("drag",B)||this.position;if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},_mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C)}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10)||500,function(){B._propagate("stop",C);B._clear()})}else{this._propagate("stop",C);this._clear()}return false},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.uiHash()]);if(C=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this.uiHash()],this.options[C])},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()}}));A.extend(A.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original",scope:"default",cssNamespace:"ui"}});A.ui.plugin.add("draggable","cursor",{start:function(D,C){var B=A("body");if(B.css("cursor")){C.options._cursor=B.css("cursor")}B.css("cursor",C.options.cursor)},stop:function(C,B){if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("draggable","zIndex",{start:function(D,C){var B=A(C.helper);if(B.css("zIndex")){C.options._zIndex=B.css("zIndex")}B.css("zIndex",C.options.zIndex)},stop:function(C,B){if(B.options._zIndex){A(B.helper).css("zIndex",B.options._zIndex)}}});A.ui.plugin.add("draggable","opacity",{start:function(D,C){var B=A(C.helper);if(B.css("opacity")){C.options._opacity=B.css("opacity")}B.css("opacity",C.options.opacity)},stop:function(C,B){if(B.options._opacity){A(B.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(C,B){A(B.options.iframeFix===true?"iframe":B.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(C,B){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","scroll",{start:function(D,C){var E=C.options;var B=A(this).data("draggable");E.scrollSensitivity=E.scrollSensitivity||20;E.scrollSpeed=E.scrollSpeed||20;B.overflowY=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-y"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);B.overflowX=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-x"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){B.overflowYOffset=B.overflowY.offset()}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){B.overflowXOffset=B.overflowX.offset()}},drag:function(E,D){var F=D.options,B=false;var C=A(this).data("draggable");if(C.overflowY[0]!=document&&C.overflowY[0].tagName!="HTML"){if((C.overflowYOffset.top+C.overflowY[0].offsetHeight)-E.pageY<F.scrollSensitivity){C.overflowY[0].scrollTop=B=C.overflowY[0].scrollTop+F.scrollSpeed}if(E.pageY-C.overflowYOffset.top<F.scrollSensitivity){C.overflowY[0].scrollTop=B=C.overflowY[0].scrollTop-F.scrollSpeed}}else{if(E.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed)}if(A(window).height()-(E.pageY-A(document).scrollTop())<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed)}}if(C.overflowX[0]!=document&&C.overflowX[0].tagName!="HTML"){if((C.overflowXOffset.left+C.overflowX[0].offsetWidth)-E.pageX<F.scrollSensitivity){C.overflowX[0].scrollLeft=B=C.overflowX[0].scrollLeft+F.scrollSpeed}if(E.pageX-C.overflowXOffset.left<F.scrollSensitivity){C.overflowX[0].scrollLeft=B=C.overflowX[0].scrollLeft-F.scrollSpeed}}else{if(E.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed)}if(A(window).width()-(E.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed)}}if(B!==false){A.ui.ddmanager.prepareOffsets(C,E)}}});A.ui.plugin.add("draggable","snap",{start:function(D,C){var B=A(this).data("draggable");B.snapElements=[];A(C.options.snap.constructor!=String?(C.options.snap.items||":data(draggable)"):C.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left})}})},drag:function(P,K){var E=A(this).data("draggable");var Q=K.options.snapTolerance||20;var O=K.absolutePosition.left,N=O+E.helperProportions.width,D=K.absolutePosition.top,C=D+E.helperProportions.height;for(var M=E.snapElements.length-1;M>=0;M--){var L=E.snapElements[M].left,J=L+E.snapElements[M].width,I=E.snapElements[M].top,S=I+E.snapElements[M].height;if(!((L-Q<O&&O<J+Q&&I-Q<D&&D<S+Q)||(L-Q<O&&O<J+Q&&I-Q<C&&C<S+Q)||(L-Q<N&&N<J+Q&&I-Q<D&&D<S+Q)||(L-Q<N&&N<J+Q&&I-Q<C&&C<S+Q))){if(E.snapElements[M].snapping){(E.options.snap.release&&E.options.snap.release.call(E.element,null,A.extend(E.uiHash(),{snapItem:E.snapElements[M].item})))}E.snapElements[M].snapping=false;continue}if(K.options.snapMode!="inner"){var B=Math.abs(I-C)<=Q;var R=Math.abs(S-D)<=Q;var G=Math.abs(L-N)<=Q;var H=Math.abs(J-O)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I-E.helperProportions.height,left:0}).top}if(R){K.position.top=E._convertPositionTo("relative",{top:S,left:0}).top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L-E.helperProportions.width}).left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J}).left}}var F=(B||R||G||H);if(K.options.snapMode!="outer"){var B=Math.abs(I-D)<=Q;var R=Math.abs(S-C)<=Q;var G=Math.abs(L-O)<=Q;var H=Math.abs(J-N)<=Q;if(B){K.position.top=E._convertPositionTo("relative",{top:I,left:0}).top}if(R){K.position.top=E._convertPositionTo("relative",{top:S-E.helperProportions.height,left:0}).top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:L}).left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J-E.helperProportions.width}).left}}if(!E.snapElements[M].snapping&&(B||R||G||H||F)){(E.options.snap.snap&&E.options.snap.snap.call(E.element,null,A.extend(E.uiHash(),{snapItem:E.snapElements[M].item})))}E.snapElements[M].snapping=(B||R||G||H||F)}}});A.ui.plugin.add("draggable","connectToSortable",{start:function(D,C){var B=A(this).data("draggable");B.sortables=[];A(C.options.connectToSortable).each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");B.sortables.push({instance:E,shouldRevert:E.options.revert});E._refreshItems();E._propagate("activate",D,B)}})},stop:function(D,C){var B=A(this).data("draggable");A.each(B.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;B.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(D);this.instance.element.triggerHandler("sortreceive",[D,A.extend(this.instance.ui(),{sender:B.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper}else{this.instance._propagate("deactivate",D,B)}})},drag:function(F,E){var D=A(this).data("draggable"),B=this;var C=function(K){var H=K.left,J=H+K.width,I=K.top,G=I+K.height;return(H<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<J&&I<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<G)};A.each(D.sortables,function(G){if(C.call(D,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return E.helper[0]};F.target=this.instance.currentItem[0];this.instance._mouseCapture(F,true);this.instance._mouseStart(F,true,true);this.instance.offset.click.top=D.offset.click.top;this.instance.offset.click.left=D.offset.click.left;this.instance.offset.parent.left-=D.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=D.offset.parent.top-this.instance.offset.parent.top;D._propagate("toSortable",F)}if(this.instance.currentItem){this.instance._mouseDrag(F)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._mouseStop(F,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}D._propagate("fromSortable",F)}}})}});A.ui.plugin.add("draggable","stack",{start:function(D,B){var C=A.makeArray(A(B.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||B.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||B.options.stack.min)});A(C).each(function(E){this.style.zIndex=B.options.stack.min+E});this[0].style.zIndex=B.options.stack.min+C.length}})})(jQuery);(function(A){A.widget("ui.droppable",{_setData:function(B,C){if(B=="accept"){this.options.accept=C&&A.isFunction(C)?C:function(D){return D.is(accept)}}else{A.widget.prototype._setData.apply(this,arguments)}},_init:function(){var C=this.options,B=C.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&A.isFunction(this.options.accept)?this.options.accept:function(D){return D.is(B)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};A.ui.ddmanager.droppables[this.options.scope]=A.ui.ddmanager.droppables[this.options.scope]||[];A.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.cssNamespace&&this.element.addClass(this.options.cssNamespace+"-droppable"))},plugins:{},ui:function(B){return{draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,options:this.options,element:this.element}},destroy:function(){var B=A.ui.ddmanager.droppables[this.options.scope];for(var C=0;C<B.length;C++){if(B[C]==this){B.splice(C,1)}}this.element.removeClass("ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_over:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"over",[C,this.ui(B)]);this.element.triggerHandler("dropover",[C,this.ui(B)],this.options.over)}},_out:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"out",[C,this.ui(B)]);this.element.triggerHandler("dropout",[C,this.ui(B)],this.options.out)}},_drop:function(D,C){var B=C||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return false}var E=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(B,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){E=true;return false}});if(E){return false}if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"drop",[D,this.ui(B)]);this.element.triggerHandler("drop",[D,this.ui(B)],this.options.drop);return this.element}return false},_activate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"activate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropactivate",[C,this.ui(B)],this.options.activate)}},_deactivate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"deactivate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropdeactivate",[C,this.ui(B)],this.options.deactivate)}}});A.extend(A.ui.droppable,{defaults:{disabled:false,tolerance:"intersect",scope:"default",cssNamespace:"ui"}});A.ui.intersect=function(L,F,J){if(!F.offset){return false}var D=(L.positionAbs||L.position.absolute).left,C=D+L.helperProportions.width,I=(L.positionAbs||L.position.absolute).top,H=I+L.helperProportions.height;var E=F.offset.left,B=E+F.proportions.width,K=F.offset.top,G=K+F.proportions.height;switch(J){case"fit":return(E<D&&C<B&&K<I&&H<G);break;case"intersect":return(E<D+(L.helperProportions.width/2)&&C-(L.helperProportions.width/2)<B&&K<I+(L.helperProportions.height/2)&&H-(L.helperProportions.height/2)<G);break;case"pointer":return(E<((L.positionAbs||L.position.absolute).left+(L.clickOffset||L.offset.click).left)&&((L.positionAbs||L.position.absolute).left+(L.clickOffset||L.offset.click).left)<B&&K<((L.positionAbs||L.position.absolute).top+(L.clickOffset||L.offset.click).top)&&((L.positionAbs||L.position.absolute).top+(L.clickOffset||L.offset.click).top)<G);break;case"touch":return((I>=K&&I<=G)||(H>=K&&H<=G)||(I<K&&H>G))&&((D>=E&&D<=B)||(C>=E&&C<=B)||(D<E&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(E,H){var B=A.ui.ddmanager.droppables[E.options.scope];var F=H?H.type:null;var G=(E.currentItem||E.element).find(":data(droppable)").andSelf();droppablesLoop:for(var D=0;D<B.length;D++){if(B[D].options.disabled||(E&&!B[D].options.accept.call(B[D].element,(E.currentItem||E.element)))){continue}for(var C=0;C<G.length;C++){if(G[C]==B[D].element[0]){B[D].proportions.height=0;continue droppablesLoop}}B[D].visible=B[D].element.css("display")!="none";if(!B[D].visible){continue}B[D].offset=B[D].element.offset();B[D].proportions={width:B[D].element[0].offsetWidth,height:B[D].element[0].offsetHeight};if(F=="dragstart"||F=="sortactivate"){B[D]._activate.call(B[D],H)}}},drop:function(B,C){var D=false;A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&A.ui.intersect(B,this,this.options.tolerance)){D=this._drop.call(this,C)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,(B.currentItem||B.element))){this.isout=1;this.isover=0;this._deactivate.call(this,C)}});return D},drag:function(B,C){if(B.options.refreshPositions){A.ui.ddmanager.prepareOffsets(B,C)}A.each(A.ui.ddmanager.droppables[B.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var E=A.ui.intersect(B,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(":data(droppable):eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F.isover=0;F.isout=1;F._out.call(F,C)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"_over":"_out"].call(this,C);if(F&&G=="isout"){F.isout=0;F.isover=1;F._over.call(F,C)}})}};A.ui.plugin.add("droppable","activeClass",{activate:function(C,B){A(this).addClass(B.options.activeClass)},deactivate:function(C,B){A(this).removeClass(B.options.activeClass)},drop:function(C,B){A(this).removeClass(B.options.activeClass)}});A.ui.plugin.add("droppable","hoverClass",{over:function(C,B){A(this).addClass(B.options.hoverClass)},out:function(C,B){A(this).removeClass(B.options.hoverClass)},drop:function(C,B){A(this).removeClass(B.options.hoverClass)}})})(jQuery);(function(A){A.widget("ui.resizable",A.extend({},A.ui.mouse,{_init:function(){var M=this,N=this.options;var Q=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(Q)?"relative":Q});A.extend(N,{_aspectRatio:!!(N.aspectRatio),helper:N.helper||N.ghost||N.animate?N.helper||"proxy":null,knobHandles:N.knobHandles===true?"ui-resizable-knob-handle":N.knobHandles});var H="1px solid #DEDEDE";N.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:H},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:H},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:H},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:H},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:H,borderBottom:H},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:H,borderLeft:H},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:H,borderTop:H},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:H,borderTop:H}};N.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};N._nodeName=this.element[0].nodeName;if(N._nodeName.match(/canvas|textarea|input|select|button|img/i)){var B=this.element;if(/relative/.test(B.css("position"))&&A.browser.opera){B.css({position:"relative",top:"auto",left:"auto"})}B.wrap(A('<div class="ui-wrapper"	style="overflow: hidden;"></div>').css({position:B.css("position"),width:B.outerWidth(),height:B.outerHeight(),top:B.css("top"),left:B.css("left")}));var J=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:J.css("marginLeft"),marginTop:J.css("marginTop"),marginRight:J.css("marginRight"),marginBottom:J.css("marginBottom")});J.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(A.browser.safari&&N.preventDefault){J.css("resize","none")}N.proportionallyResize=J.css({position:"static",zoom:1,display:"block"});this.element.css({margin:J.css("margin")});this._proportionallyResize()}if(!N.handles){N.handles=!A(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}}if(N.handles.constructor==String){N.zIndex=N.zIndex||1000;if(N.handles=="all"){N.handles="n,e,s,w,se,sw,ne,nw"}var O=N.handles.split(",");N.handles={};var G={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var R=0;R<O.length;R++){var S=A.trim(O[R]),L=N.defaultTheme,F="ui-resizable-"+S,C=!A.ui.css(F)&&!N.knobHandles,P=A.ui.css("ui-resizable-knob-handle"),T=A.extend(L[F],L["ui-resizable-handle"]),D=A.extend(N.knobTheme[F],!P?N.knobTheme["ui-resizable-handle"]:{});var K=/sw|se|ne|nw/.test(S)?{zIndex:++N.zIndex}:{};var I=(C?G[S]:""),E=A(['<div class="ui-resizable-handle ',F,'" style="',I,G.handle,'"></div>'].join("")).css(K);N.handles[S]=".ui-resizable-"+S;this.element.append(E.css(C?T:{}).css(N.knobHandles?D:{}).addClass(N.knobHandles?"ui-resizable-knob-handle":"").addClass(N.knobHandles))}if(N.knobHandles){this.element.addClass("ui-resizable-knob").css(!A.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(Y){Y=Y||this.element;for(var V in N.handles){if(N.handles[V].constructor==String){N.handles[V]=A(N.handles[V],this.element).show()}if(N.transparent){N.handles[V].css({opacity:0})}if(this.element.is(".ui-wrapper")&&N._nodeName.match(/textarea|input|select|button/i)){var W=A(N.handles[V],this.element),X=0;X=/sw|ne|nw|se|n|s/.test(V)?W.outerHeight():W.outerWidth();var U=["padding",/ne|nw|n/.test(V)?"Top":/se|sw|s/.test(V)?"Bottom":/^e$/.test(V)?"Right":"Left"].join("");if(!N.transparent){Y.css(U,X)}this._proportionallyResize()}if(!A(N.handles[V]).length){continue}}};this._renderAxis(this.element);N._handles=A(".ui-resizable-handle",M.element);if(N.disableSelection){N._handles.each(function(U,V){A.ui.disableSelection(V)})}N._handles.mouseover(function(){if(!N.resizing){if(this.className){var U=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}M.axis=N.axis=U&&U[1]?U[1]:"se"}});if(N.autoHide){N._handles.hide();A(M.element).addClass("ui-resizable-autohide").hover(function(){A(this).removeClass("ui-resizable-autohide");N._handles.show()},function(){if(!N.resizing){A(this).addClass("ui-resizable-autohide");N._handles.hide()}})}this._mouseInit()},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition}},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);if(C!="resize"){this.element.triggerHandler(["resize",C].join(""),[B,this.ui()],this.options[C])}},destroy:function(){var D=this.element,C=D.children(".ui-resizable").get(0);this._mouseDestroy();var B=function(E){A(E).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};B(D);if(D.is(".ui-wrapper")&&C){D.parent().append(A(C).css({position:D.css("position"),width:D.outerWidth(),height:D.outerHeight(),top:D.css("top"),left:D.css("left")})).end().remove();B(C)}},_mouseCapture:function(D){if(this.options.disabled){return false}var C=false;for(var B in this.options.handles){if(A(this.options.handles[B])[0]==D.target){C=true}}if(!C){return false}return true},_mouseStart:function(I){var C=this.options,B=this.element.position(),D=this.element,H=function(M){return parseInt(M,10)||0},G=A.browser.msie&&A.browser.version<7;C.resizing=true;C.documentScroll={top:A(document).scrollTop(),left:A(document).scrollLeft()};if(D.is(".ui-draggable")||(/absolute/).test(D.css("position"))){var J=A.browser.msie&&!C.containment&&(/absolute/).test(D.css("position"))&&!(/relative/).test(D.parent().css("position"));var K=J?C.documentScroll.top:0,F=J?C.documentScroll.left:0;D.css({position:"absolute",top:(B.top+K),left:(B.left+F)})}if(A.browser.opera&&/relative/.test(D.css("position"))){D.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var L=H(this.helper.css("left")),E=H(this.helper.css("top"));if(C.containment){L+=A(C.containment).scrollLeft()||0;E+=A(C.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:L,top:E};this.size=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalSize=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalPosition={left:L,top:E};this.sizeDiff={width:D.outerWidth()-D.width(),height:D.outerHeight()-D.height()};this.originalMousePosition={left:I.pageX,top:I.pageY};C.aspectRatio=(typeof C.aspectRatio=="number")?C.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);if(C.preserveCursor){A("body").css("cursor",this.axis+"-resize")}this._propagate("start",I);return true},_mouseDrag:function(I){var D=this.helper,C=this.options,J={},M=this,F=this.originalMousePosition,K=this.axis;var N=(I.pageX-F.left)||0,L=(I.pageY-F.top)||0;var E=this._change[K];if(!E){return false}var H=E.apply(this,[I,N,L]),G=A.browser.msie&&A.browser.version<7,B=this.sizeDiff;if(C._aspectRatio||I.shiftKey){H=this._updateRatio(H,I)}H=this._respectSize(H,I);this._propagate("resize",I);D.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!C.helper&&C.proportionallyResize){this._proportionallyResize()}this._updateCache(H);this.element.triggerHandler("resize",[I,this.ui()],this.options.resize);return false},_mouseStop:function(I){this.options.resizing=false;var E=this.options,H=function(M){return parseInt(M,10)||0},K=this;if(E.helper){var D=E.proportionallyResize,B=D&&(/textarea/i).test(D.get(0).nodeName),C=B&&A.ui.hasScroll(D.get(0),"left")?0:K.sizeDiff.height,G=B?0:K.sizeDiff.width;var L={width:(K.size.width-G),height:(K.size.height-C)},F=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(parseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!E.animate){this.element.css(A.extend(L,{top:J,left:F}))}if(E.helper&&!E.animate){this._proportionallyResize()}}if(E.preserveCursor){A("body").css("cursor","auto")}this._propagate("stop",I);if(E.helper){this.helper.remove()}return false},_updateCache:function(B){var C=this.options;this.offset=this.helper.offset();if(B.left){this.position.left=B.left}if(B.top){this.position.top=B.top}if(B.height){this.size.height=B.height}if(B.width){this.size.width=B.width}},_updateRatio:function(D,E){var F=this.options,G=this.position,C=this.size,B=this.axis;if(D.height){D.width=(C.height*F.aspectRatio)}else{if(D.width){D.height=(C.width/F.aspectRatio)}}if(B=="sw"){D.left=G.left+(C.width-D.width);D.top=null}if(B=="nw"){D.top=G.top+(C.height-D.height);D.left=G.left+(C.width-D.width)}return D},_respectSize:function(H,I){var F=this.helper,E=this.options,N=E._aspectRatio||I.shiftKey,M=this.axis,P=H.width&&E.maxWidth&&E.maxWidth<H.width,J=H.height&&E.maxHeight&&E.maxHeight<H.height,D=H.width&&E.minWidth&&E.minWidth>H.width,O=H.height&&E.minHeight&&E.minHeight>H.height;if(D){H.width=E.minWidth}if(O){H.height=E.minHeight}if(P){H.width=E.maxWidth}if(J){H.height=E.maxHeight}var C=this.originalPosition.left+this.originalSize.width,L=this.position.top+this.size.height;var G=/sw|nw|w/.test(M),B=/nw|ne|n/.test(M);if(D&&G){H.left=C-E.minWidth}if(P&&G){H.left=C-E.maxWidth}if(O&&B){H.top=L-E.minHeight}if(J&&B){H.top=L-E.maxHeight}var K=!H.width&&!H.height;if(K&&!H.left&&H.top){H.top=null}else{if(K&&!H.top&&H.left){H.left=null}}return H},_proportionallyResize:function(){var F=this.options;if(!F.proportionallyResize){return }var D=F.proportionallyResize,C=this.helper||this.element;if(!F.borderDif){var B=[D.css("borderTopWidth"),D.css("borderRightWidth"),D.css("borderBottomWidth"),D.css("borderLeftWidth")],E=[D.css("paddingTop"),D.css("paddingRight"),D.css("paddingBottom"),D.css("paddingLeft")];F.borderDif=A.map(B,function(G,I){var H=parseInt(G,10)||0,J=parseInt(E[I],10)||0;return H+J})}D.css({height:(C.height()-F.borderDif[0]-F.borderDif[2])+"px",width:(C.width()-F.borderDif[1]-F.borderDif[3])+"px"})},_renderProxy:function(){var C=this.element,F=this.options;this.elementOffset=C.offset();if(F.helper){this.helper=this.helper||A('<div style="overflow:hidden;"></div>');var B=A.browser.msie&&A.browser.version<7,D=(B?1:0),E=(B?2:-1);this.helper.addClass(F.helper).css({width:C.outerWidth()+E,height:C.outerHeight()+E,position:"absolute",left:this.elementOffset.left-D+"px",top:this.elementOffset.top-D+"px",zIndex:++F.zIndex});this.helper.appendTo("body");if(F.disableSelection){A.ui.disableSelection(this.helper.get(0))}}else{this.helper=C}},_change:{e:function(D,C,B){return{width:this.originalSize.width+C}},w:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{left:E.left+C,width:D.width-C}},n:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{top:E.top+B,height:D.height-B}},s:function(D,C,B){return{height:this.originalSize.height+B}},se:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[D,C,B]))},sw:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[D,C,B]))},ne:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[D,C,B]))},nw:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[D,C,B]))}}}));A.extend(A.ui.resizable,{defaults:{cancel:":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});A.ui.plugin.add("resizable","containment",{start:function(I,K){var E=K.options,M=A(this).data("resizable"),G=M.element;var C=E.containment,F=(C instanceof A)?C.get(0):(/parent/.test(C))?G.parent().get(0):C;if(!F){return }M.containerElement=A(F);if(/document/.test(C)||C==document){M.containerOffset={left:0,top:0};M.containerPosition={left:0,top:0};M.parentData={element:A(document),left:0,top:0,width:A(document).width(),height:A(document).height()||document.body.parentNode.scrollHeight}}else{M.containerOffset=A(F).offset();M.containerPosition=A(F).position();M.containerSize={height:A(F).innerHeight(),width:A(F).innerWidth()};var J=M.containerOffset,B=M.containerSize.height,H=M.containerSize.width,D=(A.ui.hasScroll(F,"left")?F.scrollWidth:H),L=(A.ui.hasScroll(F)?F.scrollHeight:B);M.parentData={element:F,left:J.left,top:J.top,width:D,height:L}}},resize:function(H,K){var E=K.options,N=A(this).data("resizable"),C=N.containerSize,J=N.containerOffset,G=N.size,I=N.position,L=E._aspectRatio||H.shiftKey,B={top:0,left:0},D=N.containerElement;if(D[0]!=document&&/static/.test(D.css("position"))){B=N.containerPosition}if(I.left<(E.helper?J.left:B.left)){N.size.width=N.size.width+(E.helper?(N.position.left-J.left):(N.position.left-B.left));if(L){N.size.height=N.size.width/E.aspectRatio}N.position.left=E.helper?J.left:B.left}if(I.top<(E.helper?J.top:0)){N.size.height=N.size.height+(E.helper?(N.position.top-J.top):N.position.top);if(L){N.size.width=N.size.height*E.aspectRatio}N.position.top=E.helper?J.top:0}var F=(E.helper?N.offset.left-J.left:(N.position.left-B.left))+N.sizeDiff.width,M=(E.helper?N.offset.top-J.top:N.position.top)+N.sizeDiff.height;if(F+N.size.width>=N.parentData.width){N.size.width=N.parentData.width-F;if(L){N.size.height=N.size.width/E.aspectRatio}}if(M+N.size.height>=N.parentData.height){N.size.height=N.parentData.height-M;if(L){N.size.width=N.size.height*E.aspectRatio}}},stop:function(G,J){var C=J.options,L=A(this).data("resizable"),H=L.position,I=L.containerOffset,B=L.containerPosition,D=L.containerElement;var E=A(L.helper),M=E.offset(),K=E.innerWidth(),F=E.innerHeight();if(C.helper&&!C.animate&&/relative/.test(D.css("position"))){A(this).css({left:(M.left-I.left),top:(M.top-I.top),width:K,height:F})}if(C.helper&&!C.animate&&/static/.test(D.css("position"))){A(this).css({left:B.left+(M.left-I.left),top:B.top+(M.top-I.top),width:K,height:F})}}});A.ui.plugin.add("resizable","grid",{resize:function(H,J){var D=J.options,L=A(this).data("resizable"),G=L.size,E=L.originalSize,F=L.originalPosition,K=L.axis,I=D._aspectRatio||H.shiftKey;D.grid=typeof D.grid=="number"?[D.grid,D.grid]:D.grid;var C=Math.round((G.width-E.width)/(D.grid[0]||1))*(D.grid[0]||1),B=Math.round((G.height-E.height)/(D.grid[1]||1))*(D.grid[1]||1);if(/^(se|s|e)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B}else{if(/^(ne)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B}else{if(/^(sw)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.left=F.left-C}else{L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B;L.position.left=F.left-C}}}}});A.ui.plugin.add("resizable","animate",{stop:function(I,K){var F=K.options,L=A(this).data("resizable");var E=F.proportionallyResize,B=E&&(/textarea/i).test(E.get(0).nodeName),C=B&&A.ui.hasScroll(E.get(0),"left")?0:L.sizeDiff.height,H=B?0:L.sizeDiff.width;var D={width:(L.size.width-H),height:(L.size.height-C)},G=(parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left))||null,J=(parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top))||null;L.element.animate(A.extend(D,J&&G?{top:J,left:G}:{}),{duration:F.animateDuration||"slow",easing:F.animateEasing||"swing",step:function(){var M={width:parseInt(L.element.css("width"),10),height:parseInt(L.element.css("height"),10),top:parseInt(L.element.css("top"),10),left:parseInt(L.element.css("left"),10)};if(E){E.css({width:M.width,height:M.height})}L._updateCache(M);L._propagate("animate",I)}})}});A.ui.plugin.add("resizable","ghost",{start:function(E,D){var F=D.options,B=A(this).data("resizable"),G=F.proportionallyResize,C=B.size;if(!G){B.ghost=B.element.clone()}else{B.ghost=G.clone()}B.ghost.css({opacity:0.25,display:"block",position:"relative",height:C.height,width:C.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof F.ghost=="string"?F.ghost:"");B.ghost.appendTo(B.helper)},resize:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost){B.ghost.css({position:"relative",height:B.size.height,width:B.size.width})}},stop:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost&&B.helper){B.helper.get(0).removeChild(B.ghost.get(0))}}});A.ui.plugin.add("resizable","alsoResize",{start:function(E,C){var F=C.options,B=A(this).data("resizable"),D=function(G){A(G).each(function(){A(this).data("resizable-alsoresize",{width:parseInt(A(this).width(),10),height:parseInt(A(this).height(),10),left:parseInt(A(this).css("left"),10),top:parseInt(A(this).css("top"),10)})})};if(typeof (F.alsoResize)=="object"){if(F.alsoResize.length){F.alsoResize=F.alsoResize[0];D(F.alsoResize)}else{A.each(F.alsoResize,function(G,H){D(G)})}}else{D(F.alsoResize)}},resize:function(F,E){var G=E.options,C=A(this).data("resizable"),D=C.originalSize,I=C.originalPosition;var H={height:(C.size.height-D.height)||0,width:(C.size.width-D.width)||0,top:(C.position.top-I.top)||0,left:(C.position.left-I.left)||0},B=function(J,K){A(J).each(function(){var N=A(this).data("resizable-alsoresize"),M={},L=K&&K.length?K:["width","height","top","left"];A.each(L||["width","height","top","left"],function(O,Q){var P=(N[Q]||0)+(H[Q]||0);if(P&&P>=0){M[Q]=P||null}});A(this).css(M)})};if(typeof (G.alsoResize)=="object"){A.each(G.alsoResize,function(J,K){B(J,K)})}else{B(G.alsoResize)}},stop:function(C,B){A(this).removeData("resizable-alsoresize-start")}})})(jQuery);(function(B){function A(E,D){var C=B.browser.safari&&B.browser.version<522;if(E.contains&&!C){return E.contains(D)}if(E.compareDocumentPosition){return !!(E.compareDocumentPosition(D)&16)}while(D=D.parentNode){if(D==E){return true}}return false}B.widget("ui.sortable",B.extend({},B.ui.mouse,{_init:function(){var C=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},plugins:{},ui:function(C){return{helper:(C||this)["helper"],placeholder:(C||this)["placeholder"]||B([]),position:(C||this)["position"],absolutePosition:(C||this)["positionAbs"],options:this.options,element:this.element,item:(C||this)["currentItem"],sender:C?C.element:null}},_propagate:function(F,E,C,D){B.ui.plugin.call(this,F,[E,this.ui(C)]);if(!D){this.element.triggerHandler(F=="sort"?F:"sort"+F,[E,this.ui(C)],this.options[F])}},serialize:function(E){var C=this._getItemsAsjQuery(E&&E.connected);var D=[];E=E||{};B(C).each(function(){var F=(B(this.item||this).attr(E.attribute||"id")||"").match(E.expression||(/(.+)[-=_](.+)/));if(F){D.push((E.key||F[1]+"[]")+"="+(E.key&&E.expression?F[1]:F[2]))}});return D.join("&")},toArray:function(E){var C=this._getItemsAsjQuery(E&&E.connected);var D=[];C.each(function(){D.push(B(this).attr(E.attr||"id"))});return D},_intersectsWith:function(L){var E=this.positionAbs.left,D=E+this.helperProportions.width,K=this.positionAbs.top,J=K+this.helperProportions.height;var F=L.left,C=F+L.width,M=L.top,I=M+L.height;var N=this.offset.click.top,H=this.offset.click.left;var G=(K+N)>M&&(K+N)<I&&(E+H)>F&&(E+H)<C;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>L[this.floating?"width":"height"])){return G}else{return(F<E+(this.helperProportions.width/2)&&D-(this.helperProportions.width/2)<C&&M<K+(this.helperProportions.height/2)&&J-(this.helperProportions.height/2)<I)}},_intersectsWithEdge:function(N){var E=this.positionAbs.left,D=E+this.helperProportions.width,L=this.positionAbs.top,J=L+this.helperProportions.height;var F=N.left,C=F+N.width,O=N.top,I=O+N.height;var P=this.offset.click.top,H=this.offset.click.left;var G=(L+P)>O&&(L+P)<I&&(E+H)>F&&(E+H)<C;if(this.options.tolerance=="pointer"||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>N[this.floating?"width":"height"])){if(!G){return false}if(this.floating){if((E+H)>F&&(E+H)<F+N.width/2){return 2}if((E+H)>F+N.width/2&&(E+H)<C){return 1}}else{var M=N.height;var K=L-this.updateOriginalPosition.top<0?2:1;if(K==1&&(L+P)<O+M/2){return 2}else{if(K==2&&(L+P)>O+M/2){return 1}}}}else{if(!(F<E+(this.helperProportions.width/2)&&D-(this.helperProportions.width/2)<C&&O<L+(this.helperProportions.height/2)&&J-(this.helperProportions.height/2)<I)){return false}if(this.floating){if(D>F&&E<F){return 2}if(E<C&&D>C){return 1}}else{if(J>O&&L<O){return 1}if(L<I&&J>I){return 2}}}return false},refresh:function(){this._refreshItems();this.refreshPositions()},_getItemsAsjQuery:function(H){var D=this;var C=[];var F=[];if(this.options.connectWith&&H){for(var G=this.options.connectWith.length-1;G>=0;G--){var J=B(this.options.connectWith[G]);for(var E=J.length-1;E>=0;E--){var I=B.data(J[E],"sortable");if(I&&I!=this&&!I.options.disabled){F.push([B.isFunction(I.options.items)?I.options.items.call(I.element):B(I.options.items,I.element).not(".ui-sortable-helper"),I])}}}}F.push([B.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):B(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var G=F.length-1;G>=0;G--){F[G][0].each(function(){C.push(this)})}return B(C)},_removeCurrentsFromItems:function(){var E=this.currentItem.find(":data(sortable-item)");for(var D=0;D<this.items.length;D++){for(var C=0;C<E.length;C++){if(E[C]==this.items[D].item[0]){this.items.splice(D,1)}}}},_refreshItems:function(){this.items=[];this.containers=[this];var D=this.items;var C=this;var F=[[B.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):B(this.options.items,this.element),this]];if(this.options.connectWith){for(var G=this.options.connectWith.length-1;G>=0;G--){var I=B(this.options.connectWith[G]);for(var E=I.length-1;E>=0;E--){var H=B.data(I[E],"sortable");if(H&&H!=this&&!H.options.disabled){F.push([B.isFunction(H.options.items)?H.options.items.call(H.element):B(H.options.items,H.element),H]);this.containers.push(H)}}}}for(var G=F.length-1;G>=0;G--){F[G][0].each(function(){B.data(this,"sortable-item",F[G][1]);D.push({item:B(this),instance:F[G][1],width:0,height:0,left:0,top:0})})}},refreshPositions:function(D){if(this.offsetParent){var C=this.offsetParent.offset();this.offset.parent={top:C.top+this.offsetParentBorders.top,left:C.left+this.offsetParentBorders.left}}for(var F=this.items.length-1;F>=0;F--){if(this.items[F].instance!=this.currentContainer&&this.currentContainer&&this.items[F].item[0]!=this.currentItem[0]){continue}var E=this.options.toleranceElement?B(this.options.toleranceElement,this.items[F].item):this.items[F].item;if(!D){this.items[F].width=E[0].offsetWidth;this.items[F].height=E[0].offsetHeight}var G=E.offset();this.items[F].left=G.left;this.items[F].top=G.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var F=this.containers.length-1;F>=0;F--){var G=this.containers[F].element.offset();this.containers[F].containerCache.left=G.left;this.containers[F].containerCache.top=G.top;this.containers[F].containerCache.width=this.containers[F].element.outerWidth();this.containers[F].containerCache.height=this.containers[F].element.outerHeight()}}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var C=this.items.length-1;C>=0;C--){this.items[C].item.removeData("sortable-item")}},_createPlaceholder:function(E){var C=E||this,F=C.options;if(!F.placeholder||F.placeholder.constructor==String){var D=F.placeholder;F.placeholder={element:function(){var G=B(document.createElement(C.currentItem[0].nodeName)).addClass(D||"ui-sortable-placeholder")[0];if(!D){G.style.visibility="hidden";document.body.appendChild(G);G.innerHTML=C.currentItem[0].innerHTML;document.body.removeChild(G)}return G},update:function(G,H){if(D&&!F.forcePlaceholderSize){return }if(!H.height()){H.height(C.currentItem.innerHeight()-parseInt(C.currentItem.css("paddingTop")||0,10)-parseInt(C.currentItem.css("paddingBottom")||0,10))}if(!H.width()){H.width(C.currentItem.innerWidth()-parseInt(C.currentItem.css("paddingLeft")||0,10)-parseInt(C.currentItem.css("paddingRight")||0,10))}}}}C.placeholder=B(F.placeholder.element.call(C.element,C.currentItem));C.currentItem.parent()[0].appendChild(C.placeholder[0]);C.placeholder[0].parentNode.insertBefore(C.placeholder[0],C.currentItem[0]);F.placeholder.update(C,C.placeholder)},_contactContainers:function(F){for(var D=this.containers.length-1;D>=0;D--){if(this._intersectsWith(this.containers[D].containerCache)){if(!this.containers[D].containerCache.over){if(this.currentContainer!=this.containers[D]){var I=10000;var H=null;var E=this.positionAbs[this.containers[D].floating?"left":"top"];for(var C=this.items.length-1;C>=0;C--){if(!A(this.containers[D].element[0],this.items[C].item[0])){continue}var G=this.items[C][this.containers[D].floating?"left":"top"];if(Math.abs(G-E)<I){I=Math.abs(G-E);H=this.items[C]}}if(!H&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[D];H?this.options.sortIndicator.call(this,F,H,null,true):this.options.sortIndicator.call(this,F,null,this.containers[D].element,true);this._propagate("change",F);this.containers[D]._propagate("change",F,this);this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[D]._propagate("over",F,this);this.containers[D].containerCache.over=1}}else{if(this.containers[D].containerCache.over){this.containers[D]._propagate("out",F,this);this.containers[D].containerCache.over=0}}}},_mouseCapture:function(G,F){if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems();var E=null,D=this,C=B(G.target).parents().each(function(){if(B.data(this,"sortable-item")==D){E=B(this);return false}});if(B.data(G.target,"sortable-item")==D){E=B(G.target)}if(!E){return false}if(this.options.handle&&!F){var H=false;B(this.options.handle,E).find("*").andSelf().each(function(){if(this==G.target){H=true}});if(!H){return false}}this.currentItem=E;this._removeCurrentsFromItems();return true},createHelper:function(D){var E=this.options;var C=typeof E.helper=="function"?B(E.helper.apply(this.element[0],[D,this.currentItem])):(E.helper=="original"?this.currentItem:this.currentItem.clone());if(!C.parents("body").length){B(E.appendTo!="parent"?E.appendTo:this.currentItem[0].parentNode)[0].appendChild(C[0])}return C},_mouseStart:function(G,I,K){var C=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this.createHelper(G);this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:G.pageX-this.offset.left,top:G.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var E=this.offsetParent.offset();this.offsetParentBorders={top:(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};this.offset.parent={top:E.top+this.offsetParentBorders.top,left:E.left+this.offsetParentBorders.left};this.updateOriginalPosition=this.originalPosition=this._generatePosition(G);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(C.helper=="original"){this._storedCSS={position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left"),clear:this.currentItem.css("clear")}}else{this.currentItem.hide()}this.helper.css({position:"absolute",clear:"both"}).addClass("ui-sortable-helper");this._createPlaceholder();this._propagate("start",G);if(!this._preserveHelperProportions){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}}if(C.cursorAt){if(C.cursorAt.left!=undefined){this.offset.click.left=C.cursorAt.left}if(C.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-C.cursorAt.right}if(C.cursorAt.top!=undefined){this.offset.click.top=C.cursorAt.top}if(C.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-C.cursorAt.bottom}}if(C.containment){if(C.containment=="parent"){C.containment=this.helper[0].parentNode}if(C.containment=="document"||C.containment=="window"){this.containment=[0-this.offset.parent.left,0-this.offset.parent.top,B(C.containment=="document"?document:window).width()-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(B(C.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(C.containment)){var D=B(C.containment)[0];var J=B(C.containment).offset();var H=(B(D).css("overflow")!="hidden");this.containment=[J.left+(parseInt(B(D).css("borderLeftWidth"),10)||0)-this.offset.parent.left,J.top+(parseInt(B(D).css("borderTopWidth"),10)||0)-this.offset.parent.top,J.left+(H?Math.max(D.scrollWidth,D.offsetWidth):D.offsetWidth)-(parseInt(B(D).css("borderLeftWidth"),10)||0)-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),J.top+(H?Math.max(D.scrollHeight,D.offsetHeight):D.offsetHeight)-(parseInt(B(D).css("borderTopWidth"),10)||0)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}}if(!K){for(var F=this.containers.length-1;F>=0;F--){this.containers[F]._propagate("activate",G,this)}}if(B.ui.ddmanager){B.ui.ddmanager.current=this}if(B.ui.ddmanager&&!C.dropBehaviour){B.ui.ddmanager.prepareOffsets(this,G)}this.dragging=true;this._mouseDrag(G);return true},_convertPositionTo:function(D,E){if(!E){E=this.position}var C=D=="absolute"?1:-1;return{top:(E.top+this.offset.parent.top*C-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*C+this.margins.top*C),left:(E.left+this.offset.parent.left*C-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*C+this.margins.left*C)}},_generatePosition:function(F){var G=this.options;var C={top:(F.pageY-this.offset.click.top-this.offset.parent.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)),left:(F.pageX-this.offset.click.left-this.offset.parent.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft))};if(!this.originalPosition){return C}if(this.containment){if(C.left<this.containment[0]){C.left=this.containment[0]}if(C.top<this.containment[1]){C.top=this.containment[1]}if(C.left>this.containment[2]){C.left=this.containment[2]}if(C.top>this.containment[3]){C.top=this.containment[3]}}if(G.grid){var E=this.originalPosition.top+Math.round((C.top-this.originalPosition.top)/G.grid[1])*G.grid[1];C.top=this.containment?(!(E<this.containment[1]||E>this.containment[3])?E:(!(E<this.containment[1])?E-G.grid[1]:E+G.grid[1])):E;var D=this.originalPosition.left+Math.round((C.left-this.originalPosition.left)/G.grid[0])*G.grid[0];C.left=this.containment?(!(D<this.containment[0]||D>this.containment[2])?D:(!(D<this.containment[0])?D-G.grid[0]:D+G.grid[0])):D}return C},_mouseDrag:function(D){this.position=this._generatePosition(D);this.positionAbs=this._convertPositionTo("absolute");B.ui.plugin.call(this,"sort",[D,this.ui()]);this.positionAbs=this._convertPositionTo("absolute");this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";for(var C=this.items.length-1;C>=0;C--){var E=this._intersectsWithEdge(this.items[C]);if(!E){continue}if(this.items[C].item[0]!=this.currentItem[0]&&this.placeholder[E==1?"next":"prev"]()[0]!=this.items[C].item[0]&&!A(this.placeholder[0],this.items[C].item[0])&&(this.options.type=="semi-dynamic"?!A(this.element[0],this.items[C].item[0]):true)){this.updateOriginalPosition=this._generatePosition(D);this.direction=E==1?"down":"up";this.options.sortIndicator.call(this,D,this.items[C]);this._propagate("change",D);break}}this._contactContainers(D);if(B.ui.ddmanager){B.ui.ddmanager.drag(this,D)}this.element.triggerHandler("sort",[D,this.ui()],this.options.sort);return false},_rearrange:function(H,G,D,F){D?D[0].appendChild(this.placeholder[0]):G.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?G.item[0]:G.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var E=this,C=this.counter;window.setTimeout(function(){if(C==E.counter){E.refreshPositions(!F)}},0)},_mouseStop:function(E,D){if(B.ui.ddmanager&&!this.options.dropBehaviour){B.ui.ddmanager.drop(this,E)}if(this.options.revert){var C=this;var F=C.placeholder.offset();B(this.helper).animate({left:F.left-this.offset.parent.left-C.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:F.top-this.offset.parent.top-C.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){C._clear(E)})}else{this._clear(E,D)}return false},_clear:function(E,D){if(!this._noFinalSort){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0]){this._propagate("update",E,null,D)}if(!A(this.element[0],this.currentItem[0])){this._propagate("remove",E,null,D);for(var C=this.containers.length-1;C>=0;C--){if(A(this.containers[C].element[0],this.currentItem[0])){this.containers[C]._propagate("update",E,this,D);this.containers[C]._propagate("receive",E,this,D)}}}for(var C=this.containers.length-1;C>=0;C--){this.containers[C]._propagate("deactivate",E,this,D);if(this.containers[C].containerCache.over){this.containers[C]._propagate("out",E,this);this.containers[C].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this._propagate("beforeStop",E,null,D);this._propagate("stop",E,null,D);return false}this._propagate("beforeStop",E,null,D);this.placeholder.remove();if(this.options.helper!="original"){this.helper.remove()}this.helper=null;this._propagate("stop",E,null,D);return true}}));B.extend(B.ui.sortable,{getter:"serialize toArray",defaults:{helper:"original",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:"> *",zIndex:1000,dropOnEmpty:true,appendTo:"parent",sortIndicator:B.ui.sortable.prototype._rearrange,scope:"default",forcePlaceholderSize:false}});B.ui.plugin.add("sortable","cursor",{start:function(E,D){var C=B("body");if(C.css("cursor")){D.options._cursor=C.css("cursor")}C.css("cursor",D.options.cursor)},beforeStop:function(D,C){if(C.options._cursor){B("body").css("cursor",C.options._cursor)}}});B.ui.plugin.add("sortable","zIndex",{start:function(E,D){var C=D.helper;if(C.css("zIndex")){D.options._zIndex=C.css("zIndex")}C.css("zIndex",D.options.zIndex)},beforeStop:function(D,C){if(C.options._zIndex){B(C.helper).css("zIndex",C.options._zIndex)}}});B.ui.plugin.add("sortable","opacity",{start:function(E,D){var C=D.helper;if(C.css("opacity")){D.options._opacity=C.css("opacity")}C.css("opacity",D.options.opacity)},beforeStop:function(D,C){if(C.options._opacity){B(C.helper).css("opacity",C.options._opacity)}}});B.ui.plugin.add("sortable","scroll",{start:function(E,D){var F=D.options;var C=B(this).data("sortable");C.overflowY=function(G){do{if(/auto|scroll/.test(G.css("overflow"))||(/auto|scroll/).test(G.css("overflow-y"))){return G}G=G.parent()}while(G[0].parentNode);return B(document)}(C.currentItem);C.overflowX=function(G){do{if(/auto|scroll/.test(G.css("overflow"))||(/auto|scroll/).test(G.css("overflow-x"))){return G}G=G.parent()}while(G[0].parentNode);return B(document)}(C.currentItem);if(C.overflowY[0]!=document&&C.overflowY[0].tagName!="HTML"){C.overflowYOffset=C.overflowY.offset()}if(C.overflowX[0]!=document&&C.overflowX[0].tagName!="HTML"){C.overflowXOffset=C.overflowX.offset()}},sort:function(E,D){var F=D.options;var C=B(this).data("sortable");if(C.overflowY[0]!=document&&C.overflowY[0].tagName!="HTML"){if((C.overflowYOffset.top+C.overflowY[0].offsetHeight)-E.pageY<F.scrollSensitivity){C.overflowY[0].scrollTop=C.overflowY[0].scrollTop+F.scrollSpeed}if(E.pageY-C.overflowYOffset.top<F.scrollSensitivity){C.overflowY[0].scrollTop=C.overflowY[0].scrollTop-F.scrollSpeed}}else{if(E.pageY-B(document).scrollTop()<F.scrollSensitivity){B(document).scrollTop(B(document).scrollTop()-F.scrollSpeed)}if(B(window).height()-(E.pageY-B(document).scrollTop())<F.scrollSensitivity){B(document).scrollTop(B(document).scrollTop()+F.scrollSpeed)}}if(C.overflowX[0]!=document&&C.overflowX[0].tagName!="HTML"){if((C.overflowXOffset.left+C.overflowX[0].offsetWidth)-E.pageX<F.scrollSensitivity){C.overflowX[0].scrollLeft=C.overflowX[0].scrollLeft+F.scrollSpeed}if(E.pageX-C.overflowXOffset.left<F.scrollSensitivity){C.overflowX[0].scrollLeft=C.overflowX[0].scrollLeft-F.scrollSpeed}}else{if(E.pageX-B(document).scrollLeft()<F.scrollSensitivity){B(document).scrollLeft(B(document).scrollLeft()-F.scrollSpeed)}if(B(window).width()-(E.pageX-B(document).scrollLeft())<F.scrollSensitivity){B(document).scrollLeft(B(document).scrollLeft()+F.scrollSpeed)}}}});B.ui.plugin.add("sortable","axis",{sort:function(E,D){var C=B(this).data("sortable");if(D.options.axis=="y"){C.position.left=C.originalPosition.left}if(D.options.axis=="x"){C.position.top=C.originalPosition.top}}})})(jQuery);(function(E){E.widget("ui.accordion",{_init:function(){var G=this.options;if(G.navigation){var J=this.element.find("a").filter(G.navigationFilter);if(J.length){if(J.filter(G.header).length){G.active=J}else{G.active=J.parent().parent().prev();J.addClass("current")}}}G.headers=this.element.find(G.header);G.active=C(G.headers,G.active);if(E.browser.msie){this.element.find("a").css("zoom","1")}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");E('<span class="ui-accordion-left"/>').insertBefore(G.headers);E('<span class="ui-accordion-right"/>').appendTo(G.headers);G.headers.addClass("ui-accordion-header").attr("tabindex","0")}var I;if(G.fillSpace){I=this.element.parent().height();G.headers.each(function(){I-=E(this).outerHeight()});var H=0;G.headers.next().each(function(){H=Math.max(H,E(this).innerHeight()-E(this).height())}).height(I-H)}else{if(G.autoHeight){I=0;G.headers.next().each(function(){I=Math.max(I,E(this).outerHeight())}).height(I)}}G.headers.not(G.active||"").next().hide();G.active.parent().andSelf().addClass(G.selectedClass);if(G.event){this.element.bind((G.event)+".accordion",F)}},activate:function(G){F.call(this.element[0],{target:C(this.options.headers,G)[0]})},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}E.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}});function B(H,G){return function(){return H.apply(G,arguments)}}function D(I){if(!E.data(this,"accordion")){return }var G=E.data(this,"accordion");var H=G.options;H.running=I?0:--H.running;if(H.running){return }if(H.clearStyle){H.toShow.add(H.toHide).css({height:"",overflow:""})}G._trigger("change",null,H.data)}function A(G,K,L,J,M){var I=E.data(this,"accordion").options;I.toShow=G;I.toHide=K;I.data=L;var H=B(D,this);E.data(this,"accordion")._trigger("changestart",null,I.data);I.running=K.size()===0?G.size():K.size();if(I.animated){if(!I.alwaysOpen&&J){E.ui.accordion.animations[I.animated]({toShow:jQuery([]),toHide:K,complete:H,down:M,autoHeight:I.autoHeight})}else{E.ui.accordion.animations[I.animated]({toShow:G,toHide:K,complete:H,down:M,autoHeight:I.autoHeight})}}else{if(!I.alwaysOpen&&J){G.toggle()}else{K.hide();G.show()}H(true)}}function F(L){var J=E.data(this,"accordion").options;if(J.disabled){return false}if(!L.target&&!J.alwaysOpen){J.active.parent().andSelf().toggleClass(J.selectedClass);var I=J.active.next(),M={options:J,newHeader:jQuery([]),oldHeader:J.active,newContent:jQuery([]),oldContent:I},G=(J.active=E([]));A.call(this,G,I,M);return false}var K=E(L.target);K=E(K.parents(J.header)[0]||K);var H=K[0]==J.active[0];if(J.running||(J.alwaysOpen&&H)){return false}if(!K.is(J.header)){return }J.active.parent().andSelf().toggleClass(J.selectedClass);if(!H){K.parent().andSelf().addClass(J.selectedClass)}var G=K.next(),I=J.active.next(),M={options:J,newHeader:H&&!J.alwaysOpen?E([]):K,oldHeader:J.active,newContent:H&&!J.alwaysOpen?E([]):G,oldContent:I},N=J.headers.index(J.active[0])>J.headers.index(K[0]);J.active=H?E([]):K;A.call(this,G,I,M,H,N);return false}function C(H,G){return G?typeof G=="number"?H.filter(":eq("+G+")"):H.not(H.not(G)):G===false?E([]):H.filter(":eq(0)")}E.extend(E.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(G,I){G=E.extend({easing:"swing",duration:300},G,I);if(!G.toHide.size()){G.toShow.animate({height:"show"},G);return }var H=G.toHide.height(),J=G.toShow.height(),K=J/H;G.toShow.css({height:0,overflow:"hidden"}).show();G.toHide.filter(":hidden").each(G.complete).end().filter(":visible").animate({height:"hide"},{step:function(L){var M=(H-L)*K;if(E.browser.msie||E.browser.opera){M=Math.ceil(M)}G.toShow.height(M)},duration:G.duration,easing:G.easing,complete:function(){if(!G.autoHeight){G.toShow.css("height","auto")}G.complete()}})},bounceslide:function(G){this.slide(G,{easing:G.down?"bounceout":"swing",duration:G.down?1000:200})},easeslide:function(G){this.slide(G,{easing:"easeinout",duration:700})}}})})(jQuery);(function(A){A.widget("ui.tabs",{_init:function(){this.options.event+=".tabs";this._tabify(true)},_setData:function(B,C){if((/^selected/).test(B)){this.select(C)}else{this.options[B]=C;this._tabify()}},length:function(){return this.$tabs.length},_tabId:function(B){return B.title&&B.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+A.data(B)},ui:function(C,B){return{options:this.options,tab:C,panel:B,index:this.$tabs.index(C)}},_tabify:function(O){this.$lis=A("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return A("a",this)[0]});this.$panels=A([]);var P=this,D=this.options;this.$tabs.each(function(R,Q){if(Q.hash&&Q.hash.replace("#","")){P.$panels=P.$panels.add(Q.hash)}else{if(A(Q).attr("href")!="#"){A.data(Q,"href.tabs",Q.href);A.data(Q,"load.tabs",Q.href);var T=P._tabId(Q);Q.href="#"+T;var S=A("#"+T);if(!S.length){S=A(D.panelTemplate).attr("id",T).addClass(D.panelClass).insertAfter(P.$panels[R-1]||P.element);S.data("destroy.tabs",true)}P.$panels=P.$panels.add(S)}else{D.disabled.push(R+1)}}});if(O){this.element.addClass(D.navClass);this.$panels.each(function(){var Q=A(this);Q.addClass(D.panelClass)});if(D.selected===undefined){if(location.hash){this.$tabs.each(function(S,Q){if(Q.hash==location.hash){D.selected=S;if(A.browser.msie||A.browser.opera){var R=A(location.hash),T=R.attr("id");R.attr("id","");setTimeout(function(){R.attr("id",T)},500)}scrollTo(0,0);return false}})}else{if(D.cookie){var J=parseInt(A.cookie("ui-tabs-"+A.data(P.element[0])),10);if(J&&P.$tabs[J]){D.selected=J}}else{if(P.$lis.filter("."+D.selectedClass).length){D.selected=P.$lis.index(P.$lis.filter("."+D.selectedClass)[0])}}}}D.selected=D.selected===null||D.selected!==undefined?D.selected:0;D.disabled=A.unique(D.disabled.concat(A.map(this.$lis.filter("."+D.disabledClass),function(R,Q){return P.$lis.index(R)}))).sort();if(A.inArray(D.selected,D.disabled)!=-1){D.disabled.splice(A.inArray(D.selected,D.disabled),1)}this.$panels.addClass(D.hideClass);this.$lis.removeClass(D.selectedClass);if(D.selected!==null){this.$panels.eq(D.selected).show().removeClass(D.hideClass);this.$lis.eq(D.selected).addClass(D.selectedClass);var K=function(){P._trigger("show",null,P.ui(P.$tabs[D.selected],P.$panels[D.selected]))};if(A.data(this.$tabs[D.selected],"load.tabs")){this.load(D.selected,K)}else{K()}}A(window).bind("unload",function(){P.$tabs.unbind(".tabs");P.$lis=P.$tabs=P.$panels=null})}else{D.selected=this.$lis.index(this.$lis.filter("."+D.selectedClass)[0])}if(D.cookie){A.cookie("ui-tabs-"+A.data(P.element[0]),D.selected,D.cookie)}for(var G=0,N;N=this.$lis[G];G++){A(N)[A.inArray(G,D.disabled)!=-1&&!A(N).hasClass(D.selectedClass)?"addClass":"removeClass"](D.disabledClass)}if(D.cache===false){this.$tabs.removeData("cache.tabs")}var C,I,B={"min-width":0,duration:1},E="normal";if(D.fx&&D.fx.constructor==Array){C=D.fx[0]||B,I=D.fx[1]||B}else{C=I=D.fx||B}var H={display:"",overflow:"",height:""};if(!A.browser.msie){H.opacity=""}function M(R,Q,S){Q.animate(C,C.duration||E,function(){Q.addClass(D.hideClass).css(H);if(A.browser.msie&&C.opacity){Q[0].style.filter=""}if(S){L(R,S,Q)}})}function L(R,S,Q){if(I===B){S.css("display","block")}S.animate(I,I.duration||E,function(){S.removeClass(D.hideClass).css(H);if(A.browser.msie&&I.opacity){S[0].style.filter=""}P._trigger("show",null,P.ui(R,S[0]))})}function F(R,T,Q,S){T.addClass(D.selectedClass).siblings().removeClass(D.selectedClass);M(R,Q,S)}this.$tabs.unbind(".tabs").bind(D.event,function(){var T=A(this).parents("li:eq(0)"),Q=P.$panels.filter(":visible"),S=A(this.hash);if((T.hasClass(D.selectedClass)&&!D.unselect)||T.hasClass(D.disabledClass)||A(this).hasClass(D.loadingClass)||P._trigger("select",null,P.ui(this,S[0]))===false){this.blur();return false}P.options.selected=P.$tabs.index(this);if(D.unselect){if(T.hasClass(D.selectedClass)){P.options.selected=null;T.removeClass(D.selectedClass);P.$panels.stop();M(this,Q);this.blur();return false}else{if(!Q.length){P.$panels.stop();var R=this;P.load(P.$tabs.index(this),function(){T.addClass(D.selectedClass).addClass(D.unselectClass);L(R,S)});this.blur();return false}}}if(D.cookie){A.cookie("ui-tabs-"+A.data(P.element[0]),P.options.selected,D.cookie)}P.$panels.stop();if(S.length){var R=this;P.load(P.$tabs.index(this),Q.length?function(){F(R,T,Q,S)}:function(){T.addClass(D.selectedClass);L(R,S)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(A.browser.msie){this.blur()}return false});if(!(/^click/).test(D.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(E,D,C){if(C==undefined){C=this.$tabs.length}var G=this.options;var I=A(G.tabTemplate.replace(/#\{href\}/g,E).replace(/#\{label\}/g,D));I.data("destroy.tabs",true);var H=E.indexOf("#")==0?E.replace("#",""):this._tabId(A("a:first-child",I)[0]);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).addClass(G.hideClass).data("destroy.tabs",true)}F.addClass(G.panelClass);if(C>=this.$lis.length){I.appendTo(this.element);F.appendTo(this.element[0].parentNode)}else{I.insertBefore(this.$lis[C]);F.insertBefore(this.$panels[C])}G.disabled=A.map(G.disabled,function(K,J){return K>=C?++K:K});this._tabify();if(this.$tabs.length==1){I.addClass(G.selectedClass);F.removeClass(G.hideClass);var B=A.data(this.$tabs[0],"load.tabs");if(B){this.load(C,B)}}this._trigger("add",null,this.ui(this.$tabs[C],this.$panels[C]))},remove:function(B){var D=this.options,E=this.$lis.eq(B).remove(),C=this.$panels.eq(B).remove();if(E.hasClass(D.selectedClass)&&this.$tabs.length>1){this.select(B+(B+1<this.$tabs.length?1:-1))}D.disabled=A.map(A.grep(D.disabled,function(G,F){return G!=B}),function(G,F){return G>=B?--G:G});this._tabify();this._trigger("remove",null,this.ui(E.find("a")[0],C[0]))},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }var D=this.$lis.eq(B).removeClass(C.disabledClass);if(A.browser.safari){D.css("display","inline-block");setTimeout(function(){D.css("display","block")},0)}C.disabled=A.grep(C.disabled,function(F,E){return F!=B});this._trigger("enable",null,this.ui(this.$tabs[B],this.$panels[B]))},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.$lis.eq(C).addClass(D.disabledClass);D.disabled.push(C);D.disabled.sort();this._trigger("disable",null,this.ui(this.$tabs[C],this.$panels[C]))}},select:function(B){if(typeof B=="string"){B=this.$tabs.index(this.$tabs.filter("[href$="+B+"]")[0])}this.$tabs.eq(B).trigger(this.options.event)},load:function(G,K){var L=this,D=this.options,E=this.$tabs.eq(G),J=E[0],H=K==undefined||K===false,B=E.data("load.tabs");K=K||function(){};if(!B||!H&&A.data(J,"cache.tabs")){K();return }var M=function(N){var O=A(N),P=O.find("*:last");return P.length&&P.is(":not(img)")&&P||O};var C=function(){L.$tabs.filter("."+D.loadingClass).removeClass(D.loadingClass).each(function(){if(D.spinner){M(this).parent().html(M(this).data("label.tabs"))}});L.xhr=null};if(D.spinner){var I=M(J).html();M(J).wrapInner("<em></em>").find("em").data("label.tabs",I).html(D.spinner)}var F=A.extend({},D.ajaxOptions,{url:B,success:function(O,N){A(J.hash).html(O);C();if(D.cache){A.data(J,"cache.tabs",true)}L._trigger("load",null,L.ui(L.$tabs[G],L.$panels[G]));D.ajaxOptions.success&&D.ajaxOptions.success(O,N);K()}});if(this.xhr){this.xhr.abort();C()}E.addClass(D.loadingClass);setTimeout(function(){L.xhr=A.ajax(F)},0)},url:function(C,B){this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs",B)},destroy:function(){var B=this.options;this.element.unbind(".tabs").removeClass(B.navClass).removeData("tabs");this.$tabs.each(function(){var C=A.data(this,"href.tabs");if(C){this.href=C}var D=A(this).unbind(".tabs");A.each(["href","load","cache"],function(E,F){D.removeData(F+".tabs")})});this.$lis.add(this.$panels).each(function(){if(A.data(this,"destroy.tabs")){A(this).remove()}else{A(this).removeClass([B.selectedClass,B.unselectClass,B.disabledClass,B.panelClass,B.hideClass].join(" "))}})}});A.ui.tabs.defaults={unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};A.ui.tabs.getter="length";A.extend(A.ui.tabs.prototype,{rotation:null,rotate:function(C,F){F=F||false;var B=this,E=this.options.selected;function G(){B.rotation=setInterval(function(){E=++E<B.$tabs.length?E:0;B.select(E)},C)}function D(H){if(!H||H.clientX){clearInterval(B.rotation)}}if(C){G();if(!F){this.$tabs.bind(this.options.event,D)}else{this.$tabs.bind(this.options.event,function(){D();E=B.options.selected;G()})}}else{D();this.$tabs.unbind(this.options.event,D)}}})})(jQuery);(function(A){A.fn.unwrap=A.fn.unwrap||function(B){return this.each(function(){A(this).parents(B).eq(0).after(this).remove()})};A.widget("ui.slider",{plugins:{},ui:function(B){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this._getRange()}},_propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="slide"?C:"slide"+C,[B,this.ui()],this.options[C])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){A(this).data("mouse")._mouseDestroy()})}this.generated&&this.generated.remove()},_setData:function(B,C){A.widget.prototype._setData.apply(this,arguments);if(/min|max|steps/.test(B)){this._initBoundaries()}if(B=="range"){C?this.handle.length==2&&this._createRange():this._removeRange()}},_init:function(){var B=this;this.element.addClass("ui-slider");this._initBoundaries();this.handle=A(this.options.handle,this.element);if(!this.handle.length){B.handle=B.generated=A(B.options.handles||[0]).map(function(){var D=A("<div/>").addClass("ui-slider-handle").appendTo(B.element);if(this.id){D.attr("id",this.id)}return D[0]})}var C=function(D){this.element=A(D);this.element.data("mouse",this);this.options=B.options;this.element.bind("mousedown",function(){if(B.currentHandle){this.blur(B.currentHandle)}B._focus(this,true)});this._mouseInit()};A.extend(C.prototype,A.ui.mouse,{_mouseStart:function(D){return B._start.call(B,D,this.element[0])},_mouseStop:function(D){return B._stop.call(B,D,this.element[0])},_mouseDrag:function(D){return B._drag.call(B,D,this.element[0])},_mouseCapture:function(){return true},trigger:function(D){this._mouseDown(D)}});A(this.handle).each(function(){new C(this)}).wrap('<a href="#" style="outline:none;border:none;"></a>').parent().bind("click",function(){return false}).bind("focus",function(D){B._focus(this.firstChild)}).bind("blur",function(D){B._blur(this.firstChild)}).bind("keydown",function(D){if(!B.options.noKeyboard){return B._keydown(D.keyCode,this.firstChild)}});this.element.bind("mousedown.slider",function(D){B._click.apply(B,[D]);B.currentHandle.data("mouse").trigger(D);B.firstValue=B.firstValue+1});A.each(this.options.handles||[],function(D,E){B.moveTo(E.start,D,true)});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true)}this.previousHandle=A(this.handle[0]);if(this.handle.length==2&&this.options.range){this._createRange()}},_initBoundaries:function(){var B=this.element[0],C=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};A.extend(C,{axis:C.axis||(B.offsetWidth<B.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(C.max,10))?{x:parseInt(C.max,10),y:parseInt(C.max,10)}:({x:C.max&&C.max.x||100,y:C.max&&C.max.y||100}),min:!isNaN(parseInt(C.min,10))?{x:parseInt(C.min,10),y:parseInt(C.min,10)}:({x:C.min&&C.min.x||0,y:C.min&&C.min.y||0})});C.realMax={x:C.max.x-C.min.x,y:C.max.y-C.min.y};C.stepping={x:C.stepping&&C.stepping.x||parseInt(C.stepping,10)||(C.steps?C.realMax.x/(C.steps.x||parseInt(C.steps,10)||C.realMax.x):0),y:C.stepping&&C.stepping.y||parseInt(C.stepping,10)||(C.steps?C.realMax.y/(C.steps.y||parseInt(C.steps,10)||C.realMax.y):0)}},_keydown:function(F,E){var C=F;if(/(33|34|35|36|37|38|39|40)/.test(C)){var G=this.options,B,I;if(/(35|36)/.test(C)){B=(C==35)?G.max.x:G.min.x;I=(C==35)?G.max.y:G.min.y}else{var H=/(34|37|40)/.test(C)?"-=":"+=";var D=/(37|38|39|40)/.test(C)?"_oneStep":"_pageStep";B=H+this[D]("x");I=H+this[D]("y")}this.moveTo({x:B,y:I},E);return false}return true},_focus:function(B,C){this.currentHandle=A(B).addClass("ui-slider-handle-active");if(C){this.currentHandle.parent()[0].focus()}},_blur:function(B){A(B).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==B){this.previousHandle=this.currentHandle;this.currentHandle=null}},_click:function(C){var D=[C.pageX,C.pageY];var B=false;this.handle.each(function(){if(this==C.target){B=true}});if(B||this.options.disabled||!(this.currentHandle||this.previousHandle)){return }if(!this.currentHandle&&this.previousHandle){this._focus(this.previousHandle,true)}this.offset=this.element.offset();this.moveTo({y:this._convertValue(C.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this._convertValue(C.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance)},_createRange:function(){if(this.rangeElement){return }this.rangeElement=A("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this._updateRange()},_removeRange:function(){this.rangeElement.remove();this.rangeElement=null},_updateRange:function(){var C=this.options.axis=="vertical"?"top":"left";var B=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(C,(parseInt(A(this.handle[0]).css(C),10)||0)+this._handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(B,(parseInt(A(this.handle[1]).css(C),10)||0)-(parseInt(A(this.handle[0]).css(C),10)||0))},_getRange:function(){return this.rangeElement?this._convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null},_handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(D,B){if(this.handle.length==1){this.currentHandle=this.handle}if(!B){B=this.options.axis=="vertical"?"y":"x"}var C=A(D!=undefined&&D!==null?this.handle[D]||D:this.currentHandle);if(C.data("mouse").sliderValue){return parseInt(C.data("mouse").sliderValue[B],10)}else{return parseInt(((parseInt(C.css(B=="x"?"left":"top"),10)/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(D,B)))*this.options.realMax[B])+this.options.min[B],10)}},_convertValue:function(C,B){return this.options.min[B]+(C/(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)))*this.options.realMax[B]},_translateValue:function(C,B){return((C-this.options.min[B])/this.options.realMax[B])*(this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B))},_translateRange:function(D,B){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&D>=this._translateValue(this.value(1),B)){D=this._translateValue(this.value(1,B)-this._oneStep(B),B)}if(this.currentHandle[0]==this.handle[1]&&D<=this._translateValue(this.value(0),B)){D=this._translateValue(this.value(0,B)+this._oneStep(B),B)}}if(this.options.handles){var C=this.options.handles[this._handleIndex()];if(D<this._translateValue(C.min,B)){D=this._translateValue(C.min,B)}else{if(D>this._translateValue(C.max,B)){D=this._translateValue(C.max,B)}}}return D},_translateLimits:function(C,B){if(C>=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)){C=this.actualSize[B=="x"?"width":"height"]-this._handleSize(null,B)}if(C<=0){C=0}return C},_handleSize:function(C,B){return A(C!=undefined&&C!==null?this.handle[C]:this.currentHandle)[0]["offset"+(B=="x"?"Width":"Height")]},_oneStep:function(B){return this.options.stepping[B]||1},_pageStep:function(B){return 10},_start:function(C,B){var D=this.options;if(D.disabled){return false}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this._focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:C.pageY-this.handleOffset.top,left:C.pageX-this.handleOffset.left};this.firstValue=this.value();this._propagate("start",C);this._drag(C,B);return true},_stop:function(B){this._propagate("stop",B);if(this.firstValue!=this.value()){this._propagate("change",B)}this._focus(this.currentHandle,true);return false},_drag:function(E,D){var F=this.options;var B={top:E.pageY-this.offset.top-this.clickOffset.top,left:E.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this._focus(this.previousHandle,true)}B.left=this._translateLimits(B.left,"x");B.top=this._translateLimits(B.top,"y");if(F.stepping.x){var C=this._convertValue(B.left,"x");C=Math.round(C/F.stepping.x)*F.stepping.x;B.left=this._translateValue(C,"x")}if(F.stepping.y){var C=this._convertValue(B.top,"y");C=Math.round(C/F.stepping.y)*F.stepping.y;B.top=this._translateValue(C,"y")}B.left=this._translateRange(B.left,"x");B.top=this._translateRange(B.top,"y");if(F.axis!="vertical"){this.currentHandle.css({left:B.left})}if(F.axis!="horizontal"){this.currentHandle.css({top:B.top})}this.currentHandle.data("mouse").sliderValue={x:Math.round(this._convertValue(B.left,"x"))||0,y:Math.round(this._convertValue(B.top,"y"))||0};if(this.rangeElement){this._updateRange()}this._propagate("slide",E);return false},moveTo:function(F,E,G){var H=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(E==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(E==undefined&&!this.currentHandle){E=0}if(E!=undefined){this.currentHandle=this.previousHandle=A(this.handle[E]||E)}if(F.x!==undefined&&F.y!==undefined){var B=F.x,I=F.y}else{var B=F,I=F}if(B!==undefined&&B.constructor!=Number){var D=/^\-\=/.test(B),C=/^\+\=/.test(B);if(D||C){B=this.value(null,"x")+parseInt(B.replace(D?"=":"+=",""),10)}else{B=isNaN(parseInt(B,10))?undefined:parseInt(B,10)}}if(I!==undefined&&I.constructor!=Number){var D=/^\-\=/.test(I),C=/^\+\=/.test(I);if(D||C){I=this.value(null,"y")+parseInt(I.replace(D?"=":"+=",""),10)}else{I=isNaN(parseInt(I,10))?undefined:parseInt(I,10)}}if(H.axis!="vertical"&&B!==undefined){if(H.stepping.x){B=Math.round(B/H.stepping.x)*H.stepping.x}B=this._translateValue(B,"x");B=this._translateLimits(B,"x");B=this._translateRange(B,"x");H.animate?this.currentHandle.stop().animate({left:B},(Math.abs(parseInt(this.currentHandle.css("left"))-B))*(!isNaN(parseInt(H.animate))?H.animate:5)):this.currentHandle.css({left:B})}if(H.axis!="horizontal"&&I!==undefined){if(H.stepping.y){I=Math.round(I/H.stepping.y)*H.stepping.y}I=this._translateValue(I,"y");I=this._translateLimits(I,"y");I=this._translateRange(I,"y");H.animate?this.currentHandle.stop().animate({top:I},(Math.abs(parseInt(this.currentHandle.css("top"))-I))*(!isNaN(parseInt(H.animate))?H.animate:5)):this.currentHandle.css({top:I})}if(this.rangeElement){this._updateRange()}this.currentHandle.data("mouse").sliderValue={x:Math.round(this._convertValue(B,"x"))||0,y:Math.round(this._convertValue(I,"y"))||0};if(!G){this._propagate("start",null);this._propagate("stop",null);this._propagate("change",null);this._propagate("slide",null)}}});A.ui.slider.getter="value";A.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false}})(jQuery);(function(A){A.lang.add("cancel","\u53d6\u6d88");A.ui.module={module:function(D,C){var B=this;this.element=D=(!D||D.length==0)?A("<div>"):A(D);this.options=C=A.extend({appendTo:window.ATTACHBODY?A(window.ATTACHBODY):A("body"),zIndex:100},C);if(!C.effect){C.effect=this.effect={}}if(!C.effect.open){C.effect.open=["show"]}if(!C.effect.close){C.effect.close=["hide"]}var E=this.wrapper=A("<div>").addClass("ui-module "+this.widgetBaseClass);E.css({width:C.width,height:C.height,top:C.top,left:C.left,zIndex:C.zIndex});this.element.addClass("module-container");if(!A.isUndefined(C.after)){A(C.after).after(E)}else{E.appendTo(C.appendTo)}E.hide();C.closebar&&B.closebar();C.title&&this.title(C.title);C.buttons&&this.buttons(C.buttons)},element:null,wrapper:null,options:null,effect:null,title:function(F){var E="module-title";var C=this.element;var B=this.options;var D=A("."+E,C);if(!D.length){D=A('<h4 class="'+E+'"></h4>').prependTo(C)}if(A.isUndefined(F)){D.remove()}else{D.html(F)}B.title=F},__ie6:A.browser.msie&&A.browser.version<7,__selects:null,ie6visible:function(B){var C=this.options,D="object,embed";if(C.showObject){D=false}if(this.__ie6){if(B){this.__selects&&this.__selects.css("visibility","visible")}else{this.__selects=A("select:visible"+(D?","+D:"")).not(A("select"+(D?","+D:""),this.element)).css("visibility","hidden")}}else{if(D){if(B){this.__selects&&this.__selects.css("visibility","visible")}else{this.__selects=A(D).not(A(D,this.element)).css("visibility","hidden")}}}},__overlay:null,overlay:function(B){var C=this,E=window.ATTACHBODY?A(window.ATTACHBODY):A("body"),F=this.options.zIndex-1;var D=function(){var G=E.children().height();G=G>4000?4000:G;C.__overlay.css({zIndex:F,width:E.children().width(),height:G})};if(!this.__overlay){this.__overlay=A('<div class="module-overlay"></div>').appendTo(E).hide();D();A(window).resize(function(){D()})}if(B){this.__overlay.show()}else{this.__overlay.hide()}},buttons:function(H){var G="module-buttons";var C=this;var E=this.element;var D=this.options;var F=A("."+G,E);if(!F.length){F=A('<div class="'+G+'"></div>').appendTo(E)}if(A.isUndefined(H)){F.remove()}else{F.empty();var B=0;A.each(H,function(J,L){B=1;var I=(J=="cancel")?'<span class="aux-wrap"><input type="button" class="inputaux"/></span>':'<span class="button-wrap"><input type="button" class="inputbutton"/></span>';J=A.lang?A.lang(J):J;var K=A(I);K.children().val(J).click(function(M){L.apply(C,arguments)});F.append(K)});if(!B){F.remove()}}D.buttons=H},loading:function(){this.element.html('<div class="module-loading"></div>')},hidemessage:false,message:function(B,D){var C=this;if(typeof B!="undefined"){this.element.html('<div class="dialog-body">'+B+"</div>");this.title("\u63d0\u793a");this.buttons({"\u786e\u5b9a":function(){C.close()}})}C.hidemessage=true;setTimeout(function(){C.hidemessage&&C.close()},isNaN(D)?1100:D)},closebar:function(){var C=this;var B=A('<a href="#" title="\u5173\u95ed" class="remove module-closebar">\u5173\u95ed</a>').click(function(D){C.close();return false}).prependTo(this.wrapper)},destroy:function(){this._trigger("destroy");this.wrapper.remove();this.__overlay&&this.__overlay.remove()},isOpen:function(){return this.wrapper.hasClass("isOpen")},_open:function(){var I=this.wrapper;var F=this.options;var E=this;if(this.isOpen()){return }this._trigger("open");var D=F.effect.open,B=D[0];D=Array.prototype.slice.call(D,1);var C=D.length;for(var G=0;G<C;G++){if(A.isFunction(D[G])){var H=D[G];D[G]=function(){H.apply(this,arguments);E._trigger("openComplete")}}}this.ie6visible(false);F.overlay&&E.overlay(true);I.addClass("isOpen").hide()[B].apply(I,D);if(!H){E._trigger("openComplete")}},_close:function(F){var D=this;var G=D.wrapper;var E=D.options;if(!D.isOpen()){return }var C=F?F:E.effect.close,B=C[0];C=Array.prototype.slice.call(C,1);D._trigger("close");D.ie6visible(true);E.overlay&&D.overlay(false);G.removeClass("isOpen").show()[B].apply(G,C)}};A.widget("ui.menu",A.extend({},A.ui.module,{_init:function(){var D=this.options;var B=this;if(!D.trigger){A.log("$.ui.menu: need options.trigger");return }if(!D.attach){D.attach=D.trigger}this.module(this.element,this.options);var E=this.element;var G=this.wrapper;D=this.options;G.append(E);var C=A(D.trigger),F=C[0].nodeName;if((/input/i.test(F)&&C[0].type=="text")||/textarea/i.test(F)){C.bind("focus.menu",function(H){A(this).addClass("menu-bar-open");B.open()})}else{C.bind("click.menu",function(H){if(B.isOpen()){A(this).removeClass("menu-bar-open");B.close()}else{A(this).addClass("menu-bar-open");B.open()}return false})}this.wrapper.clickout(function(H){if(H.target!==C[0]){C.removeClass("menu-bar-open");B.close()}})},open:function(){this.setPos();this._open()},close:function(){this._close()},setPos:function(){var D=this.wrapper;var B=this.options;if(B.attach){var C=A.autoposition(D,B.attach,["autoY","auto1"],B.appendTo);if(A.isUndefined(B.top)){D.css("top",C.top)}if(A.isUndefined(B.left)){D.css("left",C.left)}}}}));A.ui.menu.defaults={width:200,effect:{}};A.ui.menu.getter=["isOpen"];A.widget("ui.confirm",A.extend({},A.ui.module,{_init:function(){var C=this;if(!this.options||!this.options.attach){A.log("$.ui.confirm: need options.attach");return }this.module(this.element,this.options);var E=this.element;var G=this.wrapper;var D=this.options;var B=A('<div class="arrow-t"></div>');var F=A('<div class="arrow-b"></div>');G.html(B).append(E).append(F);this.setArrow=function(H){if(H[0]!=2){G.addClass("up")}else{G.removeClass("up")}B.add(F).css("backgroundPosition",(H[1]*100)+"% 0")};this.open()},open:function(B){if(B){this.options.attach=B}this.setPos();this._open()},close:function(){this._close()},setPos:function(){var D=this.wrapper;var B=this.options;var C=A.autoposition(D,B.attach,["autoY","auto0"],B.appendTo);D.css(C);this.setArrow(C.auto)}}));A.ui.confirm.defaults={width:200};A.ui.confirm.getter=["isOpen"];A.widget("ui.dialog",A.extend({},A.ui.module,{_init:function(){var B=this;this.module(this.element,this.options);var D=this.element;var F=this.wrapper;var C=this.options;this.css={};var E='<div class="modFrame"><table class="modTable table" cellpadding="0"><tr class="thead"><td class="mheader lt"/><td class="mheader t"/><td class="mheader rt"/></tr><tr class="tbody"><td class="mbody l"/><td class="mbody c"></td><td class="mbody r"/></tr><tr class="tfoot"><td class="mfooter lb"/><td class="mfooter b"/><td class="mfooter rb"/></tr></table></div>';F.html(E);F.find(".c").html("").append(D);this.closebar();if(C.autoOpen){this.open()}this.effect.close=["fadeOut",400]},open:function(B){if(B){this.options.attach=B}this.setEffect();this._open()},close:function(B){this._close(B)},setEffect:function(){if(this.isOpen()){return false}var B=this;this.setPos();var F=this.wrapper;var D=this.options;if(!D.attach&&!D.attachXY){return false}if(D.attachXY){var E=D.attachXY}else{if(!A(D.attach).length){return false}var E=A(D.attach).offset()}var C={};C.left=D.appendTo.scrollLeft()+E.left;C.top=D.appendTo.scrollTop()+E.top;F.css(A.extend(C,{width:0,height:0,opacity:0.4,overflow:"hidden"}));this.effect.open=["animate",this.css,400,function(){A(this).css({overflow:"visible",height:"auto",opacity:"none"})}]},setPos:function(){var I=this.wrapper;var E=this.options;var D=this;var C={width:E.width,height:I.height()},B={};var H=A(document).scrollLeft()+E.appendTo.scrollLeft();var G=A(document).scrollTop()+E.appendTo.scrollTop();if(!A.isUndefined(E.left)){B.left=E.left}else{B.left=H+(A(window).width()/2)-(C.width/2)}if(!A.isUndefined(E.top)){B.top=E.top}else{var F=(A(window).height()/2)-(C.height/2);F=F<0?0:F;B.top=G+F}this.css=A.extend(B,C,{opacity:1});I.css(this.css).css({overflow:"visible",height:"auto",opacity:"none"})}}));A.ui.dialog.defaults={width:500,autoOpen:true};A.ui.dialog.getter=["isOpen"];A.autoposition=function(O,L,B,H){var D=A(O),R=A(L),J=(typeof H=="undefined")?D.parent():A(H);if(!D.length){return false}var M=[D.outerHeight(),D.outerWidth()],F=R.offset(),Q=[R.outerHeight(),R.outerWidth(),F.top,F.left],F=J.offset(),P=[J.outerHeight(),J.outerWidth(),F.top,F.left,J.scrollTop(),J.scrollLeft()],I=[A(window).height(),A(window).width()];if(typeof B=="undefined"||B.constructor!=Array||B.length==0){B=["autoY","auto0"]}else{if(!/[0-3]|auto[XY]/.test(B[0])){B[0]="autoY"}if(typeof B[1]=="undefined"||((B[1]<0||B[1]>1)&&!/[0-3]|auto[0-1]/.test(B[1]))){B[1]="auto0"}}var N=0,C=0,K=[-P[2]+P[4],-P[3]+P[5]],E=M[0]>(I[0]-(Q[2]+Q[0]))&&M[0]<Q[2],G=M[1]>(I[1]-(Q[1]+Q[3]))&&M[1]<Q[3];if(/autoY/.test(B[0])){if(E){B[0]=0}else{B[0]=2}}else{if(/autoX/.test(B[0])){if(G){B[0]=3}else{B[0]=1}}}if(/auto0/.test(B[1])){B[1]=-1}else{if(/auto1/.test(B[1])){if((/[02]/.test(B[0])&&G)||(/[13]/.test(B[0])&&E)){B[1]=1}else{B[1]=0}}}if(B[0]==0){N=Q[2]-M[0]+K[0];if(B[1]==-1){B[1]=Q[3]/(I[1]-Q[1])}C=Q[3]-(M[1]-Q[1])*B[1]+K[1]}else{if(B[0]==1){if(B[1]==-1){B[1]=Q[2]/(I[0]-Q[0])}N=Q[2]-(M[0]-Q[0])*B[1]+K[0];C=Q[3]+Q[1]+K[1]}else{if(B[0]==2){N=Q[2]+Q[0]+K[0];if(B[1]==-1){B[1]=Q[3]/(I[1]-Q[1])}C=Q[3]-(M[1]-Q[1])*B[1]+K[1]}else{if(B[0]==3){if(B[1]==-1){B[1]=Q[2]/(I[0]-Q[0])}N=Q[2]-(M[0]-Q[0])*B[1]+K[0];C=Q[3]-M[1]+K[1]}}}}return{top:N,left:C,auto:B}};A.fn.extend({clickout:function(B,C){return this.each(function(){var F=this,D=C?A(C):document,E="mousedown.clickout"+A.data(F);if(!A.isFunction(B)){A(D).unbind(E);return }A(D).bind(E,function(I){var H=I.target;while(H&&H!=F){try{H=H.parentNode}catch(G){H=F}}if(H!=F){B.call(F,I)}})})}})})(jQuery);(function(A){A.widget("ui.typeahead",A.extend({},{_init:function(){var K=this;var F=this.element;var M=this.options;F.addClass(this.widgetBaseClass);var G=this.options.type;var H=this.element;var C="radio";if(F[0].nodeName.toUpperCase()!="INPUT"){C="checkbox";F.click(function(){H.focus()}).mousedown(function(N){N.stopPropagation()});H=A('<input type="text" value="" class="typeahead-input"/>').appendTo(this.element).wrap('<div class="typeahead-input-wrap"></div>');H.bind("focus",function(){F.addClass("text-focus")}).bind("blur",function(){F.removeClass("text-focus")})}this.input=H.attr("autocomplete","off");this.options.checkType=C;var D=this.menu=A("<div>").menu({trigger:H,attach:F,after:F,top:"auto",left:"auto",closebar:true,width:M.width?M.width:F.outerWidth()});var I=this.select=new A.ui.select[G](D,{template:this.options.template,maxHeight:K.options.maxHeight?K.options.maxHeight:300,maxLength:K.options.maxLength?K.options.maxLength:30,checkType:C});var B=this.source=new A.ui.typeahead.source({url:M.url,params:M.params,cacheResults:true});var L=M.message;D.one("menuopen",function(N){if(!M.refresh||M.hasInitData){B.load()}K.select.setMessage(L.init);K._trigger("initComplete",{menu:D,select:I})}).bind("menuclose",function(O){var N=K.__data;if(M.mustMatch&&!H.hasClass("typeahead-select")&&A.isArray(N)){if(N.length){I.trigger("select",N[0])}else{H.val("")}}});B.bind("success",function(O,N,P){if(M.refresh){K.setList(N,H.val().split(""))}else{if(G=="page"){K.results("")}else{K.results()}}K._trigger("load",{menu:D,select:I})}).bind("error",function(){K.select.setMessage("\u6570\u636e\u52a0\u8f7d\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5\u3002")});I.bind("select",function(O,N,P){if(C=="checkbox"){K.token(N);H.focus()}else{H.addClass("typeahead-select").val(N.t);D.menu("close");H.blur()}K._trigger("select",N)}).bind("found",function(O,N,P){H.addClass("typeahead-found");K._trigger("found",N)});this[G+"Events"]();if(C=="checkbox"&&A.isArray(M.initData)){var J=M.initData;for(var E=0;E<J.length;E++){K.addToken(J[E])}}},close:function(){this.menu.menu("close")},__data:null,setList:function(C,D){var B=this;B.__data=C;if(C.length){B.select.setMessage(A.lang(B.options.message.found,{n:C.length}))}else{B.select.setMessage(A.lang(B.options.message.empty,{n:C.length}))}B.select.setList(C,D);if(!D||!D.length){B.select.setMessage(B.options.message.init)}},token:function(B){if(A.isUndefined(B.checked)||B.checked){this.addToken(B)}else{this.delToken(B)}},addToken:function(E){if(this.element.find("input[value="+E.i+"]").length||!E.i||!E.t){return }E.checked=true;var C=[],B=this;C.push('<a class="typeahead-token" href="javascript:void(0)" tabindex="-1"><span><span><span><span><input type="hidden" value="');C.push(E.i);C.push('" name="ids[]"/>');C.push(E.t);C.push('<em title="\u5220\u9664" class="empty">\u5220\u9664</em></span></span></span></span></a>');var D=A(C.join(""));D.mousedown(function(F){F.stopPropagation();F.preventDefault()}).click(function(F){A(this).blur();F.stopPropagation();F.preventDefault();return false}).find(".empty").click(function(){B.delToken(E);return false});this.input.parent().before(D)},delToken:function(B){B.checked=false;this.element.find("input[value="+B.i+"]").parents(".typeahead-token:first").remove()},delLast:function(){this.element.find(".typeahead-token:last").remove()},pageEvents:function(){var B=this;A(this.input).bind("keydown.typeahead",function(C){switch(C.keyCode){case 8:break;case 9:B.menu.menu("close");break;case 13:C.preventDefault();break;case 27:B.menu.menu("close");break;default:break}}).bind("keyup.typeahead",function(C){var D=C.keyCode;switch(D){case 38:case 40:case 33:case 34:case 9:case 13:case 27:C.preventDefault();break;default:B.results()}})},listEvents:function(){var B=this;A(this.input).bind("keydown.typeahead",function(C){switch(C.keyCode){case 38:B.select.prev();C.preventDefault();break;case 40:B.select.next();C.preventDefault();break;case 33:break;case 34:break;case 9:B.menu.menu("close");break;case 13:B.onselect(C);break;case 27:B.menu.menu("close");break;default:break}}).bind("keyup.typeahead",function(C){var D=C.keyCode;switch(D){case 38:case 40:case 33:case 34:case 9:case 13:case 27:C.preventDefault();break;default:B.results()}}).bind("keypress.typeahead",function(C){switch(C.keyCode){case 13:if(B.__onselect){return false;C.preventDefault()}}})},results:function(D){var C=this.delayFn,B=this;if(C){clearTimeout(C)}this.delayFn=setTimeout(function(){B._results(D)},300)},delayFn:null,_results:function(E){var C=this;C.input.removeClass("typeahead-select").removeClass("typeahead-found");var D=A.isUndefined(E)?A.trim(A(C.input).val()):E;if(C.options.refresh){if(D||C.options.hasInitData){C.select.setMessage(C.options.message.loading);C.source.load(A.extend(C.options.params,{q:D}))}else{C.setList([],[])}}else{var B=C.source.search(D);C.setList(B.values,B.t)}},__onselect:false,onselect:function(){if(this.select.activeobj()){this.__onselect=true}else{this.__onselect=false}this.select.onselect()}}));A.ui.typeahead.defaults={type:"list",message:{loading:"\u6570\u636e\u52a0\u8f7d\u4e2d...",init:"\u8f93\u5165\u5173\u952e\u8bcd\u641c\u7d22",found:"\u627e\u5230{n}\u4e2a\u7ed3\u679c",empty:"\u8f93\u5165\u5173\u952e\u8bcd\u641c\u7d22",error:"\u6570\u636e\u52a0\u8f7d\u5931\u8d25"}};A.ui.select={};A.ui.select.page=function(){this.select.apply(this,arguments)};A.extend(A.ui.select.page.prototype,A.objectEvent,{select:function(E,C){var B=this;this.element=E;this._initEvent();this.options=C=A.extend({checkType:"checkbox",maxLength:10},C);var D=this.options.checkType,F=[];F.push('<li class="select-li"><input tabindex="-1" class="select-'+D+'" ');if(D=="radio"){F.push('name="typeahead-input-'+A.data(E[0])+'"')}F.push('" type="');F.push(D);F.push('" title="SELECT-OPTION-T"/><label title="SELECT-OPTION-N">SELECT-OPTION-T</label></li>');this.options.template=F.join("");this._listTemp=C.template;this.container=A(this.element).addClass("ui-select-page");this.message=A('<div class="select-message"></div>');this.content=A('<ul class="select-ul clearfix ul"></ul>').hide();var G=A('<div class="select-page"></div>');this.page=new A.ui.page(G);this.page.bind("select",function(H,I){B.loadPage(I)});this.container.append(this.content).append(G)},onselect:function(C){var B=A.data(C,"select-data");if(A.isObject(B)){B.checked=C.checked;B.type=C.type;this.trigger("select",B)}},setMessage:function(B){if(B){this.element.prepend(this.message.html(B))}else{this.message.remove()}},setList:function(E){var D=this;var E=E||D.options.data,C=E.length;D.options.data=E;C=C/D.options.maxLength;var B=Math.floor(C);D.page.setPage(B==C?B:(B+1),1)},loadPage:function(H){var M=this;M.content.html("").hide();var I=M.options.maxLength;var G=M.options.data;var E=G.slice((H-1)*I,H*I),C=A.data(M.element[0]);var D=E.length;if(D){M.content.show()}for(var F=0;F<D;F++){var L=E[F];var B=L.i;var K=A(M.listTemp(L)).appendTo(M.content);var J=K.find("input").attr("id","select-"+C+"-"+B).bind("click.select",function(N){M.onselect(this)});if(!A.isUndefined(L.checked)&&L.checked){J.attr("checked","checked")}A.data(J[0],"select-data",E[F]);K.find("label").attr("for","select-"+C+"-"+B)}},listTemp:function(C){var B=this._listTemp;for(t in C){var E="SELECT-OPTION-"+t.toUpperCase();var D=C[t];if(D){B=B.replace(new RegExp("("+E+")","g"),D)}else{B=B.replace(E,"")}}return B}});A.ui.page=function(){this.page.apply(this,arguments)};A.extend(A.ui.page.prototype,A.objectEvent,{page:function(D,C){var B=this;this.element=D=A(D).hide();this._initEvent();var F=this.content=A('<ul class="ui-page clearfix ul"></ul>');var E=this.template='<li><a  tabindex="-1" href="#"></a></li>';this.options=C=A.extend({},C);D.html(F)},pageNum:null,current:null,select:function(C){var B=A.data(C,"page-num");C=A(C);if(B=="up"){B=this.current-1}else{if(B=="down"){B=this.current+1}else{B=parseInt(B)}}this.setPage(null,B)},setPage:function(G,H){var K=this;if(A.isUndefined(G)||G==null){G=K.pageNum}if(!H){H=1}var J=5;var B=1;var F="up",I="down";K.content.html("");K.element.hide();if(H>G||H<1){return }this.trigger("select",H);if(H<=(J+1)/2){B=1}else{if(G-H<=(J+1)/2){B=G-J+1}else{B=H-(J-1)/2}}if(H==1){F=false}if(H==G){I=false}var D=K.pageN(F);J=J>G?G:J;J=J==1?0:J;for(var E=B;E<B+J;E++){var C=K.pageN(E);if(C){if(E==H){C.addClass("page-current")}}if(D){D=D.add(C)}else{D=C}}var C=K.pageN(I);if(C){D=D.add(C)}if(D){K.element.show();K.content.append(D)}K.current=H;K.pageNum=G},pageN:function(C){if(!C){return""}var B=this;var E=C;E=E=="up"?"\u4e0a\u4e00\u9875":E;E=E=="down"?"\u4e0b\u4e00\u9875":E;var D=A(this.template).addClass("page-"+C);var F=D.children().html(E).click(function(){B.select(this);return false});A.data(F[0],"page-num",C);return D}});A.ui.select.list=function(){this.select.apply(this,arguments)};A.extend(A.ui.select.list.prototype,A.objectEvent,{select:function(D,C){var B=this;D=B.element=A(D).addClass("ui-select-list");B._initEvent();B.options=C=A.extend({nohighlight:["s"],template:'<li class="select-li"><div>SELECT-OPTION-T</div><div class="small">SELECT-OPTION-N</div></li>',maxLength:null,data:[{}]},C);A.data(A(D)[0],"ui-select",B);B.container=A("<div>").addClass("select-cont").appendTo(D).hide();B.message=A('<div class="select-message"></div>');B.content=A('<ul class="select-ul ul"></ul>');B._listTemp=B.options.template;B.content.html("").appendTo(B.container)},moveSelect:function(E){var H=this.content.children(".select-active:first");var G=this.content.children().index(H[0]);var F=G;switch(typeof E){case"string":G+=new Number(E);break;case"number":G=E;break;default:G=-1}var B=this.content.children(".select-li").length;if(G>=0&&G<B){var C=this.content.children(".select-li:eq("+G+")");this.addActive(C);if(this.hasScroll){if(G>F){var D=C.position().top+C.outerHeight()-this.container.height();if(D>0){this.container.scrollTop(D-this.content.position().top)}}else{if(G<F&&C.position().top<0){this.container.scrollTop(C.position().top-this.content.position().top)}}}}else{if(G<0){this.removeActive()}else{}}},addActive:function(B){this.removeActive();A(B).addClass("select-active");this.onfound()},removeActive:function(){this.content.children(".select-active").removeClass("select-active")},next:function(){this.moveSelect("+1")},prev:function(){this.moveSelect("-1")},hasScroll:false,show:function(){var B=this;B.container.css({height:"auto","overflow-x":"hidden"});B.content.css("width","100%");if(B.options&&B.options.maxHeight){var C=B.options.maxHeight;B.hasScroll=B.container.height()>=C;if(B.hasScroll){B.container.css({height:C,"overflow-y":"auto"});B.content.css("width","auto")}}},activeobj:function(){var B=this.content.children(".select-active:first");if(!B.length){B=null}else{B=B[0]}return B},onfound:function(){if(this.activeobj()){var B=this.activeobj();this.trigger("found",A.data(B,"select-data"))}},onselect:function(){var B=this.activeobj();if(B){this.trigger("select",A.data(B,"select-data"));this.removeActive()}},setMessage:function(B){if(B){this.element.prepend(this.message.html(B))}else{this.message.remove()}this.show()},setList:function(H,F){var E=this;E.content.html("");E.container.hide();var H=H||E.options.data,D=H.length;var C=E.options.maxLength;if(C){D=D>C?C:D}if(!D){E.container.hide();return }else{E.container.show()}for(var G=0;G<D;G++){var B=A(E.listTemp(H[G],F)).hover(function(){E.addActive(this)},function(){E.removeActive()}).appendTo(E.content).bind("mousedown.select",function(I){E.onselect()})[0];A.data(B,"select-data",H[G])}E.content.children(":first").addClass("first");E.content.children(":last").addClass("last");E.show()},listTemp:function(F,D){var J=this._listTemp;for(t in F){if(!F[t]){continue}var I="SELECT-OPTION-"+t.toUpperCase();var H=F[t].toString();if(H){var B=true;A.each(this.options.nohighlight,function(L,K){if(K==t){B=false}});if(D&&B){if(typeof D!="string"){var G=D,E=G.length;var C=new RegExp(G.join("|"),"ig");H=H.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1").replace(C,function(K){return'<b class="highlight">'+K+"</b>"})}else{H=H.replace(D,'<b class="highlight">'+D+"</b>")}}J=J.replace(I,H)}else{J=J.replace(I,"")}}return J}});A.ui.typeahead.source=function(){this.source.apply(this,arguments)};A.extend(A.ui.typeahead.source.prototype,A.objectEvent,{source:function(B){this._initEvent();if(!B){B={}}if(!B.url){B.url=""}if(!B.params){B.params={}}this.options=B},values:null,initValues:function(B){this.values=B;this.trigger("success",B)},cacheResults:true,results:null,getById:function(E,B){if(B){var D=B}else{var D=this.values}for(var C in D){if(parseInt(D[C].i)==parseInt(E)){return D[C]}}return null},lastSearch:null,search:function(I,J){if(J){var G=J}else{var G=this.values}var H=G.length,F=new Array();if(I){var K=I.toUpperCase().split(""),C=K.length,L="t";for(var E=0;E<H;E++){if(G[E][L]){for(var D=0;D<C;D++){if(G[E][L].toUpperCase().indexOf(K[D])==-1){break}}if(D==C){F.push(G[E])}}}var B={t:I.split(""),values:F}}else{var B={t:"",values:G}}this.lastSearch=B;return B},load:function(D,C){var B=this;if(!C){C=this.options.url}if(D){D=A.extend(this.options.params,D)}else{D=this.options.params}D.q=D.q?D.q:"";if(B.cacheResults&&B.results&&B.results["d_"+D.q]){B.initValues(B.results["d_"+D.q]);return }A.ajax({dataType:"json",type:"GET",url:C,data:D,success:function(E){if(E.payload&&E.payload.json){E=E.payload.json;E=A.makeArray(E);if(B.cacheResults){if(!B.results){B.results={}}B.results["d_"+D.q]=E}B.initValues(E)}else{B.trigger("error")}},error:function(){B.trigger("error")}})}})})(jQuery);(function(B){B.widget("ui.ahead",B.extend({},{_init:function(){var M=this;var I=this.element;var N=this.options;var K=this.options.type;var L=this.element;var E="radio";var D=this.options.url;var C,J,H;this.options.top?H=this.options.top:H=4;this.options.right?J=this.options.right:J=5;C='<span class="xx_xx" style="position:absolute; cursor:pointer; top:'+H+"px; right:"+J+'px; z-index:100"><img src="http://site.tongxue.com/v4/realword/images/xx_xx1.gif" /></span>';if(I[0].nodeName.toUpperCase()!="INPUT"){E="checkbox";L=B('<input class="aheadInput" type="text" value="" />').appendTo(this.element).wrap('<div class="aheadContainer"></div>');B(I).css("position","relative");var F=B(I).append(C).find(".xx_xx>img");F.bind("mouseover",function(){B(this).attr("src")=="http://site.tongxue.com/v4/realword/images/xx_xx1.gif"&&B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx2.gif");B(this).attr("src")=="http://site.tongxue.com/v4/realword/images/xx_xs1.gif"&&B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xs2.gif?v=1")}).bind("mouseout",function(){B(this).attr("src")=="http://site.tongxue.com/v4/realword/images/xx_xx2.gif"&&B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx1.gif");B(this).attr("src")=="http://site.tongxue.com/v4/realword/images/xx_xs2.gif?v=1"&&B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xs1.gif")}).bind("click",function(){if(M._toggAble){if(B(I).children("#aheadTipInfo").length>0){I.children("#aheadTipInfo").remove();M._loadTrue=true}M._toggAble=false;B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xs1.gif");if(M.options.need_group){M._load(D+"?np=0&need_group="+M.options.need_group)}else{M._load(D+"?np=0")}}else{if(B(I).children("#aheadTipInfo").length>0){I.children("#aheadTipInfo").remove();M._loadTrue=true}B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx1.gif");M._toggAble=true}});I.find(".aheadContainer").click(function(){L.focus()});I.clickout(function(){I.children("#aheadTipInfo").remove();M._loadTrue=true;B(I.find(".xx_xx>img")).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx1.gif");M._toggAble=true});L.bind("focus",function(){var O=B('<span class="tipAttention" style="top:'+(I.height()+5)+'px">\u8bf7\u8f93\u5165\u597d\u53cb\u7684\u59d3\u540d\uff08\u652f\u6301\u62fc\u97f3\u5339\u914d\uff09</span>');if(L.val()==""){O.appendTo(I)}}).bind("blur",function(O){I.find(".tipAttention").remove()}).bind("keyup",function(){if(M.input.val()==""){M._removeTip();var O=B('<span class="tipAttention" style="top:'+(I.height()+5)+'px">\u8bf7\u8f93\u5165\u597d\u53cb\u7684\u59d3\u540d\uff08\u652f\u6301\u62fc\u97f3\u5339\u914d\uff09</span>');O.appendTo(I);M._loadTrue=true}else{I.find(".tipAttention").remove();M.load(D+"?np=0&t=head&q="+encodeURIComponent(M.input.val()))}}).bind("keydown",function(O){O=window.event||O;if(O.keyCode==8&&M.input.val()==""){I.find(".aheadContainer").children(".aheadVBlock:last").remove()}});if(N.initData){var G=this.options.initData;for(i=0;i<G.length;i++){B(L).before('<div class="aheadVBlock" i="'+G[i].i+'"><input type="hidden" name="ids[]" value="'+G[i].i+'"/>'+G[i].t+"</div>")}}I.parents("form").bind("submit",function(){if(I.parents("form").find(":input[@name=aheadHidden]")){I.parents("form").find(":input[@name=aheadHidden]").remove()}var P=I.find(".aheadContainer").children(".aheadVBlock");var O=[];for(j=0;j<P.length;j++){O.push(B(P[j]).attr("i"))}I.parents("form").append('<input type="hidden" name="aheadHidden" value="'+O.aheadStrip().toString()+'">')})}else{L=L.wrap('<span class="aheadInputWrapper" style="display:inline-block"></span>');var F=B(I).parent().append(C).find(".xx_xx>img");B(I).parent().css("position","relative");B(I).parent().clickout(function(){I.parent().children("#aheadTipInfo").remove();M._loadTrue=true;B(I.parent().find(".xx_xx>img")).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx1.gif");M._toggAble=true});F.bind("mouseover",function(){B(this).attr("src")=="http://site.tongxue.com/v4/realword/images/xx_xx1.gif"&&B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx2.gif");B(this).attr("src")=="http://site.tongxue.com/v4/realword/images/xx_xs1.gif"&&B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xs2.gif?v=1")}).bind("mouseout",function(){B(this).attr("src")=="http://site.tongxue.com/v4/realword/images/xx_xx2.gif"&&B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx1.gif");B(this).attr("src")=="http://site.tongxue.com/v4/realword/images/xx_xs2.gif?v=1"&&B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xs1.gif")}).bind("click",function(){if(M._toggAble){if(B(I).parent().children("#aheadTipInfo").length>0){I.parent().children("#aheadTipInfo").remove();M._loadTrue=true}M._toggAble=false;B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xs1.gif");if(M.options.need_group){M._load(D+"?np=0&need_group="+M.options.need_group)}else{M._load(D+"?np=0")}}else{if(B(I).parent().children("#aheadTipInfo").length>0){I.parent().children("#aheadTipInfo").remove();M._loadTrue=true}M._toggAble=true;B(this).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx1.gif")}});L.bind("focus",function(){var O=B('<span class="tipAttention" style="top:'+(I.height()+5)+'px">\u8bf7\u8f93\u5165\u597d\u53cb\u7684\u59d3\u540d\uff08\u652f\u6301\u62fc\u97f3\u5339\u914d\uff09</span>');O.appendTo(I.parent())}).bind("blur",function(O){I.parent().find(".tipAttention").remove()}).bind("keyup",function(){if(M.input.val()==""){M._removeTip();var O=B('<span class="tipAttention" style="top:'+(I.height()+5)+'px">\u8bf7\u8f93\u5165\u597d\u53cb\u7684\u59d3\u540d\uff08\u652f\u6301\u62fc\u97f3\u5339\u914d\uff09</span>');O.appendTo(I.parent());M._loadTrue=true}else{I.parent().find(".tipAttention").remove();M.load(D+"?np=0&t=head&q="+encodeURIComponent(M.input.val()))}})}this.input=L.attr("autocomplete","off");this.options.checkType=E},_hideData:[],_toggAble:true,_loadTrue:true,_close:function(){},_tip:function(D){var K=this;if(B(this.element.html()).find("#aheadTipInfo")){K.element.children("#aheadTipInfo").remove();K._loadTrue=true}var E=this.element;var J;J=250;if(!K._tipTemplate(D)){var I=B('<div id="aheadTipInfo" style="width:'+J+"px; top:"+(E.height()+5)+'px">\u597d\u53cb\u5217\u8868\u52a0\u8f7d\u5931\u8d25\uff01</div>')}else{var H=B(K._tipTemplate(D)).find(".aheadListLine>span");var G=[];for(i=0;i<H.length;i++){if(B(H[i]).attr("c")){G.push(B(H[i]).attr("c"))}else{}}var F=G.aheadStrip();var C="";C+='<h3><span class="f_l">\u8bf7\u9009\u62e9\u597d\u53cb</span>';if(K.options.need_group){C+='<span class="f_r"><select class="aheadClass" style="margin-top:5px;">';C+="<option>\u5168\u90e8\u597d\u53cb</option>";for(j=0;j<F.length;j++){if(F.length==0){break}C+="<option>"+F[j]+"</option>"}C+="</select></span>"}C+="</h3>";C+='<form class="aheadForm">'+K._tipTemplate(D)+"</form>";C+='<span class="aheadButtonWraper" style="margin:0 0 10px 10px"><input type="button" value=" \u786e\u5b9a "  class="aheadButton"/></span>';var I=B('<div id="aheadTipInfo" style="width:'+J+"px; top:"+(E.height()+5)+'px;">'+C+"</div>")}B(I).find(".aheadClass").change(function(){B(this).each(function(){if(B(this).val()=="\u5168\u90e8\u597d\u53cb"){B(I).find(".aheadForm").html(K._tipTemplate(D))}else{var L=[];for(i=0;i<D.length;i++){if(D[i].c==B(this).val()){L.push(D[i])}}B(I).find(".aheadForm").html(K._tipTemplate(L))}})});B(I).find(".aheadButton").bind("mouseover",function(){B(this).addClass("aheadButtonHover")}).bind("mouseout",function(){B(this).removeClass("aheadButtonHover")});if(E[0].nodeName.toUpperCase()!="INPUT"){if(K._loadTrue){B(I).find("input[type=button]").click(function(){var L=B(I).find(':input[@name="aheadCheckBox"]');var M=B(I).find(':input[@name="aheadCheckBox"]').length;for(i=0;i<M;i++){if(B(L[i]).attr("checked")){E.find("input[@type=text]").before('<div class="aheadVBlock" i="'+B(L[i]).parent().attr("id")+'"><input type="hidden" name="ids[]" value="'+B(L[i]).parent().attr("id")+'"/>'+B(L[i]).attr("title")+"</div>");E.parents("form").find(':input[@name="aheadHidden"]').val(E.parents("form").find(':input[@name="aheadHidden"]').val()+","+B(L[i]).parent().attr("id"))}}K._removeTip();B(E.find(".xx_xx>img")).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx1.gif");K._toggAble=true;E.find("input[@type=text]").focus()});I.appendTo(K.element);K._loadTrue=false}}else{if(K._loadTrue){B(I).find("input[type=button]").click(function(){E.parent().find("input[@type=text]").val(B(I).find(':input[@name="aheadCheckBox"][@checked]').attr("title"));B(E.parent().find(".xx_xx>img")).attr("src","http://site.tongxue.com/v4/realword/images/xx_xx1.gif");if(K.options.select){var L=B(I).find(':input[@name="aheadCheckBox"][@checked]');L.t=L.attr("title");L.i=L.parent().attr("id");if(L.i){K.options.select(L)}}K._toggAble=true;K._removeTip()});I.insertAfter(K.element);K._loadTrue=false}}},_tipTemplate:function(F){if(F){var E=[];var C=F.length;E.push('<div class="aheadList"><div class="aheadListLine">');for(i=0;i<C;i++){var D;D=F[i].c?('c="'+F[i].c+'"'):"";if(i%3!=0){E.push('<span id="'+F[i].i+'"'+D+'><input name="aheadCheckBox" title="'+F[i].t+'" type="'+this.options.checkType+'" /><label class="aheadLiLa">'+F[i].t+"</label></span>")}else{if(i==0){E.push('<span id="'+F[i].i+'"'+D+'><input name="aheadCheckBox" title="'+F[i].t+'" type="'+this.options.checkType+'" /><label class="aheadLiLa">'+F[i].t+"</label></span>")}else{E.push('<div class="aheadClearFix"></div></div><div class="aheadListLine"><span id="'+F[i].i+'"'+D+'><input name="aheadCheckBox" title="'+F[i].t+'" type="'+this.options.checkType+'" /><label class="aheadLiLa">'+F[i].t+"</label></span>")}}}E.push('<div class="aheadClearFix"></div></div><div class="aheadClearFix"></div></div>')}return E.join().replace(/[(,)(?)(*)]/g,"")},_setTemplate:function(D){var C=this;C._tip(D)},_removeTip:function(){var C=this;if(B(this.element.html()).find("#aheadTipInfo")){C.element.children("#aheadTipInfo").remove();C._loadTrue=true}if(B(this.element).parent().children("#aheadTipInfo").length>0){C.element.parent().children("#aheadTipInfo").remove("#aheadTipInfo");C._loadTrue=true}},values:null,ahead_search:function(I,J){if(J){oldData=J}else{oldData=this.values}var H=oldData.length,E=new Array();if(I!=""){var K=I.toUpperCase().split(""),D=K.length,L="p";for(var F=0;F<H;F++){if(oldData[F][L]){var G=new RegExp(I,"i");G.test(oldData[F][L])&&E.push(oldData[F])}}var C={t:I.split(""),values:E}}else{var C={t:"",values:""}}return C},tip:function(G){var C=this;var E=this.element;var D;D=E.width();if(!G||G==""){var F=B('<div id="aheadTipInfo" class="aheadTipInfoWrapper" style="width:'+D+"px; top:"+(E.height()+5)+'px"><span class="aheadTipPoint"">\u6ca1\u6709\u627e\u5230\u5339\u914d\u9879\uff01</span></div>')}else{var F=B('<div id="aheadTipInfo" class="aheadTipInfoWrapper_01" style="width:'+D+"px; top:"+(E.height()+5)+'px">'+G+"</div>");F.find("li").bind("click",function(){if(E[0].nodeName.toUpperCase()!="INPUT"){E.find("input[@type=text]").before('<div class="aheadVBlock" i="'+this.id+'"><input type="hidden" name="ids[]" value="'+this.id+'"/>'+B(this).html()+"</div>");E.find("input[@type=text]").val("");C._removeTip();E.find("input[@type=text]").focus()}else{E.parent().find("input[@type=text]").val(B(this).html());if(C.options.select){var H=B(this);H.t=H.html();H.i=H.attr("id");C.options.select(H)}else{return false}C._removeTip()}}).bind("mouseover",function(){B(this).addClass("active")}).bind("mouseout",function(){B(this).removeClass("active")})}if(E[0].nodeName.toUpperCase()!="INPUT"){if(C._loadTrue){B(F).find("input[type=button]").click(function(){C._removeTip()});F.appendTo(C.element);C._loadTrue=false}}else{if(C._loadTrue){B(F).find("input[type=button]").click(function(){C._removeTip()});F.insertAfter(C.element);C._loadTrue=false}}},setTemplate:function(F){var D=this;var E=[];if(F.length>0){var C=F.length;E.push('<ul class="aheadSearchList">');for(i=0;i<C;i++){E.push('<li id="'+F[i].i+'" title="'+F[i].t+'">'+F[i].t+"</li>")}E.push("</ul>");D.tip(E.join().replace(/[(,)(?)(*)]/g,""))}else{D.tip();return false}},ahead_success:function(D){var C=this;if(B(this.element.html()).find("#aheadTipInfo")){C.element.children("#aheadTipInfo").remove();C._loadTrue=true;C.setTemplate(D)}if(B(this.element).parent().children("#aheadTipInfo").length>0){C.element.parent().children("#aheadTipInfo").remove("#aheadTipInfo");C._loadTrue=true;C.setTemplate(D)}},load:function(D){var C=this;(!D)&&(D=this.options.url);B.ajax({dataType:"json",type:"get",url:D,success:function(E){if(E.payload&&E.payload.json){E=E.payload.json;E=B.makeArray(E);C.ahead_success(E)}}})},_load:function(D,E){var C=this;(!D)&&(D=this.options.url);B.ajax({dataType:"json",type:"get",url:D,success:function(F){if(F.payload&&F.payload.json){F=F.payload.json;F=B.makeArray(F);C._setTemplate(F)}}})}}));var A=function(F,E){var F=window.event||F;var D=F.srcElement||F.target;var C=B(D).parents();for(i=0;i<C.length;i++){if(C[i]===E[0]){return true}else{return false}}};Array.prototype.aheadStrip=function(){if(this.length==1){return[this[0]]}if(this.length==0){return[]}else{var C=[];for(var E=0;E<this.length;E++){C.push(this.splice(E--,1));for(var D=0;D<this.length;D++){if(this[D]==C[C.length-1]){this.splice(D--,1)}}}return C}}})(jQuery);(function(A){A.widget("ui.suspend",A.extend({},{_init:function(){var C=this;var D=this.options.url;C.setTemplate(D)},setTemplate:function(E){var H=this.options.title;var G=this.options.width;var C=this.options.height;var F=this.options.type;var D='<div id="suspend_txfix" class="suspend_fix" style="width:'+(G+4)+'px">';D+='<h4><span class="suspend_f_l">';D+=H;D+='</span><span class="suspend_f_r"><a class="suspend_fix_closer" href="#" onclick="return false">x</a></span></h4>';D+='<div class="suspend_mainBody">';if(F=="swf"){D+='<object id="suspend_movie" align="middle" height="';D+=C;D+='" width="';D+=G;D+='">';D+='<param name="suspend_movie" value="';D+=E;D+='" />';D+='<param name="menu" value="false" />';D+='<param name="bgcolor" value="#ffcc33" />';D+='<param name="width" value="auto" />';D+='<param name="height" value="auto" />';D+='<embed src="';D+=E;D+='" menu="false" height="';D+=C;D+='" width="';D+=G;D+='" name="suspend_movie" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';D+="</object>"}if(F=="img"){D+='<img src="';D+=E;D+='" width="';D+=G;D+='" height="';D+=C;D+='" />'}D+="</div>";D+='<div style="clear:both; height:0; width:0; overflow:hidden;">';D+="</div>";D+="</div>";A(D).appendTo(A("body"));A(".suspend_fix_closer").bind("click",function(){A("#suspend_txfix").remove()})}}));function B(){var C=document.body;var D;if(C.currentStyle&&C.currentStyle.backgroundAttachment!="fixed"){if(C.currentStyle.backgroundImage=="none"){C.runtimeStyle.backgroundImage="url("+D+")";C.runtimeStyle.backgroundAttachment="fixed"}}}window.onload=function(){B()}})(jQuery);(function(A){A.widget("ui.htmleditor",A.extend({},{_init:function(){var I=this;var D=I.element;var K=I.options;D.addClass(I.widgetBaseClass);var B=I.form=D.parents("form:first").bind("submit",function(){I.saveHtml()});var G=I.toolbar=A('<ul class="htmleditor-bar clearfix ul"></ul>');var E=I.editor=A('<iframe frameborder="no" allowtransparency="true" marginheight="0" marginwidth="0" border="0" src="'+K.src+'"></iframe>').css({height:K.height||D.innerHeight(),width:"100%"}).addClass("htmleditor-iframe");var C=I.wrapper=A("<div></div>").css({width:K.width||D.innerWidth()}).addClass("htmleditor-wrapper").append(E);D.after(C).addClass("htmleditor-area");var H=false;if(D.hasClass("placeholder")){H=A.data(D[0],"placeholder")||D.val()}this.placeholder=H;this.designMode=false;E.load(function(){try{var O=I.win=E[0].contentWindow;var N=I.doc=O.document||E[0].contentDocument||E[0].document;N.designMode="on";N.contentEditable=true;N.domain=document.domain;var L=A(N).find("body")}catch(M){I.destroy();return }if(!I.designMode){(A.browser.msie?E:A(O)).focus(function(){H&&I.getHtml()==""&&I.setHtml("",true);C.addClass("text-focus");A(document).mousedown()}).blur(function(){H&&A.trim(I.getHtml())==""&&I.setHtml(H,true);C.removeClass("text-focus")});A(N).bind("keydown.shot",function(P){if(B.length&&P.ctrlKey&&(P.keyCode==13)){P.stopPropagation();P.preventDefault();B.submit()}})}L.html(D.val());I.designMode=true});D.focus(function(L){L.preventDefault();I.focus()});G.prependTo(I.element.parents(".text-wrapper")[0]);var J=A('<li class="bar-emot empty"></li>').appendTo(G).mousedown(function(){I.onBlur()});var F=A("<div>").addClass("emot-cont").menu({trigger:J,after:G,top:"auto",left:"auto",closebar:true,width:480});J.one("click",function(N){var M=[];M.push('<ul class="ul clearfix">');for(var L=0;L<90;L++){M.push('<li><a href="#"><img src="http://site.tongxue.com/v4/images/face/'+L+'.gif"/></a></li>')}M.push("</ul>");F.html(M.join("")).find("a").click(function(){F.menu("close");var O=A(this).children("img").attr("src");var P='<img src="'+O+'" />';I.paste(P);return false})})},destroy:function(){var B=this;B.element.removeData(B.widgetName).removeClass(B.widgetBaseClass).removeClass("htmleditor-area");B.wrapper.remove();B.toolbar.remove()},focus:function(){if(A.browser.msie){this.setHtml(this.getHtml())}else{A(this.win).focus()}},filter:function(B){B=B.replace(/<img\s+src=["|']?([^"']*)["|']?.*?>/gi,function(D,C){if(C){return"[img]"+C+"[/img]"}return""});B=B.replace(/<p.*?>|<br.*?>/ig,"\r\n");B=B.replace(/<[^><]*>/ig,"").replace(/&nbsp;/ig," ");return B},getText:function(){var B=A(this.doc).find("body").text();return B},getHtml:function(){var B=this,C=A(this.doc).find("body").html();if(A.trim(C.replace(/<br>|<p>&nbsp;<\/p>/i,""))==""||C==this.placeholder){C=""}if(B.options.isHtml){return C}else{return this.filter(C)}},setHtml:function(D,C){if(!A.browser.msie&&D==""){D="<br>"}var B=A(this.doc).find("body");B.html("");if(C){B.html(D)}else{this.paste(D)}},saveHtml:function(){this.element.val(this.getHtml())},submit:function(){this.form.submit()},exec:function(C,B){var E=this.win,D=this.doc;A(E).focus();if(A.browser.msie){if(!this._range){this._range=D.selection.createRange()}this._range.select();this._range=null}else{E.getSelection()}D.execCommand(C,false,B)},paste:function(B){var E=this.win,D=this.doc;A(E).focus();B=B?B:"";if(A.browser.msie){if(!this._range){this._range=D.selection.createRange()}this._range.select();try{this._range.pasteHTML(B)}catch(C){A(D).find("body").append(B)}this._range=null}else{E.getSelection();D.execCommand("insertHTML",false,B)}},_range:null,onBlur:function(){A(this.win).focus();this._range=A.browser.msie?this.doc.selection.createRange():null}}));A.ui.htmleditor.defaults={src:"/static/iframe.html?v=1316"};A.ui.htmleditor.getter="getHtml"})(jQuery);(function(A){A.widget("ui.ajaxWall",A.extend({},{_init:function(){var D=this;var F=this.element;var E=this.options;var H=null;if(F[0].nodeName.toUpperCase()!="FORM"){H=F.parents("form")}else{H=F}if(!H.length){return }this.form=H;F.addClass(this.widgetBaseClass);if(!E.container){E.container=H.next()}var G=H.find(".inputsubmit");var C=G.val();var B=H.find(".ui-htmleditor");H.ajaxForm({beforeSubmit:function(){var I=A.data(H.get(0),"validate");if(I&&!I.valid()){return false}G.addClass("inputaux").val("\u7559\u8a00\u4e2d...").attr("disabled","disabled")},dataType:"json",cache:false,data:{dataType:"json"},success:function(I){if(I&&I.wp){var J=A(I.wp);J.hide().prependTo(E.container).fadeIn("slow");B.htmleditor("setHtml","")}G.removeClass("inputaux").val(C).attr("disabled","")},error:function(){G.removeClass("inputaux").val(C).attr("disabled","")}})}}));A.widget("ui.validate",A.extend({},{_init:function(){var B=this;var D=this.element;var C=this.options;D.addClass(this.widgetBaseClass);D.bind("submit.validate",function(E){return B.valid()})},destroy:function(){this.element.unbind("submit.validate")},showNotice:function(B){B.focus();B.parents(".validate-wrap").find(".validate-msg").css("display","block")},hideNotice:function(B){B.parents(".validate-wrap").find(".validate-msg").hide()},valid:function(){var C=this;var F=this.element;var D=this.options;var H=F.find(".validate-wrap").find(":input");var B=H.length;for(var E=0;E<B;E++){var G=A(H[E]);var I=G.val();if(G.hasClass("email")){I=A.trim(I);G.val(I)}if((G.hasClass("repassword")&&I!=H.filter(".password:last").val())||(G.hasClass("password")&&I.length<6)||(G.hasClass("required")&&I.length==0)||(G.hasClass("url")&&!A.isUrl(I))||(G.hasClass("email")&&!A.isEmail(I))){C.showNotice(G);return false}else{C.hideNotice(G)}}return true}}));A.ui.validate.getter=["valid"];A.fn.placeholder=function(){return this.each(function(){var B=A(this);var C=A.data(this,"placeholder");if(!C){C=this.title||this.value;A.data(this,"placeholder",C);this.title=""}B.bind("focus.placeholder",function(){if(this.value==C){this.value=""}B.removeClass("placeholder")}).bind("blur.placeholder",function(){if(this.value==""||this.value==C){this.value=C;B.addClass("placeholder")}}).parents("form:first").bind("submit",function(){if(B.val()==C){B.val("")}})})};A.fn.buildUI=function(){return this.each(function(){var B=A(this);B.find(".inputtext,.textarea").bind("focus.focus",function(){A(this).addClass("text-focus")}).bind("blur.focus",function(){A(this).removeClass("text-focus")});B.find(".inputbutton,.inputsubmit").hover(function(){A(this).addClass("button-hover")},function(){A(this).removeClass("button-hover")});B.find(".inputaux").hover(function(){A(this).addClass("aux-hover")},function(){A(this).removeClass("aux-hover")});B.find(".placeholder").placeholder();B.find(".textarea").bind("keydown.short",function(D){var C=A(this).parents("form");C.length&&D.ctrlKey&&(D.keyCode==13)&&C.submit()});if(A.browser.msie&&A.browser.version<7){B.find(".ie-png,.pngfix").pngfix()}B.find(".ui-htmleditor").htmleditor();B.find(".ui-validate").validate();B.find(".user-tabs .tabs-left li").hover(function(){A(this).addClass("tab-hover")},function(){A(this).removeClass("tab-hover")})})};A.extend(A,{copy:function(F,D){var E=false;if(window.clipboardData){window.clipboardData.setData("Text",F);E=true}else{if(1){var B="ClipboardDiv";if(!A("#"+B).get(0)){var G;G=A("<div/>").attr("id",B).css({width:0,height:0,overflow:"hidden"}).appendTo("body").html("")}A("#"+B).html("");var C=A('<embed id="'+B+'Swf" src="http://www.tongxue.com/static/clipboard.swf" FlashVars="clipboard='+encodeURIComponent(F)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>').appendTo(A("#"+B));E=true}}if(typeof (D)=="function"){return D(E,F)}else{return }}});A(document).ready(function(){A(document).buildUI()})})(jQuery);(function(C){_tx=window.tx;var A=window.tx={};window.ge=function(D){return document.getElementById(D)};window.goURI=function(D){window.location.href=D};window.report=function(D,E){window.location.href="/report/report.php?type="+D+"&type_id="+E+"&url="+window.location.href};A.maxLength=function(F,G,E){var H=C(F);var D=H.val();if(C.size(D,true)>G){a=C.substring(D,0,G);H.val(a);E&&C(E).show()}};A.delcomment=function(G,F){var E=C("<div>").html("\u60a8\u786e\u8ba4\u5220\u9664\u6b64\u7559\u8a00\u5417\uff1f");E.confirm({attach:G,title:"\u5220\u9664\u7559\u8a00",buttons:{"\u786e\u5b9a":function(){C.ajax({url:F,type:"get",success:function(H){E.confirm("destroy");C(G).parents(".wallpost").fadeOut(500)}})},cancel:function(){E.confirm("destroy")}}});var D=C(".module-buttons",E.parent()).children("input:first").focus()};A.replycomment=function(E,G,H,D){var G=C("form");G.find(".reply-id").val(H);var F=G.find("textarea");C.scrollTo(F,{offset:-80,duration:500,axis:"y",onAfter:function(){if(F.htmleditor){F.htmleditor("setHtml","\u56de\u590d "+D+"\uff1a")}else{F.focus().val("\u56de\u590d "+D+"\uff1a")}}})};A.searchnetwork=function(E,D){D=C.extend({template:'<li class="select-li"><div>SELECT-OPTION-T</div><div class="small">SELECT-OPTION-L</div></li>',refresh:true,params:{},url:"/ajax/typeahead_networks2.php"},D);C(E).typeahead(D);return false};A.searchcollege=function(E,D){D=C.extend({message:{init:"\u8bf7\u8f93\u5165\u5927\u5b66\uff0c\u4e2d\u5c0f\u5b66\uff0c\u4e2d\u4e13\u7b49\u540d\u79f0",found:"\u9009\u62e9\u4e00\u6240\u5b66\u6821",empty:"\u8bf7\u8f93\u5165\u5927\u5b66\uff0c\u4e2d\u5c0f\u5b66\uff0c\u4e2d\u4e13\u7b49\u540d\u79f0",loading:"\u6570\u636e\u52a0\u8f7d\u4e2d...",error:"\u6570\u636e\u52a0\u8f7d\u5931\u8d25"},template:'<li class="select-li"><div>SELECT-OPTION-T</div><div class="small">SELECT-OPTION-L</div></li>',refresh:true,params:{t:1},url:"/ajax/typeahead_networks2.php"},D);C(E).typeahead(D);return false};A.searchcompany=function(E,D){D=C.extend({message:{init:"\u8f93\u5165\u516c\u53f8\u540d\u79f0",found:"\u9009\u62e9\u4e00\u4e2a\u516c\u53f8",empty:"\u8f93\u5165\u516c\u53f8\u540d\u79f0",loading:"\u6570\u636e\u52a0\u8f7d\u4e2d...",error:"\u6570\u636e\u52a0\u8f7d\u5931\u8d25"},template:'<li class="select-li"><div>SELECT-OPTION-T</div><div class="small">SELECT-OPTION-L</div></li>',refresh:true,params:{t:3},url:"/ajax/typeahead_networks2.php"},D);C(E).typeahead(D);return false};A.searchcity=function(E,D){D=C.extend({message:{init:"\u8f93\u5165\u4e2d\u6587/\u62fc\u97f3\u6216\u9009\u62e9",found:"\u8f93\u5165\u4e2d\u6587/\u62fc\u97f3\u6216\u9009\u62e9",empty:"\u6ca1\u6709\u627e\u5230\u6b64\u5730\u70b9",loading:"\u6570\u636e\u52a0\u8f7d\u4e2d...",error:"\u6570\u636e\u52a0\u8f7d\u5931\u8d25"},template:'<li class="select-li"><div>SELECT-OPTION-T</div><div class="small">SELECT-OPTION-L</div></li>',refresh:true,width:130,hasInitData:true,initComplete:function(G){var F=G.select,H=G.menu;F.container.append(C('<a style="float:right;margin:1px 10px;" href="/ajax/morecity.php">\u66f4\u591a&raquo;</a>').click(function(){A.dialog(this,{width:600,success:function(I){I.dialog.element.find("a").click(function(){var J=C(this).attr("rel");J=J?C.toJSON(J):J;J&&F.trigger("select",J);I.dialog.close()});I.dialog.wrapper.mousedown(function(J){J.stopPropagation()})}});return false}))},params:{t:"reg"},url:"/ajax/typeahead_networks2.php"},D);C(E).typeahead(D);return false};A.searchpoi=function(E,D){D=C.extend({message:{init:"\u8f93\u5165\u4f60\u6240\u5728\u7684\u5c0f\u533a\u3001\u5b66\u6821\u6216\u5199\u5b57\u697c\u5168\u79f0",found:"\u663e\u793a{n}\u4e2a\u7ed3\u679c\uff0c\u8bf7\u70b9\u51fb\u9009\u62e9\u4e00\u4e2a",empty:"\u8f93\u5165\u4f60\u6240\u5728\u7684\u5c0f\u533a\u3001\u5b66\u6821\u6216\u5199\u5b57\u697c\u5168\u79f0",loading:"\u6570\u636e\u52a0\u8f7d\u4e2d...\u8bf7\u7b49\u5f85",error:"\u6570\u636e\u52a0\u8f7d\u5931\u8d25"},template:'<li class="select-li"><div>SELECT-OPTION-T</div><div class="small">SELECT-OPTION-A</div></li>',refresh:true,params:{},url:"/world/ajax/getPoiByKeyword.php"},D);C(E).typeahead(D);return false};A.searchfriendphoto=function(E,D){D=C.extend({message:{init:"",found:"",empty:"",loading:"",error:""},template:'<li class="select-li" style="padding:3px;width:120px;height:23px;"><img style="width:25px;float:left;" src="SELECT-OPTION-S"/><div style="padding-left:5px;float:left;">SELECT-OPTION-T</div></li>',refresh:true,params:{t:"head"},url:"/ajax/typeahead_friends3.php"},D);C(E).typeahead(D);return false};A.suspend=function(D){C("body").suspend(D);return false};A.searchfriend=function(E,D){D=C.extend({params:{include_me:0},url:"/ajax/typeahead_friends2.php"},D);C(E).typeahead(D);return false};A.addfriend=function(D,E){A.dialog(D,{success:function(F){}},"/ajax/addfriend2.php?message=&can_friend="+E);return false};A.share=function(D,E){A.dialog(D,{success:function(F){}},"/ajax/share_dialog2.php?"+E);return false};A.poke=function(D,E){A.dialog(D,{success:function(F){}},"/ajax/poke2.php?pokeback=1&can_poke="+E);return false};A.removeMinifeed=function(D,E){C.ajax({url:"/minifeed.php",type:"post",data:{a:"del",id:E},success:function(F){C("#feed_"+E).css("display","none")}})};A.selectfriend=function(E,D){D=C.extend({url:"/ajax/typeahead_friends2.php"},D);C(E).ahead(D);return false};A.removefriend=function(F,G,I,H){var E=C("<div>").html("\u4f60\u786e\u5b9a\u8981\u5c06"+H+"\u79fb\u9664\u5417? "+H+" \u5c06\u4e0d\u4f1a\u88ab\u544a\u4e4b\u3002");E.confirm({attach:F,title:"\u79fb\u9664\u597d\u53cb?",buttons:{"\u786e\u5b9a":function(){C.ajax({url:"/ajax/removefriend.php",type:"post",data:{uid:G},success:function(J){E.confirm("destroy");if(window.location.reload){window.location.reload()}}})},cancel:function(){E.confirm("destroy")}}});var D=C(".module-buttons",E.parent()).children("input:first").focus()};A.dialog=function(F,S,K){element=C(F);var H={autoOpen:false,overlay:true,zIndex:100,width:500,showObject:false,title:null,buttons:null};var P=C.extend(H,S);var E=element.attr("href");if(!K&&!E){return false}var M=null;if(!P.newDialog){M=A.__dialog}if(!M){M=new C.ui.dialog(C("<div>"),P);if(!P.newDialog){A.__dialog=M}else{C.extend(P,{close:function(){M.destroy()}})}}C.extend(M.options,H,S);M.hidemessage=false;var L=M.element;L.html("").unbind("dialogopenComplete.tx");var N=function(T){M.message("\u7f51\u7edc\u8fde\u63a5\u51fa\u9519\uff01",2000)};var I=function(){if(M.isOpen()){L.trigger("dialogopenComplete.tx")}else{M.open(F)}};var J=-1,G=null;var O=function(){return{index:J,element:element,dialog:M,data:G}};var Q=function(U){var V=C.toJSON(U);J++;G=null;if(V&&V.payload&&!C.isUndefined(V.payload.html)){G=V.payload;var T=V.payload.html;if(V.payload.type&&V.payload.type=="message"){M.message(T,P.time?P.time:1400)}else{L.html(T)}}else{L.html(U)}P.success&&P.success(O());R()};var R=function(){L.buildUI();M.setPos();L.find(".pagerpro a,.pagination a").click(function(T){M.loading();C.ajax({url:this.href,cache:false,data:{dataType:"json"},success:function(U){Q(U)},error:function(){N()}});return false});L.find("form").each(function(){var T=this;C(this).ajaxForm({beforeSubmit:function(){var U=C.data(T,"validate");if(U&&!U.valid()){return false}M.loading()},cache:false,data:{dataType:"json"},success:function(U){Q(U)},error:function(){N()}})});L.find(":input:visible:first").focus();L.find(".module-close").click(function(T){M.close();return false})};if((C.isString(K)&&K.length&&(C.isUrl(K)||K.substring(0,1)=="/"))||E){var D=K||E;L.bind("dialogopenComplete.tx",function(){C.ajax({url:D,cache:false,data:{dataType:"json"},success:function(T){Q(T)},error:function(){N()}})});M.loading();I()}else{L.html(K);L.bind("dialogopenComplete.tx",function(){R()});I()}return M};A.hint=function(G,M,E,L){var I=C("#body");I=I.length?I:C("body");el=C(G);var D=C('<div class="hint"><div class="hint-container"><h4>'+M+"</h4></div></div>");var J=C('<div class="arrow-t"></div>').prependTo(D);var H=C('<div class="hint-lay">').appendTo(D);var K=C('<a href="#" class="hint-close">\u77e5\u9053\u4e86</a>').appendTo(D);D.css({width:L}).appendTo(I);var F=C.autoposition(D,el,[2,"auto0"],I);D.css(F);J.css("backgroundPosition",(F.auto[1]*100)+"% 0");K.mousedown(function(){D.html("").remove();if(E){C.get(E)}return false}).click(function(){return false})};A.date={};A.date.monthChange=function(E,I,D){var L=C(I);var H=C(D).get(0);var F=E?C(E):false;var K=B(L.val(),F.val&&F.val()!=-1?F.val():false);var J=H.options[0].value==-1?1:0;for(var G=H.options.length;G>K+J;G--){C(H.options[G-1]).remove()}for(var G=H.options.length;G<K+J;G++){H.options[G]=new Option(G+(J?0:1))}};A.date.yearChange=function(F,D,E){A.date.monthChange(F,D,E)};function B(F,E){var D;if(F==-1){return 31}D=new Date(E?E:1912,F,0);return D.getDate()}C(document).ready(function(E){var D=C("#mainMenu > .withMenu");D.each(function(){var G=C(this);var F=G.children(".drop");var H=G.children(".dropMenu");G.hover(function(I){G.addClass("active");H.show()},function(I){G.removeClass("active");H.hide()})})})})(jQuery);(function(D){D.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(F,E){D.fx.step[E]=function(G){if(G.state==0){G.start=C(G.elem,E);G.end=B(G.end)}G.elem.style[E]="rgb("+[Math.max(Math.min(parseInt((G.pos*(G.end[0]-G.start[0]))+G.start[0]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[1]-G.start[1]))+G.start[1]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[2]-G.start[2]))+G.start[2]),255),0)].join(",")+")"}});function B(F){var E;if(F&&F.constructor==Array&&F.length==3){return F}if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return[parseInt(E[1]),parseInt(E[2]),parseInt(E[3])]}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return[parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55]}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)]}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)]}return A[D.trim(F).toLowerCase()]}function C(G,E){var F;do{F=D.curCSS(G,E);if(F!=""&&F!="transparent"||D.nodeName(G,"body")){break}E="backgroundColor"}while(G=G.parentNode);return B(F)}var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function($){$.objectEvent={_initEvent:function(){if(!this.options){this.options={}}if(!this.element){this.element=$("<div>")}$.data(this.element[0],"objectEvent",this)},element:null,trigger:function(eventName,data,e){e=e||$.event.fix({type:eventName,target:this.element[0]});this.element.triggerHandler(eventName,[e,data,this],this.options[eventName]);return this},one:function(eventName,data,fn){this.element.one(eventName,data,fn);return this},bind:function(eventName,data,fn){this.element.bind(eventName,data,fn);return this},unbind:function(eventName,fn){this.element.unbind(eventName,fn);return this}};tx=window.tx||{};tx._presence=function(){var parseId=function(id){return $.trim(id.split("@")[0])};var addCount=function(count,div){if(count){if(count.toString().indexOf("+")!=-1){count=parseInt(div.html())+parseInt(count)}else{if(count.toString().indexOf("-")!=-1){count=parseInt(div.html())-parseInt(count)}}count=count.toString();div.html(count).show()}else{div.html("0").hide()}};var sound=(function(){swfobject.embedSWF("/static/player/sound.swf?_"+new Date().getTime(),"presence-sound-player-c","100","100","9.0.0",null,null,null,{id:"presence-sound-player"});var play=function(url){if(tx.presence.sound){try{$("#presence-sound-player")[0].playSound(url?url:"/static/player/sound.mp3")}catch(e){}}};return{play:function(type){play(type?"/static/player/sound/"+type+".mp3?v=55":null)}}})();var _showNoti=false;$(window).focus(function(){_showNoti=false}).blur(function(){_showNoti=true});var notice=(function(){var title=document.title,t=0,s=false,set=null;return{show:function(msg,time){if(!_showNoti){return }if(set){clearInterval(set);t=0;s=false}var set=setInterval(function(){t++;s=!s;if(t==time){clearInterval(set);t=0;s=false}if(s){document.title="\u3010"+msg+"\u3011"+title}else{document.title=title}},1000)}}})();var trigger_logout=false;tx.presence={};tx.presence.init=function(options){$.extend(tx.presence,options);if(tx.presence.serverTime){$.date.init(tx.presence.serverTime)}var wrap=$("#presence");var con=new tx.conn();var chat=null;var friends=new tx.buddylist();window.onbeforeunload=function(){trigger_logout&&$.post("/webim/synclogout.php",{ticket:con.ticket})};var friElement=$("#presence-friends").clickout(function(){if(!tx.presence.sticky_buddylist){$(this).removeClass("focused")}});var fri=new tx.presenceSection({template:friElement});var setElement=$("#presence-chat-status").clickout(function(){$(this).removeClass("focused")});var set=new tx.presenceSection({template:setElement,open:function(){fri.close()}});var notiElement=$("#presence-notifications").clickout(function(){$(this).removeClass("focused")});var noti=new tx.presenceSection({template:notiElement,open:function(){fri.close();notiSetCount(0)}});var notiSetCount=function(d){noti.count.addClass("tab-count-new");if(!noti.isOpen()){noti.setCount(d)}else{noti.setCount(0)}};var getNoti=function(){$.ajax({url:tx.presence.noti_url,cache:false,dataType:"json",success:function(d){pollingNoti();handleNoti(d)},error:function(d){}})};var pollingNoti=function(){setTimeout(function(){getNoti()},30000)};var handleNoti=function(d){var newnum=d.walls-parseInt($("#noti-walls").find(".noti-num").html());if(newnum>0){sound.play("noti");$("#noti-walls").find("#noti-walls-block").show();var n="+"+newnum.toString();notiSetCount(n);addCount(n,$("#noti-walls").addClass("noti-new").find(".noti-num"));notice.show("\u6709\u65b0\u7559\u8a00",10)}var newnum=d.msgs-parseInt($("#noti-msgs").find(".noti-num").html());if(newnum>0){sound.play("noti");$("#noti-msgs").find("#noti-msgs-block").show();var n="+"+newnum.toString();notiSetCount(n);addCount(n,$("#noti-msgs").addClass("noti-new").find(".noti-num"));notice.show("\u6709\u65b0\u4fe1\u4ef6",10)}var newnum=d.notifications-parseInt($("#noti-notifications").find(".noti-num").html());if(newnum>0){sound.play("noti");$("#noti-notifications").find("#noti-notifications-block").show();var n="+"+newnum.toString();notiSetCount(n);addCount(n,$("#noti-notifications").addClass("noti-new").find(".noti-num"));notice.show("\u6709\u65b0\u901a\u77e5",10)}var newnum=d.viewers-parseInt($("#noti-viewers").find(".noti-num").html());if(newnum>0){sound.play("noti");$("#noti-viewers").find("#noti-viewers-block").show();var n="+"+newnum.toString();notiSetCount(n);addCount(n,$("#noti-viewers").addClass("noti-new").find(".noti-num"));notice.show("\u6709\u65b0\u6765\u8bbf",10)}};pollingNoti();setElement.find("#chat-checkbox-buddylist").click(function(){var self=this;if(this.checked){tx.presence.sticky_buddylist=true}else{tx.presence.sticky_buddylist=false}var load=$(this).hide().siblings(".small-loading").css("display","block");$.post("/webim/set.php",{sticky_buddylist:this.checked},function(d){load.hide();$(self).show()})});setElement.find("#chat-checkbox-sound").click(function(){var self=this;if(this.checked){tx.presence.sound=true}else{tx.presence.sound=false}var load=$(this).hide().siblings(".small-loading").css("display","block");$.post("/webim/set.php",{sound:this.checked},function(d){load.hide();$(self).show()})});var online=setElement.find(".show-available");var offline=setElement.find(".show-unavailable");offline.find("a").click(function(e){con.login(1);return false});online.find("a").click(function(e){con.logout(1);return false});if(tx.presence.auto_login){con.login()}};$.ajaxSetup({cache:false});tx.conn=function(){this._initEvent();this.connected=true;this.pollTimer=null;this.url={login:"/webim/login.php",logout:"/webim/mylogout.php",buddies:"/webim/buddies.php",message:"/webim/message.php",presence:"/webim/presence.php"}};$.extend(tx.conn.prototype,$.objectEvent,{init:function(config){this.ticket=config.ticket;this.imserver=config.imserver;this.connected=true;this.channel=config.channel},postPresence:function(presence){var self=this;$.ajax({url:this.url.presence,type:"post",data:{status:presence.status,show:presence.show},success:function(d,o){self.trigger("presenceSuccess",d)},error:function(d,o){self.trigger("presenceError",d)}})},postMsg:function(msg,callback){var msgBody=msg.body.replace(/\n/g," ");msgBody=msgBody.replace(/\r/g,"");msgBody=msgBody.replace(/'/g,"'");msg.body=msgBody;var self=this;$.ajax({url:this.url.message,type:"post",data:msg,success:function(d,o){msg.body=msgBody.replace(/&/g,"&amp;").replace(/\"/g,"&quot;").replace(/\'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;");self.trigger("msgSuccess",[d,msg])},error:function(d,o){self.trigger("msgError",d)}})},startPolling:function(){var self=this;this.channel.ajax({url:"/packets",cache:false,dataType:"json",data:{ticket:this.ticket,callback:""},success:function(json){self.onPollSuccess(json,this)},error:function(json){self.onPollError(json,this)}});return },stopPolling:function(){var self=this;self.connected=false;if(self.pollTimer){clearTimeout(self.pollTimer)}self.trigger("pollStop")},onPollSuccess:function(d,o){var self=this;if(this.connected){self.trigger("pollSuccess",d);this.pollTimer=window.setTimeout(function(){self.startPolling()},1000)}else{self.connected=true}},onPollError:function(d,o){var self=this;if(self.connected){self.pollTimer=window.setTimeout(function(){self.startPolling()},1000);self.connected=false}else{self.trigger("pollError",d);self.stopPolling()}},logout:function(set){var self=this;set=set?1:0;self.stopPolling();$.ajax({url:this.url.logout,data:{ticket:self.ticket,set:set},success:function(d,o){self.trigger("logoutSuccess",d)},error:function(d,o){self.trigger("logoutError",d)}})},loadBuddies:function(){var self=this;$.ajax({url:this.url.buddies,dataType:"json",success:function(d,o){self.trigger("loadBuddiesSuccess",d)},error:function(d,o){self.trigger("loadBuddiesError",d)}})},login:function(set){set=set?1:0;var self=this;$.ajax({url:this.url.login,dataType:"json",data:{set:set},success:function(d,o){if(d&&d.imserver&&d.ticket){var channel=$('<iframe width="0" height="0" border="0" src="'+d.imserver+'/channel.html"></iframe>');channel.load(function(){try{d.channel=channel[0].contentWindow.jQuery;if(d){self.init(d);self.onLoginSuccess(d)}else{self.onLoginError(d)}}catch(e){self.onLoginError(d)}});channel.appendTo("body")}else{self.onLoginError(d)}},error:function(d,o){self.onLoginError(d)}})},onLoginSuccess:function(d){this.trigger("loginSuccess",d)},onLoginError:function(d){this.trigger("loginError",d)}});tx.buddylist=function(options){this.options=options;this.window=$("#presence-friends");this.wrapper=$("#friends-list");this.empty=$("#empty-friends");this.searchinput=$("#friends-search input");this.numDiv=$("#friends-num");this.element=$('<ul class="buddylist-ul ul"></ul>');this._initEvent();this.markup='<li><a href="#"><img width="25" /><strong></strong><span></span></a></li>';this.buddies={};if(this.options.data){this.init(options.data)}this.wrapper.html(this.element);this.bindEvents()};$.extend(tx.buddylist.prototype,$.objectEvent,{bindEvents:function(){var input=this.searchinput,wrapper=this.wrapper;input.bind("focus",function(){if(this.value==this.title){this.value="";$(this).removeClass("gray")}}).bind("blur",function(){if(this.value==""){this.value=this.title;$(this).addClass("gray")}}).bind("keyup",function(e){var list=$("li",wrapper);if(this.value==""){list.show()}else{list.hide();$("li:contains('"+this.value+"')",wrapper).show()}})},init:function(data){this.setNum();this.buddies=data;this.element.html("");for(var i in data){if(data[i]["name"]){this.addOne(i,data[i])}}},destroy:function(){this.element.html("")},setNum:function(){var l=this.element.children().length,win=this.window;this.numDiv.html(l.toString());if(l==0){this.empty.show()}else{if(l<11){win.removeClass("friends-more");this.empty.hide()}else{win.addClass("friends-more");this.empty.hide()}}},addOne:function(id,op){if(!this.buddies[id]){var option=this.buddies[id]=op}else{var option=this.buddies[id]}var lb=$("#buddylist-id-"+id,this.element);if(lb.length){lb.show();return }var self=this;var h=$(this.markup).attr("id","buddylist-id-"+id);h.find("a").attr("rel",id).click(function(e){self.select($(this).attr("rel"));return false});h.find("img").attr("src",option.thumbSrc);h.find("strong").html(option.name);h.find("span").html(option.status);h.appendTo(this.element);this.setNum()},delOne:function(id){$("#buddylist-id-"+id,this.element).remove();this.setNum()},select:function(id){this.trigger("select",id)},size:function(){var l=0,b=this.buddies;if(b){for(var i in b){if(b[i]){l++}}}return l}});tx.presenceSection=function(options){var str='<div class="presence-section"><div class="presence-tab"><div class="presence-tab-inner"><a href="#" title="\u5173\u95ed" class="remove right">\u5173\u95ed</a><div class="tab-count">0</div><h4></h4></div></div><div class="presence-window"><div class="window-inner"><div class="window-header"><div class="window-actions"><a href="#" class="min" title="\u6700\u5c0f\u5316">\u6700\u5c0f\u5316</a><a href="#" class="remove" title="\u5173\u95ed">\u5173\u95ed</a></div><h4 class="window-title"></h4></div><div class="window-cont"></div></div></div></div>';if(!options){options={}}if(!options.template){options.template=str}this.options=options;var wrap=$(options.template);this.element=wrap;this.tab=$(".presence-tab",wrap);this.window=$(".window-opts",wrap);this.header=$(".window-header",wrap);this.headTitle=$("h4",this.header);this.count=$(".tab-count",this.tab);this.actions=$(".window-actions",wrap);this.remove=$(".remove",wrap);this.minimize=$(".min",this.actions);this.title=$("h4",wrap);this.cont=$(".window-cont",wrap);this.init()};$.extend(tx.presenceSection.prototype,{init:function(){var self=this;this.element.hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});this.title.add(this.minimize).click(function(){if(self.isOpen()){self.close();return false}else{self.open();return false}}).hover(function(){self.minimize.addClass("hover")},function(){self.minimize.removeClass("hover")});this.remove.click(function(e){self._remove();return false})},isOpen:function(){return this.element.hasClass("focused")},open:function(){this.element.addClass("focused");if(this.options.open){this.element.triggerHandler("onOpen",null,this.options.open)}},close:function(){this.element.removeClass("focused");if(this.options.close){this.element.triggerHandler("onClose",null,this.options.close)}},_remove:function(){this.element.remove();if(this.options.remove){this.element.triggerHandler("onRemove",null,this.options.remove)}},setCount:function(count){addCount(count,this.count)},getCount:function(){return parseInt(this.count.html())},destroy:function(){}});tx.chatSection=function(id,options){var options=this.options=options;this.id=id;var self=this;var str='<div class="chat-info"><a class="chat-info-pic" href="#"><img src="about:blank"/></a><span class="chat-info-status"></span><span class="time">\u00a0</span></div><div class="chat-cont"><div class="chat-clear-history"><a href="#">\u6e05\u9664\u804a\u5929\u5386\u53f2\u8bb0\u5f55</a></div><div class="chat-content"></div></div><div class="chat-input-div"><textarea name="chat_input" class="chat-input textarea"></textarea></div><div class="chat-not-avail gray"><div class="chat-not-avail-you">\u60a8\u4e0d\u5728\u7ebf\u3002</div><div class="chat-not-avail-them">\u4e0d\u5728\u7ebf\u3002</div><div class="chat-not-avail-actions"><a href="#">\u7ed9ta\u53d1\u7ad9\u5185\u4fe1</a></div></div>';var warp=new tx.presenceSection({open:function(){self._open()},close:function(){self._close()},remove:function(){self._remove()}});this.section=warp;this.element=warp.element.attr("id","chat-"+id).addClass("chat-section");this.window=warp.cont.html(str).addClass("chat-window");this.tab=warp.tab;var info=$(".chat-info",this.window);this.infoLink=$(".chat-info-pic",info);this.infoImg=$("img",this.infoLink);this.infoStatus=$(".chat-info-status",info);this.infoStatusTime=$(".time",info);this.infoOnline=$(".chat-not-avail-them",this.window);this.inputDiv=$(".chat-input-div",this.window);this.input=$(".chat-input",this.inputDiv);this.content=$(".chat-cont",this.window).bind("click",function(e){self.input.focus()});this.chatCont=$(".chat-content",this.window);this.title=warp.title;this.owner={id:tx.presence.id,name:tx.presence.name};this.updateUserInfo();this.lastLogItem=null;this.histories=[];this.newCount=options.newCount?options.newCount:0;if(this.newCount){this.highlight(true);this.setCount(this.newCount)}this.disabled=options.disabled?options.disabled:false;if(this.disabled){this.disable()}this.pos=0};$.extend(tx.chatSection.prototype,{updateUserInfo:function(){var options=this.options;this.title.html(options.name);this.infoLink.attr("href","/profile.php?id="+this.id);this.infoImg.attr("src",options.thumbSrc);this.infoStatus.html(options.status.substring(0,25));this.infoStatusTime.html(options.statusTimeRel);this.infoOnline.html(options.name+"\u4e0d\u5728\u7ebf\uff01")},_open:function(){if(this.options.open){this.options.open.apply(this)}this.scrollToBottom()},_close:function(){if(this.options.close){this.options.close.apply(this)}},_remove:function(){if(this.options.remove){this.options.remove.apply(this)}},open:function(){this.section.open()},close:function(){this.section.close()},disable:function(){this.disabled=true;this.element.addClass("disabled")},enable:function(){this.disabled=false;this.element.removeClass("disabled")},highlight:function(b){if(b){this.element.addClass("chat-highlight")}else{this.element.removeClass("chat-highlight")}},setCount:function(count){this.section.setCount(count);this.newCount=this.getCount();if(this.options.setCount){this.options.setCount.apply(this)}},getCount:function(){return parseInt(this.section.count.html())},addHistory:function(logItem){var markup="";if(1){markup+=this._renderMsg(logItem.from,logItem.to,logItem.timestamp,logItem.body)}else{return }this.lastLogItem=logItem;this.chatCont.append(markup);tx.presence.histories[this.id].push(logItem);this.scrollToBottom()},setHistory:function(logItems){this.lastLogItem=null;var markup=[];var prevItemTime=0;for(var i=0;i<logItems.length;i++){var logItem=logItems[i];if(1||logItem.style=="msg"){markup.push(this._renderMsg(logItem.from,logItem.to,logItem.timestamp,logItem.body))}else{continue}this.lastLogItem=logItem;prevItemTime=logItem.timestamp}this.chatCont.prepend(markup.join(""));this.scrollToBottom()},_renderMsg:function(from,to,time,msg,pendingMsgID,isError,errorMarkup){var fromSelf=from!=this.id;var fromToSelf=fromSelf&&from==to;var msgClass=fromSelf&&!fromToSelf?"self":"other";var markup=this._renderDateBreak(time);var timeStr=(new $.date(time)).getTime();var name=fromSelf?this.owner.name:'<a href="/profile.php?id='+this.id+'">'+this.options.name+"</a>";var pic="";var shouldTilte=true;var last=this.lastLogItem;if(last&&last.to==to&&last.from==from&&time-last.timestamp<60000){shouldTilte=false}if(shouldTilte){markup+='<h3 class="'+msgClass+'">'+pic+' <span class="time">'+timeStr+"</span>"+name+"</h3>"}var msgElementID="";var msgClasses="p-"+msgClass;markup+="<p"+msgElementID+' class="'+msgClasses+'">'+msg+"</p>";return markup},_renderDateBreak:function(time){var newDate=new Date();newDate.setTime(time);var shouldRender=false;var lastDate=new Date();if(this.lastLogItem){lastDate.setTime(this.lastLogItem.timestamp)}if(!this.lastLogItem||newDate.getDate()!=lastDate.getDate()||newDate.getMonth()!=lastDate.getMonth()){shouldRender=true}var markup="";if(shouldRender){var classname="date-divider";if(!this.lastLogItem){classname+=" first"}markup='<h4 class="'+classname+'">'+(new $.date(time)).getDay(true)+"</h4>"}return markup},loadData:function(){if(this.chatDisplay.histories[this.id]){this._setHistory(this.chatDisplay.histories[this.id])}if(this.chatDisplay.userInfos[this.id]){this.updateUserInfo(false)}else{this.chatDisplay.userInfos[this.id]={name:this.name,firstName:this.firstName,thumbSrc:"",status:""}}},scrollToBottom:function(){this.content.scrollTop(this.content[0].scrollHeight)}});tx.chat=function(){var self=this;this._initEvent();this.handleWidth=136;this.animationTime=210;this.chatWidth=null;this.maxNum=null;this.chat=$("#chat");this.chatTabBar=$("#chat-tab-bar");this.nextTab=$(".chat-next");this.prevTab=$(".chat-prev");this.nextCounter=$(".count",this.nextTab);this.prevCounter=$(".count",this.prevTab);this.nextMsgNum=$(".tab-count",this.nextTab);this.prevMsgNum=$(".tab-count",this.prevTab);this.numNext=0;this.numPrev=0;this.tabs={};this.tabsArray=[];this.activeTab=null;this.prevTabs={};this.nextTabs={};$(window).resize(function(){self._resize()});this.nextTab.mousedown(function(){self._slide(-1)}).mouseup(function(){self._sildeUp()});this.prevTab.mousedown(function(){self._slide(1)}).mouseup(function(){self._sildeUp()});this._refreshNum()};$.extend(tx.chat.prototype,$.objectEvent,{initHistory:function(buddies){var data=$.cookie("tx_presence");if(!data){return }data=$.toJSON(data);activeTab=data.activeTab;numPrev=data.numPrev;tabs=data.tabs;activeTab=activeTab?activeTab:null;var l=tabs.length;for(var i=0;i<l;i++){var tab=tabs[i];var id=tab.i;if(buddies[id]){this.addTab(id,$.extend(buddies[id],{newCount:tab.n}))}}this.numPrev=numPrev?parseInt(numPrev):0;this._updateNum();if(activeTab){this.tabs[activeTab]&&this.tabs[activeTab].open()}},setHistory:function(){var self=this;var tabs=[];$.each(this.tabsArray,function(i,v){tabs.push({i:v,n:self.tabs[v].newCount})});var data={tabs:tabs,numPrev:this.numPrev,activeTab:this.activeTab};$.cookie("tx_presence",$.toString(data),{path:"/",domain:document.domain})},destroy:function(){this.tabs={};this.tabsArray=[];this.activeTab=null;this.chatTabBar.html("");this._updateNum()},_resize:function(){var w=$("#presence-ui").width()-$("#presence-buttons").outerWidth()-120;this.maxNum=parseInt(w/this.handleWidth)},_refreshNum:function(){var w=$("#presence-ui").width()-$("#presence-buttons").outerWidth()-120;this.maxNum=parseInt(w/this.handleWidth)},setNextMsgNum:function(num){addCount(num,this.nextMsgNum)},setPrevMsgNum:function(num){addCount(num,this.prevMsgNum)},selectTab:function(id,options){if(!this.tabs[id]){this.addTab(id,options)}else{}this._updatePrev(id);this._updateNum();this.tabs[id].open()},_addTab:function(id,options){var self=this;$.extend(options,{open:function(){var o=self.tabs[this.id];o.setCount(0);o.highlight(false);o.input.focus();if(self.activeTab&&self.activeTab!=this.id){self.tabs[self.activeTab].close()}self.activeTab=this.id;self.setHistory()},close:function(){if(self.activeTab==this.id){self.activeTab=null}self.setHistory()},remove:function(){if(self.activeTab==this.id){self.activeTab=null}self.delTab(this.id);self.setHistory()},setCount:function(){self.setHistory()}});var c=new tx.chatSection(id,options);this.chatTabBar.prepend(c.element);c.input.bind("keydown",function(e){if(e.keyCode==13){self.trigger("post",{to:id,body:$(this).val()});$(this).val("");e.preventDefault()}});if(!tx.presence.histories[id]){tx.presence.histories[id]=[];$.getJSON("/webim/history.php",{id:id},function(history){var h=history[id]?history[id]:[];tx.presence.histories[id]=h;c.setHistory(h)})}else{c.setHistory(tx.presence.histories[id])}this.tabs[id]=c;this.tabsArray[this.tabsArray.length]=id;this._updateNum()},addTab:function(id,options,history){this._addTab(id,options)},delTab:function(id){this.tabsArray=$.grep(this.tabsArray,function(v,i){return v!=id});delete this.tabs[id];this._updateNum()},_updatePrev:function(id){var tabsArray=this.tabsArray;var l=tabsArray.length;if(l<=this.maxNum){return }if(!id){var n=l-this.maxNum;this.numPrev=n<0?0:n}else{var nn=0;for(var i=0;i<l;i++){if(tabsArray[i]==id){nn=i;break}}if(nn<=this.numPrev){this.numPrev=nn}else{if(nn>=this.numPrev+this.maxNum){this.numPrev=nn-this.maxNum+1}}}},_setVisibleTabs:function(all){var numPrev=this.numPrev,upcont=this.numPrev+this.maxNum,tabs=this.tabs,tabsArray=this.tabsArray;var l=tabsArray.length,nextN=0,prevN=0;for(var i=0;i<l;i++){var tab=tabs[tabsArray[i]];if(i<numPrev||i>=upcont){if(all){tab.element.show()}else{if(this.activeTab==tabsArray[i]){tab.close()}var n=tab.getCount();if(i<numPrev){prevN+=n;tab.pos=1}else{nextN+=n;tab.pos=-1}tab.element.hide()}}else{tab.pos=0;tab.element.show()}}if(!all){this.setNextMsgNum(nextN);this.setPrevMsgNum(prevN)}},slideing:false,_slide:function(direction){if((this.numNext>0&&direction==-1)||(this.numPrev>0&&direction==1)){this.slideing=true;if(this.numNext==1&&direction==-1||this.numPrev==1&&direction==1){this.slideing=false}var self=this;this._slideSetup(false);this._setVisibleTabs(true);if(direction==-1){this.numNext--;this.numPrev++}else{if(direction==1){this.numNext++;this.numPrev--}}this.chatTabBar.animate({left:-1*this.handleWidth*this.numNext},500,function(){if(self.slideing){self._slide(direction)}else{self._updateNum();self._slideReset()}})}},_sildeUp:function(){this.slideing=false},_slideSetup:function(reset){this.chat[0].style.position=reset?"":"relative";this.chat[0].style.overflow=reset?"visible":"hidden";if(!this.chatWidth){this.chatWidth=this.chatTabBar.width()}if(reset){this.chatWidth=null}this.chatTabBar.width(reset?"":this.handleWidth*this.tabsArray.length);this.chat[0].style.width=reset?"":this.chatWidth+"px";this.chatTabBar[0].style.position=reset?"":"absolute"},_slideReset:function(){this._slideSetup(true)},_updateNum:function(){if(this.maxNum){var l=this.tabsArray.length;if(l<=this.maxNum){this.numNext=0;this.numPrev=0}else{this.numNext=l-this.maxNum-this.numPrev;this.numNext=this.numNext<0?0:this.numNext}}this.chatTabBar.css("left",-1*this.handleWidth*this.numNext);this._updateCounters();this._setVisibleTabs();this.setHistory()},_updateCounters:function(){if(this.numNext<=0){this.numNext=0;this.nextTab.addClass("next-disabled")}else{this.nextTab.removeClass("next-disabled")}if(this.numPrev<=0){this.numPrev=0;this.prevTab.addClass("prev-disabled")}else{this.prevTab.removeClass("prev-disabled")}if(this.numPrev>0||this.numNext>0){this.nextTab.show();this.prevTab.show()}else{this.nextTab.hide();this.prevTab.hide()}this.nextCounter.html(this.numNext.toString());this.prevCounter.html(this.numPrev.toString())}})};$.fn.extend({clickout:function(fn,expr){return this.each(function(){var elem=this,attach=expr?$(expr):document,type="mousedown.clickout"+$.data(elem);if(!$.isFunction(fn)){$(attach).unbind(type);return }$(attach).bind(type,function(event){var parent=event.target;while(parent&&parent!=elem){try{parent=parent.parentNode}catch(error){parent=elem}}if(parent!=elem){fn.call(elem,event)}})})}});$.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires="; expires="+date.toUTCString()}var path=options.path?"; path="+(options.path):"";var domain=options.domain?"; domain="+(options.domain):"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("")}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+"=")){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};$.lang.add({"dt:monthdate":"{month}{date}\u65e5","dt:today":"\u4eca\u5929","dt:yesterday":"\u6628\u5929","dt:january":"1\u6708","dt:february":"2\u6708","dt:march":"3\u6708","dt:april":"4\u6708","dt:may":"5\u6708","dt:june":"6\u6708","dt:july":"7\u6708","dt:august":"8\u6708","dt:september":"9\u6708","dt:october":"10\u6708","dt:november":"11\u6708","dt:december":"12\u6708","dt:monday":"\u661f\u671f\u4e00","dt:tuesday":"\u661f\u671f\u4e8c","dt:wednesday":"\u661f\u671f\u4e09","dt:thursday":"\u661f\u671f\u56db","dt:friday":"\u661f\u671f\u4e94","dt:saturday":"\u661f\u671f\u516d","dt:sunday":"\u661f\u671f\u5929"});$.date=function(time){if(typeof time!="undefined"){if(typeof time=="string"){time=parseInt(time)}this.time=time+$.date.timeSkew}else{this.time=(new Date()).getTime()}this.date=(new Date());this.date.setTime(this.time)};$.date.timeSkew=0;$.date.init=function(serverTime){$.date.timeSkew=(new Date()).getTime()-serverTime};$.extend($.date.prototype,{getTime:function(){var hours=this.date.getHours();var ampm="am";if(hours>=12){ampm="pm"}if(hours==0){hours=12}else{if(hours>12){hours-=12}}var minutes=this.date.getMinutes();if(minutes<10){minutes="0"+minutes}var timeStr=hours+":"+minutes+ampm;return timeStr},getDay:function(showRelative){if(showRelative){var today=new Date();today.setHours(0);today.setMinutes(0);today.setSeconds(0);today.setMilliseconds(0);var dayMilliseconds=24*60*60*1000;var diff=today.getTime()-this.date.getTime();if(diff<=0){return $.lang("dt:today")}else{if(diff<dayMilliseconds){return $.lang("dt:yesterday")}}}var month="";switch(this.date.getMonth()){case 0:month=$.lang("dt:january");break;case 1:month=$.lang("dt:february");break;case 2:month=$.lang("dt:march");break;case 3:month=$.lang("dt:april");break;case 4:month=$.lang("dt:may");break;case 5:month=$.lang("dt:june");break;case 6:month=$.lang("dt:july");break;case 7:month=$.lang("dt:august");break;case 8:month=$.lang("dt:september");break;case 9:month=$.lang("dt:october");break;case 10:month=$.lang("dt:november");break;case 11:month=$.lang("dt:december");break}return $.lang("dt:monthdate",{month:month,date:this.date.getDate()})}});JSON={};(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c}return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(typeof value.length==="number"&&!value.propertyIsEnumerable("length")){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}return null}}})();$.toString=function(a1,a2,a3){return JSON.stringify(a1,a2,a3)};$.toJSON=function(a1,a2,a3){return JSON.parse(a1,a2,a3)}})(jQuery);