function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring;

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='';   
    return '';  
}  
var zoom = 100;
$(document).ready(function() {
	//gnb
	$("#mainMenu li a, #mainMenu2 ul li a").hover(function(){
		var img = $("img",this).attr("src");
		$("img",this).attr("src", img.replace(".png", "_on.png"));
			}, function(){
			var img = $("img",this).attr("src");
			$("img",this).attr("src", img.replace("_on.png", ".png"));
	});
	
	$(".groupList li").click(function(){
		if($(this).hasClass("on")){
			$(this).removeClass("on");
			$(this).find(".btn img").attr("src", "./images/btn/select.gif");
		}
		else{
			$(this).addClass("on");
			$(this).find(".btn img").attr("src", "./images/btn/modify.gif")
		}
	});
	
	$(".tabMenu1 li a").click(function(){
		$(".tabMenu1 li").filter(function(){
			$(this).removeClass("on");
		});
		$(this).parent().addClass("on");

		var id = $(this).attr("href");
		$("#tabArea1").hide();
		$("#tabArea2").hide();
		$(id).show();
	});

	 var showing = false;
		$(".preference").hide();
		$(".commentWrite2").hide();
		$(".open a").click(function() {
			if(showing == false) {
			$(".myKnowhowCon").animate({height:"315px"}, 500);
			$(".preference").show();
			$(".commentWrite2").show();
			$(".open a").html('<img src="/images/common/btn2/btn_khClose.gif" alt="Á¢±â"/>');
			showing = true;
			} else {			
			$(".preference").hide();
			$(".commentWrite2").hide();
			$(".myKnowhowCon").animate({height:"30px"}, 500);			
			$(".open a").html('<img src="/images/common/btn2/btn_khOpen.gif" alt="ÆîÄ¡±â"/>');
			showing = false;
		 }
	});

	$(".galleryType01 ul li a").hover(function(){
		$(this).children().show();
	}, function(){
		$(this).children("span").hide();
	});

	$(".holePhoto ul li a").hover(function(){
		$(this).children().show();
	}, function(){
		$(this).children("span").hide();
	});

	$(".linkLogin").click(function(){
		$("#blueoneLogin").show();
	});

	$(".linkJoin").click(function(){
		$("#blueoneJoin").show();
	});
	
	/* ¼öÁ¤, »èÁ¦½Ã ºñ¹Ð¹øÈ£ Ã¢ */
	$(".btnArea a.delete, .btnArea a.modify").click(function(){
		$("#passInfo").show();
	});

	$(".linkOnline").click(function(){
		$("#reservation").show();
	});

	$(".linkOnline2").click(function(){
		$("#reservation").show();
	});

	$(".popClose a, .loginBtn .popWrap .confirm").click(function(){
		$("div.layPop, div.popWrap").hide();
	});	
		

});



// Slide show ÆË¾÷
function slidshow (){
     window.open( "/golf/pop_gallery.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=770,height=780");
	}

// GÄ«µå ½ÅÃ»
function gcardApp (){
     window.open( "/golf/sangju/pop_gcardAppGuide.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=221");
	}

// GÄ«µå Å»Åð
function gcardWithdraw (){
     window.open( "/golf/sangju/pop_gcardWithdraw.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=560");
	}

// GÄ«µå ÀÌ¿ë¾à°ü
function gcardRow (){
     window.open( "/golf/sangju/pop_gcardUserow.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=500");
	}

// Ç×°ø»çÁø
function holePhoto1 (){
     window.open( "/golf/sangju/pop_hole_east1.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=384,height=815");
	}
function holePhoto2 (){
     window.open( "/golf/sangju/pop_hole_east2.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=534,height=815");
	}
function holePhoto3 (){
     window.open( "/golf/sangju/pop_hole_east3.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=413,height=815");
	}
function holePhoto4 (){
     window.open( "/golf/sangju/pop_hole_east4.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=463,height=683");
	}
function holePhoto5 (){
     window.open( "/golf/sangju/pop_hole_east5.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=447,height=815");
	}
function holePhoto6 (){
     window.open( "/golf/sangju/pop_hole_east6.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=476,height=815");
	}
function holePhoto7 (){
     window.open( "/golf/sangju/pop_hole_east7.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=409,height=815");
	}
function holePhoto8 (){
     window.open( "/golf/sangju/pop_hole_east8.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=375,height=815");
	}
function holePhoto9 (){
     window.open( "/golf/sangju/pop_hole_east9.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=496,height=683");
	}
function holePhoto10 (){
     window.open( "/golf/sangju/pop_hole_east10.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=535,height=815");
	}
function holePhoto11 (){
     window.open( "/golf/sangju/pop_hole_east11.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=501,height=815");
	}
function holePhoto12 (){
     window.open( "/golf/sangju/pop_hole_east12.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=748,height=700");
	}
function holePhoto13 (){
     window.open( "/golf/sangju/pop_hole_east13.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=419,height=815");
	}
function holePhoto14 (){
     window.open( "/golf/sangju/pop_hole_east14.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=443,height=815");
	}
function holePhoto15 (){
     window.open( "/golf/sangju/pop_hole_east15.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=489,height=815");
	}
function holePhoto16 (){
     window.open( "/golf/sangju/pop_hole_east16.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=428,height=815");
	}
function holePhoto17 (){
     window.open( "/golf/sangju/pop_hole_east17.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=479,height=815");
	}
function holePhoto18 (){
     window.open( "/golf/sangju/pop_hole_east18.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=408,height=815");
	}

/* È¸¿ø°¡ÀÔ ÆË¾÷ */
function popJoin (){
     window.open( "/utility/joinning.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=758,height=620");
	}
function popJoin2 (){
     window.open( "/utility/joinning2.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=705,height=600");
	}

/* È¸¿ø°¡ÀÔ ÆË¾÷ */
function popRes (){
     window.open( "/utility/res_yongin.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=940,height=730");
	}
function popRes2 (){
     window.open( "/utility/res_sangju.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=980,height=730");
	}

function allMap (){
     window.open( "/waterpark/pop_guidemap.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=1200,height=750");
	}

function indoor (){
     window.open( "/waterpark/pop_indoor.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=417");
	}

function outdoor (){
     window.open( "/waterpark/pop_outdoor.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=417");
	}

// FOOTER ÆË¾÷
function useClause (){
     window.open( "/etc/use_clause.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=700,height=600");
	}

function privacy (){
     window.open( "/etc/privacy.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=600");
	}

function email (){
     window.open( "/etc/email.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,height=300");
	}

/* [2012-01-28] Ãß°¡ */
function weekUse (){
     window.open( "/etc/pop_public.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=700px,height=600");
	}

/* [2012-02-17] Ãß°¡ */
function peak (){
     window.open( "/etc/pop_castLots.jsp" , "ContentsWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=700px,height=650");
	}

// °¶·¯¸®

var TINY={};

function T$(i){return document.getElementById(i)}
function T$$(e,p){return p.getElementsByTagName(e)}

TINY.slider=function(){
	function slide(n,p){this.n=n; this.init(p)}
	slide.prototype.init=function(p){
		var s=T$(p.id), u=this.u=T$$('ul',s)[0], c=T$$('li',u), l=c.length, i=this.l=this.c=0;
		if(p.navid&&p.activeclass){this.g=T$$('li',T$(p.navid)); this.s=p.activeclass}
		this.a=p.auto||0; this.p=p.resume||0; this.v=p.vertical||0; s.style.overflow='hidden';
		for(i;i<l;i++){if(c[i].parentNode==u){this.l++}}
		if(this.v){;
			u.style.top=0; this.h=p.height||c[0].offsetHeight; u.style.height=(this.l*this.h)+'px'
		}else{
			u.style.left=0; this.w=p.width||c[0].offsetWidth; u.style.width=(this.l*this.w)+'px'
		}
		this.pos(p.position||0,this.a?1:0)
	},
	slide.prototype.auto=function(){
		this.u.ai=setInterval(new Function(this.n+'.move(1,1)'),this.a*1000)
	},
	slide.prototype.move=function(d,a){
		var n=this.c+d, i=d==1?n==this.l?0:n:n<0?this.l-1:n; this.pos(i,a)
	},
	slide.prototype.pos=function(p,a){
		clearInterval(this.u.ai); clearInterval(this.u.si);
		var o=this.v?parseInt(this.u.style.top):parseInt(this.u.style.left),
		t=this.v?p*this.h:p*this.w, d=t>Math.abs(o)?1:-1; t=t*-1; this.c=p;
		if(this.g){for(var i=0;i<this.l;i++){this.g[i].className=i==p?this.s:''}}
		this.u.si=setInterval(new Function(this.n+'.slide('+t+','+d+','+a+')'),20)
	},
	slide.prototype.slide=function(t,d,a){
		var o=this.v?parseInt(this.u.style.top):parseInt(this.u.style.left);
		if(o==t){
			clearInterval(this.u.si); if(a||(this.a&&this.p)){this.auto()}
		}else{
			var v=o-Math.ceil(Math.abs(t-o)*.15)*d+'px';
			this.v?this.u.style.top=v:this.u.style.left=v
		}
	};
	return{slide:slide}
}();

$(function() {
	$('div.course div.courseCon').hide();
	$('div.course div.courseCon:first').show();
	$('.courseTab ul li:first a').addClass('current');
	$('.courseTab ul li a').hover(function(){
		$(this).addClass('current2');
	}, function(){
		$(this).removeClass('current2');
	});

	$('.courseTab ul li a').click(function(){
		$('.courseTab ul li a').removeClass('current');
		$(this).addClass('current');
		var currentTab = $(this).attr('href');
		$('div.course div.courseCon').hide();
		$(currentTab).show();
		return false;
	});
 });


/* º° ¼¿·ºÆ®¹Ú½º */
$(function() {
	$("#search_select").hover(function() {
			$(this).css('cursor', 'pointer');
			$("#selCon").show();
		}, function() {
			$("#selCon").hide();		
		});

		$("#selCon").hover(function() {
			$(this).css('cursor', 'pointer');
			$(this).show();
		}, function() {
			$(this).hide();		
		});

		$("#selCon li").bind('click', function() {
			$("#selected").html($(this).html());
			$("#selCon").hide();
		});
 });

$(function() {
	 $("div.mainDepth").hover(function() {
			$("div.menuAll").show();
		 }, function(){
			$("div.menuAll").hide();
		 });
});


$(function() {
	 $(".eventLink").click(function() {
			$("div.eventArea").show();		
			$("div.eventArea2").show();	
		 });
});


/* ¸ÞÀÎ ½æ³×ÀÏ */
$(function() {
	 $(".link1").click(function() {
		$(".viewImg").hide();	
		$("#viewImg01").show();			
	 });
	 $(".link2").click(function() {
		$(".viewImg").hide();	
		$("#viewImg02").show();			
	 });
	  $(".link3").click(function() {
		$(".viewImg").hide();	
		$("#viewImg03").show();			
	 });
	  $(".link4").click(function() {
		$(".viewImg").hide();	
		$("#viewImg04").show();			
	 });
	  $(".link5").click(function() {
		$(".viewImg").hide();	
		$("#viewImg05").show();			
	 });
	  $(".link6").click(function() {
		$(".viewImg").hide();		
		$("#viewImg06").show();			
	 });
	  $(".link7").click(function() {
		$(".viewImg").hide();	
		$("#viewImg07").show();			
	 });
	  $(".link8").click(function() {
		$(".viewImg").hide();		
		$("#viewImg08").show();			
	 });
	  $(".link9").click(function() {
		$(".viewImg").hide();		
		$("#viewImg09").show();			
	 });
	  $(".link10").click(function() {
		$(".viewImg").hide();	
		$("#viewImg10").show();			
	 });
 });



 $(function() {
	 $(".delete a").click(function() {
		$("div.knowhowDelete").show();	
	 });

	 $(".layClose a").click(function() {
		$("#layWrap").hide();	
	 });

	$(".joinYongin").click(function() {
		$("#blueoneJoin").hide();
		$("#joinning2").show();	
	 });

	$(".joinSangju").click(function() {
		$("#blueoneJoin").hide();
		$("#joinning").show();	
	 });
	 
	$(".blueoneJoin div a").click(function() {
		$("#reservation").hide();
	 });
 });


// ¿öÅÍÆÄÅ© ÀÌº¥Æ® ·Ñ¸µ
$(function() {
	$(".btn_box a:first").addClass("current");	
		
		var imgWidth 			= $(".waterEvent").width();	
		var imgSum				= $(".eventBox img").size();	
		var imgTotalWidth	= imgWidth * imgSum;	
		
		$(".eventBox").css({'width' : imgTotalWidth});	
		
		// ÀÌ¹ÌÁö ½½¶óÀÌµå ¿òÁ÷ÀÓ ÇÔ¼ö
		rotate = function() {
			var triggerId = $active.attr("rel") - 1;
			var imgPosition = triggerId * imgWidth;	
			
			$(".btn_box a").removeClass("current");	
			$active.addClass("current");		
			
			// È¿°ú ½ÃÀÛ
			$(".eventBox").animate({
				left: -imgPosition	
			}, 500);
		}
		
		// ÀÌ¹ÌÁö ½½¶óÀÌµå Å¸ÀÓ ¹× °´Ã¼ ¼±ÅÃ ÇÔ¼ö
		rotateSwitch = function() {
			play = setInterval(function() {
				$active = $(".btn_box a.current").next();	
				if ($active.length == 0) {	
					$active = $(".btn_box a:first");
				}
				rotate();	
			}, 3000);
		}
		
		rotateSwitch();
		
		// ÀÌ¹ÌÁö¿¡ ¸¶¿ì½º ÀÌº¥Æ®
		$(".eventBox img").hover(function() {
			clearInterval(play);
		}, function() {
			rotateSwitch();
		});
		
		// ¸µÅ© ¹öÆ°¿¡ Å¬¸¯ ÀÌº¥Æ®
		$(".btn_box a").click(function() {
			$active = $(this);
			clearInterval(play);
			rotate();
			rotateSwitch();
			return false;
		})
});


$(function() {
	 $("#mainWater div a").hover(function() {
		$(this).children().show();
	 }, function(){
		$(this).children("span").hide();
	 });

	  $(".waterMain01 a").click(function() {
		$("#waterView01").show();	
	 });

	  $(".waterMain02 a").click(function() {
		$("#waterView02").show();	
	 });

	  $(".waterMain04 a").click(function() {
		$("#waterView04").show();	
	 });

	  $(".waterMain05 a").click(function() {
		$("#waterView05").show();	
	 });

	  $(".waterMain06 a").click(function() {
		$("#waterView06").show();	
	 });

	  $(".waterMain07 a").click(function() {
		$("#waterView07").show();	
	 });

	  $("div.waterView p.close a").click(function() {
		$(".waterView").hide();	
	 });

	 /* VRº¸±â */
	 $(".vrBtn").click(function() {
		$("ul.subVr").show();
	 });
	 $(".subVr li a").click(function() {
		$(".subVr").hide();	
	 });

	 /* ½Ã¼³ÇöÈ² */
	$("#condo01").click(function() {
		$("#layFacilities01").show();
	 });
	$("#condo02").click(function() {
		$("#layFacilities02").show();
	 });
	$("#condo03").click(function() {
		$("#layFacilities03").show();
	 });
	$("#condo04").click(function() {
		$("#layFacilities04").show();
	 });
	$(".layFacilities .layClose a").click(function() {
		$("div.layFacilities").hide();	
	 });
 });



