-- Set up the mouse enter and leave event handlers for each button

local function onButtonEnter(button)
	local sizeTweenInfo = TweenInfo.new(tweenDuration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
	local sizeTween = game:GetService("TweenService"):Create(button, sizeTweenInfo, {
		Size = UDim2.new(button.Size.X.Scale * magnificationScale, button.Size.X.Offset, 
			button.Size.Y.Scale * magnificationScale, button.Size.Y.Offset)
	})
	click:Play()
	sizeTween:Play()

	local positionTweenInfo = TweenInfo.new(tweenDuration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
	local positionTween = game:GetService("TweenService"):Create(button, positionTweenInfo, {
		Position = UDim2.new(button.Position.X.Scale - ((magnificationScale - 1) / 2), 
			button.Position.X.Offset, button.Position.Y.Scale - ((magnificationScale - 1) / 2), 
			button.Position.Y.Offset)
	})
	positionTween:Play()
end

local function onButtonLeave(button)
	local sizeTweenInfo = TweenInfo.new(tweenDuration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
	local sizeTween = game:GetService("TweenService"):Create(button, sizeTweenInfo, {
		Size = originalSizes[button]
	})
	sizeTween:Play()

	local positionTweenInfo = TweenInfo.new(tweenDuration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
	local positionTween = game:GetService("TweenService"):Create(button, positionTweenInfo, {
		Position = originalPositions[button]
	})
	positionTween:Play()
end
