function kunenatableOrdering(a,c,b,d){var d=document.getElementById(d);d.filter_order.value=a;d.filter_order_Dir.value=c;d.submit(b);}jQuery(document).ready(function(a){a("input.kcheckall").click(function(){a(".kcheck").prop("checked",a(this).prop("checked"));});a("#kchecktask").change(function(){var b=a("select#kchecktask").val();if(b=="move"){a("#kchecktarget").attr("disabled",false).trigger("liszt:updated");}else{a("#kchecktarget").attr("disabled",true);}});a("input.kcatcheckall").click(function(){a("input.kcatcheckall:checkbox").not(this).prop("checked",this.checked);});a("input.kcheckallcategories").click(function(){a("input.kcheckallcategory:checkbox").not(this).prop("checked",this.checked);});a(document).ready(function(){a("[rel=popover]").popover();});a("#avatar_gallery_select").change(function(){var c=a("select#avatar_gallery_select").val();var b=a("#gallery_list");b.empty();a.ajax({dataType:"json",url:a("#kunena_url_avatargallery").val(),data:"gallery_name="+c}).done(function(d){a.each(d,function(e,f){b.append('<li class="span2"><input id="radio'+c+"/"+f.filename+'" type="radio" value="gallery/'+c+"/"+f.filename+'" name="avatar"><label class=" radio thumbnail" for="radio'+c+"/"+f.filename+'"><img alt="" src="'+f.url+'"></label></li>');});}).fail(function(d){});});if(a.fn.datepicker!=undefined){a("#ann-date .input-append.date").datepicker({orientation:"top auto",format:"yyyy-mm-dd"});a("#ann-date2 .input-append.date").datepicker({orientation:"top auto",format:"yyyy-mm-dd"});a("#ann-date3 .input-append.date").datepicker({orientation:"top auto",format:"yyyy-mm-dd"});}a("#clearcache").on("click",function(b){b.preventDefault();a("#clearcache").addClass("btn-success");a("#clearcache").html('<i class="icon-checkmark-2"></i>'+Joomla.JText._("COM_KUNENA_CLEARED"));});});