var sub_nav_h = 167;

function initHideShow(){
	var sub_nav = $$('#header .subnavigation-bottom');
	var _opn_cls_btn = $$('#header .nav li');
	if (sub_nav.length && _opn_cls_btn.length >= 2){
		sub_nav = sub_nav[0];
		sub_nav._mooeff = new Fx.Tween($(sub_nav), {duration:500});
		_opn_cls_btn = _opn_cls_btn[1];
		_opn_cls_btn.onclick = function(){
			if (this.className.indexOf('active')!=-1){
				sub_nav._mooeff.start('height', 0);
				this.className = this.className.replace(' active', '');
				this.className = this.className.replace('active', '');
			}
			else {
				sub_nav._mooeff.start('height', sub_nav_h);
				this.className += ' active';
			}
		}
	}
}


if (window.addEventListener) {
    window.addEventListener("load", initHideShow, false);
}
else if (window.attachEvent) {
    window.attachEvent("onload", initHideShow);
}