// UPDATED THROUGH June 1
var wordOnWay = {
	monthLabels : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
	retrieveDate : function(){
		var today = new Date();
		var day = today.getDate();
		return day;
	},
	wotw : {
		1 : {
			verse: "2 Chronicles 7:14",
			message: "(God Speaking) \"Then if my people who are called by my name will humble themselves and pray and seek my face and turn from their wicked ways, I will hear from heaven and will forgive their sins and restore their land.\""
		},
		2 : {
			verse: "Matthew 5:44",
			message: "(Jesus speaking) But I say, love your enemies!  Pray for those who persecute you!"
		},
		3 : {
			verse: "Jeremiah 29:13",
			message: "(God speaking) If you look for me wholeheartedly, you will find me."
		},
		4 : {
			verse: "James 1:19",
			message: "Understand this, my dear brothers and sisters: You must all be quick to listen, slow to speak, and slow to get angry."
		},
		5 : {
			verse: "Proverbs 18:4",
			message: "Wise words are like deep waters; wisdom flows from the wise like a bubbling brook."
		},
		6 : {
			verse: "Isaiah 41:10",
			message: "(God Speaking) Don\'t be afraid, for I am with you.  Don’t be discouraged, for I am your God.  I will strengthen you and help you.  I will hold you up with my victorious right hand."
		},
		7 : {
			verse: "Ecclesiastes 5:5",
			message: "It is better to say nothing than to make a promise and not keep it."
		},
		8 : {
			verse: "Matthew 5:7",
			message: "God blesses those who are merciful, for they will be shown mercy."
		},
		9 : {
			verse: "Luke 6:37",
			message: "Do not judge others, and you will not be judged. Do not condemn others, or it will all come back against you. Forgive others, and you will be forgiven."
		},
		10 : {
			verse: "Matthew 5:4",
			message: "God blesses those who mourn, for they will be comforted."
		},
		11 : {
			verse: "Nahum 1:7",
			message: "The LORD is good, a strong refuge when trouble comes.  He is close to those who trust in Him."
		},
		12 : {
			verse: "Psalm 37:3",
			message: "Trust in the LORD and do good.  Then you will live safely in the land and prosper."
		},
		13 : {
			verse: "Hebrews 13:16",
			message: "And don\'t forget to do good and to share with those in need. These are the sacrifices that please God."
		},
		14 : {
			verse: "Isaiah 30:18",
			message: "So the LORD must wait for you to come to him so he can show you his love and compassion.  For the LORD is a faithful God.  Blessed are those who wait for his help."		
		},
		15 : {
			verse: "James 1:17",
			message: "Whatever is good and perfect comes down to us from God our Father, who created all the lights in the heavens. He never changes or casts a shifting shadow."
		},
		16 : {
			verse: "1 Peter 3:9",
			message: "Don't repay evil for evil. Don't retaliate with insults when people insult you. Instead, pay them back with a blessing. That is what God has called you to do, and he will bless you for it."
		},
		17: {
			verse : "Romans 14:8",
			message: "If we live, it's to honor the Lord. And if we die, it's to honor the Lord. So whether we live or die, we belong to the Lord."
		},
		18 : {
			verse: "Acts 13:38",
			message: "Brothers, listen! We are here to proclaim that through this man Jesus there is forgiveness for your sins."
		},
		19 : {
			verse: "1 Corinthians 12:6",
			message: "God works in different ways, but it is the same God who does the work in all of us."
		},
		20 : {
			verse: "Proverbs 3:3",
			message: "Never let loyalty and kindness leave you!  Tie them around your neck as a reminder.  Write them deep within your heart."
		},
		21 : {
			verse: "Amos 5:14",
			message: "Do what is good and run from evil so that you may live!  Then the LORD God of Heaven's Armies will be your helper, just as you have claimed."	
		},
		22 : {
			verse: "Hebrews 12:2",
			message: "We do this by keeping our eyes on Jesus, the champion who initiates and perfects our faith.  Because of the joy awaiting him, he endured the cross, disregarding its shame. Now he is seated in the place of honor beside God’s throne."
		},
		23 : {
			verse: "Hebrews 13:1",
			message: "Keep on loving each other as brothers and sisters."
		},
		24 : {
			verse: "1 Peter 4:8",
			message: "Most important of all, continue to show deep love for each other, for love covers a multitude of sins."
		},
		25 : {
			verse: "Colossians 3:23",
			message: "Work willingly at whatever you do, as though you were working for the Lord rather than for people."
		},
		26 : {
			verse: "Colossians 3:15",
			message: "And let the peace that comes from Christ rule in your hearts. For as members of one body you are called to live in peace. And always be thankful."
		},
		27 : {
			verse: "1 Peter 5:7",
			message: "Give all your worries and cares to God, for he cares about you."
		},
		28 : {
			verse: "Ephesians 4:29",			
			message : "Don't use foul or abusive language. Let everything you say be good and helpful, so that your words will be an encouragement to those who hear them."
		},
		29 : {
			verse: "Colossians 4:5",
			message: "Live wisely among those who are not believers, and make the most of every opportunity."
		},
		30 : {
			verse: "James 1:12",
			message: "God blesses those who patiently endure testing and temptation. Afterward they will receive the crown of life that God has promised to those who love him."
		},
		31 : {
			verse: "Psalm 12:6",
			message: "The LORD's promises are pure, like silver refined in a furnace, purified seven times over."
		}
	},
	init : function(){
		var wotwSection = document.getElementById("wotw");
		var parts = wotwSection.getElementsByTagName("dd");
		var day = wordOnWay.retrieveDate();
		for (var i=0; i<parts.length; i++){
			parts[i].innerHTML = parts[i].className=="verse" ? wordOnWay.wotw[day].message : wordOnWay.wotw[day].verse;
		}
	}
}
addLoadEvent(wordOnWay.init);
