jQuery(function(){
	//IE6.0のみpingfix
	if ($.browser.version == '6.0') {
		$("img[src*='.png'], input[type='image'][src*='.png']")
			.css('behavior', 'url("' + _S_ROOT_ + 'js/iepngfix.htc")')
		;
		
//		$("div , h1 , h2 , h3 , h4 , h5 , p , ul , li , dl , dt , dd , table , th , td")
		$("div , h1 , h2 , h3 , h4 , h5 , p , ul , ol ,li , dl , dt , dd , table , th , td")
			.each(
				function () {
					if ($(this).css('background-image').match('\.png')) {
						$(this)
							.css('behavior', 'url("' + _S_ROOT_ + 'js/iepngfix.htc")')
						;
					}
				}
			)
		;
	}
	
	
	//ホバー関連
	$("img[src*='/off/'], input[type='image'][src*='/off/']")
		.live(
			'mouseover',
			function() {
				$(this).attr("src", $(this).attr("src").replace('/off/', '/on/'));
			}
		)
	;
	$("img[src*='/on/'], input[type='image'][src*='/on/']")
		.live(
			'mouseout',
			function() {
				$(this).attr("src", $(this).attr("src").replace('/on/', '/off/'));
			}
		)
	;
/*	
		.hover(
			function () {
				$(this).attr("src", $(this).attr("src").replace('/off/', '/on/'));
			},
			function () {
				$(this).attr("src", $(this).attr("src").replace('/on/', '/off/'));
			}
		)
*/
	//背景画像のホバー
	$(".bg-hover")
		.hover(
			function () {
				$(this).css("background-image", $(this).css("background-image").replace('/off/', '/on/'));
			},
			function () {
				$(this).css("background-image", $(this).css("background-image").replace('/on/', '/off/'));
			}
		)
	;
	
	//登録フォームのやつ
	$("input[value*='メールアドレスを入力'] , input[value*='パスワードを入力']")
		.focus(
			function () {
				$(this).val('');
			}
		)
		/*.blur(function () {
				$(this).val('メールアドレスを入力してください');				
			}
		)*/
	;
	
	//
	//　要素全体のホバー＆リンク
	//
	$(".all-hover")
		.live( "mouseover" , function (){
			if( $(this).find("a").length ){
				$(this).css("cursor","pointer");
				$(this).find("a").css({'text-decoration':'none' , 'color':'#0099CC' });
			}
		})
		.live( "mouseout" , function (){
			$(this).find("a")
				.css({'text-decoration':'underline' , 'color':'#0044CC' });	
		})
		.live( "click" , function (){
			if( $(this).find("a").length ){
				var a_url = $(this).find("a").attr("href");
				location.href = a_url;
			}
		})
	;
	
	
});

//--------------------------------------------------------------------------------
// 
//--------------------------------------------------------------------------------

