jQuery(function(){

	var setprm="";
	var setprm ="url('" + bg_dir + "/images/bg_title" + bg_prm + ".gif')" ;
	jQuery(".article #cnt_left_fl h2").css("background-image",setprm);

	/*tooltip*/
	/*
	$('#page *').tooltip({
		track: true, 
		delay: 0, 
		showURL: false, 
		showBody: " - "
		, fade: 250 
	});
	*/
	
	/*mouseover IE6用に*/
	jQuery(".article #cnt_right_fl li").hover(
	  function () {
		jQuery(this).css("background-color","#D1E2E2");
	  },
	  function () {
		if(jQuery(this).hasClass("current")){
			jQuery(this).css("background-color","#EFF0D2");
		}else{
			jQuery(this).css("background-color","#F5F4EE");	
		}
	  }
	);
	
	
	
	/*  フェード ishii　*/
	var fout="1";
	jQuery(".pics #pic2").hide();
	jQuery(".pics #pic3").hide();
	jQuery(".pics #pic4").hide();
	jQuery(".pics #pic5").hide();


	jQuery("#navi_global li").mousemove(
		function(){

			if(jQuery(this).is("#about")){
				if(jQuery(".pics #pic2").is(":hidden")){
					jQuery(".pics #pic"+fout).fadeOut("slow");
					jQuery(".pics #pic2").fadeIn("slow");
					fout="2";
				}
			}else if(jQuery(this).is("#services")){
				if(jQuery(".pics #pic3").is(":hidden")){
					jQuery(".pics #pic"+fout).fadeOut("slow");
					jQuery(".pics #pic3").fadeIn("slow");
					fout="3";
				}
			}else if(jQuery(this).is("#recruit")){
				if(jQuery(".pics #pic4").is(":hidden")){
					jQuery(".pics #pic"+fout).fadeOut("slow");
					jQuery(".pics #pic4").fadeIn("slow");
					fout="4";
				}
			}else if(jQuery(this).is("#contact")){
				if(jQuery(".pics #pic5").is(":hidden")){
					jQuery(".pics #pic"+fout).fadeOut("slow");
					jQuery(".pics #pic5").fadeIn("slow");
					fout="5";
				}
			}
			
		}									
	);
	
	/*TOP logoの場合 */	
	jQuery("#page #header #sitename").mousemove(
		function(){
			if(jQuery(".pics #pic1").is(":hidden")){
				jQuery(".pics #pic"+fout).fadeOut("slow");
				jQuery(".pics #pic1").fadeIn("slow");
				fout="1";
			}
		}									
	);
	

	//footer の高さ調整(塗りつぶす方式：たかさリサイズ)
	function footerresize(){
		var bh=0;
		var bh1=document.documentElement.scrollHeight;
		var bh2=document.body.scrollHeight
		var bh3=document.documentElement.clientHeight;
		
		if(bh1!=undefined||bh1!=0){
			bh=bh1;
		}
		if(bh2!=undefined||bh2!=0){
			if(bh<bh2){
				bh=bh2;
			}
		}
		if(bh3!=undefined||bh3!=0){
			if(bh<bh3){
				bh=bh3;
			}
		}
		
		var ph=jQuery("#page").height();
		if(bh>ph){
			var newheight=jQuery("#footer").height();
			newheight=newheight+(bh-ph);
			jQuery("#footer").height(newheight);
		}
	}
	
	
	footerresize();
	jQuery(window).resize(function(){
    	footerresize();
	});


});




