$(document).ready(function() {
						   
	/* =========================== EQUIPMENT ====================================== */
	
	var tab = $("#about_equip_tab").find("#about_tab");
	var equip_content = $("#about_equip_tab > #about_tab:last").attr("equip_content");
	$("#about_equip_tab > #about_tab:last").addClass("about_tab_active");
	$("#about_equip_content").html(equip_content);
	
	$(tab).hover(function(){
		var equip_content = $(this).attr("equip_content");
		$("#about_equip_tab").find(".about_tab_active").removeClass();
		$(this).addClass("about_tab_active");
		$("#about_equip_content").html(equip_content);
		
	});
	
	var TabbedContent = {
	
		init: function() {	
			$(tab).hover(function() {
				var background = $("#about_equip_tab").parent().find(".moving_bg");
				$(background).stop().animate({
					left: $(this).position()['left']
				}, {
					duration: 300
				});
				TabbedContent.slideContent($(this));
			});
		},
		slideContent: function(obj) {
			var margin = $(obj).parent().parent().find("#about_equip_content").width();
			margin = margin * ($(obj).prevAll().size() - 1);
			margin = margin * -1;
		}
	}
	
	TabbedContent.init();
	
	/* =========================== OURBRAND ========================================= */
	
	var ourbrand_logo = $("#about_ourbrand_tab > #about_tab:first").attr("logo");
	var ourbrand_content = $("#about_ourbrand_tab > #about_tab:first").attr("content");
	$("#about_ourbrand_tab > #about_tab:first").addClass("about_tab_active");
	$("#about_ourbrand_logo").html(ourbrand_logo);
	$("#about_ourbrand_content").html(ourbrand_content);
	
	$("#about_ourbrand_tab > #about_tab").click(function(){
		var ourbrand_logo = $(this).attr("logo");
		var ourbrand_content = $(this).attr("content");
		$("#about_ourbrand_tab").find(".about_tab_active").removeClass();
		$(this).addClass("about_tab_active");
		$("#about_ourbrand_logo").html(ourbrand_logo);
		$("#about_ourbrand_content").html(ourbrand_content);

	});
	
	/* ================================ BOARD ===================================== */
	
	var b_image    = $("#about_board_list").find("div:first").attr("image");
	var b_name     = $("#about_board_list").find("div:first").attr("name");
	var b_position = $("#about_board_list").find("div:first").attr("position");
	var b_educate  = $("#about_board_list").find("div:first").attr("educate");
	var b_expr     = $("#about_board_list").find("div:first").attr("expr");
	
	$("#about_board_image").html(b_image);
	$(".about_board_name > h2").html(b_name);
	$(".about_board_position").html(b_position);
	$(".about_board_education").html(b_educate);
	$("#about_board_exp").html(b_expr);
	
	$("#about_board_list").find("div").addClass("board_list");
	$("#about_board_list").find("div:first").addClass("board_list_active");
	
	
	
	$("#about_board_list > .board_list").click(function(){
		var b_image    = $(this).attr("image");
		var b_name     = $(this).attr("name");
		var b_position = $(this).attr("position");
		var b_educate  = $(this).attr("educate");
		var b_expr     = $(this).attr("expr");
		
		$("#about_board_image").html(b_image);
		$(".about_board_name > h2").html(b_name);
		$(".about_board_position").html(b_position);
		$(".about_board_education").html(b_educate);
		$("#about_board_exp").html(b_expr);
		
		$("#about_board_list").find(".board_list_active").removeClass();
		$("#about_board_list").find("div").addClass("board_list");
		$(this).addClass("board_list_active");
		
		
	});
	
	
	/* ================================ NEWS ===================================== */
	
	
	function news_list(list){
	    $("." + list).click(function(){
			$("#news_content div." + list + "_show").fadeIn();		
			$("#news_container_list").hide();
			$(".news_bt_back").show();						
		});
		$(".news_bt_back").click(function(){
			$("#news_container_list").fadeIn();
			$("#news_content div." + list + "_show").hide();
			$(this).hide();			
		});
	}
		
	var list_no = $("#news_container_list").find("#news_list").length;

	for(i = 1 ; i <= list_no ; i++){
		news_list("news0"+i);
	}	
	
	
	/* ================================ NEWS FASHION ===================================== */
	
	function fashion_list(list){
		$("." + list + " > .news_morefashion").click(function(){
			$("#news_content > ." + list + "_show").fadeIn();	
			$("#news_container_list").hide();
			$(".news_bt_back").show();						
		});
		$(".news_bt_back").click(function(){
			$("#news_container_list").fadeIn();
			$("#news_content > ." + list + "_show").hide();
			$(this).hide();			
		});
	}
		
	var fashion_no = $("#news_container_list").find("#news_list2").length;
		
	for(i = 1 ; i <= fashion_no ; i++){
		fashion_list("news0"+i);
	}	
	
	function fashion(list){
		$("." + list + " > a.fashion_more").click(function(){
			$("#fashion_content > ." + list + "_show").fadeIn();	
			$("#news_container_list").hide();
			$(".news_bt_back").show();						
		});
		$(".news_bt_back").click(function(){
			$("#news_container_list").fadeIn();
			$("#fashion_content > ." + list + "_show").hide();
			$(this).hide();			
		});
	}

	var list_fashion = $("#news_container_list").find("#fashion_list").length;
		
	for(j = 1 ; j <= list_fashion ; j++){
		fashion("fashion0"+j);
	}	
	
	
	
	/* ================================ CSR ===================================== */
	
	var imgCer = $("#thumbsCer > li:first").attr("bigCer");
		var description = $("#thumbsCer > li:first").attr("des");
		$("#csr_description").html(description);
		$("#imageCer").html(imgCer);
		$("#thumbsCer > li:first").addClass("active");
		
		$("#thumbsCer > li").click(function(){

			var imgCer = $(this).attr("bigCer");
			var description = $(this).attr("des");

			$("#imageCer").html(imgCer);
			$("#csr_description").html(description);
			
			$("#thumbsCer").find(".active").removeClass("active");
			$(this).addClass("active");
			
			
    	});
    	
     /* ========================== Fashion > Collection =============================== */
	
	    var imgFR = $("#thumbsFR > li:first").attr("bigFR");
		var description = $("#thumbsFR > li:first").attr("des");
		$("#fashion_description").html(description);
		$("#imageFR").html(imgFR);
		$("#thumbsFR > li:first").addClass("active");
		
		$("#thumbsFR > li").click(function(){

			var imgFR = $(this).attr("bigFR");
			var description = $(this).attr("des");

			$("#imageFR").html(imgFR);
			$("#fashion_description").html(description);
			
			$("#thumbsFR").find(".active").removeClass("active");
			$(this).addClass("active");
			
			
    	});
	

	
	
});

function ShowHideLine(ChannelToShow)
{
	if (document.getElementById("answer" + ChannelToShow).style.display == "inline")
	{
		document.getElementById("answer" + ChannelToShow).style.display = "none";
		document.getElementById("logo").style.display = "inline";
	}
	else
	{
		document.getElementById("answer" + ChannelToShow).style.display = "inline";
		document.getElementById("logo").style.display = "none";
	}
}







	
