// JavaScript Document

// generates a random scripture

// each member of arrScriptureArray is a scripture quote, followed by an @, followed by the scripture source
// then you just pick one at random, split it at the @, add some markup, and return it

var arrScriptures = new Array;
arrScriptures.push('I can do all things through Him who strengthens me.@Philippians 4:13');
arrScriptures.push('With God\'s help we will do mighty things...@Psalm 60:12, NLT');
arrScriptures.push('And my God will meet all your needs according to his glorious riches in Christ Jesus.@Philippians 4:19, NIV');
arrScriptures.push('...for the Lord will be your confidence and will keep your foot from being snared.@Proverbs 3:26, NIV');
arrScriptures.push('The eyes of the Lord watch over those who do right, and His ears are open to their prayers.@1 Peter 3:12, NLT');
arrScriptures.push('Blessed is the man who perseveres under trial, because when he has stood the test, he will receive the crown of life that God has promised to those who love him.@James 1:12, NIV');
arrScriptures.push('Finally, be strong in the Lord and his mighty power.  Put on the full armor of God so that you can take your stand against the devil\'s schemes.@Ephesians 6:10-11, NIV');
arrScriptures.push('Be on guard.  Stand true to what you believe.  Be courageous.  Be strong.  And everything you do must be done with love.@1 Corinthians 6:13-14, NIV');
arrScriptures.push('...anyone who believes in me will do the same works I have done, and even greater works, because I am going to be with the Father.  You can ask for anything in my name, and I will do it...@John 14:13, NLT');
arrScriptures.push('Jesus looked at them and said, "With man this is impossible, but with God all things are possible."@Matthew 19:26, NIV');
arrScriptures.push('One day Jesus told his disciples a story to illustrate their need for constant prayer and to show them that they must never give up.@Luke 18:1, NLT');
arrScriptures.push('When I pray, you answer me, and encourage me by giving me the strength I need.@Psalm 138:3, NLT');
arrScriptures.push('If any of you lacks wisdom, he should ask God, who gives generously to all without finding fault, and it will be given to him.@James 1:5, NLV');
arrScriptures.push('This is the confidence we have in approaching God; that if we ask anything according to his will, he hears us.@1 John 5:14, NIV ');
arrScriptures.push('Have I not commanded you?  Be strong and courageous.  Do not be terrified; do not be discouraged, for the Lord your God will be with you wherever you go.@Joshua 1:9, NIV');
arrScriptures.push('Oh that we might know the Lord!  Let us press on to know Him!  Then he will respond to us as surely as the arrival of dawn or the coming of rains in early spring.@Hosea 5:3, NLT');
arrScriptures.push('For the eyes of the Lord range throughout the earth to strengthen those whose hearts are fully committed to him.@2 Chronicles 16:9, NIV');
arrScriptures.push('For from him and through him and to him are all things, to him be the glory forever!  Amen.@Romans 11:36, NIV');
arrScriptures.push('Forgetting what is behind and straining toward what is ahead, I press on toward the goal to win the prize for which God has called me heavenward in Christ Jesus.@Philippians 3:13-14, NIV');
arrScriptures.push('Your unfailing love is better to me than life itself; how I praise you!  I will honor you as long as I live, lifting up my hands to you in prayer.@Psalm 63:3-4, NLT');
arrScriptures.push('We are pressed on every side by troubles, but we are not crushed and broken.  We are perplexed, but we don\'t give up and quit.@2 Corinthians 4:8, NLT');
arrScriptures.push('...those who hope in the Lord will renew their strength.  They will soar on wings like eagles; they will run and not grow weary, they will walk and not be faint.@Isaiah 40:30-31, NASB');
arrScriptures.push('We can rejoice, too, when we run into problems and trials, for we know that they are good for us - they help us learn to endure.@Romans 5:3, NLT');
arrScriptures.push('...my dear brothers, stand firm.  Let nothing move you.  Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain.@1 Corinthians 15:58, NIV');
arrScriptures.push('Let us not become weary in doing good, for at the proper time we will reap a harvest if we do not give up.@Galatians 6:9, NIV');
arrScriptures.push('For God did not give us a spirit of timidity, but a spirit of power, of love and self-discipline.@2 Timothy 1:7, NIV');
arrScriptures.push('Take delight in the Lord, and he will give you your heart\'s desires.  Commit everything you do to the Lord.  Trust him, and he will help you.@Psalm 37:4-5, NLT');
arrScriptures.push('He alone is my rock and my salvation; he is my fortress, I will never be shaken.@Psalm 62:2, NIV');
arrScriptures.push('The Lord is my strength and my shield; my heart trusts in him, and I am helped.@Psalm 28:7, NIV');
arrScriptures.push('Cast your cares on the Lord and he will sustain you; he will never let the righteous fall.@Psalm 55:22, NIV');


function fcnGenerateScripture() {
	$('.scriptureText').fadeOut(1000);
	$('.scriptureAttribution').fadeOut(1000);
	var n = Math.floor(Math.random() * arrScriptures.length);
	var arrSplit = arrScriptures[n].split('@');
	// var strScripture = '<div>\''+arrSplit[0]+'\'</div><div id="dailyScriptureSource">'+arrSplit[1]+'</div>';
	// document.write(strScripture);
	setTimeout(function(){
		$('.scriptureText').html(arrSplit[0]);
		$('.scriptureAttribution').html(arrSplit[1]);
		$('.scriptureText').fadeIn(1000);
		$('.scriptureAttribution').fadeIn(1000);}, 2000);
}



