$(function(){
	/* Left = Right */
	var left_h = $('.left').height();
	var right_h = $('.right').height();
	
	if(left_h > right_h)
		$('.right').css('height', left_h +'px');
	
	if(left_h < right_h)
		$('.left').css('height', right_h +'px');
	
	$('.menu-left li a').hover(
		function(){
			$(this).addClass('hover');
		},
		function() {
			$(this).removeClass('hover');
		}
	);
	
	$('.video_list a:not(.current) img').css({opacity : 0.5});
	
	$('.video_list a img').hover(
		function(){
			$(this).css({opacity : 1});
		},
		function(){
			if(!$(this).parent().hasClass('current'))
				$(this).css({opacity : 0.3});
		}
	);
	
	/* Change Video */
	$('.video_list a').click(function(){
		var position = $(this).attr('rel');
		
		if($('#video_'+ position).is(':hidden')) {
			$('.video_box').hide(0);
			$('#video_'+ position).show(0);
			
			$('.video_list a').removeClass('current');
			$(this).addClass('current');
			$('.video_list a img').css({opacity : 0.5});
			$(this).find('img').css({opacity : 1});
		}
	});
	
	var client_h = $(window).height();
	
	slideBanner('.banner-img', '.slide-banner-navig', 3000);

	/* Event click Navig */
	$('.slide-banner-navig a').click(function(){
		clearTimeout(timer);
		var num = $(this).text();
		num_item = num + 1;
		changePosition(num);
		num++;
		
		if(num > amout_img) {
			num_item = 1;
			num = 1;
		}
		
		timer = setTimeout("rotate("+ num +")", (_delay * 2));
	});
	/* End Banner Slide */
});
