var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /*! * jQuery Tools v1.2.6 - The missing UI library for the Web * * dateinput/dateinput.js * overlay/overlay.js * overlay/overlay.apple.js * rangeinput/rangeinput.js * scrollable/scrollable.js * scrollable/scrollable.autoscroll.js * scrollable/scrollable.navigator.js * tabs/tabs.js * tabs/tabs.slideshow.js * tooltip/tooltip.js * tooltip/tooltip.dynamic.js * tooltip/tooltip.slide.js * validator/validator.js * * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE. * * http://flowplayer.org/tools/ * */ (function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:!1,slideUpSpeed:400,slideDownSpeed:400,history:!1},addEffect:function(a,c){b[a]=c}};var b={"default":function(a,b){this.getPanes().hide().eq(a).show(),b.call()},fade:function(a,b){var c=this.getConf(),d=c.fadeOutSpeed,e=this.getPanes();d?e.fadeOut(d):e.hide(),e.eq(a).fadeIn(c.fadeInSpeed,b)},slide:function(a,b){var c=this.getConf();this.getPanes().slideUp(c.slideUpSpeed),this.getPanes().eq(a).slideDown(c.slideDownSpeed,b)},ajax:function(a,b){this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"),b)}},c,d;a.tools.tabs.addEffect("horizontal",function(b,e){if(!c){var f=this.getPanes().eq(b),g=this.getCurrentPane();d||(d=this.getPanes().eq(0).width()),c=!0,f.show(),g.animate({width:0},{step:function(a){f.css("width",d-a)},complete:function(){a(this).hide(),e.call(),c=!1}}),g.length||(e.call(),c=!1)}});function e(c,d,e){var f=this,g=c.add(this),h=c.find(e.tabs),i=d.jquery?d:c.children(d),j;h.length||(h=c.children()),i.length||(i=c.parent().find(d)),i.length||(i=a(d)),a.extend(this,{click:function(c,d){var i=h.eq(c);typeof c=="string"&&c.replace("#","")&&(i=h.filter("[href*="+c.replace("#","")+"]"),c=Math.max(h.index(i),0));if(e.rotate){var k=h.length-1;if(c<0)return f.click(k,d);if(c>k)return f.click(0,d)}if(!i.length){if(j>=0)return f;c=e.initialIndex,i=h.eq(c)}if(c===j)return f;d=d||a.Event(),d.type="onBeforeClick",g.trigger(d,[c]);if(!d.isDefaultPrevented()){b[e.effect].call(f,c,function(){j=c,d.type="onClick",g.trigger(d,[c])}),h.removeClass(e.current),i.addClass(e.current);return f}},getConf:function(){return e},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return f.click(j+1)},prev:function(){return f.click(j-1)},destroy:function(){h.unbind(e.event).removeClass(e.current),i.find("a[href^=#]").unbind("click.T");return f}}),a.each("onBeforeClick,onClick".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}}),e.history&&a.fn.history&&(a.tools.history.init(h),e.event="history"),h.each(function(b){a(this).bind(e.event,function(a){f.click(b,a);return a.preventDefault()})}),i.find("a[href^=#]").bind("click.T",function(b){f.click(a(this).attr("href"),b)}),location.hash&&e.tabs=="a"&&c.find("[href="+location.hash+"]").length?f.click(location.hash):(e.initialIndex===0||e.initialIndex>0)&&f.click(e.initialIndex)}a.fn.tabs=function(b,c){var d=this.data("tabs");d&&(d.destroy(),this.removeData("tabs")),a.isFunction(c)&&(c={onBeforeClick:c}),c=a.extend({},a.tools.tabs.conf,c),this.each(function(){d=new e(a(this),b,c),a(this).data("tabs",d)});return c.api?d:this}})(jQuery);(function(a){var b;b=a.tools.tabs.slideshow={conf:{next:".forward",prev:".backward",disabledClass:"disabled",autoplay:!1,autopause:!0,interval:3e3,clickable:!0,api:!1}};function c(b,c){var d=this,e=b.add(this),f=b.data("tabs"),g,h=!0;function i(c){var d=a(c);return d.length<2?d:b.parent().find(c)}var j=i(c.next).click(function(){f.next()}),k=i(c.prev).click(function(){f.prev()});function l(){g=setTimeout(function(){f.next()},c.interval)}a.extend(d,{getTabs:function(){return f},getConf:function(){return c},play:function(){if(g)return d;var b=a.Event("onBeforePlay");e.trigger(b);if(b.isDefaultPrevented())return d;h=!1,e.trigger("onPlay"),e.bind("onClick",l),l();return d},pause:function(){if(!g)return d;var b=a.Event("onBeforePause");e.trigger(b);if(b.isDefaultPrevented())return d;g=clearTimeout(g),e.trigger("onPause"),e.unbind("onClick",l);return d},resume:function(){h||d.play()},stop:function(){d.pause(),h=!0}}),a.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","),function(b,e){a.isFunction(c[e])&&a(d).bind(e,c[e]),d[e]=function(b){return a(d).bind(e,b)}}),c.autopause&&f.getTabs().add(j).add(k).add(f.getPanes()).hover(d.pause,d.resume),c.autoplay&&d.play(),c.clickable&&f.getPanes().click(function(){f.next()});if(!f.getConf().rotate){var m=c.disabledClass;f.getIndex()||k.addClass(m),f.onBeforeClick(function(a,b){k.toggleClass(m,!b),j.toggleClass(m,b==f.getTabs().length-1)})}}a.fn.slideshow=function(d){var e=this.data("slideshow");if(e)return e;d=a.extend({},b.conf,d),this.each(function(){e=new c(a(this),d),a(this).data("slideshow",e)});return d.api?e:this}})(jQuery);(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"
",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery);(function(a){var b=a.tools.tooltip;b.dynamic={conf:{classNames:"top right bottom left"}};function c(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function d(a){var b=a.length;while(b--)if(a[b])return!1;return!0}a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=a.extend(!0,{},e),g=e.classNames.split(/\s/),h;this.each(function(){var b=a(this).tooltip().onBeforeShow(function(b,e){var i=this.getTip(),j=this.getConf();h||(h=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,h[4]),j.position=[h[0],h[1]],j.offset=[h[2],h[3]],i.css({visibility:"hidden",position:"absolute",top:e.top,left:e.left}).show();var k=a.extend(!0,{},f),l=c(i);if(!d(l)){l[2]&&(a.extend(j,k.top),j.position[0]="top",i.addClass(g[0])),l[3]&&(a.extend(j,k.right),j.position[1]="right",i.addClass(g[1])),l[0]&&(a.extend(j,k.bottom),j.position[0]="bottom",i.addClass(g[2])),l[1]&&(a.extend(j,k.left),j.position[1]="left",i.addClass(g[3]));if(l[0]||l[2])j.offset[0]*=-1;if(l[1]||l[3])j.offset[1]*=-1}i.css({visibility:"visible"}).hide()});b.onBeforeShow(function(){var a=this.getConf(),b=this.getTip();setTimeout(function(){a.position=[h[0],h[1]],a.offset=[h[2],h[3]]},0)}),b.onHide(function(){var a=this.getTip();a.removeClass(e.classNames)}),ret=b});return e.api?ret:this}})(jQuery);(function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(jQuery);(function(a,b,c){"use strict";var d=b.event,e;d.special.smartresize={setup:function(){b(this).bind("resize",d.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",d.special.smartresize.handler)},handler:function(a,c){var d=this,f=arguments;a.type="smartresize",e&&clearTimeout(e),e=setTimeout(function(){b.event.handle.apply(d,f)},c==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Mason=function(a,c){this.element=b(c),this._create(a),this._init()},b.Mason.settings={isResizable:!0,isAnimated:!1,animationOptions:{queue:!1,duration:500},gutterWidth:0,isRTL:!1,isFitWidth:!1,containerStyle:{position:"relative"}},b.Mason.prototype={_filterFindBricks:function(a){var b=this.options.itemSelector;return b?a.filter(b).add(a.find(b)):a},_getBricks:function(a){var b=this._filterFindBricks(a).css({position:"absolute"}).addClass("masonry-brick");return b},_create:function(c){this.options=b.extend(!0,{},b.Mason.settings,c),this.styleQueue=[];var d=this.element[0].style;this.originalStyle={height:d.height||""};var e=this.options.containerStyle;for(var f in e)this.originalStyle[f]=d[f]||"";this.element.css(e),this.horizontalDirection=this.options.isRTL?"right":"left",this.offset={x:parseInt(this.element.css("padding-"+this.horizontalDirection),10),y:parseInt(this.element.css("padding-top"),10)},this.isFluid=this.options.columnWidth&&typeof this.options.columnWidth=="function";var g=this;setTimeout(function(){g.element.addClass("masonry")},0),this.options.isResizable&&b(a).bind("smartresize.masonry",function(){g.resize()}),this.reloadItems()},_init:function(a){this._getColumns(),this._reLayout(a)},option:function(a,c){b.isPlainObject(a)&&(this.options=b.extend(!0,this.options,a))},layout:function(a,b){for(var c=0,d=a.length;c=0x4e00&&val.charCodeAt(i)<=0x9fa5){len+=2}else{len++}}}else{len=val.length}break;case"checkbox":case"radio":len=$("input[type='"+sType+"'][name='"+srcjo.attr("name")+"']:checked").length;break;case"select-one":len=elem.options?elem.options.selectedIndex:-1;break;case"select-multiple":len=$("select[name="+elem.name+"] option:selected").length;break}return len},isEmpty:function(id){if($("#"+id).get(0).settings[0].empty&&$.formValidator.getLength(id)==0){return true}else{return false}},isOneValid:function(id){return $.formValidator.oneIsValid(id,1).isvalid},oneIsValid:function(id,index){var returnObj=new Object();returnObj.id=id;returnObj.ajax=-1;returnObj.errormsg="";var elem=$("#"+id).get(0);var settings=elem.settings;var settingslen=settings.length;if(settingslen==1){settings[0].bind=false}if(!settings[0].bind){return null}for(var i=0;i-1?("&"+parm):("?"+parm));if(typeof(pc_hash)!='undefined'){ls_url=ls_url+(ls_url.indexOf("?")>-1?("&pc_hash="+pc_hash):("?pc_hash="+pc_hash))}}$.ajax({mode:"abort",type:setting.type,url:ls_url,cache:setting.cache,data:setting.data,async:setting.async,dataType:setting.datatype,success:function(data){if(setting.success(data)){$.formValidator.setTipState(elem,"onCorrect",settings[0].oncorrect);setting.isvalid=true}else{$.formValidator.setTipState(elem,"onError",setting.onerror);setting.isvalid=false}},complete:function(){if(setting.buttons&&setting.buttons.length>0){setting.buttons.attr({"disabled":false})};setting.complete},beforeSend:function(xhr){if(setting.buttons&&setting.buttons.length>0){setting.buttons.attr({"disabled":true})};var isvalid=setting.beforesend(xhr);if(isvalid){setting.isvalid=false;$.formValidator.setTipState(elem,"onLoad",settings[returnObj.ajax].onwait)}setting.lastValid="-1";return isvalid},error:function(){$.formValidator.setTipState(elem,"onError",setting.onerror);setting.isvalid=false;setting.error()},processData:setting.processdata})},regexValid:function(returnObj){var id=returnObj.id;var setting=returnObj.setting;var srcTag=$("#"+id).get(0).tagName;var elem=$("#"+id).get(0);if(elem.settings[0].empty&&elem.value==""){setting.isvalid=true}else{var regexpress=setting.regexp;if(setting.datatype=="enum"){regexpress=eval("regexEnum."+regexpress)}if(regexpress==undefined||regexpress==""){setting.isvalid=false;return}setting.isvalid=(new RegExp(regexpress,setting.param)).test($("#"+id).val())}},functionValid:function(returnObj){var id=returnObj.id;var setting=returnObj.setting;var srcjo=$("#"+id);var lb_ret=setting.fun(srcjo.val(),srcjo.get(0));if(lb_ret!=undefined){if(typeof lb_ret=="string"){setting.isvalid=false;returnObj.errormsg=lb_ret}else{setting.isvalid=lb_ret}}},inputValid:function(returnObj){var id=returnObj.id;var setting=returnObj.setting;var srcjo=$("#"+id);var elem=srcjo.get(0);var val=srcjo.val();var sType=elem.type;var len=$.formValidator.getLength(id);var empty=setting.empty,emptyerror=false;switch(sType){case"text":case"hidden":case"password":case"textarea":case"file":if(setting.type=="size"){empty=setting.empty;if(!empty.leftempty){emptyerror=(val.replace(/^[ \s]+/,'').length!=val.length)}if(!emptyerror&&!empty.rightempty){emptyerror=(val.replace(/[ \s]+$/,'').length!=val.length)}if(emptyerror&&empty.emptyerror){returnObj.errormsg=empty.emptyerror}}case"checkbox":case"select-one":case"select-multiple":case"radio":var lb_go_on=false;if(sType=="select-one"||sType=="select-multiple"){setting.type="size"}var type=setting.type;if(type=="size"){if(!emptyerror){lb_go_on=true}if(lb_go_on){val=len}}else if(type=="date"||type=="datetime"){var isok=false;if(type=="date"){lb_go_on=isDate(val)};if(type=="datetime"){lb_go_on=isDate(val)};if(lb_go_on){val=new Date(val);setting.min=new Date(setting.min);setting.max=new Date(setting.max)}}else{stype=(typeof setting.min);if(stype=="number"){val=(new Number(val)).valueOf();if(!isNaN(val)){lb_go_on=true}}if(stype=="string"){lb_go_on=true}}setting.isvalid=false;if(lb_go_on){if(valsetting.max){if(valsetting.min&&setting.onerrormax){returnObj.errormsg=setting.onerrormax}}else{setting.isvalid=true}}break}},compareValid:function(returnObj){var id=returnObj.id;var setting=returnObj.setting;var srcjo=$("#"+id);var desjo=$("#"+setting.desid);var ls_datatype=setting.datatype;setting.isvalid=false;curvalue=srcjo.val();ls_data=desjo.val();if(ls_datatype=="number"){if(!isNaN(curvalue)&&!isNaN(ls_data)){curvalue=parseFloat(curvalue);ls_data=parseFloat(ls_data)}else{return}}if(ls_datatype=="date"||ls_datatype=="datetime"){var isok=false;if(ls_datatype=="date"){isok=(isDate(curvalue)&&isDate(ls_data))};if(ls_datatype=="datetime"){isok=(isDateTime(curvalue)&&isDateTime(ls_data))};if(isok){curvalue=new Date(curvalue);ls_data=new Date(ls_data)}else{return}}switch(setting.operateor){case"=":if(curvalue==ls_data){setting.isvalid=true}break;case"!=":if(curvalue!=ls_data){setting.isvalid=true}break;case">":if(curvalue>ls_data){setting.isvalid=true}break;case">=":if(curvalue>=ls_data){setting.isvalid=true}break;case"<":if(curvalue
")}if(initConfig.tidymode){jqobj.showTooltips()}}setting.tipid=tip;$.formValidator.appendValid(this.id,setting);var validobjectids=initConfig.validobjectids;if(validobjectids.indexOf("#"+this.id+" ")==-1){initConfig.validobjectids=(validobjectids==""?"#"+this.id:validobjectids+",#"+this.id)}if(!initConfig.alertmessage){$.formValidator.setTipState(this,"onShow",setting.onshow)}var srcTag=this.tagName.toLowerCase();var stype=this.type;var defaultval=setting.defaultvalue;if(defaultval){jqobj.val(defaultval)}if(srcTag=="input"||srcTag=="textarea"){jqobj.focus(function(){if(!initConfig.alertmessage){var tipjq=$("#"+tip);this.lastshowclass=tipjq.attr("class");this.lastshowmsg=tipjq.html();$.formValidator.setTipState(this,"onFocus",setting.onfocus)}});jqobj.bind(setting.triggerevent,function(){var settings=this.settings;var returnObj=$.formValidator.oneIsValid(this.id,1);if(returnObj==null){return}if(returnObj.ajax>=0){$.formValidator.showAjaxMessage(returnObj)}else{var showmsg=$.formValidator.showMessage(returnObj);if(!returnObj.isvalid){var auto=setting.automodify&&(this.type=="text"||this.type=="textarea"||this.type=="file");if(auto&&!initConfig.alertmessage){alert(showmsg);$.formValidator.setTipState(this,"onShow",setting.onshow)}else{if(initConfig.forcevalid||setting.forcevalid){alert(showmsg);this.focus()}}}}})}else if(srcTag=="select"){jqobj.bind("focus",function(){if(!initConfig.alertmessage){$.formValidator.setTipState(this,"onFocus",setting.onfocus)}});jqobj.bind("blur",function(){jqobj.trigger("change")});jqobj.bind("change",function(){var returnObj=$.formValidator.oneIsValid(this.id,1);if(returnObj==null){return}if(returnObj.ajax>=0){$.formValidator.showAjaxMessage(returnObj)}else{$.formValidator.showMessage(returnObj)}})}})};$.fn.inputValidator=function(controlOptions){var settings={isvalid:false,min:0,max:99999999999999,type:"size",onerror:"输入错误",validatetype:"InputValidator",empty:{leftempty:true,rightempty:true,leftemptyerror:null,rightemptyerror:null},wideword:true};controlOptions=controlOptions||{};$.extend(true,settings,controlOptions);return this.each(function(){$.formValidator.appendValid(this.id,settings)})};$.fn.compareValidator=function(controlOptions){var settings={isvalid:false,desid:"",operateor:"=",onerror:"输入错误",validatetype:"CompareValidator"};controlOptions=controlOptions||{};$.extend(true,settings,controlOptions);return this.each(function(){$.formValidator.appendValid(this.id,settings)})};$.fn.regexValidator=function(controlOptions){var settings={isvalid:false,regexp:"",param:"i",datatype:"string",onerror:"输入的格式不正确",validatetype:"RegexValidator"};controlOptions=controlOptions||{};$.extend(true,settings,controlOptions);return this.each(function(){$.formValidator.appendValid(this.id,settings)})};$.fn.functionValidator=function(controlOptions){var settings={isvalid:true,fun:function(){this.isvalid=true},validatetype:"FunctionValidator",onerror:"输入错误"};controlOptions=controlOptions||{};$.extend(true,settings,controlOptions);return this.each(function(){$.formValidator.appendValid(this.id,settings)})};$.fn.ajaxValidator=function(controlOptions){var settings={isvalid:false,lastValid:"",type:"GET",url:"",addidvalue:true,datatype:"html",data:"",async:true,cache:false,cached:true,getdata:'',beforesend:function(){return true},success:function(){return true},complete:function(){},processdata:false,error:function(){},buttons:null,onerror:"服务器校验没有通过",onwait:"正在等待服务器返回数据",validatetype:"AjaxValidator"};controlOptions=controlOptions||{};$.extend(true,settings,controlOptions);return this.each(function(){$.formValidator.appendValid(this.id,settings)})};$.fn.defaultPassed=function(onshow){return this.each(function(){var settings=this.settings;for(var i=1;i");$("body").append(fvtt);fvtt.before("")}return this.each(function(){jqobj=$(this);s=$("");b=$("");this.tooltip=$("").append(s).append(b).css({"filter":"alpha(opacity:95)","KHTMLOpacity":"0.95","MozOpacity":"0.95","opacity":"0.95"});jqobj.mouseover(function(e){$("#fvtt").append(this.tooltip);$("#fv_content").html(this.Tooltip);$.formValidator.localTooltip(e)});jqobj.mouseout(function(){$("#fvtt").empty()});jqobj.mousemove(function(e){$("#fv_content").html(this.Tooltip);$.formValidator.localTooltip(e)})})}})(jQuery);var regexEnum={intege:"^-?[1-9]\\d*$",intege1:"^[1-9]\\d*$",intege2:"^-[1-9]\\d*$",num:"^([+-]?)\\d*\\.?\\d+$",num1:"^[1-9]\\d*|0$",num2:"^-[1-9]\\d*|0$",decmal:"^([+-]?)\\d*\\.\\d+$",decmal1:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$",   decmal2:"^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$",  decmal3:"^-?([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0)$",  decmal4:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0$",   decmal5:"^(-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*))|0?.0+|0$",   email:"^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$",color:"^[a-fA-F0-9]{6}$",url:"^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&=]*)?$",chinese:"^[\\u4E00-\\u9FA5\\uF900-\\uFA2D]+$",ascii:"^[\\x00-\\xFF]+$",zipcode:"^\\d{6}$",mobile:"^(1)[0-9]{10}$",ip4:"^(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)$",notempty:"^\\S+$",picture:"(.*)\\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$",rar:"(.*)\\.(rar|zip|7zip|tgz)$",date:"^\\d{4}(\\-|\\/|\.)\\d{1,2}\\1\\d{1,2}$",qq:"^[1-9]*[1-9][0-9]*$",tel:"^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$",username:"^\\w+$",letter:"^[A-Za-z]+$",letter_u:"^[A-Z]+$",letter_l:"^[a-z]+$",idcard:"^[1-9]([0-9]{14}|[0-9]{17})$",ps_username:"^[\\u4E00-\\u9FA5\\uF900-\\uFA2D_\\w]+$"} function isCardID(sId){var iSum=0;var info="";if(!/^\d{17}(\d|x)$/i.test(sId))return"你输入的身份证长度或格式错误";sId=sId.replace(/x$/i,"a");if(aCity[parseInt(sId.substr(0,2))]==null)return"你的身份证地区非法";sBirthday=sId.substr(6,4)+"-"+Number(sId.substr(10,2))+"-"+Number(sId.substr(12,2));var d=new Date(sBirthday.replace(/-/g,"/"));if(sBirthday!=(d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()))return"身份证上的出生日期非法";for(var i=17;i>=0;i--)iSum+=(Math.pow(2,i)%11)*parseInt(sId.charAt(17-i),11);if(iSum%11!=1)return"你输入的身份证号非法";return true;} function isTime(str) {var a=str.match(/^(\d{1,2})(:)?(\d{1,2})\2(\d{1,2})$/);if(a==null){return false} if(a[1]>24||a[3]>60||a[4]>60) {return false;} return true;} function isDate(str) {var r=str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);if(r==null)return false;var d=new Date(r[1],r[3]-1,r[4]);return(d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]);} function isDateTime(str) {var reg=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/;var r=str.match(reg);if(r==null)return false;var d=new Date(r[1],r[3]-1,r[4],r[5],r[6],r[7]);return(d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]&&d.getMinutes()==r[6]&&d.getSeconds()==r[7]);} var qq=qq||{};qq.extend=function(first,second){for(var prop in second){first[prop]=second[prop];}};qq.indexOf=function(arr,elt,from){if(arr.indexOf)return arr.indexOf(elt,from);from=from||0;var len=arr.length;if(from<0)from+=len;for(;from=0){self._storedFileIds.splice(indexToRemove,1);} self._onCancel(id,fileName);self._options.onCancel(id,fileName);},onError:self._options.onError,onUpload:function(id,fileName,xhr){self._onUpload(id,fileName,xhr);self._options.onUpload(id,fileName,xhr);}});return handler;},_preventLeaveInProgress:function(){var self=this;this._attach(window,'beforeunload',function(e){if(!self._filesInProgress){return;} var e=e||window.event;e.returnValue=self._options.messages.onLeave;return self._options.messages.onLeave;});},_onSubmit:function(id,fileName){if(this._options.autoUpload){this._filesInProgress++;}},_onProgress:function(id,fileName,loaded,total){},_onComplete:function(id,fileName,result){var indexToRemove=qq.indexOf(this._storedFileIds,id);if(indexToRemove>=0){this._storedFileIds.splice(indexToRemove,1);} this._filesInProgress--;},_onCancel:function(id,fileName){if(this._options.autoUpload){this._filesInProgress--;}},_onUpload:function(id,fileName,xhr){},_onInputChange:function(input){if(this._handler instanceof qq.UploadHandlerXhr){this._uploadFileList(input.files);}else{if(this._validateFile(input)){this._uploadFile(input);}} this._button.reset();},_uploadFileList:function(files){if(files.length>0){for(var i=0;ithis._options.sizeLimit){this._error('sizeError',name);return false;}else if(size&&size33){name=name.slice(0,19)+'...'+name.slice(-13);} return name;},_isAllowedExtension:function(fileName){var ext=(-1!==fileName.indexOf('.'))?fileName.replace(/.*[.]/,'').toLowerCase():'';var allowed=this._options.allowedExtensions;if(!allowed.length){return true;} for(var i=0;i99);return Math.max(bytes,0.1).toFixed(1)+['kB','MB','GB','TB','PB','EB'][i];},_wrapCallbacks:function(){var self,safeCallback;self=this;safeCallback=function(callback,args){try{return callback.apply(this,args);} catch(exception){self.log("Caught "+exception+" in callback: "+callback);}} for(var prop in this._options){if(/^on[A-Z]/.test(prop)){(function(){var oldCallback=self._options[prop];self._options[prop]=function(){return safeCallback(oldCallback,arguments);}}());}}}};qq.FileUploader=function(o){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,dragText:'Drop files here to upload',extraDropzones:[],uploadButtonText:'Upload a file',cancelButtonText:'Cancel',failUploadText:'Upload failed',template:'
'+'
{dragText}
'+ (!this._options.button?'
{uploadButtonText}
':'')+ (!this._options.listElement?'
    ':'')+'
    ',fileTemplate:'
  • '+'
    '+''+''+''+''+'{cancelButtonText}'+'{failUploadtext}'+'
  • ',classes:{button:'qq-upload-button',drop:'qq-upload-drop-area',dropActive:'qq-upload-drop-area-active',dropDisabled:'qq-upload-drop-area-disabled',list:'qq-upload-list',progressBar:'qq-progress-bar',file:'qq-upload-file',spinner:'qq-upload-spinner',finished:'qq-upload-finished',size:'qq-upload-size',cancel:'qq-upload-cancel',failText:'qq-upload-failed-text',success:'qq-upload-success',fail:'qq-upload-fail',successIcon:null,failIcon:null},extraMessages:{formatProgress:"{percent}% of {total_size}",tooManyFilesError:"You may only drop one file"},failedUploadTextDisplay:{mode:'default',maxChars:50,responseProperty:'error',enableTooltip:true}});qq.extend(this._options,o);this._wrapCallbacks();qq.extend(this._options.messages,this._options.extraMessages);this._options.template=this._options.template.replace(/\{dragText\}/g,this._options.dragText);this._options.template=this._options.template.replace(/\{uploadButtonText\}/g,this._options.uploadButtonText);this._options.fileTemplate=this._options.fileTemplate.replace(/\{cancelButtonText\}/g,this._options.cancelButtonText);this._options.fileTemplate=this._options.fileTemplate.replace(/\{failUploadtext\}/g,this._options.failUploadText);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,'list');this._classes=this._options.classes;if(!this._button){this._button=this._createUploadButton(this._find(this._element,'button'));} this._bindCancelEvent();this._setupDragDrop();};qq.extend(qq.FileUploader.prototype,qq.FileUploaderBasic.prototype);qq.extend(qq.FileUploader.prototype,{clearStoredFiles:function(){qq.FileUploaderBasic.prototype.clearStoredFiles.apply(this,arguments);this._listElement.innerHTML="";},addExtraDropzone:function(element){this._setupExtraDropzone(element);},removeExtraDropzone:function(element){var dzs=this._options.extraDropzones;for(var i in dzs)if(dzs[i]===element)return this._options.extraDropzones.splice(i,1);},_leaving_document_out:function(e){return((qq.chrome()||(qq.safari()&&qq.windows()))&&e.clientX==0&&e.clientY==0)||(qq.firefox()&&!e.relatedTarget);},_storeFileForLater:function(id){qq.FileUploaderBasic.prototype._storeFileForLater.apply(this,arguments);var item=this._getItemByFileId(id);this._find(item,'spinner').style.display="none";},_find:function(parent,type){var element=qq.getByClass(parent,this._options.classes[type])[0];if(!element){throw new Error('element not found '+type);} return element;},_setupExtraDropzone:function(element){this._options.extraDropzones.push(element);this._setupDropzone(element);},_setupDropzone:function(dropArea){var self=this;var dz=new qq.UploadDropZone({element:dropArea,onEnter:function(e){qq.addClass(dropArea,self._classes.dropActive);e.stopPropagation();},onLeave:function(e){},onLeaveNotDescendants:function(e){qq.removeClass(dropArea,self._classes.dropActive);},onDrop:function(e){dropArea.style.display='none';qq.removeClass(dropArea,self._classes.dropActive);if(e.dataTransfer.files.length>1&&!self._options.multiple){self._error('tooManyFilesError',"");} else{self._uploadFileList(e.dataTransfer.files);}}});this.addDisposer(function(){dz.dispose();});dropArea.style.display='none';},_setupDragDrop:function(){var dropArea=this._find(this._element,'drop');var self=this;this._options.extraDropzones.push(dropArea);var dropzones=this._options.extraDropzones;var i;for(i=0;imaxChars){shortFailureReason=failureReason.substring(0,maxChars)+'...';} this._find(item,'failText').innerText=shortFailureReason||failureReason;if(this._options.failedUploadTextDisplay.enableTooltip){this._showTooltip(item,failureReason);}} else{this.log("'"+responseProperty+"' is not a valid property on the server response.");}} else if(mode==='none'){qq.remove(this._find(item,'failText'));} else if(mode!=='default'){this.log("failedUploadTextDisplay.mode value of '"+mode+"' is not valid");}},_showTooltip:function(item,text){item.title=text;}});qq.UploadDropZone=function(o){this._options={element:null,onEnter:function(e){},onLeave:function(e){},onLeaveNotDescendants:function(e){},onDrop:function(e){}};qq.extend(this._options,o);qq.extend(this,qq.DisposeSupport);this._element=this._options.element;this._disableDropOutside();this._attachEvents();};qq.UploadDropZone.prototype={_dragover_should_be_canceled:function(){return qq.safari()||(qq.firefox()&&qq.windows());},_disableDropOutside:function(e){if(!qq.UploadDropZone.dropOutsideDisabled){if(this._dragover_should_be_canceled){qq.attach(document,'dragover',function(e){e.preventDefault();});}else{qq.attach(document,'dragover',function(e){if(e.dataTransfer){e.dataTransfer.dropEffect='none';e.preventDefault();}});} qq.UploadDropZone.dropOutsideDisabled=true;}},_attachEvents:function(){var self=this;self._attach(self._element,'dragover',function(e){if(!self._isValidFileDrag(e))return;var effect=qq.ie()?null:e.dataTransfer.effectAllowed;if(effect=='move'||effect=='linkMove'){e.dataTransfer.dropEffect='move';}else{e.dataTransfer.dropEffect='copy';} e.stopPropagation();e.preventDefault();});self._attach(self._element,'dragenter',function(e){if(!self._isValidFileDrag(e))return;self._options.onEnter(e);});self._attach(self._element,'dragleave',function(e){if(!self._isValidFileDrag(e))return;self._options.onLeave(e);var relatedTarget=document.elementFromPoint(e.clientX,e.clientY);if(qq.contains(this,relatedTarget))return;self._options.onLeaveNotDescendants(e);});self._attach(self._element,'drop',function(e){if(!self._isValidFileDrag(e))return;e.preventDefault();self._options.onDrop(e);});},_isValidFileDrag:function(e){if(qq.ie())return false;var dt=e.dataTransfer,isSafari=qq.safari();return dt&&dt.effectAllowed!='none'&&(dt.files||(!isSafari&&dt.types.contains&&dt.types.contains('Files')));}};qq.UploadButton=function(o){this._options={element:null,multiple:false,acceptFiles:null,name:'file',onChange:function(input){},hoverClass:'qq-upload-button-hover',focusClass:'qq-upload-button-focus'};qq.extend(this._options,o);qq.extend(this,qq.DisposeSupport);this._element=this._options.element;qq.css(this._element,{position:'relative',overflow:'hidden',direction:'ltr'});this._input=this._createInput();};qq.UploadButton.prototype={getInput:function(){return this._input;},reset:function(){if(this._input.parentNode){qq.remove(this._input);} qq.removeClass(this._element,this._options.focusClass);this._input=this._createInput();},_createInput:function(){var input=document.createElement("input");if(this._options.multiple){input.setAttribute("multiple","multiple");} if(this._options.acceptFiles)input.setAttribute("accept",this._options.acceptFiles);input.setAttribute("type","file");input.setAttribute("name",this._options.name);qq.css(input,{position:'absolute',right:0,top:0,fontFamily:'Arial',fontSize:'118px',margin:0,padding:0,cursor:'pointer',opacity:0});this._element.appendChild(input);var self=this;this._attach(input,'change',function(){self._options.onChange(input);});this._attach(input,'mouseover',function(){qq.addClass(self._element,self._options.hoverClass);});this._attach(input,'mouseout',function(){qq.removeClass(self._element,self._options.hoverClass);});this._attach(input,'focus',function(){qq.addClass(self._element,self._options.focusClass);});this._attach(input,'blur',function(){qq.removeClass(self._element,self._options.focusClass);});if(window.attachEvent){input.setAttribute('tabIndex',"-1");} return input;}};qq.UploadHandlerAbstract=function(o){this._options={debug:false,action:'/upload.php',maxConnections:999,onProgress:function(id,fileName,loaded,total){},onComplete:function(id,fileName,response){},onCancel:function(id,fileName){},onUpload:function(id,fileName,xhr){}};qq.extend(this._options,o);this._queue=[];this._params=[];};qq.UploadHandlerAbstract.prototype={log:function(str){if(this._options.debug&&window.console)console.log('[uploader] '+str);},add:function(file){},upload:function(id,params){var len=this._queue.push(id);var copy={};qq.extend(copy,params);this._params[id]=copy;if(len<=this._options.maxConnections){this._upload(id,this._params[id]);}},cancel:function(id){this._cancel(id);this._dequeue(id);},cancelAll:function(){for(var i=0;i=max&&i');iframe.setAttribute('id',id);iframe.style.display='none';document.body.appendChild(iframe);return iframe;},_createForm:function(iframe,params){var protocol=this._options.demoMode?"GET":"POST" var form=qq.toElement('
    ');var queryString=qq.obj2url(params,this._options.action);form.setAttribute('action',queryString);form.setAttribute('target',iframe.name);form.style.display='none';document.body.appendChild(form);return form;}});qq.UploadHandlerXhr=function(o){qq.UploadHandlerAbstract.apply(this,arguments);this._files=[];this._xhrs=[];this._loaded=[];};qq.UploadHandlerXhr.isSupported=function(){var input=document.createElement('input');input.type='file';return('multiple'in input&&typeof File!="undefined"&&typeof FormData!="undefined"&&typeof(new XMLHttpRequest()).upload!="undefined");};qq.extend(qq.UploadHandlerXhr.prototype,qq.UploadHandlerAbstract.prototype) qq.extend(qq.UploadHandlerXhr.prototype,{add:function(file){if(!(file instanceof File)){throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');} return this._files.push(file)-1;},getName:function(id){var file=this._files[id];return(file.fileName!==null&&file.fileName!==undefined)?file.fileName:file.name;},getSize:function(id){var file=this._files[id];return file.fileSize!=null?file.fileSize:file.size;},getLoaded:function(id){return this._loaded[id]||0;},_upload:function(id,params){this._options.onUpload(id,this.getName(id),true);var file=this._files[id],name=this.getName(id),size=this.getSize(id);this._loaded[id]=0;var xhr=this._xhrs[id]=new XMLHttpRequest();var self=this;xhr.upload.onprogress=function(e){if(e.lengthComputable){self._loaded[id]=e.loaded;self._options.onProgress(id,name,e.loaded,e.total);}};xhr.onreadystatechange=function(){if(xhr.readyState==4){self._onComplete(id,xhr);}};params=params||{};params[this._options.inputName]=name;var queryString=qq.obj2url(params,this._options.action);var protocol=this._options.demoMode?"GET":"POST";xhr.open(protocol,queryString,true);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("X-File-Name",encodeURIComponent(name));if(this._options.forceMultipart){var formData=new FormData();formData.append(this._options.inputName,file);file=formData;}else{xhr.setRequestHeader("Content-Type","application/octet-stream");xhr.setRequestHeader("X-Mime-Type",file.type);} for(key in this._options.customHeaders){xhr.setRequestHeader(key,this._options.customHeaders[key]);};xhr.send(file);},_onComplete:function(id,xhr){"use strict";if(!this._files[id]){return;} var name=this.getName(id);var size=this.getSize(id);var response;this._options.onProgress(id,name,size,size);this.log("xhr - server response received");this.log("responseText = "+xhr.responseText);try{if(typeof JSON.parse==="function"){response=JSON.parse(xhr.responseText);}else{response=eval("("+xhr.responseText+")");}}catch(err){response={};} if(xhr.status!==200){this._options.onError(id,name,"XHR returned response code "+xhr.status);} this._options.onComplete(id,name,response);this._xhrs[id]=null;this._dequeue(id);},_cancel:function(id){this._options.onCancel(id,this.getName(id));this._files[id]=null;if(this._xhrs[id]){this._xhrs[id].abort();this._xhrs[id]=null;}}});qq.DisposeSupport={_disposers:[],dispose:function(){var disposer;while(disposer=this._disposers.shift()){disposer();}},addDisposer:function(disposeFunction){this._disposers.push(disposeFunction);},_attach:function(){this.addDisposer(qq.attach.apply(this,arguments));}};;(function($){$.ftxia=$.ftxia||{version:"v1.0.0"},$.extend($.ftxia,{util:{getStrLength:function(str){str=$.trim(str);var length=str.replace(/[^\x00-\xff]/g,"**").length;return parseInt(length/2)==length/2?length/2:parseInt(length/2)+.5;},empty:function(str){return void 0===str||null===str||""===str},isURl:function(str){return /([\w-]+\.)+[\w-]+.([^a-z])(\/[\w-.\/?%&=]*)?|[a-zA-Z0-9\-\.][\w-]+.([^a-z])(\/[\w-.\/?%&=]*)?/i.test(str)?!0:!1},isEmail:function(str){return /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(str);},minLength:function(str,length){var strLength=$.qupai.util.getStrLength(str);return strLength>=length;},maxLength:function(str,length){var strLength=$.qupai.util.getStrLength(str);return strLength<=length;},redirect:function(uri,toiframe){if(toiframe!=undefined){$('#'+toiframe).attr('src',uri);return!1;} location.href=uri;},setCookie:function(name,value){var Days=30;var exp=new Date();exp.setTime(exp.getTime()+Days*24*60*60*1000);document.cookie=name+"="+escape(value)+";expires="+exp.toGMTString();},getCookie:function(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output+=String.fromCharCode(chr2);} if(enc4!=64){output+=String.fromCharCode(chr3);} chr1=chr2=chr3="";enc1=enc2=enc3=enc4="";}while(i0?self.fadeIn():self.fadeOut();});}})(jQuery);;(function($){$.ftxia.tip=function(options){var settings={content:'',icon:'success',time:1000,close:false,zindex:2999};if(options){$.extend(settings,options);} if(settings.close){$(".tipbox").hide();return;} if(!$('.tipbox')[0]){$('body').append('
    ');$('.tipbox').css('z-index',parseInt(settings.zindex));} $('.tipbox').attr('class','tipbox tip-'+settings.icon);$('.tipbox .tip-c').html(settings.content);$('.tipbox').css('z-index',parseInt($('.tipbox').css('z-index'))+1).setmiddle().show();if(settings.time>0){setTimeout(function(){$(".tipbox").fadeOut()},settings.time);}}})(jQuery);;(function($){$.fn.uploader=function(options){var settings={btnid:$(this).attr('id'),action_url:'',input_id:'J_img',input_name:'img',showMessage:function(message){$.ftxia.tip({content:message,icon:'error'});},onSubmit:function(id,fileName){},onComplete:function(id,fileName,result){if(result.status=='1'){$('#'+settings.input_id).val(result.data);}else{$.ftxia.tip({content:result.msg,icon:'error'});}}};if(options){$.extend(settings,options);} new qq.FileUploaderBasic({allowedExtensions:['jpg','gif','jpeg','png','bmp','pdg','swf'],button:document.getElementById(settings.btnid),multiple:false,action:settings.action_url,inputName:settings.input_name,forceMultipart:true,messages:{typeError:'不允许上传的文件类型!',sizeError:'文件大小不能超过{sizeLimit}!',minSizeError:'文件大小不能小于{minSizeLimit}!',emptyError:'文件为空,请重新选择!',noFilesError:'没有选择要上传的文件!',onLeave:'正在上传文件,离开此页将取消上传!'},showMessage:settings.showMessage,onSubmit:settings.onSubmit,onComplete:settings.onComplete});}})(jQuery);;(function($){"use strict";var feature={};feature.fileapi=$("").get(0).files!==undefined;feature.formdata=window.FormData!==undefined;$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;} var method,action,url,$form=this;if(typeof options=='function'){options={success:options};} method=this.attr('method');action=this.attr('action');url=(typeof action==='string')?$.trim(action):'';url=url||window.location.href||'';if(url){url=(url.match(/^([^#]+)/)||[])[1];} options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},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 traditional=options.traditional;if(traditional===undefined){traditional=$.ajaxSettings.traditional;} var elements=[];var qx,a=this.formToArray(options.semantic,elements);if(options.data){options.extraData=options.data;qx=$.param(options.data,traditional);} 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,traditional);if(qx){q=(q?(q+'&'+qx):qx);} if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;} else{options.data=q;} var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});} if(options.clearForm){callbacks.push(function(){$form.clearForm(options.includeHidden);});} if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(oldSuccess,arguments);});} else if(options.success){callbacks.push(options.success);} options.success=function(data,status,xhr){var context=options.context||options;for(var i=0,max=callbacks.length;i0;var mp='multipart/form-data';var multipart=($form.attr('enctype')==mp||$form.attr('encoding')==mp);var fileAPI=feature.fileapi&&feature.formdata;log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;if(options.iframe!==false&&(options.iframe||shouldUseFrame)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){fileUploadIframe(a);});} else{fileUploadIframe(a);}} else if((hasFileInputs||multipart)&&fileAPI){fileUploadXhr(a);} else{$.ajax(options);} for(var k=0;k');$io.css({position:'absolute',top:'-1000px',left:'-1000px'});} io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;$io.attr('src',s.iframeSrc);xhr.error=e;if(s.error) s.error.call(s.context,xhr,e,status);if(g) $.event.trigger("ajaxError",[xhr,s,e]);if(s.complete) s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&0===$.active++){$.event.trigger("ajaxStart");} if(g){$.event.trigger("ajaxSend",[xhr,s]);} if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;} return;} if(xhr.aborted){return;} sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}} var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document;return doc;} var csrf_token=$('meta[name=csrf-token]').attr('content');var csrf_param=$('meta[name=csrf-param]').attr('content');if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token;} function doSubmit(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(!method){form.setAttribute('method','POST');} if(a!=s.url){form.setAttribute('action',s.url);} if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});} if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);} function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state&&state.toLowerCase()=='uninitialized') setTimeout(checkState,50);} catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);if(timeoutHandle) clearTimeout(timeoutHandle);timeoutHandle=undefined;}} var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){if(s.extraData.hasOwnProperty(n)){extraInputs.push($('').attr('value',s.extraData[n]).appendTo(form)[0]);}}} if(!s.iframeTarget){$io.appendTo('body');if(io.attachEvent) io.attachEvent('onload',cb);else io.addEventListener('load',cb,false);} setTimeout(checkState,15);form.submit();} finally{form.setAttribute('action',a);if(t){form.setAttribute('target',t);}else{$form.removeAttr('target');} $(extraInputs).remove();}} if(s.forceSync){doSubmit();} else{setTimeout(doSubmit,10);} var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;} try{doc=getDoc(io);} catch(ex){log('cannot access response document: ',ex);e=SERVER_ABORT;} if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');return;} else if(e==SERVER_ABORT&&xhr){xhr.abort('server abort');return;} if(!doc||doc.location.href==s.iframeSrc){if(!timedOut) return;} if(io.detachEvent) io.detachEvent('onload',cb);else io.removeEventListener('load',cb,false);var status='success',errMsg;try{if(timedOut){throw'timeout';} var isXml=s.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}} var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml) s.dataType='xml';xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;} var dt=(s.dataType||'').toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;} else if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText;} else if(b){xhr.responseText=b.textContent?b.textContent:b.innerText;}}} else if(dt=='xml'&&!xhr.responseXML&&xhr.responseText){xhr.responseXML=toXml(xhr.responseText);} try{data=httpData(xhr,dt,s);} catch(e){status='parsererror';xhr.error=errMsg=(e||status);}} catch(e){log('error caught: ',e);status='error';xhr.error=errMsg=(e||status);} if(xhr.aborted){log('upload aborted');status=null;} if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?'success':'error';} if(status==='success'){if(s.success) s.success.call(s.context,data,'success',xhr);if(g) $.event.trigger("ajaxSuccess",[xhr,s]);} else if(status){if(errMsg===undefined) errMsg=xhr.statusText;if(s.error) s.error.call(s.context,xhr,status,errMsg);if(g) $.event.trigger("ajaxError",[xhr,s,errMsg]);} if(g) $.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");} if(s.complete) s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout) clearTimeout(timeoutHandle);setTimeout(function(){if(!s.iframeTarget) $io.remove();xhr.responseXML=null;},100);} var toXml=$.parseXML||function(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.nodeName!='parsererror')?doc:null;};var parseJSON=$.parseJSON||function(s){return window['eval']('('+s+')');};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=type==='xml'||!type&&ct.indexOf('xml')>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror'){if($.error) $.error('parsererror');} if(s&&s.dataFilter){data=s.dataFilter(data,type);} if(typeof data==='string'){if(type==='json'||!type&&ct.indexOf('json')>=0){data=parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data);}} return data;};}};$.fn.ajaxForm=function(options){options=options||{};options.delegation=options.delegation&&$.isFunction($.fn.on);if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;} log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;} if(options.delegation){$(document).off('submit.form-plugin',this.selector,doAjaxSubmit).off('click.form-plugin',this.selector,captureSubmittingElement).on('submit.form-plugin',this.selector,options,doAjaxSubmit).on('click.form-plugin',this.selector,options,captureSubmittingElement);return this;} return this.ajaxFormUnbind().bind('submit.form-plugin',options,doAjaxSubmit).bind('click.form-plugin',options,captureSubmittingElement);};function doAjaxSubmit(e){var options=e.data;if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(options);}} function captureSubmittingElement(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(':submit');if(t.length===0){return;} target=t[0];} var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!==undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}} setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);} $.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic,elements){var a=[];if(this.length===0){return a;} var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els){return a;} var i,j,n,v,el,max,jmax;for(i=0,max=els.length;ig&&k-l>r?k-l+b:n)+"px";m.top=(q+o>s+d&&i-o>d?i-o:q)+"px";this._follow&&this._follow.removeAttribute(e);this._follow=a;a[e]=c.id;return this},button:function(){for(var a=this.dom.buttons,b=a[0],c=this._listeners=this._listeners||{},d=[].slice.call(arguments),e=0,g,k,j,l,i;eloading..',title:"message",button:null,ok:null,cancel:null,initialize:null,beforeunload:null,okValue:"ok",cancelValue:"cancel",width:"auto",height:"auto",padding:"20px 25px",skin:null,time:null,esc:!0,focus:!0,visible:!0,follow:null,lock:!1,fixed:!1,zIndex:99};this.artDialog=h.dialog=h.artDialog=e})(this.art||this.jQuery,this);(function(c){c.alert=c.dialog.alert=function(b,a){return c.dialog({id:"Alert",fixed:!0,lock:!0,content:b,ok:!0,beforeunload:a})};c.confirm=c.dialog.confirm=function(b,a,m){return c.dialog({id:"Confirm",fixed:!0,lock:!0,content:b,ok:a,cancel:m})};c.prompt=c.dialog.prompt=function(b,a,m){var d;return c.dialog({id:"Prompt",fixed:!0,lock:!0,content:['
    ',b,'
    '].join(""),initialize:function(){d=this.dom.content.find(".d-input-text")[0];d.select();d.focus()},ok:function(){return a&&a.call(this,d.value)},cancel:function(){}})};c.dialog.prototype.shake=function(){var b=function(a,b,c){var h=+new Date,e=setInterval(function(){var f=(+new Date-h)/c;1<=f?(clearInterval(e),b(f)):a(f)},13)},a=function(c,d,g,h){var e=h;void 0===e&&(e=6,g/=e);var f=parseInt(c.style.marginLeft)||0;b(function(a){c.style.marginLeft=f+(d-f)*a+"px"},function(){0!==e&&a(c,1===e?0:1.3*(d/e-d),g,--e)},g)};return function(){a(this.dom.wrap[0],40,600);return this}}();var o=function(){var b=this,a=function(a){var c=b[a];b[a]=function(){return c.apply(b,arguments)}};a("start");a("over");a("end")};o.prototype={start:function(b){c(document).bind("mousemove",this.over).bind("mouseup",this.end);this._sClientX=b.clientX;this._sClientY=b.clientY;this.onstart(b.clientX,b.clientY);return!1},over:function(b){this._mClientX=b.clientX;this._mClientY=b.clientY;this.onover(b.clientX-this._sClientX,b.clientY-this._sClientY);return!1},end:function(b){c(document).unbind("mousemove",this.over).unbind("mouseup",this.end);this.onend(b.clientX,b.clientY);return!1}};var j=c(window),k=c(document),i=document.documentElement,p=!!("minWidth"in i.style)&&"onlosecapture"in i,q="setCapture"in i,r=function(){return!1},n=function(b){var a=new o,c=artDialog.focus,d=c.dom,g=d.wrap,h=d.title,e=g[0],f=h[0],i=d.main[0],l=e.style,s=i.style,t=b.target===d.se[0]?!0:!1,u=(d="fixed"===e.style.position)?0:k.scrollLeft(),v=d?0:k.scrollTop(),n=j.width()-e.offsetWidth+u,A=j.height()-e.offsetHeight+v,w,x,y,z;a.onstart=function(){t?(w=i.offsetWidth,x=i.offsetHeight):(y=e.offsetLeft,z=e.offsetTop);k.bind("dblclick",a.end).bind("dragstart",r);p?h.bind("losecapture",a.end):j.bind("blur",a.end);q&&f.setCapture();g.addClass("d-state-drag");c.focus()};a.onover=function(a,b){if(t){var c=a+w,d=b+x;l.width="auto";s.width=Math.max(0,c)+"px";l.width=e.offsetWidth+"px";s.height=Math.max(0,d)+"px"}else c=Math.max(u,Math.min(n,a+y)),d=Math.max(v,Math.min(A,b+z)),l.left=c+"px",l.top=d+"px"};a.onend=function(){k.unbind("dblclick",a.end).unbind("dragstart",r);p?h.unbind("losecapture",a.end):j.unbind("blur",a.end);q&&f.releaseCapture();g.removeClass("d-state-drag")};a.start(b)};c(document).bind("mousedown",function(b){var a=artDialog.focus;if(a){var c=b.target,d=a.config,a=a.dom;if(!1!==d.drag&&c===a.title[0]||!1!==d.resize&&c===a.se[0])return n(b),!1}})})(this.art||this.jQuery);;(function($){$.ftxia.init=function(){$.ftxia.ui.init();$.ftxia.tool.sendmail();} $.ftxia.ui={init:function(){$.ftxia.ui.input_init();$.ftxia.ui.decode_img($(document));$.ftxia.ui.captcha();},captcha:function(){$('#J_captcha_img').click(function(){var timenow=new Date().getTime(),url=$(this).attr('data-url').replace(/js_rand/g,timenow);$(this).attr("src",url);});$('#J_captcha_change').click(function(){$('#J_captcha_img').trigger('click');});},input_init:function(){$('input[def-val],textarea[def-val]').live('focus',function(){var self=$(this);$.trim(self.val())==$.trim(self.attr('def-val'))&&self.val("");self.css("color","#484848")});$('input[def-val],textarea[def-val]').live('blur',function(){var self=$(this);$.trim(self.val())==""&&(self.val(self.attr('def-val')),self.css("color","#999999"));});},decode_img:function(context){$('.J_decode_img',context).each(function(){var uri=$(this).attr('data-uri')||"";$(this).attr('src',$.ftxia.util.base64_decode(uri));});}},$.ftxia.tool={sendmail:function(){return FTXIAER.async_sendmail?($.get(FTXIAER.root+'/?a=send_mail'),!0):!1;},msgtip:function(){if(FTXIAER.uid){var is_update=!1;var update=function(){is_update=!0;$.getJSON(FTXIAER.root+'/?m=user&a=msgtip',function(result){if(result.status==1){var fans=parseInt(result.data.fans),atme=parseInt(result.data.atme),msg=parseInt(result.data.msg),system=parseInt(result.data.system),msgtotal=fans+atme+msg+system;fans>0&&$('#J_fans').html('('+fans+')');atme>0&&$('#J_atme').html('('+atme+')');msg>0&&$('#J_msg').html('('+msg+')');system>0&&$('#J_system').html('('+system+')');msgtotal>0&&$('#J_msgtip').html('('+msgtotal+')');is_update=!1;setTimeout(function(){update()},5E3);}});};!is_update&&update();}}} $.ftxia.init();})(jQuery);;(function($){$.ftxia.dialog={islogin:function(){return""==FTXIAER.uid?($.ftxia.dialog.login(),!1):!0;},login:function(){$.getJSON(FTXIAER.root+'/?m=user&a=login',function(result){if(result.status==0){$.ftxia.tip({content:result.msg,icon:'error'});}else{$.dialog({id:'login',title:lang.login_title,content:result.data,padding:'',fixed:true,lock:true});$.ftxia.dialog.dlogin_form($('#J_dlogin_form'));}});},dlogin_form:function(form){form.ajaxForm({beforeSubmit:function(){var username=form.find('.J_username').val(),password=form.find('.J_password').val();if(username==''){form.find('#J_login_fail').html('请输入用户名!').css("visibility",'visible');return!1;} if(password==''){form.find('#J_login_fail').html('请输入密码!').css("visibility",'visible');return!1;}},success:function(result){if(result.status==1){$.dialog.get('login').title(false).content('
    '+result.msg+'
    ').time(2000);window.location.reload();}else{form.find('#J_login_fail').html(result.msg).css("visibility",'visible');}},dataType:'json'});}};})(jQuery);;(function($){$.ftxia.item={fetch:function(result){$.dialog.get('share_item').title(lang.share_title).content(result.html);$.ftxia.item.fetch_form($('#J_fetch_item'),result.item);},fetch_form:function(form,item){form.find('.J_pub_btn').die('click').live('click',function(){$.dialog.get('share_item').title(false).content('
    '+lang.wait+'
    ');var album_id=$('.J_album_id').val(),ac_id=$('.J_df_cate').val(),intro=form.find('.J_intro').val();$.ajax({url:FTXIAER.root+'/?m=item&a=publish_item',type:'POST',data:{item:item,album_id:album_id,intro:intro},dataType:'json',success:function(result){if(result.status==1){$.dialog.get('share_item').close();$.ftxia.tip({content:result.msg});}else{$.ftxia.tip({content:result.msg,icon:'error'});}}});});},check_form:function(form){form.find('.J_check_btn').die('click').live('click',function(){var item_url=$.trim($('.item_url').val());if(!$.ftxia.util.isURl(item_url))return $.ftxia.tip({content:lang.please_input+lang.correct_itemurl,icon:'alert'}),!1;$.dialog.get('check_item').title(false).content('
    '+lang.wait+'
    ');$.getJSON(FTXIAER.root+'/?m=ajax&a=fetch_item',{url:item_url},function(result){if(result.status==1){$.dialog.get('check_item').close();$.dialog({id:'check_item_result',title:lang.chaxun,content:result.data.html,padding:'',fixed:true,lock:true});}else{$.dialog.get('check_item').close();$.ftxia.tip({content:result.msg,icon:'error'});}});});},report:function(form){form.find('.J_check_btn').die('click').live('click',function(){var item_url=$.trim($('.item_url').val());$.dialog.get('check_item').title(false).content('
    '+lang.wait+'
    ');$.getJSON(FTXIAER.root+'/?m=ajax&a=report',{url:item_url},function(result){if(result.status==1){$.dialog.get('check_item').close();$.dialog({id:'check_item_result',title:lang.chaxun,content:result.data.html,padding:'',fixed:true,lock:true});}else{$.dialog.get('check_item').close();$.ftxia.tip({content:result.msg,icon:'error'});}});});}};})(jQuery);;(function($){$.ftxia.user={init:function(options){$.ftxia.user.bind_form();$.ftxia.user.sign();$.ftxia.user.changeTag();},login_validate:function(form){$.formValidator.initConfig({formid:form.attr('id'),autotip:true});form.find('#J_name').formValidator({onshow:' ',onfocus:lang.please_input+lang.username,oncorrect:' '}).inputValidator({min:1,onerror:lang.please_input+lang.username});form.find('#J_pass').formValidator({onshow:' ',onfocus:lang.please_input+lang.password,oncorrect:' '}).inputValidator({min:1,onerror:lang.please_input+lang.password});},findpwd_email_validate:function(form){$.formValidator.initConfig({formid:form.attr('id'),autotip:true});form.find('#J_email').formValidator({onshow:' ',onfocus:lang.please_input+lang.email,oncorrect:' '}).inputValidator({min:1,onerror:lang.please_input+lang.email});$('#J_captcha1').formValidator({onshow:' ',onfocus:lang.captcha_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.captcha_empty});},findpwd_name_validate:function(form){$.formValidator.initConfig({formid:form.attr('id'),autotip:true});form.find('#J_name').formValidator({onshow:' ',onfocus:lang.please_input+lang.username,oncorrect:' '}).inputValidator({min:1,onerror:lang.please_input+lang.username});$('#J_captcha2').formValidator({onshow:' ',onfocus:lang.captcha_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.captcha_empty});},resetpwd_form:function(){$.formValidator.initConfig({formid:'J_resetpwd_form',autotip:true});$('#J_password').formValidator({onshow:' ',onfocus:lang.password_tip,oncorrect:' '}).inputValidator({min:6,onerror:lang.password_too_short}).inputValidator({max:20,onerror:lang.password_too_long});$('#J_repassword').formValidator({onshow:' ',onfocus:lang.repassword_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.repassword_empty}).compareValidator({desid:'J_password',operateor:'=',onerror:lang.passwords_not_match});$('#J_captcha').formValidator({onshow:' ',onfocus:lang.captcha_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.captcha_empty});},bind_form:function(){if($('#J_bind_form')){$.formValidator.initConfig({formid:'J_bind_form',autotip:true});$('#J_email').formValidator({onshow:' ',onfocus:lang.email_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.please_input+lang.email}).regexValidator({regexp:'email',datatype:'enum',onerror:lang.email_format_error}).ajaxValidator({type:'get',url:FTXIAER.root+'/?m=user&a=ajax_check',data:'type=email',datatype:'json',async:'false',success:function(result){return result.status=='1'?!0:!1;},buttons:$('#J_regsub'),onerror:lang.email_exists,onwait:lang.wait});$('#J_username').formValidator({onshow:' ',onfocus:lang.username_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.please_input+lang.username}).inputValidator({max:20,onerror:lang.username_tip}).ajaxValidator({type:'get',url:FTXIAER.root+'/?m=user&a=ajax_check',data:'type=username',datatype:'json',async:'false',success:function(result){return result.status=='1'?!0:!1;},buttons:$('#J_regsub'),onerror:lang.username_exists,onwait:lang.wait}).defaultPassed();$('#J_password').formValidator({onshow:' ',onfocus:lang.password_tip,oncorrect:' '}).inputValidator({min:6,onerror:lang.password_too_short}).inputValidator({max:20,onerror:lang.password_too_long});$('#J_repassword').formValidator({onshow:' ',onfocus:lang.repassword_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.repassword_empty}).compareValidator({desid:'J_password',operateor:'=',onerror:lang.passwords_not_match});}},sign:function(){$('.sign_btn').live('click',function(){if(!$.ftxia.dialog.islogin())return!1;$.getJSON(FTXIAER.root+'/?m=sign&a=ajax_sign',function(result){if(result.status==1){var dou_calender_tpl='
    ' +'{HEADER}' +'
    ' +'
    ' +'周日' +'周一' +'周二' +'周三' +'周四' +'周五' +'周六' +'
    ' +'' +'{TABLE}' +'
    ';var not_sign='

    恭喜您,成功获得{TODAY_DOU}个金币!

    ' +'

    明天再来,就可以领到 {TOMORROW_DOU} 个金币,别忘记哦~

    ';var signed='

    您今天已经签过到了,明天再来,就可以获得{TOMORROW_DOU}金币!

    ';var today_dou=result.data.point;var tomorrow_dou=result.data.tmr_point;if(today_dou==tomorrow_dou){var dou_calender=dou_calender_tpl.replace(/{HEADER}/,signed);}else{var dou_calender=dou_calender_tpl.replace(/{HEADER}/,not_sign);var totaldou_obj=$('p.all_juandou').eq(0);var total_dou=totaldou_obj.text().match(/\d+/);totaldou_obj.text(totaldou_obj.text().replace(/\d+/,parseInt(total_dou)+parseInt(today_dou)));$('em.text').text('已签到 +'+today_dou);} dou_calender=dou_calender.replace(/{TODAY_DOU}/i,today_dou).replace(/{TOMORROW_DOU}/i,tomorrow_dou).replace(/{TABLE}/i,result.data.table);$.dialog({id:'sign_success',title:result.msg,content:dou_calender,width:450,padding:'',fixed:true,lock:true});}else{$.ftxia.tip({content:result.msg,icon:'error'});}});});$('.signIn_btn').live('click',function(){if(!$.ftxia.dialog.islogin())return!1;$.getJSON(FTXIAER.root+'/?m=sign&a=ajax_sign',function(result){if(result.status==1){var dou_calender_tpl='
    ' +'{HEADER}' +'
    ' +'
    ' +'周日' +'周一' +'周二' +'周三' +'周四' +'周五' +'周六' +'
    ' +'' +'{TABLE}' +'
    ';var not_sign='

    恭喜您,成功获得{TODAY_DOU}个金币!

    ' +'

    明天再来,就可以领到 {TOMORROW_DOU} 个金币,别忘记哦~

    ';var signed='

    您今天已经签过到了,明天再来,就可以获得{TOMORROW_DOU}金币!

    ';var today_dou=result.data.point;var tomorrow_dou=result.data.tmr_point;if($('div.juan_btn a.signIn_btn').text().indexOf('已签到')!=-1){var dou_calender=dou_calender_tpl.replace(/{HEADER}/,signed);}else{var dou_calender=dou_calender_tpl.replace(/{HEADER}/,not_sign);var totaldou_obj=$('p.all_juandou').eq(0);var total_dou=totaldou_obj.text().match(/\d+/);totaldou_obj.text(totaldou_obj.text().replace(/\d+/,parseInt(total_dou)+parseInt(today_dou)));} dou_calender=dou_calender.replace(/{TODAY_DOU}/i,today_dou).replace(/{TOMORROW_DOU}/i,tomorrow_dou).replace(/{TABLE}/i,result.data.table);$.dialog({id:'sign_success',title:result.msg,content:dou_calender,width:450,padding:'',fixed:true,lock:true});}else{$.ftxia.tip({content:result.msg,icon:'error'});}});});},changeTag:function(){$(".find_password .tit,.find_email .tit").live("click",function(){if($(this).find("em").attr("class")=="down"){$(this).find("em").removeClass("down").addClass("up");$(this).parent().find("ul").css("display","block");if($(this).parent().attr("class")=="get_password_way find_password"){$(".find_email ul").css("display","none");$(".find_email").find("em").removeClass("up").addClass("down");}else{$(".find_password ul").css("display","none");$(".find_password").find("em").removeClass("up").addClass("down");}}else if($(this).find("em").attr("class")=="up"){$(this).find("em").removeClass("up").addClass("down");$(this).parent().find("ul").css("display","none");if($(this).parent().attr("class")=="get_password_way find_password"){$(".find_email ul").css("display","block");$(".find_email").find("em").removeClass("down").addClass("up");}else{$(".find_password ul").css("display","block");$(".find_password").find("em").removeClass("down").addClass("up");}}});$(".get_password_way input").live("blur",function(){$(this).removeClass("cur_input");});},register_form:function(form){$('#J_protocol_btn').live('click',function(){var content=$('#J_protocol').html();$.dialog({id:'protocol',title:lang.user_protocol,content:content,padding:'',fixed:true,lock:true});});$.formValidator.initConfig({formid:'J_register_form',autotip:true});$('#J_email').formValidator({onshow:' ',onfocus:lang.email_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.please_input+lang.email}).regexValidator({regexp:'email',datatype:'enum',onerror:lang.email_format_error}).ajaxValidator({type:'get',url:FTXIAER.root+'/?m=user&a=ajax_check',data:'type=email',datatype:'json',async:'false',success:function(result){return result.status=='1'?!0:!1;},buttons:$('#J_regsub'),onerror:lang.email_exists,onwait:lang.wait});$('#J_username').formValidator({onshow:' ',onfocus:lang.username_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.please_input+lang.username}).inputValidator({max:20,onerror:lang.username_tip}).ajaxValidator({type:'get',url:FTXIAER.root+'/?m=user&a=ajax_check',data:'type=username',datatype:'json',async:'false',success:function(result){return result.status=='1'?!0:!1;},buttons:$('#J_regsub'),onerror:lang.username_exists,onwait:lang.wait});$('#J_password').formValidator({onshow:' ',onfocus:lang.password_tip,oncorrect:' '}).inputValidator({min:6,onerror:lang.password_too_short}).inputValidator({max:20,onerror:lang.password_too_long});$('#J_repassword').formValidator({onshow:' ',onfocus:lang.repassword_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.repassword_empty}).compareValidator({desid:'J_password',operateor:'=',onerror:lang.passwords_not_match});$('#J_captcha').formValidator({onshow:' ',onfocus:lang.captcha_tip,oncorrect:' '}).inputValidator({min:1,onerror:lang.captcha_empty});}};$.ftxia.user.init();})(jQuery);;(function($){$.chengxuxia.comment={settings:{container:'#pub_area',page_list:'#note_comment_list',page_bar:'#J_cmt_page',pub_content:'#pub_content',pub_btn:'#pub_submit'},init:function(options){options&&$.extend($.chengxuxia.comment.settings,options);$.chengxuxia.comment.list();$.chengxuxia.comment.publish();},list:function(){var s=$.chengxuxia.comment.settings;$('li',$(s.page_list)).live({mouseover:function(){$(this).addClass('hover');},mouseout:function(){$(this).removeClass('hover');}});$('a',$(s.page_bar)).live('click',function(){var url=$(this).attr('href');$.getJSON(url,function(result){if(result.status==1){$(s.page_list).html(result.data.list);$(s.page_bar).html(result.data.page);}else{$.ftxia.tip({content:result.msg,icon:'error'});}});return false;});},publish:function(){var s=$.chengxuxia.comment.settings;$(s.pub_btn).live('click',function(){if(!$.ftxia.dialog.islogin())return!1;var id=$(s.container).attr('data-id'),dv=$(s.pub_content).attr('def-val'),content=$(s.pub_content).val();if(content==dv){$(s.pub_content).focus();return false;} $.ajax({url:FTXIAER.root+'/?m=showitem&a=comment',type:'POST',data:{id:id,content:content},dataType:'json',success:function(result){if(result.status==1){$(s.pub_content).val('');$(s.page_list).prepend(result.data);}else{$.ftxia.tip({content:result.msg,icon:'error'});}}});});}};$.chengxuxia.comment.init();})(jQuery);(function($){$('.J_coupon').live('click',function(){if(!$.ftxia.dialog.islogin())return!1;var link=$(this).data('href');$(this).attr({'href':link,'target':'_blank'});});var sign=$("div.sign");sign.hover(function(){$(this).find(".box-sign").show();},function(){$(this).find(".box-sign").hide();});})(jQuery); }