/*
----------------------------------------------------------------------------------------------------

	■ 基本情報
		- 著作権	:	Copyright(c) 2009 アプロコム株式会社 All Rights Reserved.
		- 作成者	:	アプロコム株式会社　田中大士
		- 作成日	:	2009/05/26
		- 更新日	:

	■ ファイル情報
		- 名称
			∟ サイト用JavaScript

		- 概要
			∟ 各サイト内で共通化される処理

		- コアファイル
			∟ jQuery 1.3+

	■ ソース内容
		-

	■ 対応ブラウザ
		- Microsoft Internet Explorer
			∟ 6 +		:	○	2009/05/26

		- Mozilla Firefox
			∟ 2.0 +	:	○	2009/05/26

		- Opera
			∟ 9.0 +	:	○	2009/05/26

		- Apple Safari
			∟ 3.0 +	:	○	2009/05/26

		- Google Chrome
			∟ beta		:	○	2009/05/26

	■ 更新履歴

----------------------------------------------------------------------------------------------------
*/


/*
 サイト用処理
---------------------------------------------------------------------------------------------------- */
$(function(){
	//アクティブなメニューの表記 
	var menu_hash = {
						'/'				:'/',
						'/alba/'		:'/alba/',
						'/alba/member/'	:'/alba/',
						'/alba/card/'	:'/alba/',
						'/guide/'		:'/guide/',
						'/guide/short/'	:'/guide/',
						'/guide/front/'	:'/guide/',
						'/guide/cafe/'	:'/guide/',
						'/guide/shop/'	:'/guide/',
						'/school/'		:'/school/',
						'/school/coach/':'/school/',
						'/recruit/'		:'/recruit/',
						'/recruit/form/':'/recruit/'
					};
	var url = '/';
	url = document.location.href.replace('http://' + document.location.host, '');
	url = url.substring(0, url.lastIndexOf('/') + 1); 
	$('div#menu' + ' a[href=' + menu_hash[url] + ']').addClass('active');
	$('div#side_menu' + ' a[href=' + url + ']').addClass('active');


	//地図ページ 
	$('a[rel=map]').click(function(){
		var w,h,l,t;

		w = 540;
		h = 624;
		l = (screen.width - w) / 2;
		t = (screen.height - h) / 2;

		window.open($(this).attr('href'), 'map', 'width=' + w + ', height=' + h + ', left=' + l + ', top=' + t + ', menubar=no, toolbar=no, location=no, status=no, resizable=no, scrollbars=no');

		return false;
	});
	$('input[name=print]').click(function(){window.print();});
	$('input[name=close]').click(function(){window.close();});


	//リンクボタン 
	$('input[name=link][type=image]').click(function(){location.href=$(this).attr('url'); return false;});
});

