// JavaScript Document

// ロールオーバー
function initRollOverImages() {
  var image_cache = new Object();
  $("img.rover").each(function(i) {
	var elem = this;
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_ro = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_ro;
    $(this).hover(
      function() { this.src = imgsrc_ro;IEPNGFIX.fix(this); },
      function() { this.src = imgsrc;IEPNGFIX.fix(this);});
  });
}

$(document).ready(initRollOverImages);


//メニューアクティブ化
//画面ロード時にimgタグを_onの付いた画像に張り替える
function Menu_active(id){
	
	var target_img = "img#"+id;	
	$(target_img).each(function(i) {								
								
		var dot = this.src.lastIndexOf('.');
    	var imgsrc_ro = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
		this.src = imgsrc_ro;
		
		//既に割り当てられているロールオーバー関数を上書き
		$(this).hover(
		  function() { this.src = imgsrc_ro; },
		  function() { this.src = imgsrc_ro; });
		
	});
	
}

//メニューアクティブ化(トップ階層のオンをしない)
//画面ロード時にimgタグを_onの付いた画像に張り替える
function Menu_active2(id){
	
	var target_img = "img#"+id;	
	$(target_img).each(function(i) {								
								
		var dot = this.src.lastIndexOf('.');
    	var imgsrc_ro = this.src.substr(0, dot) + '_on02' + this.src.substr(dot, 4);
		this.src = imgsrc_ro;
		
		//既に割り当てられているロールオーバー関数を上書き
		$(this).hover(
		  function() { this.src = imgsrc_ro; },
		  function() { this.src = imgsrc_ro; });
		
	});
	
}


// テーブルのスプライト背景
$(function() {
	$(".plaza-list tr:even").addClass("even");
	$(".newsWrap tr:even").addClass("even");
	$(".pressWrap tr:even").addClass("even");
});


//ぷらざマップ切り替え

function changeMap(x){
		window.document.Plazamap.src=x;
}

//携帯サイト　ポップアップ

function OpenWin1(){
    win1=window.open("mobile/index.html","","width=450,height=360");
	
}

//座席表サイト　ポップアップ

function OpenWin2(){
    win1=window.open("nanohana_seat_japanese.html","","width=750,height=650");
	
}
function OpenWin3(){
    win1=window.open("nanohana_seat_box.html","","width=750,height=650");
	
}
function OpenWin4(){
    win1=window.open("255_seat.html","","width=780,height=800,scrollbars=yes");
	
}
function OpenWin5(){
    win1=window.open("e257_seat.html","","width=750,height=700");
	
}

//キャンペーン切り替え

function change(x){
		window.document.Eventlist01.src=x;	
}

function change2(x){
		window.document.Eventlist02.src=x;	
}

function change3(x){
		window.document.Eventlist03.src=x;		
}

// びゅう　//
function panph(){
	var wo1;
	wo1=window.open("", "panph", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=1000,height=600");
	wo1.focus();
	}



