/* Copy Right 2009 SABIS®-Creative */


var liteweb_Accordian={bodyOHeight:0,debug:false,S:5,T:15,selectedClass:"head-selected",selectedItem:"",ac:{},$:function(d){return document.getElementById(d);},dsp:function(d,v){if(!v)
return d.style.display;else
d.style.display=v;},sh:function(d,v){var _=liteweb_Accordian;if(!v)
{if(_.dsp(d)!="none"&&""!=_.dsp(d))
return d.offsetHeight;viz=d.style.visibility;d.style.visibility='hidden';o=_.dsp(d);_.dsp(d,"block");r=parseInt(d.offsetHeight);_.dsp(d,o);d.style.visibility=viz;return r;}
else
{d.style.height=v;$(".home-center").height($("#left").height()>_.bodyOHeight?$("#left").height():_.bodyOHeight);}},ct:function ct(d){var _=liteweb_Accordian;d=_.$(d);if(_.sh(d)>0){v=Math.round(_.sh(d)/d.s);v=v<1?1:v;v=_.sh(d)-v;_.sh(d,v+'px');d.style.opacity=v/d.maxh;d.style.filter="alpha(opacity="+(v*100/d.maxh)+");";}
else{_.sh(d,0);_.dsp(d,"none");clearInterval(d.t);}},et:function(d){var _=liteweb_Accordian;d=_.$(d);if(_.sh(d)<d.maxh){v=Math.round((d.maxh-_.sh(d))/d.s);v=v<1?1:v;v=_.sh(d)+v;_.sh(d,v+"px");d.style.opacity=v/d.maxh;d.style.filter="alpha(opacity="+(v*100/d.maxh)+");";}
else{_.sh(d,d.maxh);clearInterval(d.t);}},cl:function(d){var _=liteweb_Accordian;if(_.dsp(d)=="block"||_.dsp(d)==""){clearInterval(d.t);d.t=setInterval('liteweb_Accordian.ct("'+d.id+'")',_.T);}},ex:function(d){var _=liteweb_Accordian;if(_.dsp(d)=="none"){_.dsp(d,"block");d.style.height="0px";clearInterval(d.t);d.t=setInterval('liteweb_Accordian.et("'+d.id+'")',_.T);}},cc:function(n,v){if(n.tc)
n.className=n.className.replace(new RegExp(" "+n.tc+"+"),"");},hc:function()
{var _=liteweb_Accordian;if(_.bodyOHeight==0)
{_.bodyOHeight=$(".home-center").height();}
for(i=0;i<this.c.length;i++){cn=this.c[i];n=cn.substr(0,cn.indexOf('-'));if((n+"-header")==this.id){_.ex(_.$(n+"-content"));n=_.$(n+"-header");_.cc(n,'__');n.className=n.className+" "+n.tc;}else{_.cl(_.$(n+"-content"));_.cc(_.$(n+"-header"),"");}}},add:function(container,classSelected){var _=liteweb_Accordian;if(_.ac[container])
{if(_.debug)
alert("Accordian already exist");return;}
_.ac[container]={"c":container,"cs":classSelected};l=_.$(container).getElementsByTagName('div');c=[];for(i=0;i<l.length;i++){h=l[i].id;if(h.substr(h.indexOf('-')+1,h.length)=="content")
c.push(h);}
sel=null;for(i=0;i<l.length;i++){h=l[i].id;if(h.substr(h.indexOf('-')+1,h.length)=="header"){var Selected=false;var _h=_.$(h);if(_.selectedClass)
{var r=new RegExp(_.selectedClass+"+");Selected=_h.className.match(r)!=undefined;}
Selected=Selected||_.selectedItem?_.selectedItem+"-header"==_h.id:false;if(!sel)
sel=Selected?_h:null;d=_.$(h.substr(0,h.indexOf('-'))+"-content");d.style.display=!Selected?'none':"block";d.style.overflow="hidden";d.maxh=_.sh(d);d.s=_.S?_.S:7;_h.tc=classSelected;_h.c=c;_h.onclick=_.hc;_h.ac=_.ac[container];}}
if(sel)
{try
{$(sel).click();}
catch(e)
{alert(e);}}}}