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

(function(c){var b=function(){};c.extend(b.prototype,{name:"accordionMenu",initialize:function(d,a){a=c.extend({mode:"default",display:null},a);var e=d.find("ul.accordion"),f=d.find("li.toggler");f.length&&f.each(function(i){var h=c(this),j=h.find("span:first"),g=c(e[i]);h.hasClass("active")||i==a.display?g.show():g.hide();j.bind("click",function(){a.mode=="slide"?g.slideToggle():g.toggle();j.toggleClass("active");h.toggleClass("active")})})}});c.fn[b.prototype.name]=function(){var d=arguments,a=
d[0]?d[0]:null;return this.each(function(){var e=c(this);if(b.prototype[a]&&e.data(b.prototype.name)&&a!="initialize")e.data(b.prototype.name)[a].apply(e.data(b.prototype.name),Array.prototype.slice.call(d,1));else if(!a||c.isPlainObject(a)){var f=new b;b.prototype.initialize&&f.initialize.apply(f,c.merge([e],d));e.data(b.prototype.name,f)}else c.error("Method "+a+" does not exist on jQuery."+b.name)})}})(jQuery);

