// JavaScript Document
$(document).ready(function(){
	
	/* CONTENT BASIC HEIGHT */
	var winHeight = $(window).height();
	var headHeight = $('.mnHead').height();
	var footHeight = $('.mnFoot').height();
	var setMargin = 3 * 2; //content margin-top and bottom
	var setHeight = winHeight - (headHeight + footHeight + setMargin);
	$('.mnCont').css("minHeight", setHeight + "px");
	
	//INDEX BANNER NEXT BUTTON
	$('#bannerNext').hover(function(){
		$(this).find('#next').fadeIn(300);
	},function(){
		$(this).find('#next').delay(300).fadeOut();
	});
	
	//STORE INFOMATION BLOCK HEIGHT
	var contLt = $('.idx3_lt').height();
	var contRt = $('.idx3_rt').height();
	if(contLt<contRt){
		$('.idx3_lt').height(contRt);	
	}else{
		$('.idx3_rt').height(contLt);	
	}
	
	//STORE ON SELECT
	$('.idx3_sub_item').click(function(){		
		$('.idx3_sub_item a').removeClass('select');
		$(this).find('a').addClass('select');
	});	
	
	//INDEX BANNER CYCLE UI
	$('#bannerBox').cycle({ 
	fx:     'fade', 
	prev:   '#bannerPrev', 
	next:   '#bannerNext',
	speed: 1000,
	timeout: 6000 
	});
	
	//INDEX BANNER PREV BUTTON
	$('#bannerPrev').hover(function(){
		$(this).find('#prev').fadeIn(300);
	},function(){
		$(this).find('#prev').delay(300).fadeOut();
	});
});
