/*
 * Copyright (c) DESIGN inc. All Rights Reserved.
 * http://www.design-inc.jp/
 *
 */

jQuery(function($){
	
	// liとtrの奇数・偶数・最初・最後にクラス付与（odd, even, first, last）
	$('li:nth-child(odd), tr:nth-child(odd)').addClass('odd');
	$('li:nth-child(even), tr:nth-child(even)').addClass('even');
	$('li:first-child, tr:first-child').addClass('first');
	$('li:last-child, tr:last-child').addClass('last');
	
	// ページ内スクロール
	$('a.scroll').click(function(){
		$('html,body').animate({scrollTop: $($(this).attr('href')).offset().top }, {'duration': 400, 'easing': 'easeOutCubic'});
		return false;
	});
	
	// 外部リンクに「target="_blank"」付与（クラス「a.noblank以外」）
	$('a[href^=http]').not('[href*="'+location.hostname+'"]').not('a.noblank').attr('target', '_blank');
	
	// jquery.rollOver.js
	$.fn.rollOver({
		animateTime: 300,
		fadeOpacity: 0.7,
		easing: 'easeOutCubic'
	});
	
	// jquery.cross-slide.min.js
	if($('#cross-slide').length){
		$('#cross-slide').crossSlide({
			sleep: 2,
			fade: 1,
			loop: 1
		}, [
			{ src: '/uploader/data/p1.jpg' },
			{ src: '/uploader/data/p2.jpg' },
			{ src: '/uploader/data/p3.jpg' },
			{ src: '/uploader/data/p4.jpg' },
			{ src: '/uploader/data/p5.jpg' }
		]);
	}
	
	// fixHeight.js
	$('.fixHeight').fixHeight();

});
