if(typeof Solo=="undefined"){var Solo={}}if(typeof Solo.System=="undefined"){Solo.System={};Solo.System.notification={iconURL:""};Solo.System.params={AjaxURL:"",useIFrame:false,errorCallback:null,iFrame:null,iFrameCallbackError:null,iFrameCallbackSuccess:null,password:""};Solo.System.translations=[];Solo.System.modalDialog=null}(function(a){Solo.System.submitForm=function(c,b){if(!(typeof(b)==="undefined")){a("#"+c+" input[name='task']").val(b)}a("#"+c).submit()};Solo.System.defaultErrorHandler=function(b){alert("An error has occurred\n"+b)};Solo.System.doIframeCall=function(e,b,c){akeeba_iframecb_success=b;akeeba_iframecb_error=c;Solo.System.params.iFrame=document.createElement("iframe");a(akeeba_iframe).css({display:"none",visibility:"hidden",height:"1px"}).attr("onload","Solo.System.iframeCallback").insertAfter("#response-timer");var d=Solo.System.params.AjaxURL+"&"+a.param(e);a(Solo.System.params.iFrame).attr("src",d)};Solo.System.iframeCallback=function(){var h=null;if(Solo.System.params.iFrame.contentDocument){h=Solo.System.params.iFrame.contentDocument}else{h=Solo.System.params.iFrame.contentWindow.document}var g=h.body.innerHTML;a(Solo.System.params.iFrame).remove();Solo.System.params.iFrame=null;var f=null;var d="";var b=g.indexOf("###");if(b==-1){g="Invalid AJAX data: "+g;if(Solo.System.params.iFrameCallbackError==null){if(Solo.System.params.errorCallback!=null){Solo.System.params.errorCallback(g)}}else{Solo.System.params.iFrameCallbackError(g)}return}else{if(b!=0){f=g.substr(0,b);d=g.substr(b)}else{d=g}}d=d.substr(3);var b=d.lastIndexOf("###");d=d.substr(0,b);try{var e=JSON.parse(d)}catch(c){var g=c.message+"\n
\n
\n"+d+"\n
";if(Solo.System.params.iFrameCallbackError==null){if(Solo.System.params.errorCallback!=null){Solo.System.params.errorCallback(g)}}else{Solo.System.params.iFrameCallbackError(g)}return}Solo.System.params.iFrameCallbackSuccess(e)};Solo.System.doAjax=function(f,d,g,b,j){if(Solo.System.params.useIFrame){Solo.System.doIframeCall(f,d,g);return}if(b==null){b=true}if(!b){var c=new Date().getTime()/1000;var k=parseInt(c,10);var h=Math.round((c-k)*1000)/1000;f._cacheBustingJunk=h}if(j==null){j=600000}var e={type:"POST",url:Solo.System.params.AjaxURL,cache:false,data:f,timeout:j,success:function(q){var p=null;var n="";var l=q.indexOf("###");if(l==-1){q=Solo.System.sanitizeErrorMessage(q);q="Invalid AJAX data: "+q;if(g==null){if(Solo.System.params.errorCallback!=null){Solo.System.params.errorCallback(q)}}else{g(q)}return}else{if(l!=0){p=q.substr(0,l);n=q.substr(l)}else{n=q}}n=n.substr(3);var l=n.lastIndexOf("###");n=n.substr(0,l);try{var o=JSON.parse(n)}catch(m){n=Solo.System.sanitizeErrorMessage(n);var q=m.message+"\n
\n
\n"+n+"\n
";if(g==null){if(Solo.System.params.errorCallback!=null){Solo.System.params.errorCallback(q)}}else{g(q)}return}d(o)},error:function(l,o,n){var m="AJAX Loading Error
HTTP Status: "+l.status+" ("+l.statusText+")
";m=m+"Internal status: "+o+"
";m=m+"XHR ReadyState: "+l.readyState+"
";m=m+"Raw server response:
"+Solo.System.sanitizeErrorMessage(l.responseText);if(g==null){if(Solo.System.params.errorCallback!=null){Solo.System.params.errorCallback(m)}}else{g(m)}}};if(b){var i=window.jQuery.manageAjax;if(typeof i=="undefined"){var i=a.manageAjax}if(typeof i=="undefined"){var i=akeeba.jQuery.manageAjax}i.add("akeeba-ajax-profile",e)}else{akeeba.jQuery.ajax(e)}};Solo.System.sanitizeErrorMessage=function(b){if(b.indexOf("-1){b="(HTML containing script tags)"}return b};Solo.System.doEncryptedAjax=function(e,b,d){json=JSON.stringify(e);if(Solo.System.params.password.length>0){json=AesCtr.encrypt(json,Solo.System.params.password,128)}var f={json:json};var c={type:"POST",url:Solo.System.params.AjaxURL,cache:false,data:f,timeout:600000,success:function(l){var k=null;var i="";var g=l.indexOf("###");if(g==-1){l="Invalid AJAX data: "+l;if(d==null){if(Solo.System.params.errorCallback!=null){Solo.System.params.errorCallback(l)}}else{d(l)}return}else{if(g!=0){k=l.substr(0,g);i=l.substr(g)}else{i=l}}i=i.substr(3);g=i.lastIndexOf("###");i=i.substr(0,g);if(Solo.System.params.password.length>0){i=AesCtr.decrypt(i,Solo.System.params.password,128)}try{var j=JSON.parse(i)}catch(h){errorMessage=h.message+"\n
\n
\n"+i+"\n
";if(d==null){if(Solo.System.params.errorCallback!=null){Solo.System.params.errorCallback(errorMessage)}}else{d(errorMessage)}return}b(j)},error:function(g,j,i){var h="AJAX Loading Error: "+j;if(d==null){if(Solo.System.params.errorCallback!=null){Solo.System.params.errorCallback(h)}}else{d(h)}}};a.ajax(c)};Solo.System.checkAll=function(d,g){if(!g){g="cb"}if(d.form){var j=0;for(var b=0,h=d.form.elements.length;b0){setTimeout(function(f){return function(){f.close()}}(d),b)}};a.extend(a.easing,{none:function(e,d,c,b,f){return c+b*e}});a(document).ready(function(){var b=window.jQuery.manageAjax;if(typeof b=="undefined"){var b=a.manageAjax}if(typeof b=="undefined"){var b=akeeba.jQuery.manageAjax}var c=b.create("akeeba_ajax_profile",{queue:true,abortOld:false,maxRequests:1,preventDoubbleRequests:false,cacheResponse:false});Solo.System.notification.askPermission()})}(akeeba.jQuery));