(function($){

	$(window).load(function(){
		
		//delete first item
		$('#aside .nav3').each(function(){
			$(this).children('li:first').remove();
		});
		
		//delete first item
		$('#aside .nav4').each(function(){
			$(this).children('li:first').remove();
		});
		
		var bread=$('#bread span:eq(2)');
		var img_h2="";
		
		if($(bread).attr('class')=="id21"){
			bread_class="intro";
			img_h2='<img src="/chuko/library/17.png" alt="学園紹介" width="210" height="30" />';
		}else if($(bread).attr('class')=="id22"){
			bread_class="cur";
			img_h2='<img src="/chuko/library/18.png" alt="教育内容" width="210" height="30" />';
		}else if($(bread).attr('class')=="id26"){
			bread_class="life";
			img_h2='<img src="/chuko/library/19.png" alt="学生生活" width="210" height="30" />';
		}else if($(bread).attr('class')=="id27"){
			bread_class="lead";
			img_h2='<img src="/chuko/library/20.png" alt="進路状況" width="210" height="30" />';
		}else if($(bread).attr('class')=="id28"){
			bread_class="exa";
			img_h2='<img src="/chuko/library/21.png" alt="入試情報" width="210" height="30" />';
		}else if($(bread).attr('class')=="id29"){
			bread_class="faq";
			img_h2='<img src="/chuko/library/22.png" alt="よくある質問" width="210" height="30" />';
		}else if($(bread).attr('class')=="id30"){
			bread_class="news";
			img_h2='<img src="/chuko/library/30.png" alt="お知らせ一覧（カテゴリーで探す）" width="210" height="30" />';
		}else if($(bread).attr('class')=="id32"){
			bread_class="access";
			img_h2='<img src="/chuko/library/29.png" alt="交通案内" width="210" height="30" />';
		}else if($(bread).attr('class')=="id33"){
			bread_class="gallery";
			img_h2='';
		}else if($(bread).attr('class')=="id42"){
			bread_class="sitemap";
			img_h2='<img src="/chuko/library/31.png" alt="サイトマップ" width="210" height="30" />';
		}
		
		//main_image
		//$('#main_image').append('<div class="'+bread_class+'"><h2>'+$(bread).text()+'</h2></div>');
		$('#main_image').children('div').addClass(bread_class);
		
		//aside
		$('#aside .nav').prepend('<h2>'+img_h2+'</h2>');
		
		//bread
		
		if($('#bread a span:last').text() == $('#bread #page_name').text()  ){
			$('#bread a span:last').remove();
			$('#bread .bread_gt:last').remove();
			
		}
		
		$('#bread').toggle();
		
	});
	
	
})(jQuery);

