!function($){function selection(a,b){var c=this.find(a).filter(b||"*");return $.extend(c,{val:function(a){var b=null,d=[];return arguments.length?(this.checked(!1),"array"===$.type(a)?$.each(a,$.proxy(function(a,b){this.filter("[value='"+b+"']").checked(!0)},this)):this.filter("[value='"+a+"']").checked(!0),c):(b=this.filter(":checked"),b.length>1?($.each(b,function(a,b){d.push($(b).val())}),d):b.val())}})}$.extend($.fn,{translation:function(a){function b(a){a.find("[t]").each(function(){var a=$(this),b=a.attr("t");b&&$.each(b.split(";"),function(b,d){var e=d.split("::"),f="";1===e.length?($.each(e[0].split("+"),function(a,b){f+=c(b)}),a.text(f),a.is("span.set-menu-label")&&(a.parent().is("li.set-item")||a.parent().is("a.set-menu"))?a.attr("title",f):a.is("span")&&a.parent().is("li[data-for]")?a.attr("title",f):a.is("label.ui-label")||a.is("a.ui-button")||a.is("li[data-for]")||a.is("label.u-label")||a.is("a.u-button")||a.is("label span")||a.is(".ellipsisNode")||a.is("a.ui-button-special > label")||a.is("label.ui-label-sub")||a.is("a.ivs-shape-draw span")?a.attr("title",f):(a.is("span.fn-bcbbb + span")||a.is("span.fn-bcccc + span"))&&a.attr("title",f)):($.each(e[1].split("+"),function(a,b){f+=c(b)}),a.attr(e[0],f))})})}function c(b){if($.isFunction(a))return a(b)||"";if($.isPlainObject(a))return a[b]||"";if($.isFunction(tl)){var c=b.split(/[\[\]]/),d=tl(c[0]),e=c[1]-0;if(!isNaN(e)){var f=d.split("|");d=f[e]}return d}return b}return this.each(function(){b($(this))})},testBackgroundImage:function(a){var b=this;return $.get(a,function(){b.css("background",'url("'+a+'") no-repeat scroll center bottom rgba(0, 0, 0, 0)')}),this},sequence:function(a,b){if(arguments.length)return a=b?a.split(b):a,$.each(this,function(b,c){$(c).val(a[b])}),this;var c=[];return $.each(this,function(a,b){c.push($(b).val())}),c},checkboxs:function(a){return selection.call(this,":checkbox",a)},radios:function(a){return selection.call(this,":radio",a)},options:function(){var a=this.prop("options");return $.extend(a,{owner:this,_opt:a,addOpt:function(a,b,c,d){"number"!=$.type(a)&&(d=c,c=b,b=a,a=void 0);var e=$("<option>"+b+"</option>");return"undefined"!=$.type(c)&&e.prop("value",c),"object"==$.type(d)&&e.attr(d),"undefined"==$.type(a)?this.owner.append(e):(a=0>a?this.length+a:a,a=0>a?0:a,$(this[a]).before(e)),this},removeOpt:function(a,b){if("number"==$.type(a)){var c=$(this).toArray();c.splice(a,b),this.owner.html(c)}else"undefined"==$.type(a)?this.owner.html(""):this.owner[0].options.remove(this.valueIndex(a));return this},valueIndex:function(a){for(var b=0;b<this.length;b++)if(this[b].value==a)return b;return-1},selectedOptions:function(){for(var b=[],c=0,d=a.length;d>c;c++)a[c].selected&&b.push(a[c]);return b}})}}),$.extend({comparVersion:function(a,b){for(var c=a.split("."),d=b.split("."),e=Math.max(c.length,d.length),f=0;e>f;++f){var g=(c[f]||0)-(d[f]||0);if(g)return g}return 0},bytesToSize:function(a,b,c){var d,e,f=1024,g=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],h=c?c.match(/(\w+)/g):[],i=[],j=0;return b=b?b:2,$.each(h,function(a,b){i.push($.inArray(b,g))}),j=Math.min.apply(null,i),0===a?(c=c?g[j]:"B","0 "+c):(d=Math.floor(Math.log(a)/Math.log(f)),d=d>=g.length?g.length-1:d,c&&-1===$.inArray(d,i)&&(d=j>d?j:Math.max.apply(null,i)),e=a/Math.pow(f,d),(parseInt(e*Math.pow(10,b))/Math.pow(10,b)).toFixed(b)+" "+g[d])},toRemainTime:function(a){var b,c,d,e,f=[tl("com_time.second"),tl("com_time.min"),tl("conf_gen.hour"),tl("info_holiday.days")],g="";return a=parseInt(a),e=Math.floor(a/60/60/24),d=Math.floor(a/60/60)-24*e,c=Math.floor(a/60)-1440*e-60*d,b=Math.floor(a)-60*c-60*d*60-60*e*60*24,e&&(g+=e+f[3]),d&&(g+=d+f[2]),c&&(g+=c+f[1]),g+=b+f[0]},toChangeTime:function(a){a=0>a?0:a;var b=Math.floor(a/86400),c=a%86400,d=$.pad(Math.floor(c/3600)+24*b,2),e=c%3600,f=$.pad(Math.floor(e/60),2),g=e%60,h=$.pad(Math.floor(g),2);return[d,f,h].join(":")},calculateSeconds:function(a){return a=a.split(":"),3600*(a[0]-0)+60*(a[1]-0)+(a[2]-0)},makeAryByLength:function(a,b){for(var c=[],d=a;a+b>d;d++)c.push(d);return c},initArray:function(a,b){for(var c=[],d="function"==typeof b,e=0;a>=e;e++)c.push(d?b(e):b);return c},compareTime:function(a,b){var c=$.type(a),d=function(a){var b=a.split(":");return 1e3*(3600*b[0]+60*b[1]+b[2])},e=0;if("date"===c)e=a-b;else{var f=/\s?\d{2}:\d{2}:\d{2}/,g=a.replace(f,""),h=b.replace(f,"");e=""===g?d(a)-d(b):new Date($.formatDate(g,"yyyy/MM/dd")).getMilliseconds()+d(a.match(f)[0])-(new Date($.formatDate(h,"yyyy/MM/dd")).getMilliseconds()+d(b.match(f)[0]))}return e},concatPath:function(){var a=arguments,b=a[0]||"",c=a[a.length-1]||"",d=$.browser.Platform.win?"\\":"/",e=/\w+(\\|\/)$/,f=/^[\\|\/]/;if(b=b.test(e)?b:b+d,0===a.length)return d;if(1==a.length)return b;for(var g=b,h=1,i=a.length-1;i>h;h++)g+=(a[h].test(e)?a[h]:a[h]+d).replace(f,"");return g+c.replace(f,"")},getFileName:function(a,b){var c,d=(a.match(/[^\/\\]+$/)||[""])[0];return b&&d&&(c=d.match(/(.+)\..+|(.+)/),d=c[1]||c[2]),d},htmlEscape:function(a){return a.replace(/[<>&"' ]/g,function(a){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&acute;"," ":"&nbsp;"}[a]})},htmlEscapeReverse:function(a){return a.replace(/(&lt;)|(&gt;)|(&amp;)|(&quot;)|(&acute;)|(&nbsp;)/g,function(a){return{"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&acute;":"'","&nbsp;":" "}[a]})},lineBreak:function(a){return a.replace(/\n/g,"<br/>")},mergerArrayObj:function(a,b,c,d){var e={},f={};d=d||c;var g=function(a,b,c){$.each(b,function(b,d){a[d[c]]=d})},h=function(a){var b=[];return $.each(a,function(a,c){b.push(c)}),b};return g(e,b,d),g(f,a,c),$.extend(!0,f,e),h(f)},throttle:function(a,b,c,d,e){var f=+new Date;(!c.previews||c.previews<0)&&(c.previews=f);var g=$.type(a);"function"===g&&(e=c,d=b,c=a,b=1e3,a=null),("number"===g||"number"!=$.type(b))&&(e=d,d=c,c=b,"number"===g&&(b=a),"object"!=g&&(a=null),"number"!=$.type(b)&&(b=1e3)),clearTimeout(c.tId),e&&(c.proxy=$.proxy(c.proxy||c,a,d)),f-c.previews>b&&(c.previews=f),c.tId=setTimeout(e?function(){c.proxy(),delete c.proxy,c.previews=f}:function(){$.proxy(c,a,d)(),c.previews=f},b-(f-c.previews))},delInArray:function(a,b,c,d){var e=void 0!=d?d:a.length-1;for(c=c||0;e>=c;e--)b(e,a[e])===!0&&a.splice(e,1)}}),function(){Array.prototype.erase=function(a){for(var b=this.length;b--;)this[b]===a&&this.splice(b,1);return this},Number.prototype.chk10=function(){var a=this-0;return 10>this-0?"0"+(this-0):a},Number.prototype.getBitEx=function(a,b){var c=this.toString(2),d=c.length,e="";return b=$.isNumeric(b)?b:1,e=c.substring(d-a,d-a-b),e?parseInt(e,2):0},Number.prototype.setBit=function(a,b){var c=this-0;return b?c|=1<<a:c&=~(1<<a),c},Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=0>b?Math.max(0,c+b):b||0;c>d;d++)if(this[d]===a)return d;return-1}),Array.prototype.each=function(a,b){for(var c,d=this.length,e=0;d>e&&(c=a.call(b||this[e],this[e],e),c!==!1);e++);}}(),function(){if(window.JSON&&JSON.stringify&&(!$.browser.ie||8!==$.browser.version))return!1;window.JSON=window.JSON||{};var special={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},escape=function(a){return special[a]||"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)};JSON.stringify=function(a){switch($.type(a)){case"string":return'"'+a.replace(/[\x00-\x1f\\"]/g,escape)+'"';case"array":var b=$.map(a,function(a){return JSON.stringify(a)});return"["+b+"]";case"object":var c=[];return $.each(a,function(a,b){var d=JSON.stringify(b);d&&c.push(JSON.stringify(a)+":"+d)}),"{"+c+"}";case"number":case"boolean":return""+a;case"null":return"null"}return null},JSON.parse=function(string,secure){return"string"==$.type(string)&&string.length?secure&&!/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))?null:eval("("+string+")"):null}}(),function(){!window.btoa&&$.base64&&$.base64.btoa&&(window.btoa=$.base64.btoa),!window.atob&&$.base64&&$.base64.atob&&(window.atob=$.base64.atob)}()}(jQuery);