var ac={rand:function(){return ac.str.cast(Math.random())},randHex:function(){var a=ac.rand().split(".");return sprintf("%x",a[1])},hidden:function(a){return"none"==$J(a).css("display")},empty:function(a){for(var c in a)if("function"!=typeof a[c])return!1;return!0},redirect:function(a){a.match(/^http/)||(a=ac_js_site.p_link+"/"+a);window.location.href=a},refresh:function(){window.location.reload(!0)},highlight:function(a){a.focus();a.select()},distance:function(a,c){return Math.sqrt(Math.pow(a,2)+ Math.pow(c,2))},uniqid:function(){return ac.encodeBase64(Math.random().toString()).replace(/(\+|\/|=)+/,"")},clickToEdit:function(a,c,d){var e=ac.uniqid();c=c||function(){};d=d||{};$J(document).on("click",a,function(a){d.allowPropagation||a.stopPropagation();a=$J(this);a.hasClass("click-to-edit")||(a.addClass("click-to-edit "+e).data("click-to-edit-original",a.html()),!1!==d.select_all&&document.execCommand("selectAll",!1,null))});$J(document).on("keypress",a,function(a){if(13==a.which){var d=$J(this); a.preventDefault();d.blur();c(d)}});$J(document).on("click",function(a){_.each($J(".click-to-edit."+e),function(a){a=$J(a);a.removeClass("click-to-edit "+e);c(a)})})},decodeBase64:function(a){return window.atob?decodeURIComponent(window.atob(a)):decodeURIComponent(ac._decodeBase64(a))},encodeBase64:function(a){return window.btoa?window.btoa(encodeURIComponent(a)):ac._encodeBase64(encodeURIComponent(a))},var:function(a,c){var d={};"string"==typeof a?d[a]=c:"object"==typeof a&&(d=a);$J.each(d,function(a, c){for(var e=$J("*[var='"+ac.str.escape(a)+"']"),f=0,l;f