jQuery(document).ready(function($){
	$('#zip').keyup(function(event){
		AjaxZip3.zip2addr(this,'','address','address');
	});
	//外部リンクの処理
	$('.googlemaps a:first').addClass("out");
	$('a.out').click(function(){
	window.open(this.href, '');
	return false;});

	//スクロール
	$("a.pscr[href*='#']").easingScroll({
		easing: "easeInOutCubic",
		duration: 1000
	});

	//アコーディオンメニュー
	$("dd:not(:first)").css("display","none");
	$("dt:first").addClass("selected");
	$("dl dt").click(function(){
		if($("+dd",this).css("display")=="none"){
			$("dd").slideUp("slow");
			$("+dd",this).slideDown("slow");
			$("dt").removeClass("selected");
			$(this).addClass("selected");
		}
	}).mouseover(function(){
		$(this).addClass("over");
	}).mouseout(function(){
		$(this).removeClass("over");
	});

	//タブ
	$("div.panel .newsbox:not("+$("div.tab div.newsgm a.selected").attr("href")+")").hide();
	$("div.tab div.newsgm a").click(function(){
		$("div.tab div.newsgm a").removeClass("selected");
		$(this).addClass("selected");
		$("div.panel .newsbox").slideUp("fast");
		$($(this).attr("href")).slideDown("fast");
		return false;
	});
	
	//ロールオーバー処理
	$("a img").hover(
		function(){
			$(this).fadeTo(0.1,0.8);
		},
		function(){
			$(this).fadeTo(0.1,1);
		}
	);
	
	//画像の拡大
	$(".c_box a[href$='.jpg']").addClass("image");

	//画像を読み込む時の場所の指定
	$(".c_box a.image").fancybox({
		'hideOnContentClick': true,
		'titleFormat': function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">' + (title.length ? '' + title : '') + '</span>';
		}
	});

	//frame呼び出す時に必要なスクリプト
		$("a#custom_1, a#custom_2").fancybox({
			'zoomSpeedIn': 0,
			'zoomSpeedOut': 0
		});
});

function getGroupItems(opts) {
		jQuery.each(imageList, function(i, val) {
			opts.itemArray.push(val);
		});
	}
