MJL.event.add(window, "load", function(event) {
    // MJL に関係するコードはこの中に記述
    MJL.enable.flash("flash");
    MJL.enable.rollover("roll");
}, false);

// MJL と無関係なコードはこの先に記述

///*プルダウンメニュー（トップ）*///

 $(document).ready(function(){
		$("#naviArea-01 li").hover(
			function(){$("ul", this);}, 
			function(){} 
		);
	if (document.all) {
			$("#naviArea-01 li").hoverClass ("sfHover");
		}
  });
  
	$.fn.hoverClass = function(c) {
		return this.each(function(){
			$(this).hover( 
				function() { $(this).addClass(c);  },
				function() { $(this).removeClass(c); }
			);
		});
	};


///*イベントスケジュールをIframeの外へ*/
(function()
{
	var EVENT_WINDOW_NAME = "event_schedule";
	var EVENT_WINDOW_SELECTOR = "iframe[name=" + EVENT_WINDOW_NAME + "]";
	
	$(document).ready(function()
	{
		$(EVENT_WINDOW_SELECTOR).css("visibility", "hidden");
	});
	
	$(window).bind("load", function()
	{
		var eventIframe = $(EVENT_WINDOW_SELECTOR);
		
		var tid;
		
		tid = window.setInterval(function()
		{
			var ew = window[EVENT_WINDOW_NAME];
			var edoc = ew.document;
			
			if (edoc.documentElement.innerHTML.match(/<\/[bB][oO][dD][yY]>/))
			{
				clearInterval(tid);
				
				var eventAreaButton = $(edoc).find('.column-L>p a');
				
				eventAreaButton.unbind("click");
				
				var popupOriginal = $(edoc).find('.area');
				
				$(popupOriginal).css({
					visibility : "hidden",
					display    : "none",
					height     : 0
				});
				
				var popup = $(document.createElement("DIV"));
				
				popup.html(popupOriginal.html());
				popup.attr("class", "area");
				popup.css({
					position : "absolute",
					visibility : "hidden"
				});
				
				var setPopupPos = function()
				{
					var iframePos = eventIframe.offset();
					var buttonPos = eventAreaButton.offset();
					
					popup.css({
						left : iframePos.left + buttonPos.left - eventAreaButton.width()  / 2 - 13 + "px",
						top  : iframePos.top  + buttonPos.top  + eventAreaButton.height() + 1 + "px"
					});
				};
				
				setPopupPos.call();
				
				$(window).bind("resize", setPopupPos);
				
				eventAreaButton.bind("click", function()
				{
					popup.css("visibility", "visible");
					return false;
				});
				
				$(edoc).find('#set_area').bind("click", function()
				{
					popup.css("visibility", "visible");
					return false;
				});
				
				popup.find("a").each(function(i, o)
				{
					var a = document.createElement("A");
					
					a.innerHTML = o.innerHTML;
					a.href = o.href;
					
					$(a).bind("click", function()
					{
						popupOriginal.find("a").get(i).onclick();
						popup.css("visibility", "hidden");
						return false;
					});
					
					o.parentNode.replaceChild(a, o);
				});
				
				$(document.body).append(popup);
				
				eventIframe.css("visibility", "visible");
			}
		}, 200);
	});
}).call();

//* IEで右クリックを禁止 *//

function notes(eve){
if(document.all){
  if(event.button == 2){
  alert("右クリック禁止になっています。画像のコピーはしないでね！");
  return false;
  }
}
if(document.layers){
  if(eve.which == 3){
  alert("右クリック禁止になっています。画像のコピーはしないでね！");
  return false;
  }
}
}

if(document.layers)document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=notes;