/*
 * yuga.js 0.5.1 - 優雅なWeb制作のためのJS
 * Copyright (c) 2007 Kyosuke Nakamura (kyosuke.jp)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */
var yuga = {
	
	uri: {
		absolutePath: function(path){
			var img = new Image();
			img.src = path;
			path = img.src;
			img.src = '#';
			return path;
		},
		anchorName: function (uri){
			return uri.split('#')[1];
		},
		isSelfLink: function(href){
			return (this.absolutePath(href) == location.href) ;
		}
	}
};
j$(function(){	
	//現在のページへのリンク
	j$('a[@href]').each(function(){
		var href = this.getAttribute('href');
		if (yuga.uri.isSelfLink(href) && !yuga.uri.anchorName(href)) {
			j$(this).addClass('current');			
		}
	});
});


j$(function(){ //jQuery Add_CSS

j$('ul#g_navi_bt').prepend('<li><a href="http://seidansha.com">HOME</a></li>'); //UL要素の中の１番目にリスト要素を挿入

j$('ul#g_navi_bt li:nth-child(1)').after('<li><a href="http://seidansha.com/aboutus">COMPANY</a></li>'); //2番目のリスト要素の次に【新しく】リスト要素を挿入
j$('ul#g_navi_bt li:nth-child(2)').after('<li><a href="http://seidansha.com/works">WORKS</a></li>'); 
j$('ul#g_navi_bt li:nth-child(3)').after('<li><a href="http://seidansha.com/blog/">BLOG</a></li>'); 
j$('ul#g_navi_bt li:nth-child(4)').after('<li><a href="http://seidansha.com/inquiry">CONTACT</a></li>'); 

j$("ul#g_navi_bt a:eq(0)").addClass("bt01");
j$("ul#g_navi_bt a:eq(1)").addClass("bt02");
j$("ul#g_navi_bt a:eq(2)").addClass("bt03");
j$("ul#g_navi_bt a:eq(3)").addClass("bt04");
j$("ul#g_navi_bt a:eq(4)").addClass("bt05");



j$('ul#footer_gnavi').prepend('<li><a href="http://seidansha.com">HOME</a></li>'); //フッターUL要素の中の１番目にリスト要素を挿入
j$('ul#footer_gnavi li:nth-child(1)').after('<li><a href="http://seidansha.com/aboutus">会社情報</a></li>'); 
j$('ul#footer_gnavi li:nth-child(2)').after('<li><a href="http://seidansha.com/works">制作事例</a></li>'); 
j$('ul#footer_gnavi li:nth-child(3)').after('<li><a href="http://seidansha.com/blog/">BLOG</a></li>'); 
j$('ul#footer_gnavi li:nth-child(4)').after('<li><a href="http://seidansha.com/sitemap.php">SITEMAP</a></li>'); 
j$('ul#footer_gnavi li:nth-child(5)').after('<li><a href="http://seidansha.com/inquiry">お問い合わせ</a></li>'); 

j$('ul#footer_gnavi li:last-child').css({'border-right':'none','padding-right':'0px'});





	j$("#main table#main_corner td:eq(1)").css({'background':'#fbf7f5','font-weight':'bold'});
	

	//サイドメニューul毎に最後のli要素からborder-bottomを削除
	j$("#sub ul#side_menu li:last-child").css({'border-bottom':'none'});
	
	//サイドメニュー 入れ子内の１つめのulにborder-topを追加
	j$("#sub ul#side_menu ul ul:eq(0)").css({'border-top':'1px solid #a2a1a1'});
	
	//サイドメニュー 一番最後のliにborder-bottomを追加
	j$("#sub ul#side_menu li:last").css({'border-bottom':'1px solid #a2a1a1'});

	

});





