
//フォームのフォーカス関係
$(document).ready(function() {
	//フォームの初期値をfocus時に消す
	var defCol = '#999999'; //初期値の文字色
	var fCol = '#000000'; //通常入力時の文字色

	$('.formFocus').css('color',defCol).focus(function(){
		$(this).addClass("focus");
		if($(this).val() == this.defaultValue){
			$(this).val('').css('color', fCol);
		}
	})
	.blur(function(){
	$(this).removeClass("focus");
	if($(this).val() == this.defaultValue | $(this).val() == ''){
		$(this).val(this.defaultValue).css('color',defCol);
	};
});



var ua = navigator.userAgent;//ua取得

if(ua.indexOf('IE 6') > -1 || ua.indexOf('IE 7') > -1){ //IE6,7絞り込み

	//ここにIE非対応セレクタ使用時は書き足してください。
	$('#areaNav ul li:first-child').addClass('first-child');  
	$('#headSubNav li:first-child').addClass('first-child'); 
	$('#announce ul li:first-child').addClass('first-child');
	$('#subTopics #topicsCts div:hover').addClass('hover');
	
	//フォーム関連設定
	$('input[type="text"]').addClass('inputText');
	$('input[type="password"]').addClass('inputPassword');
	$('input[type="checkbox"]').addClass('inputCheckbox');
	$('input[type="radio"]').addClass('inputRadio');
}


//inline-box対応
$('.pagenation span').exInlineBlock();

//colorbox対応
$(".deleteCheck , .modalwindow").colorbox();

//サブナビ用設定
$("#1").lavaLamp({
	fx: "backout",
	 speed: 500,
	click: function(event, menuItem) {
	return false;
	}
});

//アコーディオン
$(".acccont").hide();
$(".acccontO").show();
$(".acctit").click(function(){ 
	var index = $(".acctit").index(this); 
	$(".acccont").eq(index).slideToggle("fast");  
	$(".acccontO").eq(index).slideToggle("fast"); 
}).css("cursor","pointer"); 


//autosprites起動
$('#gNav').autosprites({
	offset: '57px',
	activeState: true,
	activeSprites: true
});


//MJL に関係するコードは以下に記述
//MJL.enable.flash("flash");
//MJL.enable.window("window");
MJL.enable.tab("tabs");
//MJL.enable.styleSwitcher("styleSwitcher");
MJL.enable.heightEqualizer("equalize");
MJL.enable.rollover("roll");


//qtip起動
$.fn.qtip.styles.helpBtn = {
	width: { min: 130, max:200 },
	background: '#FFFFFF',
	padding: 10,
	color: 'black',
	textAlign: 'left',
	border: { width: 2, radius: 0, color: '#3366CC' },
	tip: { size: { x: 14, y: 8 }, corner: 'bottomMiddle'}
}

$('[title]').qtip({
	style: {name: 'helpBtn'},
	show:  {delay: 0},
	position: {
		corner: { target: 'topMiddle', tooltip: 'bottomMiddle' },
		adjust: { x: 0, y: 0}
	}
});

}); 




