var animatedcollapse={divholders:{},divgroups:{},lastactiveingroup:{},show:function(_1){
if(typeof _1=="object"){
for(var i=0;i<_1.length;i++){
this.showhide(_1[i],"show");
}
}else{
this.showhide(_1,"show");
}
},hide:function(_3){
if(typeof _3=="object"){
for(var i=0;i<_3.length;i++){
this.showhide(_3[i],"hide");
}
}else{
this.showhide(_3,"hide");
}
},toggle:function(_5){
this.showhide(_5,"toggle");
},addDiv:function(_6,_7){
this.divholders[_6]=({id:_6,$divref:null,attrs:_7});
this.divholders[_6].getAttr=function(_8){
var _9=new RegExp(_8+"=([^,]+)","i");
return (_9.test(this.attrs)&&parseInt(RegExp.$1)!=0)?RegExp.$1:null;
};
},showhide:function(_a,_b){
var _c=this.divholders[_a].$divref;
if(this.divholders[_a]&&_c.length==1){
var _d=this.divgroups[_c.attr("groupname")];
if(_c.attr("groupname")&&_d.count>1&&(_b=="show"||_b=="toggle"&&_c.css("display")=="none")){
if(_d.lastactivedivid&&_d.lastactivedivid!=_a){
this.slideengine(_d.lastactivedivid,"hide");
}
this.slideengine(_a,"show");
_d.lastactivedivid=_a;
}else{
this.slideengine(_a,_b);
}
}
},slideengine:function(_e,_f){
var _10=this.divholders[_e].$divref;
if(this.divholders[_e]&&_10.length==1){
var _11={height:_f};
if(_10.attr("fade")){
_11.opacity=_f;
}
_10.animate(_11,_10.attr("speed")?parseInt(_10.attr("speed")):500);
return false;
}
},generatemap:function(){
var map={};
for(var i=0;i<arguments.length;i++){
if(arguments[i][1]!=null){
map[arguments[i][0]]=arguments[i][1];
}
}
return map;
},init:function(){
var ac=this;
jQuery(document).ready(function($){
var _16=ac.getCookie("acopendivids");
var _17=ac.getCookie("acgroupswithpersist");
if(_16!=null){
_16=(_16=="nada")?[]:_16.split(",");
}
_17=(_17==null||_17=="nada")?[]:_17.split(",");
jQuery.each(ac.divholders,function(){
this.$divref=$("#"+this.id);
if((this.getAttr("persist")||jQuery.inArray(this.getAttr("group"),_17)!=-1)&&_16!=null){
var _18=(jQuery.inArray(this.id,_16)!=-1)?"block":"none";
}else{
var _18=this.getAttr("hide")?"none":null;
}
this.$divref.css(ac.generatemap(["height",this.getAttr("height")],["display",_18]));
this.$divref.attr(ac.generatemap(["groupname",this.getAttr("group")],["fade",this.getAttr("fade")],["speed",this.getAttr("speed")]));
if(this.getAttr("group")){
var _19=ac.divgroups[this.getAttr("group")]||(ac.divgroups[this.getAttr("group")]={});
_19.count=(_19.count||0)+1;
if(!_19.lastactivedivid&&this.$divref.css("display")!="none"||_18=="block"){
_19.lastactivedivid=this.id;
}
this.$divref.css({display:"none"});
}
});
jQuery.each(ac.divgroups,function(){
if(this.lastactivedivid){
ac.divholders[this.lastactivedivid].$divref.show();
}
});
var _1a=$("*[rel]").filter("[@rel^=\"collapse-\"], [@rel^=\"expand-\"], [@rel^=\"toggle-\"]");
var _1b=/(collapse-)|(expand-)|(toggle-)/;
_1a.each(function(){
$(this).click(function(){
var _1c=this.getAttribute("rel");
var _1d=_1c.replace(_1b,"");
var _1e=(_1c.indexOf("collapse-")!=-1)?"hide":(_1c.indexOf("expand-")!=-1)?"show":"toggle";
return ac.showhide(_1d,_1e);
});
});
$(window).bind("unload",function(){
ac.uninit();
});
});
},uninit:function(){
var _1f="",_20="";
jQuery.each(this.divholders,function(){
if(this.$divref.css("display")!="none"){
_1f+=this.id+",";
}
if(this.getAttr("group")&&this.getAttr("persist")){
_20+=this.getAttr("group")+",";
}
});
_1f=(_1f=="")?"nada":_1f.replace(/,$/,"");
_20=(_20=="")?"nada":_20.replace(/,$/,"");
this.setCookie("acopendivids",_1f);
this.setCookie("acgroupswithpersist",_20);
},getCookie:function(_21){
var re=new RegExp(_21+"=[^;]*","i");
if(document.cookie.match(re)){
return document.cookie.match(re)[0].split("=")[1];
}
return null;
},setCookie:function(_23,_24,_25){
if(typeof _25!="undefined"){
var _26=new Date();
_26.setDate(_26.getDate()+_25);
document.cookie=_23+"="+_24+"; path=/; expires="+_26.toGMTString();
}else{
document.cookie=_23+"="+_24+"; path=/";
}
}};


