$.namespace("trapeze.showHide");trapeze.showHide=$.Class.extend({prepareBoxes:function(){this.$box.find("."+this.conf.box_class).not(".no-slide").hide();var a=window.location.hash.replace("#","")||null;var b=[];this.$box.each(function(c,d){b.push($(d).attr("id"))});if(a&&($.inArray(a,b)>=0)){$("#"+a).addClass(this.conf.box_opened_class).find("."+this.conf.box_class).slideDown(this.conf.slide_time)}else{$(this.conf.selector+":eq("+this.conf.box_default+")").find("."+this.conf.box_class).not(".no-slide").slideDown(this.conf.slide_time).parent().addClass(this.conf.box_opened_class)}},showHideList:function(){var a=$(".parent-list");if(a.length>0){a.find(".child-list").each(function(b,c){if(!$(c).parent().hasClass("active-list")){$(c).hide().addClass("hidden")}});$(".parent-list > li > a").click(function(b){$(b.currentTarget).parent().find("ul").slideToggle(200).parent().toggleClass("browse-list");$(b.currentTarget).toggleClass("active");return false})}},setEvents:function(){$("#OpenList > li > a").click($.proxy(this.showHideBox,this));this.$box.find("h2 a").click($.proxy(function(a){$(a.currentTarget).parents(this.conf.selector).toggleClass(this.conf.box_opened_class).find("."+this.conf.box_class).slideToggle(this.conf.slide_time);return false},this))},showHideBox:function(b){var a="#"+$(b.currentTarget).attr("rel");if(!($(a).hasClass(this.conf.box_opened_class)&&!this.$box.not(a).hasClass(this.conf.box_opened_class))){this.$box.not(a).removeClass(this.conf.box_opened_class).find("."+this.conf.box_class).slideUp(this.conf.slide_time);$(a).addClass(this.conf.box_opened_class).find("."+this.conf.box_class).delay(this.conf.slide_time).slideDown(this.conf.slide_time)}return false},init:function(a){var b={box_opened_class:"opened",box_default:"0",box_class:"rbox-content",slide_time:400,selector:null};this.conf=$.extend({},b,a);this.$box=$(this.conf.selector);this.prepareBoxes();this.showHideList();this.setEvents()}});
