// JavaScript Document
$("html").addClass("js");

$(document).ready(function(){
	$("a img[src*='_off.']").rollOver();
	$("a.pn[href^='#']").smScroll({speed:800, easing:"easeOutCubic"});
	$(".contNaviSet").setHeight(".contNavi");
	$(".ar").alphaRo({from:1, to:0.6, group:false});
	$(".map").mapChanger(".change");
	$("textarea.ex, input.ex").exClick("#main form");
	$(".win").anotherWin({width:800});
	
	if( $("#lpBanList").length > 0 ) {
		var _now = 0;
		var _max = $("#lpBanList li").length;
		$("#lpBanList li").css({ovacity:1,display:"none"}).stop({ovacity:1,display:"list-item"}).eq(0).fadeIn(1);
		var _interval = setInterval( function() {
			_now = _now+1>=_max ? 0 : _now+1;
			$("#lpBanList li").fadeOut(700).eq(_now).stop().fadeIn(700);
		}, 5000 );
	}
	
	$("#flowBtn a").hover( function() {
		$(this).css("opacity", 0.8);
	}, function() {
		$(this).css("opacity", 1);
	} ).click( function() {
		if( $(this).data("open") != "open" ) {
			$(this).data("open", "open").find("img").attr("src", $(this).find("img").attr("src").replace("flowbtn.png", "flowbtn_open.png") );
			$("#flowBox").slideDown();
		} else {
			$(this).data("open", "close").find("img").attr("src", $(this).find("img").attr("src").replace("flowbtn_open.png", "flowbtn.png") );
			$("#flowBox").slideUp();
		}
		return false;
	} );
});

