;
﻿;jQuery.fn.extend({everyTime:function(interval,label,fn,times,belay){return this.each(function(){jQuery.timer.add(this,interval,label,fn,times,belay);});},oneTime:function(interval,label,fn){return this.each(function(){jQuery.timer.add(this,interval,label,fn,1);});},stopTime:function(label,fn){return this.each(function(){jQuery.timer.remove(this,label,fn);});}});jQuery.extend({timer:{global:[],guid:1,dataKey:"jQuery.timer",regex:/^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,powers:{"ms":1,"cs":10,"ds":100,"s":1000,"das":10000,"hs":100000,"ks":1000000},timeParse:function(value){if(value==undefined||value==null){return null;}var result=this.regex.exec(jQuery.trim(value.toString()));if(result[2]){var num=parseFloat(result[1]);var mult=this.powers[result[2]]||1;return num*mult;}else{return value;}},add:function(element,interval,label,fn,times,belay){var counter=0;if(jQuery.isFunction(label)){if(!times){times=fn;}fn=label;label=interval;}interval=jQuery.timer.timeParse(interval);if(typeof interval!="number"||isNaN(interval)||interval<=0){return;}if(times&&times.constructor!=Number){belay=!!times;times=0;}times=times||0;belay=belay||false;var timers=jQuery.data(element,this.dataKey)||jQuery.data(element,this.dataKey,{});if(!timers[label]){timers[label]={};}fn.timerID=fn.timerID||this.guid++;var handler=function(){if(belay&&this.inProgress){return;}this.inProgress=true;if((++counter>times&&times!==0)||fn.call(element,counter)===false){jQuery.timer.remove(element,label,fn);}this.inProgress=false;};handler.timerID=fn.timerID;if(!timers[label][fn.timerID]){timers[label][fn.timerID]=window.setInterval(handler,interval);}this.global.push(element);},remove:function(element,label,fn){var timers=jQuery.data(element,this.dataKey),ret;if(timers){if(!label){for(label in timers){this.remove(element,label,fn);}}else{if(timers[label]){if(fn){if(fn.timerID){window.clearInterval(timers[label][fn.timerID]);delete timers[label][fn.timerID];}}else{for(var fn in timers[label]){window.clearInterval(timers[label][fn]);delete timers[label][fn];}}for(ret in timers[label]){break;}if(!ret){ret=null;delete timers[label];}}}for(ret in timers){break;}if(!ret){jQuery.removeData(element,this.dataKey);}}}}});jQuery(window).bind("unload",function(){jQuery.each(jQuery.timer.global,function(index,item){jQuery.timer.remove(item);});});
;
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options=$.extend({},options);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;}};
;
(function($){$.fn.addOption=function(){var add=function(el,v,t,sO){var option=document.createElement("option");option.value=v,option.text=t;var o=el.options;var oL=o.length;if(!el.cache){el.cache={};for(var i=0;i<oL;i++){el.cache[o[i].value]=i;}}if(typeof el.cache[v]=="undefined"){el.cache[v]=oL;}el.options[el.cache[v]]=option;if(sO){option.selected=true;}};var a=arguments;if(a.length==0){return this;}var sO=true;var m=false;var items,v,t;if(typeof(a[0])=="object"){m=true;items=a[0];}if(a.length>=2){if(typeof(a[1])=="boolean"){sO=a[1];}else{if(typeof(a[2])=="boolean"){sO=a[2];}}if(!m){v=a[0];t=a[1];}}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return;}if(m){for(var item in items){add(this,item,items[item],sO);}}else{add(this,v,t,sO);}});return this;};$.fn.ajaxAddOption=function(url,params,select,fn,args){if(typeof(url)!="string"){return this;}if(typeof(params)!="object"){params={};}if(typeof(select)!="boolean"){select=true;}this.each(function(){var el=this;$.getJSON(url,params,function(r){$(el).addOption(r,select);if(typeof fn=="function"){if(typeof args=="object"){fn.apply(el,args);}else{fn.call(el);}}});});return this;};$.fn.ajaxSetOptions=function(url,params,select,fn,args){if(typeof(url)!="string"){return this;}if(typeof(params)!="object"){params={};}if(typeof(select)!="boolean"){select=true;}this.each(function(){var el=this;$.getJSON(url,params,function(r){$(el).removeOption(/./);$(el).addOption(r,select);if(typeof fn=="function"){if(typeof args=="object"){fn.apply(el,args);}else{fn.call(el);}}});});return this;};$.fn.removeOption=function(){var a=arguments;if(a.length==0){return this;}var ta=typeof(a[0]);var v,index;if(ta=="string"||ta=="object"||ta=="function"){v=a[0];if(v.constructor==Array){var l=v.length;for(var i=0;i<l;i++){this.removeOption(v[i],a[1]);}return this;}}else{if(ta=="number"){index=a[0];}else{return this;}}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return;}if(this.cache){this.cache=null;}var remove=false;var o=this.options;if(!!v){var oL=o.length;for(var i=oL-1;i>=0;i--){if(v.constructor==RegExp){if(o[i].value.match(v)){remove=true;}}else{if(o[i].value==v){remove=true;}}if(remove&&a[1]===true){remove=o[i].selected;}if(remove){o[i]=null;}remove=false;}}else{if(a[1]===true){remove=o[index].selected;}else{remove=true;}if(remove){this.remove(index);}}});return this;};$.fn.sortOptions=function(ascending){var sel=$(this).selectedValues();var a=typeof(ascending)=="undefined"?true:!!ascending;this.each(function(){if(this.nodeName.toLowerCase()!="select"){return;}var o=this.options;var oL=o.length;var sA=[];for(var i=0;i<oL;i++){sA[i]={v:o[i].value,t:o[i].text};}sA.sort(function(o1,o2){o1t=o1.t.toLowerCase(),o2t=o2.t.toLowerCase();if(o1t==o2t){return 0;}if(a){return o1t<o2t?-1:1;}else{return o1t>o2t?-1:1;}});for(var i=0;i<oL;i++){o[i].text=sA[i].t;o[i].value=sA[i].v;}}).selectOptions(sel,true);return this;};$.fn.selectOptions=function(value,clear){var v=value;var vT=typeof(value);if(vT=="object"&&v.constructor==Array){var $this=this;$.each(v,function(){$this.selectOptions(this,clear);});}var c=clear||false;if(vT!="string"&&vT!="function"&&vT!="object"){return this;}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this;}var o=this.options;var oL=o.length;for(var i=0;i<oL;i++){if(v.constructor==RegExp){if(o[i].value.match(v)){o[i].selected=true;}else{if(c){o[i].selected=false;}}}else{if(o[i].value==v){o[i].selected=true;}else{if(c){o[i].selected=false;}}}}});return this;};$.fn.copyOptions=function(to,which){var w=which||"selected";if($(to).size()==0){return this;}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this;}var o=this.options;var oL=o.length;for(var i=0;i<oL;i++){if(w=="all"||(w=="selected"&&o[i].selected)){$(to).addOption(o[i].value,o[i].text);}}});return this;};$.fn.containsOption=function(value,fn){var found=false;var v=value;var vT=typeof(v);var fT=typeof(fn);if(vT!="string"&&vT!="function"&&vT!="object"){return fT=="function"?this:found;}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this;}if(found&&fT!="function"){return false;}var o=this.options;var oL=o.length;for(var i=0;i<oL;i++){if(v.constructor==RegExp){if(o[i].value.match(v)){found=true;if(fT=="function"){fn.call(o[i],i);}}}else{if(o[i].value==v){found=true;if(fT=="function"){fn.call(o[i],i);}}}}});return fT=="function"?this:found;};$.fn.selectedValues=function(){var v=[];this.selectedOptions().each(function(){v[v.length]=this.value;});return v;};$.fn.selectedTexts=function(){var t=[];this.selectedOptions().each(function(){t[t.length]=this.text;});return t;};$.fn.selectedOptions=function(){return this.find("option:selected");};})(jQuery);
;
(function($){$.fn.marquee=function(klass){var newMarquee=[],last=this.length;function getReset(newDir,marqueeRedux,marqueeState){var behavior=marqueeState.behavior,width=marqueeState.width,dir=marqueeState.dir;var r=0;if(behavior=="alternate"){r=newDir==1?marqueeRedux[marqueeState.widthAxis]-(width*2):width;}else{if(behavior=="slide"){if(newDir==-1){r=dir==-1?marqueeRedux[marqueeState.widthAxis]:width;}else{r=dir==-1?marqueeRedux[marqueeState.widthAxis]-(width*2):0;}}else{r=newDir==-1?marqueeRedux[marqueeState.widthAxis]:0;}}return r;}function animateMarquee(){var i=newMarquee.length,marqueeRedux=null,$marqueeRedux=null,marqueeState={},newMarqueeList=[],hitedge=false;while(i--){marqueeRedux=newMarquee[i];$marqueeRedux=$(marqueeRedux);marqueeState=$marqueeRedux.data("marqueeState");if($marqueeRedux.data("paused")!==true){marqueeRedux[marqueeState.axis]+=(marqueeState.scrollamount*marqueeState.dir);hitedge=marqueeState.dir==-1?marqueeRedux[marqueeState.axis]<=getReset(marqueeState.dir*-1,marqueeRedux,marqueeState):marqueeRedux[marqueeState.axis]>=getReset(marqueeState.dir*-1,marqueeRedux,marqueeState);if((marqueeState.behavior=="scroll"&&marqueeState.last==marqueeRedux[marqueeState.axis])||(marqueeState.behavior=="alternate"&&hitedge&&marqueeState.last!=-1)||(marqueeState.behavior=="slide"&&hitedge&&marqueeState.last!=-1)){if(marqueeState.behavior=="alternate"){marqueeState.dir*=-1;}marqueeState.last=-1;$marqueeRedux.trigger("stop");marqueeState.loops--;if(marqueeState.loops===0){if(marqueeState.behavior!="slide"){marqueeRedux[marqueeState.axis]=getReset(marqueeState.dir,marqueeRedux,marqueeState);}else{marqueeRedux[marqueeState.axis]=getReset(marqueeState.dir*-1,marqueeRedux,marqueeState);}$marqueeRedux.trigger("end");}else{newMarqueeList.push(marqueeRedux);$marqueeRedux.trigger("start");marqueeRedux[marqueeState.axis]=getReset(marqueeState.dir,marqueeRedux,marqueeState);}}else{newMarqueeList.push(marqueeRedux);}marqueeState.last=marqueeRedux[marqueeState.axis];$marqueeRedux.data("marqueeState",marqueeState);}else{newMarqueeList.push(marqueeRedux);}}newMarquee=newMarqueeList;if(newMarquee.length){setTimeout(animateMarquee,25);}}this.each(function(i){var $marquee=$(this),width=$marquee.attr("width")||$marquee.width(),height=$marquee.attr("height")||$marquee.height(),$marqueeRedux=$marquee.after("<div "+(klass?'class="'+klass+'" ':"")+'style="display: block-inline; width: '+width+"px; height: "+height+'px; overflow: hidden;"><div style="float: left; white-space: nowrap;">'+$marquee.html()+"</div></div>").next(),marqueeRedux=$marqueeRedux.get(0),hitedge=0,direction=($marquee.attr("direction")||"left").toLowerCase(),marqueeState={dir:/down|right/.test(direction)?-1:1,axis:/left|right/.test(direction)?"scrollLeft":"scrollTop",widthAxis:/left|right/.test(direction)?"scrollWidth":"scrollHeight",last:-1,loops:$marquee.attr("loop")||-1,scrollamount:$marquee.attr("scrollamount")||this.scrollAmount||2,behavior:($marquee.attr("behavior")||"scroll").toLowerCase(),width:/left|right/.test(direction)?width:height};if($marquee.attr("loop")==-1&&marqueeState.behavior=="slide"){marqueeState.loops=1;}$marquee.remove();if(/left|right/.test(direction)){$marqueeRedux.find("> div").css("padding","0 "+width+"px");}else{$marqueeRedux.find("> div").css("padding",height+"px 0");}$marqueeRedux.bind("stop",function(){$marqueeRedux.data("paused",true);}).bind("pause",function(){$marqueeRedux.data("paused",true);}).bind("start",function(){$marqueeRedux.data("paused",false);}).bind("unpause",function(){$marqueeRedux.data("paused",false);}).data("marqueeState",marqueeState);newMarquee.push(marqueeRedux);marqueeRedux[marqueeState.axis]=getReset(marqueeState.dir,marqueeRedux,marqueeState);$marqueeRedux.trigger("start");if(i+1==last){animateMarquee();}});return $(newMarquee);};}(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:""});}E(this).triggerHandler("accordionchange",[E.event.fix({type:"accordionchange",target:G.element[0]}),H.data],H.change);}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);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:K,oldHeader:J.active,newContent: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!=undefined?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});}}});E.fn.activate=function(G){return this.accordion("activate",G);};})(jQuery);
;
(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log("ajaxSubmit: skipping submit process - no element selected");return this;}if(typeof options=="function"){options={success:options};}var url=$.trim(this.attr("action"));if(url){url=(url.match(/^([^#]+)/)||[])[1];}url=url||window.location.href||"";options=$.extend({url:url,type:this.attr("method")||"GET"},options||{});var veto={};this.trigger("form-pre-serialize",[this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this;}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log("ajaxSubmit: submit aborted via beforeSerialize callback");return this;}var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data){if(options.data[n] instanceof Array){for(var k in options.data[n]){a.push({name:n,value:options.data[n][k]});}}else{a.push({name:n,value:options.data[n]});}}}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log("ajaxSubmit: submit aborted via beforeSubmit callback");return this;}this.trigger("form-submit-validate",[a,this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this;}var q=$.param(a);if(options.type.toUpperCase()=="GET"){options.url+=(options.url.indexOf("?")>=0?"&":"?")+q;options.data=null;}else{options.data=q;}var $form=this,callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});}if(options.clearForm){callbacks.push(function(){$form.clearForm();});}if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments);});}else{if(options.success){callbacks.push(options.success);}}options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(options,[data,status,$form]);}};var files=$("input:file",this).fieldValue();var found=false;for(var j=0;j<files.length;j++){if(files[j]){found=true;}}var multipart=false;if(options.iframe||found||multipart){if(options.closeKeepAlive){$.get(options.closeKeepAlive,fileUpload);}else{fileUpload();}}else{$.ajax(options);}this.trigger("form-submit-notify",[this,options]);return this;function fileUpload(){var form=$form[0];if($(":input[name=submit]",form).length){alert('Error: Form elements must not be named "submit".');return;}var opts=$.extend({},$.ajaxSettings,options);var s=$.extend(true,{},$.extend(true,{},$.ajaxSettings),opts);var id="jqFormIO"+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" src="about:blank" />');var io=$io[0];$io.css({position:"absolute",top:"-1000px",left:"-1000px"});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;$io.attr("src","about:blank");}};var g=opts.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,opts]);}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&$.active--;return;}if(xhr.aborted){return;}var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+".x"]=form.clk_x;options.extraData[name+".y"]=form.clk_y;}}}setTimeout(function(){var t=$form.attr("target"),a=$form.attr("action");form.setAttribute("target",id);if(form.getAttribute("method")!="POST"){form.setAttribute("method","POST");}if(form.getAttribute("action")!=opts.url){form.setAttribute("action",opts.url);}if(!options.skipEncodingOverride){$form.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});}if(opts.timeout){setTimeout(function(){timedOut=true;cb();},opts.timeout);}var extraInputs=[];try{if(options.extraData){for(var n in options.extraData){extraInputs.push($('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />').appendTo(form)[0]);}}$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);form.submit();}finally{form.setAttribute("action",a);t?form.setAttribute("target",t):$form.removeAttr("target");$(extraInputs).remove();}},10);var nullCheckFlag=0;function cb(){if(cbInvoked++){return;}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var ok=true;try{if(timedOut){throw"timeout";}var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if((doc.body==null||doc.body.innerHTML=="")&&!nullCheckFlag){nullCheckFlag=1;cbInvoked--;setTimeout(cb,100);return;}xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={"content-type":opts.dataType};return headers[header];};if(opts.dataType=="json"||opts.dataType=="script"){var ta=doc.getElementsByTagName("textarea")[0];xhr.responseText=ta?ta.value:xhr.responseText;}else{if(opts.dataType=="xml"&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}}data=$.httpData(xhr,opts.dataType);}catch(e){ok=false;$.handleError(opts,xhr,"error",e);}if(ok){opts.success(data,"success");if(g){$.event.trigger("ajaxSuccess",[xhr,opts]);}}if(g){$.event.trigger("ajaxComplete",[xhr,opts]);}if(g&&!--$.active){$.event.trigger("ajaxStop");}if(opts.complete){opts.complete(xhr,ok?"success":"error");}setTimeout(function(){$io.remove();xhr.responseXML=null;},100);}function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return(doc&&doc.documentElement&&doc.documentElement.tagName!="parsererror")?doc:null;}}};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){$(this).ajaxSubmit(options);return false;}).each(function(){$(":submit,input:image",this).bind("click.form-plugin",function(e){var form=this.form;form.clk=this;if(this.type=="image"){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var offset=$(this).offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-this.offsetLeft;form.clk_y=e.pageY-this.offsetTop;}}}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},10);});});};$.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){$(":submit,input:image",this).unbind("click.form-plugin");});};$.fn.formToArray=function(semantic){var a=[];if(this.length==0){return a;}var form=this[0];var els=semantic?form.getElementsByTagName("*"):form.elements;if(!els){return a;}for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n){continue;}if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y});}continue;}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v});}}}if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0],n=input.name;if(n&&!input.disabled&&input.type=="image"){a.push({name:n,value:$input.val()});a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y});}}return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=="undefined"){successful=true;}if(successful&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var index=el.selectedIndex;if(index<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v){v=(op.attributes&&op.attributes["value"]&&!(op.attributes["value"].specified))?op.text:op.value;}if(one){return v;}a.push(v);}}return a;}return el.value;};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=="text"||t=="password"||tag=="textarea"){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b==undefined){b=true;}return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select==undefined){select=true;}return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio"){this.checked=select;}else{if(this.tagName.toLowerCase()=="option"){var $sel=$(this).parent("select");if(select&&$sel[0]&&$sel[0].type=="select-one"){$sel.find("option").selected(false);}this.selected=select;}}});};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""));}}})(jQuery);
;
(function($){$.dimensions={version:"1.2"};$.each(["Height","Width"],function(i,name){$.fn["inner"+name]=function(){if(!this[0]){return;}var torl=name=="Height"?"Top":"Left",borr=name=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+name]:num(this,name.toLowerCase())+num(this,"padding"+torl)+num(this,"padding"+borr);};$.fn["outer"+name]=function(options){if(!this[0]){return;}var torl=name=="Height"?"Top":"Left",borr=name=="Height"?"Bottom":"Right";options=$.extend({margin:false},options||{});var val=this.is(":visible")?this[0]["offset"+name]:num(this,name.toLowerCase())+num(this,"border"+torl+"Width")+num(this,"border"+borr+"Width")+num(this,"padding"+torl)+num(this,"padding"+borr);return val+(options.margin?(num(this,"margin"+torl)+num(this,"margin"+borr)):0);};});$.each(["Left","Top"],function(i,name){$.fn["scroll"+name]=function(val){if(!this[0]){return;}return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=="Left"?val:$(window)["scrollLeft"](),name=="Top"?val:$(window)["scrollTop"]()):this["scroll"+name]=val;}):this[0]==window||this[0]==document?self[(name=="Left"?"pageXOffset":"pageYOffset")]||$.boxModel&&document.documentElement["scroll"+name]||document.body["scroll"+name]:this[0]["scroll"+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,"marginTop");offset.left-=num(elem,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent;}return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;}})(jQuery);
;
(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings.id=$(this).attr("id")+"_tooltip";settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css("backgroundImage");if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({"backgroundImage":"none","filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css("position");if(position!="absolute"&&position!="relative"){$(this).css("position","relative");}});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({"filter":"",backgroundImage:""});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr("href")||this.attr("src");}});function createHelper(settings){if(helper.parent){return;}helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe){helper.parent.bgiframe();}helper.title=$("h3",helper.parent);helper.body=$("div.body",helper.parent);helper.url=$("div.url",helper.parent);helper.parent.addClass("oetooltip");}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay){tID=setTimeout(show,settings(this).delay);}else{show();}track=!!settings(this).track;$(document.body).bind("mousemove",update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler)){return;}current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent);}else{helper.body.html(bodyContent);}helper.body.show();}else{if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0){helper.body.append("<br/>");}helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}}if(settings(this).showURL&&$(this).url()){helper.url.html($(this).url().replace("http://","")).show();}else{helper.url.hide();}helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG){helper.parent.fixPNG();}handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated")){helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);}else{helper.parent.is(":visible")?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked){return;}if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind("mousemove",update);}if(current==null){$(document.body).unbind("mousemove",update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right="auto";if(settings(current).positionLeft){right=$(window).width()-left;left="auto";}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+"px"}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+"px"}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked){return;}if(tID){clearTimeout(tID);}current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(":animated")){helper.parent.stop().fadeTo(tsettings.fade,0,complete);}else{helper.parent.stop().fadeOut(tsettings.fade,complete);}}else{complete();}if(settings(this).fixPNG){helper.parent.unfixPNG();}}})(jQuery);
;
/*
 * jQuery corner plugin: simple corner rounding
 * Examples and documentation at: http://jquery.malsup.com/corner/
 * version 2.06 (16-FEB-2010)
 * Requires jQuery v1.3.2 or later
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Authors: Dave Methvin and Mike Alsup
 */
(function($){var style=document.createElement("div").style;var moz=style["MozBorderRadius"]!==undefined;var webkit=style["WebkitBorderRadius"]!==undefined;var radius=style["BorderRadius"]!==undefined;var mode=document.documentMode||0;var noBottomFold=$.browser.msie&&(($.browser.version<8&&!mode)||mode<8);var expr=$.browser.msie&&(function(){var div=document.createElement("div");try{div.style.setExpression("width","0+0");div.style.removeExpression("width");}catch(e){return false;}return true;})();function sz(el,p){return parseInt($.css(el,p))||0;}function hex2(s){var s=parseInt(s).toString(16);return(s.length<2)?"0"+s:s;}function gpc(node){for(;node&&node.nodeName.toLowerCase()!="html";node=node.parentNode){var v=$.css(node,"backgroundColor");if(v=="rgba(0, 0, 0, 0)"){continue;}if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex2(rgb[0])+hex2(rgb[1])+hex2(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}function getWidth(fx,i,width){switch(fx){case"round":return Math.round(width*(1-Math.cos(Math.asin(i/width))));case"cool":return Math.round(width*(1+Math.cos(Math.asin(i/width))));case"sharp":return Math.round(width*(1-Math.cos(Math.acos(i/width))));case"bite":return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));case"slide":return Math.round(width*(Math.atan2(i,width/i)));case"jut":return Math.round(width*(Math.atan2(width,(width-i-1))));case"curl":return Math.round(width*(Math.atan(i)));case"tear":return Math.round(width*(Math.cos(i)));case"wicked":return Math.round(width*(Math.tan(i)));case"long":return Math.round(width*(Math.sqrt(i)));case"sculpt":return Math.round(width*(Math.log((width-i-1),width)));case"dogfold":case"dog":return(i&1)?(i+1):width;case"dog2":return(i&2)?(i+1):width;case"dog3":return(i&3)?(i+1):width;case"fray":return(i%2)*width;case"notch":return width;case"bevelfold":case"bevel":return i+1;}}$.fn.corner=function(options){if(this.length==0){if(!$.isReady&&this.selector){var s=this.selector,c=this.context;$(function(){$(s,c).corner(options);});}return this;}return this.each(function(index){var $this=$(this);var o=[$this.attr($.fn.corner.defaults.metaAttr)||"",options||""].join(" ").toLowerCase();var keep=/keep/.test(o);var cc=((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);var sc=((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);var width=parseInt((o.match(/(\d+)px/)||[])[1])||10;var re=/round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog/;var fx=((o.match(re)||["round"])[0]);var fold=/dogfold|bevelfold/.test(o);var edges={T:0,B:1};var opts={TL:/top|tl|left/.test(o),TR:/top|tr|right/.test(o),BL:/bottom|bl|left/.test(o),BR:/bottom|br|right/.test(o)};if(!opts.TL&&!opts.TR&&!opts.BL&&!opts.BR){opts={TL:1,TR:1,BL:1,BR:1};}if($.fn.corner.defaults.useNative&&fx=="round"&&(radius||moz||webkit)&&!cc&&!sc){if(opts.TL){$this.css(radius?"border-top-left-radius":moz?"-moz-border-radius-topleft":"-webkit-border-top-left-radius",width+"px");}if(opts.TR){$this.css(radius?"border-top-right-radius":moz?"-moz-border-radius-topright":"-webkit-border-top-right-radius",width+"px");}if(opts.BL){$this.css(radius?"border-bottom-left-radius":moz?"-moz-border-radius-bottomleft":"-webkit-border-bottom-left-radius",width+"px");}if(opts.BR){$this.css(radius?"border-bottom-right-radius":moz?"-moz-border-radius-bottomright":"-webkit-border-bottom-right-radius",width+"px");}return;}var strip=document.createElement("div");$(strip).css({overflow:"hidden",height:"1px",minHeight:"1px",fontSize:"1px",backgroundColor:sc||"transparent",borderStyle:"solid"});var pad={T:parseInt($.css(this,"paddingTop"))||0,R:parseInt($.css(this,"paddingRight"))||0,B:parseInt($.css(this,"paddingBottom"))||0,L:parseInt($.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined){this.style.zoom=1;}if(!keep){this.style.border="none";}strip.style.borderColor=cc||gpc(this.parentNode);var cssHeight=$.curCSS(this,"height");for(var j in edges){var bot=edges[j];if((bot&&(opts.BL||opts.BR))||(!bot&&(opts.TL||opts.TR))){strip.style.borderStyle="none "+(opts[j+"R"]?"solid":"none")+" none "+(opts[j+"L"]?"solid":"none");var d=document.createElement("div");$(d).addClass("jquery-corner");var ds=d.style;bot?this.appendChild(d):this.insertBefore(d,this.firstChild);if(bot&&cssHeight!="auto"){if($.css(this,"position")=="static"){this.style.position="relative";}ds.position="absolute";ds.bottom=ds.left=ds.padding=ds.margin="0";if(expr){ds.setExpression("width","this.parentNode.offsetWidth");}else{ds.width="100%";}}else{if(!bot&&$.browser.msie){if($.css(this,"position")=="static"){this.style.position="relative";}ds.position="absolute";ds.top=ds.left=ds.right=ds.padding=ds.margin="0";if(expr){var bw=sz(this,"borderLeftWidth")+sz(this,"borderRightWidth");ds.setExpression("width","this.parentNode.offsetWidth - "+bw+'+ "px"');}else{ds.width="100%";}}else{ds.position="relative";ds.margin=!bot?"-"+pad.T+"px -"+pad.R+"px "+(pad.T-width)+"px -"+pad.L+"px":(pad.B-width)+"px -"+pad.R+"px -"+pad.B+"px -"+pad.L+"px";}}for(var i=0;i<width;i++){var w=Math.max(0,getWidth(fx,i,width));var e=strip.cloneNode(false);e.style.borderWidth="0 "+(opts[j+"R"]?w:0)+"px 0 "+(opts[j+"L"]?w:0)+"px";bot?d.appendChild(e):d.insertBefore(e,d.firstChild);}if(fold&&$.support.boxModel){if(bot&&noBottomFold){continue;}for(var c in opts){if(!opts[c]){continue;}if(bot&&(c=="TL"||c=="TR")){continue;}if(!bot&&(c=="BL"||c=="BR")){continue;}var common={position:"absolute",border:"none",margin:0,padding:0,overflow:"hidden",backgroundColor:strip.style.borderColor};var $horz=$("<div/>").css(common).css({width:width+"px",height:"1px"});switch(c){case"TL":$horz.css({bottom:0,left:0});break;case"TR":$horz.css({bottom:0,right:0});break;case"BL":$horz.css({top:0,left:0});break;case"BR":$horz.css({top:0,right:0});break;}d.appendChild($horz[0]);var $vert=$("<div/>").css(common).css({top:0,bottom:0,width:"1px",height:width+"px"});switch(c){case"TL":$vert.css({left:width});break;case"TR":$vert.css({right:width});break;case"BL":$vert.css({left:width});break;case"BR":$vert.css({right:width});break;}d.appendChild($vert[0]);}}}}});};$.fn.uncorner=function(){if(radius||moz||webkit){this.css(radius?"border-radius":moz?"-moz-border-radius":"-webkit-border-radius",0);}$("div.jquery-corner",this).remove();return this;};$.fn.corner.defaults={useNative:true,metaAttr:"data-corner"};})(jQuery);
;
(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e);};k.defaults={axis:"xy",duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable();};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!i){return a;}var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=="BackCompat"?e.body:e.documentElement;});};d.fn.scrollTo=function(n,j,b){if(typeof j=="object"){b=j;j=0;}if(typeof b=="function"){b={onAfter:b};}if(n=="max"){n=9000000000;}b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue){j/=2;}b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is("html,body");switch(typeof f){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break;}f=d(f,this);case"object":if(f.is||f.style){s=(f=d(f)).offset();}}d.each(b.axis.split(""),function(a,i){var e=i=="x"?"Left":"Top",h=e.toLowerCase(),c="scroll"+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css("margin"+e))||0;g[c]-=parseInt(f.css("border"+e+"Width"))||0;}g[c]+=b.offset[h]||0;if(b.over[h]){g[c]+=f[i=="x"?"width":"height"]()*b.over[h];}}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=="%"?parseFloat(o)/100*m:o;}if(/^\d+$/.test(g[c])){g[c]=g[c]<=0?0:Math.min(g[c],m);}if(!a&&b.queue){if(l!=g[c]){t(b.onAfterFirst);}delete g[c];}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b);});}}).end();};k.max=function(a,i){var e=i=="x"?"Width":"Height",h="scroll"+e;if(!d(a).is("html,body")){return a[h]-d(a)[e.toLowerCase()]();}var c="client"+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c]);};function p(a){return typeof a=="object"?a:{top:a,left:a};}})(jQuery);
;
﻿(function($){$.fn.caret=function(options,opt2){var start,end,t=this[0];if(typeof options==="object"&&typeof options.start==="number"&&typeof options.end==="number"){start=options.start;end=options.end;}else{if(typeof options==="number"&&typeof opt2==="number"){start=options;end=opt2;}else{if(typeof options==="string"){if((start=t.value.indexOf(options))>-1){end=start+options.length;}else{start=null;}}else{if(Object.prototype.toString.call(options)==="[object RegExp]"){var re=options.exec(t.value);if(re!=null){start=re.index;end=start+re[0].length;}}}}}if(typeof start!="undefined"){if($.browser.msie){var selRange=this[0].createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end-start);selRange.select();}else{this[0].selectionStart=start;this[0].selectionEnd=end;}this[0].focus();return this;}else{if($.browser.msie){if(this[0].tagName.toLowerCase()!="textarea"){var val=this.val();var range=document.selection.createRange().duplicate();range.moveEnd("character",val.length);var s=(range.text==""?val.length:val.lastIndexOf(range.text));range=document.selection.createRange().duplicate();range.moveStart("character",-val.length);var e=range.text.length;}else{var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText(this[0]);stored_range.setEndPoint("EndToEnd",range);var s=stored_range.text.length-range.text.length;var e=s+range.text.length;}}else{var s=t.selectionStart,e=t.selectionEnd;}var te=t.value.substring(s,e);return{start:s,end:e,text:te,replace:function(st){return t.value.substring(0,s)+st+t.value.substring(e,t.value.length);}};}return this;};})(jQuery);
;
