restaurant1 = {}

function restaurant1:initialize()
	local background = scenes.SCENE_INTERSTITIAL:child("BACKGROUND")
	glowSprite = background:newChildSprite({x=332, y=176, image="GLOW1", section="interstitial", anchorpoint="center"})
	glowSprite:doEvery(1200, restaurant1.glow)
end

function restaurant1:glow()	
	local d1 = 500 + math.random(500)
	local d2 = 500 + math.random(500)
	glowSprite:animate(
		{alpha=0, duration=d1},
		{alpha=0.5, duration=d2}
	)	
	return d1 + d2
end

function restaurant1:simpleAnimation()
	local background = scene:child("BACKGROUND")
	local black = scene:newChildSprite({x=0, y=0, image="BACKGROUND1", section="interstitial"})
	black:setColor({alpha=0, red=0, green=0, blue=0})
	
	moveCalender(false)
	moveButtons(false)
	moveRestSelection(false)
	
	black:animate(		
		{alpha=1, duration=1000},
		{command="updateObjects", target=background},
		{command="updateBackground", target=background},	
		{alpha=0, duration=1000},
		{call=function() 
			moveCalender(true)
			moveButtons(true)
			moveRestSelection(true)
			black:setObsolete() end}
	)
end
