$(function() {
$("img.cap").fadeTo(0,0);
    $("li[id^='groupink']").hover(function(){
    	$("img.cap",this).stop().fadeTo(350,1);
    }, 
    function(){
        $("img.cap",this).stop().fadeTo(350,0);
    });
});
$(function() {
	// GlobalNavigation	
		$("#about li#navi_01 img").attr({"src":"/common/img/g_navi/g_navi_01_on.png"});
		$("#service li#navi_02 img, #service_under li#navi_02 img").attr({"src":"/common/img/g_navi/g_navi_02_on.png"});
		$("#policy li#navi_03 img").attr({"src":"/common/img/g_navi/g_navi_03_on.png"});
		$("#recruit li#navi_04 img").attr({"src":"/common/img/g_navi/g_navi_04_on.png"});
		$("#contact li#navi_05 img").attr({"src":"/common/img/g_navi/g_navi_05_on.png"});
		$('#g_navi').droppy();
});


$(function() {
//smartRollover
	var imgCount = 0;
	var images_pre = new Array();
	$('img[src*="_off."],input[src*="_off."]').each (function(){
		images_pre[imgCount] = new Image();
		images_pre[imgCount].src = $(this).attr("src").replace("_off.", "_on.");
		$(this).hover(
			function () {
				$(this).attr("src", $(this).attr("src").replace("_off.", "_on."));
			},
			function () {
				$(this).attr("src", $(this).attr("src").replace("_on.", "_off."));
			}
		);
		imgCount ++;
	});

// opacity Rollover
    	$('img[src*="_op."],input[src*="_op."]').hover(
			function () {
				$(this).css('opacity', 0.6).css('filter', 'alpha(opacity=60)');
			},
			function () {
				$(this).css('opacity', 1).css('filter', 'alpha(opacity=100)');
			}
		);
		
		
	


// smoothScroll
	$('a[href^="#"], a[href^="' + location.pathname + '#"]').each (function(){
		var hash = this.hash;
		if(hash.length > 1 && !this['rel']){
			$(this).click(function() {
				smoothScroll(hash);
				return false;
			})
		}
	});

function smoothScroll(hash) {
	var target = $(hash).offset().top;

	$(($.browser.safari) ? 'body' : 'html')
		.animate({scrollTop: target >= 15 ? target - 15 : target}, 600, 'swing', function(){$(this).unbind("mousewheel DOMMouseScroll");})
		.bind("mousewheel DOMMouseScroll",function(){
			$(this).queue([]).stop();
			$(this).unbind("mousewheel DOMMouseScroll");
		});
};

});





(function($) {

	$(function() {
		$.css3.stripe();
		$.css3.css3class();
	});

	$.css3 = {
		//螂�焚縲∝�謨ｰ繧定�蜍戊ｿｽ蜉
		stripe: function(options) {
			var c = $.extend({
				oddClass:'odd',
				evenClass:'even'
			}, options);
			$('#category_area').each(function(){
				//JS縺ｧ縺ｯ0縺九ｉ謨ｰ縺医ｋ縺ｮ縺ｧeven縺ｨadd繧帝�↓謖�ｮ
				$(this).children('.category:odd').addClass(c.evenClass);
				$(this).children('.category:even').addClass(c.oddClass);
			});
			$('body#service_under #feature').each(function(){
				$(this).children('dl:odd').addClass(c.evenClass);
				$(this).children('dl:even').addClass(c.oddClass);
			});
			$('body#blog #side ul').each(function(){
				$(this).children('li:odd').addClass(c.evenClass);
				$(this).children('li:even').addClass(c.oddClass);
			});
		},
		//css3縺ｮ繧ｯ繝ｩ繧ｹ繧定ｿｽ蜉
		css3class: function() {
			$('body#service_under table tr:first-child').addClass('firstChild');
			$('#top ul#pickup li:last-child').addClass('lastChild');
			$('#footer_nav ul li:last-child').addClass('lastChild');
			$('#about dl.company:last-child').addClass('lastChild');
			$('body :empty').addClass('empty');
		}
	};
})(jQuery);
