/* ++++++++++++++++++++++++++++++++++++ Mission Statement +++
+
+ Update:2009-07-17
+
+ 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');@*/

/* On Load Action ++++++++++++++++++++++++++++++++++++++++++ */

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

//mouseover
function initRollOverImages() {
/*img src*/
  var image_cache = new Object();
  $("img.imgOn,input.imgOn").each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_on;
    $(this).hover(
      function() { this.src = imgsrc_on; },
      function() { this.src = imgsrc; });
  });
}
$(document).ready(initRollOverImages);


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


// pw current switter
//gmenu category
$(function(){
	var gsubCat = $('body').attr('id');
	$("#gsub_"+gsubCat).css("background-position","left bottom");
});

// pw current switter
$(function(){
	var smenuPage = $('#ctR>div:first').attr('id');
	$("#sMenu_"+smenuPage).css("background-position","-165px 0px");
		$("#sMenu_"+smenuPage).hover(function () {
			$(this).css("background-position","-165px 0px");
			},function () {
			$(this).css("background-position","-165px 0px");
	});
});

//pw pulldown menu plugin	
$(function(){
for(var i = 0; i <= 6; i++) {
			$("#gnv > li").eq(i).hover(function () {
					$(this).children("ul").animate({height: "toggle", opacity: 0.9}, 400, "swing");
					},function () {
					$(this).children("ul").animate({height: "toggle", opacity: 0}, 400, "swing");
			});			
}
});

