	$(function(){
		if($.trim($.cookie('acc')) == ''){
			$.cookie('acc','acc02',{path: '/'});
		}
		$(".acc, #iconMenu, #header").each(function(){
			$("li > a, h1 > a", this).each(function(index){
				var $this = $(this);
				var id=$(this).parent().attr('id');
				var capture = id.match(/icoMenu(0[1-3])/);
				if(capture) {
					id = 'acc'+capture[1];
				}else if($this.parent().attr('tagName')=='H1'){
					id = 'acc02';
				}

				if($.trim($.cookie('acc')) != ''){
					if($.cookie('acc') == $this.parent().attr('id')){
						$this.next().show();
						$this.parent().toggleClass('active');
					}else if(id == $this.parent().attr('id')){
						$this.next().hide();
					}
				}
				$this.click(function(){
					return function($this,id){
						if(id.length != 0){
							$.cookie('acc',id,{path: '/'});
							$('#'+id).toggleClass('active');
						}

						if(id == $this.parent().attr('id')){
							var params = {height:"toggle", opacity:"toggle"};
							$this.next().animate(params).parent().siblings().children("ul:visible").animate(params)
						}

						var nextPageURL = $this.attr("href");

						location.href=nextPageURL;

						return false;
					}($this,id)
				});
			});
		});
	});

	$(function() {
		//IE6で透過pngをアクティブに
		$(document).pngFix();
		
	});
