$(document).ready(function() {
	//===========[S] img rollover ===============
	$("img.rollover").mouseover(function() {
		$(this).attr("src", $(this).attr("src").replace("_off", "_on"));
	});
	
	$("img.rollover").mouseout(function() {
		$(this).attr("src", $(this).attr("src").replace("_on", "_off"));
	});
	//===========[E] img rollover ===============
	//===========[S] input check all ===============
	$("input[name='checkAll']").click(function(){ 
		var checked_status = this.checked;
		$("input[id='chkSeq']").each(function(){
			this.checked = checked_status;
		});	

		$("input[class='"+this.className+"']").each(function(){
			this.checked = checked_status;
		});	
	});
	//===========[E] input check all ===============
	//===========[S] validator ===============
	$("#player2").attr('width',320).attr('height',250);
	/*
	$('#insertform').validate({
		rules: {},
		messages: {},
		errorPlacement: function (error, element) {},
		submitHandler: function (form) { 
			if(typeof beforeSubmit == 'function'){
				if(beforeSubmit(form)){
					form.submit(); 
				}
			}else{
				form.submit(); 
			}			
		}
	});

	$('#searchform').validate({
		rules: {},
		messages: {},
		errorPlacement: function (error, element) {},
		submitHandler: function (form) { 
			if(typeof beforeSubmit == 'function'){
				if(beforeSubmit(form)){
					form.submit(); 
				}
			}else{
				form.submit(); 
			}			
		}
	});*/
	//===========[E] validator ===============
	//$('.datepicker').datepicker({});

	//===========[S] SMS===============
	$(".sms").keyup(function()
	{
		var l_byte = textchk(this, '80');

		if(l_byte > 80)
		{
			l_byte = textchk(this, '80');
		}

		$(".byte_len").eq($(this).attr("tabindex")).text(l_byte);
	}).css("font-size", "9pt");


	//===========[E] SMS===============
	//===========[S] ¸Þ´º===============
	$('#menu li').hover(function() {		

		var index = $('#menu li').index(this);

		if ($("#outTotalMenu div:eq("+index+")").is(':hidden')) {
			$("#outTotalMenu div").hide();
			$("#outTotalMenu div:eq("+index+")").slideDown('past');
		}
	});

	$('#header, #contents, #contentsWrap').hover(function() {		
		$("#outTotalMenu div").slideUp('past');
	});

	$(".menuClose").click(function(){
		$("#outTotalMenu div").slideUp('past');
	});
	//===========[E] ¸Þ´º===============
	//===========[S] °Ô½ÃÆÇ ¸®½ºÆ®===============
	$("#tbody_list tr").mouseover(function(){
		$(this).addClass('on');
	});

	$("#tbody_list tr").mouseout(function(){
		$(this).removeClass('on');
	});
	//===========[E] °Ô½ÃÆÇ ¸®½ºÆ®===============


});
