// JavaScript Document
jQuery(function($){
	$("#langBut").toggle(function(){
		$("#langSelect").show();
		},function(){
		$("#langSelect").hide();
	});
	//$("#langSelect li").click(function(){
		//$(".langPane").html($(this).html());								   
	//});
	$("#langSelect li:eq(0)").click(function(){
    $.cookie('jQuery_client_language',null,{path:"/"}); 
	$(".langPane").html($(this).html());
    location.href=location.href;
  });
	$(".langPane").click(function(){
	$("#langSelect").slideToggle();					  
  });
  $("#langSelect li:eq(1)").click(function(){
    $.cookie('jQuery_client_language',"big5",{path:"/"}); 
    jQuery("body").gb2big5();
	$(".langPane").html($(this).html());
	location.href=location.href;
  });
  var $language = $.cookie('jQuery_client_language'); 
  if($language && $language=="big5"){
    $("body").gb2big5();
	$(".langPane").html($("#langSelect li:eq(1)").html());
	$("#langSelect li:eq(1)").hide();
    document.title =jtf(document.title);
  }else{
	$("#langSelect li:eq(0)").hide();  
	}
	//bottomselect
	//$("#linkbut1").mouseover()
	
	$(".friendLink").each(function(){
								   $(this).hover(function(){
														 $(this).children(".selectLi").slideDown(400); 
														 $(this).children(".linkbut").addClass("linkbut_up");
														  },function(){
															  $(this).children(".selectLi").slideUp(400);
															  $(this).children(".linkbut").removeClass("linkbut_up");
															  });
								   });
	
	
	//breadCrumb
	$(".breadCrumb a:last").addClass("lastA");
	$(document).click(function(event){$("#selectLi1").hide();$("#selectLi2").hide();$("#selectLi3").hide();$("#langSelect").hide();});

});
