
function initMenu() {
	$('#left-menu ul ul').hide();
//	$('#left-menu ul ul:first').show();
	$('#left-menu li a.one').hover(function() {
		var checkElement = $(this).next();
		if((checkElement.is('ul ul')) && (checkElement.is(':visible'))) {
			$(this).removeClass('selected');
			checkElement.slideUp('normal');
			return false;
		}
		if((checkElement.is('ul ul')) && (!checkElement.is(':visible'))) {
			$('#left-menu ul ul:visible').slideUp('normal');
			$(this).addClass('selected');
			checkElement.slideDown('normal');
			return false;
		}
	},function (){});
}

$(document).ready(function() {

	var x=0;
	var y=0;

	$('.layer-full').css( {backgroundPosition: '0 0'} );
	
	$('.navi-top').hover(function(){
		y=0;
		$('.layer-full').stop().animate({backgroundPosition: x + '% ' + y + '%'},1000 );
	},function(){$('.layer-full').stop();});
	
	$('.navi-left').hover(function(){
		x=0;
		$('.layer-full').stop().animate({backgroundPosition: x + '% ' + y + '%'},1000 );
	},function(){
		$('.layer-full').stop();
	});
	

	$('.navi-right').hover(function(){
		x=100;
		$('.layer-full').stop().animate({backgroundPosition: x + '% ' + y + '%'},1000 );
	},function(){$('.layer-full').stop();});
	
	$('#navi-bottom').hover(function(){
		y=100;
		$('.layer-full').stop().animate({backgroundPosition: x + '% ' + y + '%'},1000 );
	},function(){$('.layer-full').stop();});
	
	$('.tl').hover(function(){
		y=0;
		y=0;
		$('.layer-full').stop().animate({backgroundPosition: x + '% ' + y + '%'},1000 );
	},function(){$('.layer-full').stop();});
	
	$('.tr').hover(function(){
		x=100;
		y=0;
		$('.layer-full').stop().animate({backgroundPosition: x + '% ' + y + '%'},1000 );
	},function(){$('.layer-full').stop();});
	
	$('#br').hover(function(){
		x=100;
		y=100;
		$('.layer-full').stop().animate({backgroundPosition: x + '% ' + y + '%'},1000 );
	},function(){$('.layer-full').stop();});
	
	$('#bl').hover(function(){
		x=0;
		y=100;
		$('.layer-full').stop().animate({backgroundPosition: x + '% ' + y + '%'},1000 );
	},function(){$('.layer-full').stop();});






	$("#left-menu li a").click(function(){
		$('#left-menu li a').removeClass('selected');
		$(this).addClass('selected');
	});
	initMenu();


	$(".tabs-2").tabs();

	$("#tabs").tabs({
		fx: { opacity: "toggle", duration: "fast" },
		cookie: { expires: 7, name: "startTab" }
	});
	
});

