/* Copyright (C) 2007 - 2011 YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */

(function(a){var b=function(){};b.prototype=a.extend(b.prototype,{name:"ApplicationEdit",options:{url:"index.php?option=com_zoo&controller=configuration",application_id:0,application_group:""},initialize:function(b,d){this.options=a.extend({},this.options,d);var c=this,e=a("#parameter-accordion"),g=a("#template");g.bind("change",function(){var b=a('<span class="loader">').insertAfter(g);e.fadeOut().accordion("destroy");a.ajax({url:c.options.url,data:{task:"getApplicationParams",format:"raw","cid[]":c.options.application_id,
group:c.options.application_group,template:a(this).val()},success:function(a){e.html(a).fadeIn().accordionMenu({mode:"slide",display:0});b.remove()}})})}});a.fn[b.prototype.name]=function(){var f=arguments,d=f[0]?f[0]:null;return this.each(function(){var c=a(this);if(b.prototype[d]&&c.data(b.prototype.name)&&d!="initialize")c.data(b.prototype.name)[d].apply(c.data(b.prototype.name),Array.prototype.slice.call(f,1));else if(!d||a.isPlainObject(d)){var e=new b;b.prototype.initialize&&e.initialize.apply(e,
a.merge([c],f));c.data(b.prototype.name,e)}else a.error("Method "+d+" does not exist on jQuery."+b.name)})}})(jQuery);
