(function(a){a.fn.bgIframe=a.fn.bgiframe=function(c){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var d=function(e){return e&&e.constructor==Number?e+"px":e},b='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":d(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":d(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":d(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":d(c.height))+';"/>';return this.each(function(){if(a("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(b),this.firstChild)}})}return this}})(jQuery);(function(c){var a={};var e=new Array();var b=function(h,g){var f=this;this.dh=null;this.mh=null;this.dc=null;this.dt=null;this.db=null;this.selector=null;this.ajaxurl=null;this.options=null;this._dragging=false;this._content=h||"";this._options=g||{};this._defaults={boxid:null,boxclass:null,cache:false,type:"dialog",title:"",width:0,height:0,maxheight:0,timeout:0,draggable:true,estopscroll:false,modal:true,focus:null,blur:null,position:"center",overlay:30,showTitle:true,showButton:true,showCancel:true,ButtonAlign:"right",showOk:true,okBtnName:"\u786e\u5b9a",cancelBtnName:"\u53d6\u6d88",contentType:"text",contentChange:false,clickClose:false,zIndex:999,animate:"",showAnimate:"",hideAnimate:"",onclose:null,onopen:null,oncancel:null,onok:null,suggest:{url:"",tele:"",vele:"",fn:null},select:{url:"",type:"radio",tele:"",vele:"",width:120,search:false,fn:null}};this.initOptions=function(){f._options=f._options||{};f._options.animate=f._options.animate||"";f._options.showAnimate=f._options.showAnimate||f._options.animate;f._options.hideAnimate=f._options.hideAnimate||f._options.animate;f._options.type=f._options.type||"dialog";f._options.title=f._options.title||"";f._options.boxclass=f._options.boxclass||"wee"+f._options.type;f._options.contentType=f._options.contentType||"";if(f._options.contentType==""){f._options.contentType=(f._content.substr(0,1)=="#")?"selector":"text"}f.options=c.extend({},f._defaults,f._options);f._options=null;f._defaults=null};this.initBox=function(){var j="";switch(f.options.type){case"alert":case"select":case"dialog":j='<div class="weedialog">	<div class="dialog-header">		<div class="dialog-tl"></div>		<div class="dialog-tc">			<div class="dialog-tc1"></div>			<div class="dialog-tc2"><span class="dialog-title"></span></div>		</div>		<div class="dialog-tr"></div>	</div>	<table width="100%" border="0" cellspacing="0" cellpadding="0" >		<tr>			<td class="dialog-cl"></td>			<td>				<div class="dialog-content"></div>				<div class="dialog-button" id="dialog-bnt">					<a href="#" title="\u786e\u5b9a" class="dialog-ok">\u786e\u5b9a</a>					<a href="#" title="\u53d6\u6d88" class="dialog-cancel">\u53d6\u6d88</a>				</div>               <div class="dialog-msg" style="display:none;"></div>			</td>			<td class="dialog-cr"></td>		</tr>	</table>	<div class="dialog-bot">		<div class="dialog-bl"></div>		<div class="dialog-bc"></div>		<div class="dialog-br"></div>	</div></div>';break;case"custom":case"suggest":j='<div><div class="dialog-content"></div></div>';break}f.dh=c(j).appendTo("body").hide().css({position:"absolute",overflow:"hidden",zIndex:f.options.zIndex});f.dc=f.find(".dialog-content");f.dt=f.find(".dialog-title");f.db=f.find(".dialog-button");if(f.options.boxid){f.dh.attr("id",f.options.boxid)}if(f.options.boxclass){f.dh.addClass(f.options.boxclass)}if(f.options.height>0){f.dc.css("height",f.options.height)}if(f.options.width>0){f.dh.css("width",f.options.width)}f.dh.bgiframe();f.find(".dialog-tl,.dialog-tr,.dialog-tc1,.dialog-cl,.dialog-cr,.dialog-bl,.dialog-bc,.dialog-br").css({filter:"alpha(opacity=50)",opacity:50/100,MozOpacity:50/100,background:"#323233"})};this.initMask=function(){if(f.options.modal){f.mh=c("<div class='dialog-mask'></div>").appendTo("body").hide().css({width:f.bwidth(),height:f.bheight(),zIndex:f.options.zIndex-1,filter:"alpha(opacity=50)",opacity:50/100,MozOpacity:50/100,background:"#000000"}).bgiframe()}};this.initContent=function(k){f.dh.find(".dialog-ok").text(f.options.okBtnName);f.dh.find(".dialog-cancel").text(f.options.cancelBtnName);f.dt.html(f.options.title);if(!f.options.showTitle){f.dh.find(".dialog-header").hide()}if(!f.options.showButton){f.dh.find(".dialog-button").hide()}if(!f.options.showCancel){f.dh.find(".dialog-cancel").hide()}if(!f.options.showOk){f.dh.find(".dialog-ok").hide()}if(f.options.ButtonAlign!="right"){f.dh.find("#dialog-bnt").removeClass("dialog-button");f.dh.find("#dialog-bnt").addClass("dialog-button-center")}if(f.options.contentType=="selector"){f.selector=f._content;f._content=c(f.selector).html();f.setContent(f._content);var j=c(f.selector).find(":checkbox");f.dc.find(":checkbox").each(function(l){this.checked=j[l].checked});c(f.selector).empty();f.show();f.focus();f.onopen()}else{if(f.options.contentType=="ajax"){f.ajaxurl=f._content;f.setLoading();f.show();f.dh.find(".dialog-button").hide();if(f.options.cache==false){if(f.ajaxurl.indexOf("?")==-1){f.ajaxurl+="?_t="+Math.random()}else{f.ajaxurl+="&_t="+Math.random()}}c.get(f.ajaxurl,function(l){f._content=l;f.setContent(f._content);f.show();f.focus();f.onopen();if(f.options.maxheight!=0){if(f.dc.height()>f.options.maxheight){f.dc.css("height",f.options.maxheight)}}})}else{f.setContent(f._content);f.show();f.focus();f.onopen()}}};this.initEvent=function(){f.dh.find(".dialog-close, .dialog-cancel, .dialog-ok").unbind("click").click(function(){f.close();return false});if(typeof(f.options.onok)=="function"){f.dh.find(".dialog-ok").unbind("click").click(function(){f.options.onok(f);return false})}if(typeof(f.options.oncancel)=="function"){f.dh.find(".dialog-cancel").unbind("click").click(function(){f.options.oncancel(f);return false})}if(f.options.timeout>0){window.setTimeout(f.close,(f.options.timeout*1000))}this.drag()};this.setOnok=function(j){f.dh.find(".dialog-ok").unbind("click");if(typeof(j)=="function"){f.dh.find(".dialog-ok").click(function(){j(f)})}};this.setOncancel=function(j){f.dh.find(".dialog-cancel").unbind("click");if(typeof(j)=="function"){f.dh.find(".dialog-cancel").click(function(){j(f)})}};this.setOnclose=function(j){f.options.onclose=j};this.drag=function(){if(f.options.draggable&&f.options.showTitle){f.dh.find(".dialog-header").mousedown(function(j){var q=this;var m=document;var n=f.dh.position().left;var l=f.dh.position().top;var s=j.clientX;var r=j.clientY;var k=f.dh.width();var t=f.dh.height();var p=f.bwidth();var u=f.bheight();if(q.setCapture){q.setCapture()}c(document).mousemove(function(o){if(window.getSelection){window.getSelection().removeAllRanges()}else{document.selection.empty()}var w=Math.max(n+o.clientX-s,0);var v=Math.max(l+o.clientY-r,0);var w=Math.min(w,p-k);var v=Math.min(v,u-t);f.dh.css({left:w,top:v})}).mouseup(function(){if(q.releaseCapture){q.releaseCapture()}c(document).unbind("mousemove");c(document).unbind("mouseup")})})}else{f.dh.find(".dialog-header").css("cursor","default")}};this.onopen=function(){if(typeof(f.options.onopen)=="function"){f.options.onopen(f)}};this.show=function(){if(f.options.showButton){f.dh.find(".dialog-button").show()}if(f.options.position=="center"){f.setCenterPosition()}else{f.setElementPosition()}if(typeof f.options.showAnimate=="string"){f.dh.show(f.options.animate)}else{f.dh.animate(f.options.showAnimate.animate,f.options.showAnimate.speed)}if(f.mh){f.mh.show()}};this.hide=function(j){if(typeof f.options.hideAnimate=="string"){f.dh.hide(f.options.animate,j)}else{f.dh.animate(f.options.hideAnimate.animate,f.options.hideAnimate.speed,"",j)}};this.focus=function(){if(f.options.focus){f.dh.find(f.options.focus).focus()}};this.find=function(j){return f.dh.find(j)};this.setLoading=function(){f.setContent('<div class="dialog-loading"></div>');f.dh.find(".dialog-button").hide();if(f.dc.height()<90){f.dc.height(Math.max(90,f.options.height))}if(f.dh.width()<200){f.dh.width(Math.max(200,f.options.width))}};this.setWidth=function(j){f.dh.width(j)};this.setHeight=function(j){f.dc.height(j)};this.setTitle=function(j){f.dt.html(j)};this.getTitle=function(){return f.dt.html()};this.setContent=function(j){f.dc.html(j);if(f.options.height>0){f.dc.css("height",f.options.height)}else{if(c.browser.msie&&c.browser.version=="6.0"){f.dc.css("height","100%")}else{f.dc.css("height","")}}if(f.options.width>0){if(c.browser.msie&&c.browser.version=="6.0"){if(f.options.ie6Width!=null){f.dh.css("width",parseInt(f.options.width)+parseInt(f.options.ie6Width))}else{f.dh.css("width",parseInt(f.options.width))}}else{f.dh.css("width",f.options.width)}}else{f.dh.css("width","")}if(f.options.showButton){f.dh.find(".dialog-button").show()}};this.getContent=function(){return f.dc.html()};this.disabledButton=function(k,j){f.dh.find(".dialog-"+k).attr("disabled",j)};this.hideButton=function(j){f.dh.find(".dialog-"+j).hide()};this.showButton=function(j){f.dh.find(".dialog-"+j).show()};this.setButtonTitle=function(k,j){f.dh.find(".dialog-"+k).val(j)};this.next=function(j){j=j||{};j.title=j.title||f.getTitle();j.content=j.content||"";j.okname=j.okname||"\u786e\u5b9a";j.width=j.width||260;j.onok=j.onok||f.close;j.onclose=j.onclose||null;j.oncancel=j.oncancel||null;j.hideCancel=j.hideCancel||true;f.setTitle(j.title);f.setButtonTitle("ok",okname);f.setWidth(width);f.setOnok(j.onok);if(j.content!=""){f.setContent(j.content)}if(j.hideCancel){f.hideButton("cancel")}if(typeof(j.onclose)=="function"){f.setOnclose(j.onclose)}if(typeof(j.oncancel)=="function"){f.setOncancel(j.oncancel)}f.show()};this.close=function(j){if(typeof(f.options.onclose)=="function"){f.options.onclose(f)}if(f.options.contentType=="selector"){c(f.selector).html(f._content)}if(f.options.blur){c(f.options.blur).focus()}f.hide();f.dh.remove();if(f.mh){f.mh.remove()}};this.bheight=function(){if(c.browser.msie&&c.browser.version<7){var k=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var j=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(k<j){return c(window).height()}else{return k}}else{return c(document).height()}};this.bwidth=function(){if(c.browser.msie&&c.browser.version<9){var j=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var k=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(j<k){return c(window).width()}else{return j}}else{return c(document).width()}};this.setCenterPosition=function(){var k=c(window),l=c(document),m=l.scrollTop(),j=l.scrollLeft();m+=(k.height()-f.dh.height())/2;j+=(k.width()-f.dh.width())/2;f.dh.css({top:m,left:j})};this.setElementPosition=function(){var m=c(f.options.position.refele);var p=f.options.position.reftop||0;var l=f.options.position.refleft||0;var s=(typeof f.options.position.adjust=="undefined")?true:f.options.position.adjust;var r=m.offset().top+m.height();var n=m.offset().left;var q=document.documentElement.clientWidth||document.body.clientWidth;var u=document.documentElement.clientHeight||document.body.clientHeight;var t=document.documentElement.scrollTop||document.body.scrollTop;var k=document.documentElement.scrollLeft||document.body.scrollLeft;var j=t+u;var o=k+q;if(s&&n+f.dh.width()>o){n=o-f.dh.width()-1}if(s&&r+f.dh.height()>j){r=j-f.dh.height()-1}n=Math.max(n+l,0);r=Math.max(r+p,0);f.dh.css({top:r,left:n})};this.initOptions();this.initMask();this.initBox();this.initContent();this.initEvent()};var d=function(){var f=this;this._onbox=false;this._opening=false;this.zIndex=999;this.length=function(){return e.length};this.open=function(k,g){f._opening=true;if(typeof(g)=="undefined"){g={}}if(g.boxid){for(var h=0;h<e.length;h++){if(e[h].dh.attr("id")==g.boxid){e[h].close();break}}}g.zIndex=f.zIndex;f.zIndex+=10;var j=new b(k,g);j.dh.click(function(){f._onbox=true});e.push(j);return j};this.setHeight=function(j,g){for(var h=0;h<e.length;h++){if(e[h].dh.attr("id")==j){e[h].setHeight(g)}}};this.resetCenter=function(h){for(var g=0;g<e.length;g++){if(e[g].dh.attr("id")==h){e[g].setCenterPosition()}}};this.closeDialog=function(h){for(var g=0;g<e.length;g++){if(e[g].dh.attr("id")==h){e[g].close()}}};this.getTopBox=function(){if(e.length>0){return e[e.length-1]}else{return false}};c(window).scroll(function(){if(e.length>0){for(i=0;i<e.length;i++){var g=e[i];if(g.options.position=="center"){if(!g.options.estopscroll){g.setCenterPosition()}}if(g.options.position!="center"){g.setElementPosition()}if(g.mh){g.mh.css({width:g.bwidth(),height:g.bheight()})}}}}).resize(function(){if(e.length>0){var g=f.getTopBox();if(g.options.position=="center"){g.setCenterPosition()}if(g.mh){g.mh.css({width:g.bwidth(),height:g.bheight()})}}});c(document).click(function(h){if(h.button==2){return true}if(e.length>0){var g=f.getTopBox();if(!f._opening&&!f._onbox&&g.options.clickClose){g.close()}}f._opening=false;f._onbox=false})};c.extend({weeboxs:new d()})})(jQuery);jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m=$.extend({},m);m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};jQuery.offset=function(d){var b=d.offsetTop;var c=d.clientHeight;var a=d.offsetLeft;while(d=d.offsetParent){b+=d.offsetTop;a+=d.offsetLeft}return{top:b+c,left:a}};(function(b){var c=[];b.fn.jdNewsScroll=function(d){d=b.extend({},arguments.callee.defaults,d);b(this).css({position:"relative",overflow:"hidden",width:d.divWidth,height:d.divHeight});b(this).find("ul").css({position:"relative","list-style-type":"none","font-size":d.fontSize,margin:"0px"});b(this).find("li").css({"line-height":"130%",margin:"0px",padding:"2px 10px 1px 10px"});b(this).each(function(){this.$settings=d;this.$pause=false;this.$counter=d.beginTime;b(this).hover(function(){b(this).jdNewsScrollPause(true)},function(){b(this).jdNewsScrollPause(false)});c.push(this)});return this};b.fn.jdNewsScroll.defaults={beginTime:10,fontSize:"9pt",divWidth:"100%",divHeight:"200px",lineHeight:"130%",delay:20,step:2};b.fn.jdNewsScrollPause=function(d){return this.each(function(){this.$pause=d})};b.fn.outerHeight=function(d){if(!this[0]){0}d=b.extend({margin:false},d||{});return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight+(d.margin?(num(this,"marginTop")+num(this,"marginBottom")):0):this.height()+num(this,"borderTopWidth")+num(this,"borderBottomWidth")+num(this,"paddingTop")+num(this,"paddingBottom")+(d.margin?(num(this,"marginTop")+num(this,"marginBottom")):0)};setInterval(a,80);function a(){for(var e=0;e<c.length;e++){var f=c[e];if(f&&!f.$pause){if(f.$counter==0){var d=b("> ul",f)[0];if(!f.$steps){f.$steps=b("> li:first-child",d).outerHeight();f.$step=0}if((f.$steps+f.$step)<=0){f.$counter=f.$settings.delay;f.$steps=false;b(d).css("top","0").find("> li:last-child").after(b("> li:first-child",d));b("> *",d).not("li").remove()}else{f.$step-=f.$settings.step;if(-f.$step>f.$steps){f.$step=-f.$steps}d.style.top=f.$step+"px"}}else{f.$counter--}}}}})(jQuery);(function(b){b.fn.ajaxSubmit=function(t){if(!this.length){a("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof t=="function"){t={success:t}}var e=b.trim(this.attr("action"));if(e){e=(e.match(/^([^#]+)/)||[])[1]}e=e||window.location.href||"";t=b.extend({url:e,type:this.attr("method")||"GET"},t||{});var v={};this.trigger("form-pre-serialize",[this,t,v]);if(v.veto){a("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(t.beforeSerialize&&t.beforeSerialize(this,t)===false){a("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var o=this.formToArray(t.semantic);if(t.data){t.extraData=t.data;for(var f in t.data){if(t.data[f] instanceof Array){for(var g in t.data[f]){o.push({name:f,value:t.data[f][g]})}}else{o.push({name:f,value:t.data[f]})}}}if(t.beforeSubmit&&t.beforeSubmit(o,this,t)===false){a("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[o,this,t,v]);if(v.veto){a("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var d=b.param(o);if(t.type.toUpperCase()=="GET"){t.url+=(t.url.indexOf("?")>=0?"&":"?")+d;t.data=null}else{t.data=d}var u=this,m=[];if(t.resetForm){m.push(function(){u.resetForm()})}if(t.clearForm){m.push(function(){u.clearForm()})}if(!t.dataType&&t.target){var r=t.success||function(){};m.push(function(j){b(t.target).html(j).each(r,arguments)})}else{if(t.success){m.push(t.success)}}t.success=function(q,k){for(var n=0,j=m.length;n<j;n++){m[n].apply(t,[q,k,u])}};var c=b("input:file",this).fieldValue();var s=false;for(var l=0;l<c.length;l++){if(c[l]){s=true}}var h=false;if(t.iframe||s||h){if(t.closeKeepAlive){b.get(t.closeKeepAlive,p)}else{p()}}else{b.ajax(t)}this.trigger("form-submit-notify",[this,t]);return this;function p(){var x=u[0];if(b(":input[name=submit]",x).length){alert('Error: Form elements must not be named "submit".');return}var q=b.extend({},b.ajaxSettings,t);var H=b.extend(true,{},b.extend(true,{},b.ajaxSettings),q);var w="jqFormIO"+(new Date().getTime());var D=b('<iframe id="'+w+'" name="'+w+'" src="about:blank" />');var F=D[0];D.css({position:"absolute",top:"-1000px",left:"-1000px"});var G={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;D.attr("src","about:blank")}};var E=q.global;if(E&&!b.active++){b.event.trigger("ajaxStart")}if(E){b.event.trigger("ajaxSend",[G,q])}if(H.beforeSend&&H.beforeSend(G,H)===false){H.global&&b.active--;return}if(G.aborted){return}var k=0;var z=0;var j=x.clk;if(j){var y=j.name;if(y&&!j.disabled){t.extraData=t.extraData||{};t.extraData[y]=j.value;if(j.type=="image"){t.extraData[name+".x"]=x.clk_x;t.extraData[name+".y"]=x.clk_y}}}setTimeout(function(){var K=u.attr("target"),I=u.attr("action");x.setAttribute("target",w);if(x.getAttribute("method")!="POST"){x.setAttribute("method","POST")}if(x.getAttribute("action")!=q.url){x.setAttribute("action",q.url)}if(!t.skipEncodingOverride){u.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(q.timeout){setTimeout(function(){z=true;A()},q.timeout)}var J=[];try{if(t.extraData){for(var L in t.extraData){J.push(b('<input type="hidden" name="'+L+'" value="'+t.extraData[L]+'" />').appendTo(x)[0])}}D.appendTo("body");F.attachEvent?F.attachEvent("onload",A):F.addEventListener("load",A,false);x.submit()}finally{x.setAttribute("action",I);K?x.setAttribute("target",K):u.removeAttr("target");b(J).remove()}},10);var B=0;function A(){if(k++){return}F.detachEvent?F.detachEvent("onload",A):F.removeEventListener("load",A,false);var I=true;try{if(z){throw"timeout"}var J,L;L=F.contentWindow?F.contentWindow.document:F.contentDocument?F.contentDocument:F.document;if((L.body==null||L.body.innerHTML=="")&&!B){B=1;k--;setTimeout(A,100);return}G.responseText=L.body?L.body.innerHTML:null;G.responseXML=L.XMLDocument?L.XMLDocument:L;G.getResponseHeader=function(N){var M={"content-type":q.dataType};return M[N]};if(q.dataType=="json"||q.dataType=="script"){var n=L.getElementsByTagName("textarea")[0];G.responseText=n?n.value:G.responseText}else{if(q.dataType=="xml"&&!G.responseXML&&G.responseText!=null){G.responseXML=C(G.responseText)}}J=b.httpData(G,q.dataType)}catch(K){I=false;b.handleError(q,G,"error",K)}if(I){q.success(J,"success");if(E){b.event.trigger("ajaxSuccess",[G,q])}}if(E){b.event.trigger("ajaxComplete",[G,q])}if(E&&!--b.active){b.event.trigger("ajaxStop")}if(q.complete){q.complete(G,I?"success":"error")}setTimeout(function(){D.remove();G.responseXML=null},100)}function C(n,I){if(window.ActiveXObject){I=new ActiveXObject("Microsoft.XMLDOM");I.async="false";I.loadXML(n)}else{I=(new DOMParser()).parseFromString(n,"text/xml")}return(I&&I.documentElement&&I.documentElement.tagName!="parsererror")?I: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(f){var d=this.form;d.clk=this;if(this.type=="image"){if(f.offsetX!=undefined){d.clk_x=f.offsetX;d.clk_y=f.offsetY}else{if(typeof b.fn.offset=="function"){var g=b(this).offset();d.clk_x=f.pageX-g.left;d.clk_y=f.pageY-g.top}else{d.clk_x=f.pageX-this.offsetLeft;d.clk_y=f.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(q){var p=[];if(this.length==0){return p}var d=this[0];var h=q?d.getElementsByTagName("*"):d.elements;if(!h){return p}for(var k=0,m=h.length;k<m;k++){var e=h[k];var f=e.name;if(!f){continue}if(q&&d.clk&&e.type=="image"){if(!e.disabled&&d.clk==e){p.push({name:f,value:b(e).val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}continue}var r=b.fieldValue(e,true);if(r&&r.constructor==Array){for(var g=0,c=r.length;g<c;g++){p.push({name:f,value:r[g]})}}else{if(r!==null&&typeof r!="undefined"){p.push({name:f,value:r})}}}if(!q&&d.clk){var l=b(d.clk),o=l[0],f=o.name;if(f&&!o.disabled&&o.type=="image"){p.push({name:f,value:l.val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}}return p};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,j){var e=c.name,p=c.type,q=c.tagName.toLowerCase();if(typeof j=="undefined"){j=true}if(j&&(!e||c.disabled||p=="reset"||p=="button"||(p=="checkbox"||p=="radio")&&!c.checked||(p=="submit"||p=="image")&&c.form&&c.form.clk!=c||q=="select"&&c.selectedIndex==-1)){return null}if(q=="select"){var k=c.selectedIndex;if(k<0){return null}var m=[],d=c.options;var g=(p=="select-one");var l=(g?k+1:d.length);for(var f=(g?k:0);f<l;f++){var h=d[f];if(h.selected){var o=h.value;if(!o){o=(h.attributes&&h.attributes.value&&!(h.attributes.value.specified))?h.text:h.value}if(g){return o}m.push(o)}}return m}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.selected=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").selected(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 convertTxtToHtml(b){var a={"&":"&amp;","<":"&lt;",">":"&gt;","\n":"<br>"," ":"&nbsp;",'"':"&quot;"};for(i in a){b=b.replace(new RegExp(i,"ig"),a[i])}return b}function convertHtmlToTxt(b){var a={"&lt;":"<","&gt;":">","<br>":"\n","&nbsp;":" ","&amp;":"&","&quot;":'"'};for(i in a){b=b.replace(new RegExp(i,"ig"),a[i])}return b}function filtrateHtml(a){return $.trim(a.replace(/<.*?>/g,""))}function debug(a){if($("#debug").length==0){$("body").append('<textarea name="debug" cols="100" rows="50">'+a+"</textarea>")}else{$("#debug").val(a)}}function base64encode(h){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var d,f,a;var g,e,c;a=h.length;f=0;d="";while(f<a){g=h.charCodeAt(f++)&255;if(f==a){d+=b.charAt(g>>2);d+=b.charAt((g&3)<<4);d+="==";break}e=h.charCodeAt(f++);if(f==a){d+=b.charAt(g>>2);d+=b.charAt(((g&3)<<4)|((e&240)>>4));d+=b.charAt((e&15)<<2);d+="=";break}c=h.charCodeAt(f++);d+=b.charAt(g>>2);d+=b.charAt(((g&3)<<4)|((e&240)>>4));d+=b.charAt(((e&15)<<2)|((c&192)>>6));d+=b.charAt(c&63)}return d}function base64decode(j){var g=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);var e,d,b,a;var f,h,c;h=j.length;f=0;c="";while(f<h){do{e=g[j.charCodeAt(f++)&255]}while(f<h&&e==-1);if(e==-1){break}do{d=g[j.charCodeAt(f++)&255]}while(f<h&&d==-1);if(d==-1){break}c+=String.fromCharCode((e<<2)|((d&48)>>4));do{b=j.charCodeAt(f++)&255;if(b==61){return c}b=g[b]}while(f<h&&b==-1);if(b==-1){break}c+=String.fromCharCode(((d&15)<<4)|((b&60)>>2));do{a=j.charCodeAt(f++)&255;if(a==61){return c}a=g[a]}while(f<h&&a==-1);if(a==-1){break}c+=String.fromCharCode(((b&3)<<6)|a)}return c}function urlencode(b){var a="AA"+b+"ZZ";enurl=base64encode(a);return enurl}function urldecode(a){var a=a.replace(/ +$|\/$/g,"");a=base64decode(a).replace(/^AA|ZZ$/gi,"");return a}$.fn.highlight=function(a){doHighlight=function(g,b){highlightStartTag='<span class="highlight">';highlightEndTag="</span>";var e="";var d=-1;var c=b.toLowerCase();var f=g.toLowerCase();while(g.length>0){d=f.indexOf(c,d+1);if(d<0){e+=g;g=""}else{if(g.lastIndexOf(">",d)>=g.lastIndexOf("<",d)){if(f.lastIndexOf("/script>",d)>=f.lastIndexOf("<script",d)){e+=g.substring(0,d)+highlightStartTag+g.substr(d,b.length)+highlightEndTag;g=g.substr(d+b.length);f=g.toLowerCase();d=-1}}}}return e};$(this).each(function(){$(this).html(doHighlight($(this).html(),a))});return this};
