/**
 * @name main.js
 * @fileOverview
 * @version 1.0
 * @description
 * <p>(c) FOURDIGIT Inc. Licensed <a href="http://ja.wikipedia.org/wiki/GNU_General_Public_License">GNU General Public License</a>.</p>
 */
//他ライブラリと共存する場合、下の一行削除($無効化)
//jQuery.noConflict();
(function($){
	var config = function () {
	//bodyのクラスにブラウザ情報を追加
		$.addClassUA();
	//easyOverのターゲット設定
		$("img.ahover, .ahoverArea img").easyOver();
	//IE5,6にてPNG有効化 (pngfixの読み込みが必要)
		$("img[src$=png],p.png").enablePNG();
	//Flash
		//$("object, embed").enableFlash();
	//ポップアップリンクに置換
		$(".commonPop").easyPop();
	//他ドメインリンク時にpageTracker有効化
		//$("a,area").blankLogToGoogle();
	//アンカーリンクをスムージング
		$("a[href^=#]").smoothScroll();
	//対象の要素をスクロールに追従するようにする
		//$("#fixBox").fixPosition("stopperID","normal");
	}
	//onload
	$(function() {
		config();
		switch (jQuery("body").attr("id")) {
			case "pageID":
				//eachPageFunction
			break;
			case "pageID":
				//eachPageFunction
			break;
		}
		if($('div.sb')[0]) {
			Shadowbox.init();
		}
		
		/* for floatBnr */
		if(jQuery('body.floatBnr')[0]){
			floatBnr();
		};

		/* for analytics */
		$("#fNavList li.fNavPoint a").each(function(){
			$(this).click(function(){
				var str = "/analytics/fnav/";
				var contentID = $(this).attr("id");
				pageTracker._trackPageview(str+contentID+"/");
			});
		});
		$("#hNav li.hNavPoint a").each(function(){
			$(this).click(function(){
				var contentID = $(this).attr("id");
				if(contentID != "" ) {
					var str = "/analytics/hnav/";
					pageTracker._trackPageview(str+contentID+"/");
				}
			});
		});
		$("#pagenation a").each(function(){
			$(this).click(function(){
				var contentID = $(this).attr("id");
				if(contentID != "" ) {
					var str = "/analytics/pagenation/";
					pageTracker._trackPageview(str+contentID+"/");
				}
			});
		});
	});

})(jQuery);

function hideAndSeek (objId, objsclass) {
	$("div."+objsclass).css("display","none");
	$("div#"+objId).css("display","block");
	//$("div#"+objId).fadeIn();
}

jQuery(function(){
	if(jQuery("body#lbox")[0]) {
		$("a.lbox").lightBox();
	};
	if(jQuery("body#lbox")[0]) {
		$("a.lbox01").lightBox();
		$("a.lbox02").lightBox();
	};
});

function onclickSend() {
	window.open("","sendwin","width=780,height=800,left=0,top=0,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no");
	document.SiryoOrderForm.method = "post";
	document.SiryoOrderForm.target = "sendwin";
	document.SiryoOrderForm.action.value = "Show";
	document.SiryoOrderForm.submit();
}

	