$(document).ready(function() {
	
	// リスト スクロール
	$(".newsticker-jcarousellite").jCarouselLite({
		vertical: true,
		hoverPause: false,
		visible: 5,
		auto: 15,
		speed: 2000,
		easing: 'linear'
	});
	
	// タブ 初期設定

	// #tab-nav直下の全li要素の中から最初のli要素に.selectを追加
	$("#tab-nav > li:first").addClass("selected");

	// #tab-contents直下の全div要素を非表示にし、最初のdiv要素を表示
	$("#tab-contents > div").hide();
	$("#tab-contents > div:first").show();
	
	// タブ切替処理 1
	$("#tab-nav > li").click(function () {
								   
		// #tabNav直下の全li要素のclass属性を削除
		$("#tab-nav > li").removeClass("selected");
		
		// クリックしたli要素に.selectを追加
		$(this).addClass("selected");
		
		// #tabContents直下の全div要素を非表示
		$("#tab-contents > div").hide();
		
		// クリックしたタブのインデックス番号と同じdiv要素を表示
		$("#tab-contents > div").eq($("#tab-nav > li").index(this)).show();
	});
	
	// PNG
	$(".item-layout-03 img").pngfix();
	$("#brapane-campaign").pngfix({
			sizingMethod: "scale"
	});
						   
	// スムーススクロール
	jQuery('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = jQuery(this.hash);
			$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				jQuery('html,body').animate({ scrollTop: targetOffset }, 600, 'easeOutExpo');
				return false;
			}
		}
	});
});
