/home/arranoyd/magicraft/wp-content/plugins/incsub-support/assets/js/support-system.min.js
!function(t,e){"use strict";e.Support_System={name:"Support System",version:"2.0",libs:{},init:function(t,e){this.scope=t||this.scope;for(var i in this.libs)this.init_lib(i,e);return t},init_lib:function(e,i){return this.libs.hasOwnProperty(e)?i&&i.hasOwnProperty(e)?("undefined"!=typeof this.libs[e].settings?t.extend(!0,this.libs[e].settings,i[e]):"undefined"!=typeof this.libs[e].defaults&&t.extend(!0,this.libs[e].defaults,i[e]),this.libs[e].init.apply(this.libs[e],[this.scope,i[e]])):(i=i instanceof Array?i:new Array(i),this.libs[e].init.apply(this.libs[e],i)):function(){}}},t.fn.support_system=function(){var t=Array.prototype.slice.call(arguments,0);return this.each(function(){return Support_System.init.apply(Support_System,[this].concat(t)),this})}}(jQuery,window,window.document),function(t){Support_System.libs.filter={name:"Support System Filter",version:"2.0",init:function(){var e=t('input[name="support-system-submit-filter"]'),i=t(".cat-id"),s=t("#support-system-filter");return s.length&&i.length&&e.length?(i.change(function(e){e.preventDefault(),$this=t(this),$this.closest("form").submit()}),void e.hide()):function(){}}}}(jQuery,window,window.document),function(t){Support_System.libs.attachments={name:"Support System Attachments",version:"2.0",defaults:{container_selector:"",button_text:"Add files...",button_class:"",first_slot:0,slot_name:"support-attachment",current_files:[],files_list_id:"support-attachments-list",remove_file_title:"Remove file",remove_link_class:"",remove_link_text:"[x]",description:""},init:function(e,i){var s=this;this.settings=this.settings||t.extend({},this.defaults,i);var n=this.settings,a=t(this.settings.container_selector);if(!a.length)return!1;var r=n.first_slot;return a.each(function(){var e=t("<button/>",{text:n.button_text,"class":n.button_class});e.data("settings",n),e.data("current_slot",r),e.click(function(e){e.preventDefault(),s.addFileSlot(t(this),s)});var i=t("<ul/>",{id:"support-attachments-list"});e.data("list",t(i)),t(this).append(i).append(e).append(n.description)})},addFileSlot:function(e,i){var s=t(e),n=s.data("settings"),a=s.data("current_slot"),r=s.data("list"),o=t("<input/>",{type:"file",id:n.slot_name+"-"+a,name:n.slot_name+"[]"}),l=t("<a>",{"class":"remove-file "+n.remove_link_class,"data-remove-file":n.slot_name+"-"+a,text:n.remove_link_text,href:"",title:n.remove_file_title});l.click(function(e){e.preventDefault(),i.removeFileSlot(t(this).data("remove-file"),s)}),r.append(t("<li>").hide().append(o).append(l).fadeIn()),s.data("current_slot",++a)},removeFileSlot:function(e){var i=t("#"+e);i&&i.parent().remove()}}}(jQuery,window,window.document),function(t){Support_System.libs.faqs={name:"Support System FAQS",version:"2.0",defaults:{spinner_class:"support-system-spinner"},init:function(e){this.settings=this.settings||t.extend({},this.defaults,e);var i=this.settings;t(".vote-button").click(function(e){e.preventDefault();var s=t(this).data("vote"),n=t(this).data("faq-id"),a=t(this).parent();a.find("button").attr("disabled","true");var r=a.find("img");r.show();var o=t(this).siblings("."+i.spinner_class);o.css("display","inline-block");var l={vote:s,faq_id:n,action:"vote_faq_question"};t.post(support_system_strings.ajaxurl,l,function(){r.hide(),o.hide()})}),t(".faq-category-wrap").hide(),t(".faq-category-question").hide(),t(".faq-category").click(function(e){e.preventDefault(),t(".faq-category").attr("disabled",!1),t(this).attr("disabled",!0);var i=t(this).data("cat-id");t(".faq-category-wrap").hide(),t("#faq-category-"+i).fadeIn()}),t(".faq-category-answer").hide(),t(".faq-category-wrap .postbox .hndle").click(function(){t(".faq-category-wrap .postbox").addClass("closed"),t(this).parent().animate().toggleClass("closed");var e=t(this).data("faq-id");t(".faq-category-answer").slideUp(),t("#faq-answer-"+e).slideDown()}),t(".faq-category").first().trigger("click")}}}(jQuery,window,window.document);