$(document).ready(
	function(){
		slideShow();
		set_menu();
		$("#menu p.menu_head").click(function() {
			$(this).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		});
		
	}
);

function set_menu(){
	$('.lang-b a img').mouseover(
		function(){
			var src_ = $(this).attr('src');
			
			src_ = src_.replace('.', '_a.');
			$(this).attr('src', src_);
		}
	);
	
	$('.lang-b a img').mouseout(
		function(){
			var src_ = $(this).attr('src');
			
			src_ = src_.replace('_a.', '.');
			$(this).attr('src', src_);
		}
	);
}

function slideShow() {   
    $('#gallery a').css({opacity: 0.0});   
    $('#gallery a:first').css({opacity: 1.0});   
    setInterval('gallery()',5000);   
}   
  
function gallery() {   
    var current = ($('#gallery a.show')?  $('#gallery a.show') : $('#gallery a:first'));   
    var next = ((current.next().length) ? ((current.next().hasClass('caption'))? $('#gallery a:first') :current.next()) : $('#gallery a:first'));             
    next.css({opacity: 0.0})   
    .addClass('show')   
    .animate({opacity: 1.0}, 1000);   
  
    current.animate({opacity: 0.0}, 1000)   
    .removeClass('show');   
}   
