window.addEvent('domready', function() {

//        if($chk($('leftNavi').getFirst('div.navibox')))
//            $('leftNavi').getFirst('div.navibox').grab(endImg, 'before');

        var openLink=null;
	var chk=$chk(openLink= $('leftNavi').getElement('a.NaviLink_active'));

	if (openLink != null) {
                if($chk($(openLink.getNext('ul')))){
                    var openList = $(openLink.getNext('ul'));
                    var openListHeight = openList.getComputedSize().height;
                    var paddingTop = openList.getStyle('padding-top');
                    var paddingBottom = openList.getStyle('padding-bottom');
                    openList.setStyles({
                            'height': 0,
                            'padding-top': 0,
                            'padding-bottom': 0,
                            'display': 'block'
                    });

                    window.openThisList = function () {
                            var openTween = new Fx.Morph(openList, {duration: 1000});
                            openTween.start({
                                    'height': openListHeight,
                                    'padding-top': paddingTop,
                                    'padding-bottom': paddingBottom
                            });
                    }

                    window.setTimeout("openThisList()", 600);
                }
	}
	
	
	/*var naviTopItems = $$('li.top');
	naviTopItems.addEvent('mouseover', function() {
		this.getChildren('ul').setStyles({
			'top': 36,
			'left': 6
		})
	})
	naviTopItems.addEvent('mouseout', function() {
		this.getChildren('ul').setStyles({
			'top': 9999,
			'left': 9999
		})
	})*/
})
