// JavaScript Document
$(document).ready(function() {
	/* Sitemap */
	$('#header a.sitemap').click(function() {
		$('#sitemap').css({'display':'block'});
		this.href = '#sitemap';
	});
	
	$('#footer a.sitemap').click(function() {
		$('#sitemap').css({'display':'block'});
		this.href = '#sitemap';
	});
	
	$('#sitemap .close a').click(function() {
		$('#sitemap').css({'display':'none'});
		this.href = '#';
		return false;
	});
	
	/* Family */
	$('#footer .family a.sel').click(function() {
		if($('#footer .list').css('display') == 'none') {
			$('#footer .list').css({'display':'block'});
		} else {
			$('#footer .list').css({'display':'none'});
		}
		return false;
	});

	$('#footer .list a').click(function() {
		if($('#footer .list').css('display') == 'block') {
			$('#footer .list').css({'display':'none'});
			window.open(this.href);
		}
		return false;
	});

	$('.zoom a.zoomIn').click(function() {
		if($.browser.msie) {
			zoomIn();
		} else {
			msg('zoom');
		}
		return false;
	});

	$('.zoom a.zoomOut').click(function() {
		if($.browser.msie) {
			zoomOut();
		} else {
			msg('zoom');
		}
		return false;
	});
});

function msg(t) {
	if(t == 'zoom') {
		alert('익스플로러에서만 동작합니다. 브라우저 메뉴를 이용해 주세요.');
	}
}

/* 화면 확대 축소 시작 IE 전용 */
var nowZoom = 100; // 현재비율
var maxZoom = 200; // 최대비율(500으로하면 5배 커진다)
var minZoom = 80; // 최소비율

//화면 키운다.
function zoomIn() {
	if (nowZoom < maxZoom) {
		nowZoom += 10; //25%씩 커진다.
	} else {
		return;
	}
	document.body.style.zoom = nowZoom + '%';
}

//화면 줄인다.
function zoomOut() {
	if (nowZoom > minZoom) {
		nowZoom -= 10; //25%씩 작아진다.
	} else {
		return;
	}
	document.body.style.zoom = nowZoom + '%';
}
/* // 화면 확대 축소 끝 */
