/*スパム対策*/
<!--
function vspam(im,domain) {
  maddress = "mailto:" + im + "@" + domain;
  window.location.href = maddress;
}
// -->


/*ページスクロール*/
function SmoothScroll(targetID){
  if( !document.getElementById ) {return true;}
  var step=1;  //初速度
  var max=200;  //最高速度
  var accel=1;  //加速度
  var interval=1;  //加速インターバル
  var current_y = document.body.scrollTop  || document.documentElement.scrollTop;
  var element=document.getElementById(targetID);
  if (!element){return true;}
  var target_y = 0;
  for (i = element;i.offsetParent;i=i.offsetParent ){
    target_y += i.offsetTop;
  }
  var count=0;
  if ( current_y > target_y ){ step = -(step); accel = -(accel);}
  var timerid = setInterval( function(){
    if (step<max) step += (count*accel);
    if ( Math.abs(current_y-target_y) < Math.abs(step) ){
      window.scrollTo((document.body.scrollTop  || document.documentElement.scrollTop),target_y);
      clearInterval(timerid);
      return false;
    }else{
      window.scrollBy(0,step);
      current_y += step;
      count++;
    }
  },interval);
  return false;
}

function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

$(function(){
		   
	//高さ一定(いらないかも)
	//equalHeight($(".tab"));
	
	//TOPページのインフォとナビ消す
	//$("#entry").hide();
	//$("#g-NavIndex").fadeOut();
	
	//swf読み込む
	var flashvars = null; 
	var params = {
		wmode:"transparent"
	}
	swfobject.embedSWF("common/swf/loader2011.swf", "flash", "901", "410", "8.0.0", "common/swf/expressInstall.swf", flashvars, params);
	
	
	//効果音セット
	soundManager.url = 'common/swf/soundmanager2.swf';
	soundManager.debugMode = false;
	soundManager.consoleOnly = false;
	soundManager.onload = function() {
	soundManager.createSound({
		id:'overSE',
		url:'common/audio/over.mp3',
		volume: 40
		});
	}
	
	//効果音ならすよ
	$(function() {    
		$("#f-Nav a,#g-NavIndex a").hover(function() {  
			soundManager.play('overSE');
		});  
	});
	
	$("ul.sub").hide();
	$("ul.menu li").hover(function(){
		$("ul:not(:animated)",this).slideDown("fast")
	},
	function(){
		$("ul",this).slideUp("fast");
	})

});

//インフォメーションとナビ表示
function entryShow(){	
	$("#entry").fadeIn(0);
	$("#g-NavIndex").fadeIn(0);
}
//



$(document).ready(function() {
    $(".tabLink").each(function(){
      $(this).click(function(){
        tabeId = $(this).attr('id');
        $(".tabLink").removeClass("live");
        $(this).addClass("live");
        $(".tab").addClass("hide");
        $("#"+tabeId+"-1").removeClass("hide")   
        return false;	  
      });
    });  
  });


/*
function addCSS01(){
	$(".shop-01").addClass("live");
	$(".shop-02").removeClass("live");
	$(".shop-03").removeClass("live");
	$(".shop-04").removeClass("live");
	$(".shop-05").removeClass("live");
	$(".shop-06").removeClass("live");
	$("#tab1").show(0);
	$("#tab2").hide(0);
	$("#tab3").hide(0);
	$("#tab4").hide(0);
	$("#tab5").hide(0);
	$("#tab6").hide(0);
}

function addCSS02(){
	$(".shop-01").removeClass("live");
	$(".shop-02").addClass("live");
	$(".shop-03").removeClass("live");
	$(".shop-04").removeClass("live");
	$(".shop-05").removeClass("live");
	$(".shop-06").removeClass("live");
	$("#tab1").hide(0);
	$("#tab2").show(0);
	$("#tab3").hide(0);
	$("#tab4").hide(0);
	$("#tab5").hide(0);
	$("#tab6").hide(0);
}

function addCSS03(){
	$(".shop-01").removeClass("live");
	$(".shop-02").removeClass("live");
	$(".shop-03").addClass("live");
	$(".shop-04").removeClass("live");
	$(".shop-05").removeClass("live");
	$(".shop-06").removeClass("live");
	$("#tab1").hide(0);
	$("#tab2").hide(0);
	$("#tab3").show(0);
	$("#tab4").hide(0);
	$("#tab5").hide(0);
	$("#tab6").hide(0);
}

function addCSS04(){
	$(".shop-01").removeClass("live");
	$(".shop-02").removeClass("live");
	$(".shop-03").removeClass("live");
	$(".shop-04").addClass("live");
	$(".shop-05").removeClass("live");
	$(".shop-06").removeClass("live");
	$("#tab1").hide(0);
	$("#tab2").hide(0);
	$("#tab3").hide(0);
	$("#tab4").show(0);
	$("#tab5").hide(0);
	$("#tab6").hide(0);
}

function addCSS05(){
	$(".shop-01").removeClass("live");
	$(".shop-02").removeClass("live");
	$(".shop-03").removeClass("live");
	$(".shop-04").removeClass("live");
	$(".shop-05").addClass("live");
	$(".shop-06").removeClass("live");
	$("#tab1").hide(0);
	$("#tab2").hide(0);
	$("#tab3").hide(0);
	$("#tab4").hide(0);
	$("#tab5").show(0);
	$("#tab6").hide(0);
}

function addCSS06(){
	$(".shop-01").removeClass("live");
	$(".shop-02").removeClass("live");
	$(".shop-03").removeClass("live");
	$(".shop-04").removeClass("live");
	$(".shop-05").removeClass("live");
	$(".shop-06").addClass("live");
	$("#tab1").hide(0);
	$("#tab2").hide(0);
	$("#tab3").hide(0);
	$("#tab4").hide(0);
	$("#tab5").hide(0);
	$("#tab6").show(0);
}
*/

