<!--

/*-----------------------------
 メニューフレーム Action
------------------------------*/

var menu;

// start menu
$( function()
{
	if( is_inframe( 'menu' ) ) {
		menu = new my_menu();
	}
	else {
		// jump
	}
});



// my_menu Class
// --
// Constructor
function my_menu()
{
	this.change_select( 'intro' );
	this.set_onclick( this );
	
	return this;
};
my_menu.prototype = {
	
	_select: '',
	
	change_select: function( my_select )
	{
		this._select = my_select;
		
		$( 'ul.menu li, p.intro' ).each( function()
		{
			if ( $(this).hasClass( my_select ) ) {
				$(this).find( 'a' ).addClass( 'stay' );
			}
			else {
				$(this).find( 'a' ).removeClass( 'stay' );
			}
		});
	},
	set_onclick: function( owner )
	{
		$( 'ul.menu a, p.intro a' ).click( function(){
			var href = $(this).attr( 'href' );
			var temp = href.split( '#my_' );
			
			if ( temp.length > 1 ) {
				
				if ( typeof( parent.frames[ 'contents' ].contents ) == 'object' ) {
					owner.change_select( temp[ temp.length - 1 ] );
					parent.frames[ 'contents' ].contents.move_page( 'my_' + temp[ temp.length - 1 ] );
				}
				return false;
			}
			else {
				return true;
			}
		});
	}
};


-->