text: /* Copyright (C) YOOtheme GmbH, http://www.gnu.org/licenses/gpl.html GNU/GPL */
  
  (function($){var Plugin=function(){};Plugin.prototype=$.extend(Plugin.prototype,{name:"BrowseItems",initialize:function(form){this.timer=null;this.delay=1500;form.find("td.priority").each(function(){var input=$(this).find("input.value:first");input.bind("change",function(){if(this.timer)clearTimeout(this.timer);this.timer=setTimeout(function(){var post={};var table=form.find("table.list:first");$.each(form.serializeArray(),function(i,field){post[field.name]=field.value});table.addClass("loader");$.ajax({url:form.attr("action"),type:"post",datatype:"json",data:$.extend(post,{task:"savepriority",format:"raw"}),success:function(data){table.removeClass("loader");$.Message(data,true)}})},this.delay)});$(this).find("span.plus:first, span.minus:first").bind("click",function(){var val=$(this).is(".plus")?1:-1;input.val(input.val().toInt()+val).trigger("change")})})}});$.fn[Plugin.prototype.name]=function(){var args=arguments;var method=args[0]?args[0]:null;return this.each(function(){var element=$(this);if(Plugin.prototype[method]&&element.data(Plugin.prototype.name)&&method!="initialize"){element.data(Plugin.prototype.name)[method].apply(element.data(Plugin.prototype.name),Array.prototype.slice.call(args,1))}else if(!method||$.isPlainObject(method)){var plugin=new Plugin;if(Plugin.prototype["initialize"]){plugin.initialize.apply(plugin,$.merge([element],args))}element.data(Plugin.prototype.name,plugin)}else{$.error("Method "+method+" does not exist on jQuery."+Plugin.name)}})}})(jQuery);(function($){var Plugin=function(){};Plugin.prototype=$.extend(Plugin.prototype,{name:"EditItem",initialize:function(form){$.each(["apply","save","sav-new"],function(i,task){$("#toolbar-"+task+" a, #toolbar-"+task+" button").bind("validate.adminForm",function(event){if(form.find('input[name="name"]').val()==""){form.find("span.message-name").css("display","block");event.preventDefault()}})});var categories_elem=$("#categories"),primary_elem=$("#paramsprimary_category");categories_elem.bind("change",function(){var categories=$(this).val()?$(this).val():[],primary=primary_elem.val();if($.inArray(primary,categories)==-1)primary_elem.val(categories.length?categories.shift():"");primary_elem.trigger("liszt:updated")});primary_elem.bind("change",function(){var categories=categories_elem.val()?categories_elem.val():[],primary=$(this).val();if($.inArray(primary,categories)==-1){categories.push(primary);categories_elem.val(categories);categories_elem.trigger("liszt:updated")}});form.find("div.element").each(function(){$(this).delegate("div.more-options div.trigger div.button","click",function(){var more=$(this).closest("div.more-options");var show_class="show-"+$(this).attr("class").split(" ").shift();more.hasClass(show_class)?more.attr("class","more-options"):more.attr("class","more-options "+show_class)}).find("div.row > input:text").placeholder()})}});$.fn[Plugin.prototype.name]=function(){var args=arguments;var method=args[0]?args[0]:null;return this.each(function(){var element=$(this);if(Plugin.prototype[method]&&element.data(Plugin.prototype.name)&&method!="initialize"){element.data(Plugin.prototype.name)[method].apply(element.data(Plugin.prototype.name),Array.prototype.slice.call(args,1))}else if(!method||$.isPlainObject(method)){var plugin=new Plugin;if(Plugin.prototype["initialize"]){plugin.initialize.apply(plugin,$.merge([element],args))}element.data(Plugin.prototype.name,plugin)}else{$.error("Method "+method+" does not exist on jQuery."+Plugin.name)}})}})(jQuery);