
if (navigator.userAgent.match(/iPhone/) != null || navigator.userAgent.match(/iPod/) != null) {
	document.write('<link rel="apple-touch-icon" href="/images/icon.png" />'); // 57*57
	document.write('<meta name="format-detection" content="telephone=no"/>');
	document.write('<meta name="apple-mobile-web-app-capable" content="yes" />');
	document.write('<meta name="apple-mobile-web-app-status-bar-style" content="black" />');
	document.write('<link rel="stylesheet" type="text/css" media="only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5)" href="/css/480.css" />');
	window.addEventListener('load', function(){
		setTimeout(scrollTo, 0, 0, 1);}, 
	false);

	document.location.href ="http://m.kumhobuslines.co.kr/";
}else if((navigator.userAgent.match(/Windows CE/i)) || (navigator.userAgent.match(/Symbian/i)) || (navigator.userAgent.match(/BlackBerry/i)) || (navigator.userAgent.match(/Android/i)) ||
	(navigator.userAgent.match(/nokia/i)) || (navigator.userAgent.match(/webos/i)) || (navigator.userAgent.match(/opera mini/i)) || (navigator.userAgent.match(/opera mobi/i)) ||
	(navigator.userAgent.match(/iemobile/i)) || (navigator.userAgent.match(/Windows Phone/i)) ){
	document.write('<meta name="HandheldFriendly" content="true" />');
	document.write('<meta name="MobileOptimized" content="0" />');
	document.write('<link rel="stylesheet" type="text/css" media="only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5)" href="/css/480.css" />');

	document.location.href ="http://m.kumhobuslines.co.kr/";
}else{
	
//	document.location.href ="http://m.kumhobuslines.co.kr/";
}


function setPng24(obj) {
obj.width=obj.height=1;
obj.className=obj.className.replace(/\bpng24\b/i,'');
obj.style.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
obj.src='/images/comm/blank.gif'; // 404error 대처 
return '';
}

// quick
$(function() {
	$(".txton").hover(function () {
		$(this).stop().animate({ opacity: 1, left: [0, 'easeOutBack'],top: 0}, 1000);
		//$(this).next(".txton").slideDown("slow");
	},
	function () {
		//$(this).next(".txton").stop().animate({opacity: 0}, 'slow');
		$(this).stop().animate({ opacity: 1, left: [-52, 'easeOutBack'],top: 0}, 1000);
	});
});
function quick(){
	document.write('<div id="quickwrap">');
	document.write('<div class="viewrap">');
	document.write('<ul class="qmenu">');
	document.write('<li class="m1"><a href="#" onclick="fn_kumBus();"><span class="txton"></span></a></li>');
	document.write('<li class="m2"><a href="/biz/Charter/Rev_write.asp"><span class="txton"></span></a></li>');
	document.write('<li class="m3"><a href="/biz/Business/Specialties.asp"><span class="txton"></span></a></li>');
	document.write('<li class="m5"><a href="/customer/lost/Find_list.asp"><span class="txton"></span></a></li>');
	document.write('<li class="m4"><a href="/customer/Notice/Faq_1.asp"><span class="txton"></span></a></li>');
	document.write('</ul>');
	document.write('</div>');
	document.write('</div>');
}
function test(){
		alert('dd');
}

function selview(id){
	$("#"+id+" .depth").slideDown("fast", function(){
		$("#"+id+" .depth").focus();
	});
}
// select
$(document).ready(function(){
	$(".depth").focus(function(){

	}).blur(function(){
		$(".depth").slideUp();
	});
	$(".depth span").hover(function () {
		$(this).css({ background: "f6f6f6"});
	}, function () {
		$(this).css({ background: "fff"});
	});
});

// footer
$(document).ready(function(){
	$(".choice1").toggle(function () {
			$(".choice1").addClass("choice1on");
			$("div.se1").animate({ height: 64});
			$("div.se1 ul").animate({ opacity: 1});
		},function () {
			$(".choice1").removeClass("choice1on");
			$(".choice2").removeClass("choice2on");
			$("div.se1").animate({ height: 4});
			$("div.se1 ul").animate({ opacity: 0});
			$("div.se2").animate({ height: 4});
			$("div.se2 ul").animate({ opacity: 0});
		});
	$("div.se1 a").hover(function () {
			$(this).animate({ opacity: 1});
		}, function () {
			$(this).animate({ opacity: 0.5});
		});

	$(".choice2").click(function (){
			if($(".choice2").hasClass("choice2on")){
				$(".choice2").removeClass("choice2on");
				$("div.se2").animate({ height: 4},1000);
				$("div.se2 ul").animate({ opacity: 0},1000);
			}else{
				alert('사업부문을 선택하여 주세요.');
				$(".choice1").addClass("choice1on");
				$("div.se1").animate({ height: 64},1000);
				$("div.se1 ul").animate({ opacity: 1});
			}
		});
	$(".site").click(function (){
			$(".choice1").removeClass("choice1on");
			$(".choice2").removeClass("choice2on");
			$("div.se1").animate({ height: 4});
			$("div.se1 ul").animate({ opacity: 0});
			$("div.se2").animate({ height: 4});
			$("div.se2 ul").animate({ opacity: 0});
		});
});
function family(num,size){
	for (i=0; i<=2; i++){
		if(i==num){
			$(".choice2").addClass("choice2on");
			$("dd.se2 div:eq("+num+")").animate({ height: size},1000);
			$("dd.se2 div:eq("+num+") ul").animate({ opacity: 1},1000);
		}else{
			$("dd.se2 div:eq("+i+")").animate({ height: 0});
			$("dd.se2 div:eq("+i+") ul").animate({ opacity: 0});
		}
	}
}





window.onload = function(){bgdiv();}

	function bgdiv(){
			$('.quick_bg').animate({opacity: 0.2});
		}
	function riaview(){
     $('#quick_wrap').show();
   }
   function riahide(){
     $('#quick_wrap').hide();
   }

function quickView(){
		var obj	= document.getElementById('quick_wrap')
		if(obj.style.display == ""){
			obj.style.display	= "none";
		}else{
			obj.style.display	= "";
		}
	}
function siteView(obj) {
		var target = document.getElementById(obj);
		target.style.display = (target.style.display=='none' ? 'block':'none');
	}

/// 버스 운행정보 //	
function fn_kumBus() {
	var target = document.getElementById("down");
	target.style.display = (target.style.display=='none' ? 'block':'none');
	fn_expStart();
}
function fn_songBus() {
	var songBusTarget = document.getElementById("songBus");
	songBusTarget.style.display = (songBusTarget.style.display=='none' ? 'block':'none');
	fn_songStart();
}


function playerOpen(){
	document.getElementById('cfview').style.display="block";
}

function playerClose(){
	document.getElementById('cfview').style.display="none";
}
