// JavaScript Document
$(document).ready(function() {

	$('#storeBtn').bind('mouseenter', function() {
		if (!moveFlag) {
			moveFlag = true;
			$('#storeBtn').animate({right: '465px', width: '120px'}, 200);
			$('#store-title').fadeIn(300, function(){moveFlag = false;});
		}
	});
	
	$('#storeBtn').bind('mouseleave', function() {
		if (nowSituation != 'store' && nowSituation != 'checkout') {									   
			$('#store-title').fadeOut(300);
			$('#storeBtn').delay(300).animate({width: '40px',right: '545px'}, 200);
		}
	});
	
	$('#aboutBtn').bind('mouseenter', function() {
		if (!moveFlag) {
			moveFlag = true;
			$('#aboutBtn').animate({right: '465px', width: '120px'}, 200);
			$('#about-title').fadeIn(300, function(){moveFlag = false;});
		}
	});
	
	$('#aboutBtn').bind('mouseleave', function() {
		if (nowSituation != 'about') {									   
			$('#about-title').fadeOut(300);
			$('#aboutBtn').delay(300).animate({width: '40px',right: '545px'}, 200);
		}
	});

	/*$('#supportBtn').bind('mouseenter', function() {
		if (!moveFlag) {
			moveFlag = true;
			$('#supportBtn').animate({right: '465px', width: '120px'}, 200);
			$('#support-title').fadeIn(300, function(){moveFlag = false;});
		}
	});
	
	$('#supportBtn').bind('mouseleave', function() {
		if (nowSituation != 'support') {									   
			$('#support-title').fadeOut(300);
			$('#supportBtn').delay(300).animate({width: '40px',right: '545px'}, 200);
		}
	});*/
	
	$('#contactBtn').bind('mouseenter', function() {
		if (!moveFlag) {
			moveFlag = true;
			$('#contactBtn').animate({right: '465px', width: '120px'}, 200);
			$('#contact-title').fadeIn(300, function(){moveFlag = false;});
		}
	});
	
	$('#contactBtn').bind('mouseleave', function() {
		if (nowSituation != 'contact') {									   
			$('#contact-title').fadeOut(300);
			$('#contactBtn').delay(300).animate({width: '40px',right: '545px'}, 200);
		}
	});


	$('#logoutBtn').bind('mouseenter', function() {
		if (!moveFlag) {
			moveFlag = true;
			$('#logoutBtn').animate({right: '465px', width: '120px'}, 200);
			$('#logout-title').fadeIn(300, function(){moveFlag = false;});
		}
	});
	
	$('#logoutBtn').bind('mouseleave', function() {
		$('#logout-title').fadeOut(300);
		$('#logoutBtn').delay(300).animate({width: '40px',right: '545px'}, 200);
	});
	
	$('#sizeChartBtn').bind('mouseenter', function() {
		if (!moveFlag) {
			moveFlag = true;
			$('#sizeChartBtn').animate({right: '465px', width: '140px'}, 200);
			$('#sizeChart-title').fadeIn(300, function(){moveFlag = false;});
		}
	});
	
	$('#sizeChartBtn').bind('mouseleave', function() {
		$('#sizeChart-title').fadeOut(300);
		$('#sizeChartBtn').delay(300).animate({width: '40px',right: '545px'}, 200);
	});

});
