/* ++++++++++++++++++++++++++++++++++++ Mission Statement +++
+
+ Update:2010-01-22
+
+ http://www.ms-inc.co.jp
+ EditiorID:REN
+ EditiorID:
+
+ + use library:jquery-1.2.6.js,jquery.pngFix.js
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/*@cc_on var doc = document; eval('var document = doc');@*/

// conflict escape
jQuery(function($) {
								
/* On Load Action ++++++++++++++++++++++++++++++++++++++++++ */

//pngFix 
	$(function(){
		$(document).pngFix();
	});

//mouseover
$(function(){
	$("img.imgOn").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
	})
})
$(function(){
	$("input.imgOn").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
	}).each(function(){
		$("<input>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"))
	})
})


/*TargetBlank*/
$( function () {
    $('.blank').click(function(){
        window.open(this.href, '_blank');
        return false;
    });
});


// pw current switter
$(function(){

	var smnPage = $('#ctL>div:first').attr('id');
	$("#smn_"+smnPage).css("background-position","right top");
		$("#smn_"+smnPage).hover(function () {
			$(this).css("background-position","right top");
			},function () {
			$(this).css("background-position","right top");
	});
	
	var ssmnPage = $('#ctL>div>div:first').attr('id');
	$("#ssmn_"+ssmnPage).css("background-position","right top");
		$("#ssmn_"+ssmnPage).hover(function () {
			$(this).css("background-position","right top");
			},function () {
			$(this).css("background-position","right top");
	});

});


//scroll
$(document).ready(function(){
  $('a[href^=#]').click(function() {
 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
 && location.hostname == this.hostname) {
   var $target = $(this.hash);
   $target = $target.length && $target
   || $('[name=' + this.hash.slice(1) +']');
   if ($target.length) {
  var targetOffset = $target.offset().top;
  $('html,body')
  .animate({scrollTop: targetOffset}, {duration:1000, easing:"easeOutExpo"});
    return false;
   }
 }
  });
});
/*$(function(){
	$('.pagetopBtn img,.floatPagetop').click(function () {
	$(this).blur();
	
	$('html,body').animate({ scrollTop: 0 }, '1000');
	
	return false;
	});
});
*/

// conflict escape end
});



/* popup setting ********************************** */

	function popup01(URL,Winname,Wwidth,Wheight){
		var WIN;
		WIN = window.open(URL,Winname,"width="+Wwidth+",height="+Wheight+",scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no");
		WIN.focus();
	}
	function closeChild()
{
	window.close();
}

/* /popup setting ********************************** */