// JavaScript Document

function WriteVerse() {
	var randomnumber=Math.floor(Math.random()*20); //0-19
	var aVerses=new Array(
	"John 3:16 For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.",
	"John 1:1 In the beginning was the Word, and the Word was with God, and the Word was God.",
	"John 14:6 Jesus answered, &quot;I am the way and the truth and the life. No one comes to the Father except through me.&quot;",
	"Matthew 28:19 Therefore go and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit",
	"Romans 3:23 For all have sinned and fall short of the glory of God.",
	"Ephesians 2:8 For it is by grace you have been saved, through faith – and this is not from yourselves, it is the gift of God",
	"Genesis 1:1 In the beginning God created the heavens and the earth.",
	"Acts 1:8 &quot;But you will receive power when the Holy Spirit comes on you; and you will be my witnesses in Jerusalem, and in all Judea and Samaria, and to the ends of the earth.&quot;",
	"2 Timothy 3:16 All Scripture is God-breathed and is useful for teaching, rebuking, correcting and training in righteousness",
	"Romans 10:9 If you declare with your mouth, &quot;Jesus is Lord,&quot; and believe in your heart that God raised him from the dead, you will be saved.",
	"Romans 6:23 For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord.",
	"Acts 2:38 Peter replied, &quot;Repent and be baptized, every one of you, in the name of Jesus Christ for the forgiveness of your sins. And you will receive the gift of the Holy Spirit.&quot;",
	"John 1:12 Yet to all who did receive him, to those who believed in his name, he gave the right to become children of God.",
	"Romans 8:28 And we know that in all things God works for the good of those who love him, who have been called according to his purpose.",
	"Romans 12:1 Therefore, I urge you, brothers and sisters, in view of God's mercy, to offer your bodies as a living sacrifice, holy and pleasing to God – this is true worship.",
	"Romans 5:8 But God demonstrates his own love for us in this: While we were still sinners, Christ died for us.",
	"Matthew 28:18 Then Jesus came to them and said, &quot;All authority in heaven and on earth has been given to me.&quot;",
	"John 3:3 Jesus replied, &quot;Very truly I tell you, no one can see the kingdom of God without being born again.&quot;"
	);
	$("#verse").html(aVerses[randomnumber]);
}

function sparkle() {
	var nX=Math.floor(Math.random()*725); 
	var nY=Math.floor(Math.random()*700);
	var nTimer=Math.floor(Math.random()*2000);
	$("#sparkle").css("top", nY);
	$("#sparkle").css("left", nX+250);
	$("#sparkle").fadeIn(400, function() {
		$("#sparkle").fadeOut(400, function() {
			$("#sparkle").css("top", 750);	$("#sparkle").css("left", 1000); //move it out of the way.
		}); 
	});
	setTimeout("sparkle()", 1500+nTimer);
}

function RunOnLoad() {
	$(document).ready(function(){ 
		jQuery.preLoadImages('localimages/homepage/shop_catalog_over.jpg', 'localimages/homepage/search_over.jpg', 'localimages/homepage/help_over.jpg', 'localimages/homepage/shopping_cart_over.jpg', 'localimages/homepage/order_status_over.jpg'); 
		WriteVerse();
		setTimeout("sparkle()", 2000);
		});
}
