﻿var productMedia = [];
var productTitle = []; 
var productDescription = []; 
var productLinks = [];

productMedia[0] = "products/media/comet_mid.png";
productTitle[0] = "Dtop Comet Screen Saver";
productDescription[0] = "With the Dtop Comet screensaver you can enjoy the view and comets come crashing down onto youre desktop.";
productLinks[0] = "<a href='http://www.undeadgames.com/software/dtopcomet/Dtop%20Comets%20Setup.exe'><img src='images/try_now.gif'/></a>&nbsp; <a href='https://www.plimus.com/jsp/buynow.jsp?contractId=1674829'><img src='images/buy_now.gif'/></a> &nbsp;&nbsp;<a href='http://www.loktar.com/Comet%20Screensaver.html'><img src='images/learn_more.png'/></a>";
productMedia[1] = "products/media/snowmen_mid.png";
productTitle[1] = "Skating Snowmen Screen Saver";
productDescription[1] = "Watch as snowmen skate around your desktop leaving skate trails, as snow falls from above.";
productLinks[1] = "<a href='http://www.undeadgames.com/software/snowmenskate/Snowmen_Skaters_Demo_Setup.exe'><img src='images/try_now.gif'/></a>&nbsp; <a href='https://www.plimus.com/jsp/buynow.jsp?contractId=1675642'><img src='images/buy_now.gif'/></a> &nbsp;&nbsp;<a href='http://www.loktar.com/Snowmen%20Screensaver.html'><img src='images/learn_more.png'/></a>";
productMedia[2] = "products/media/valens_mid.png";
productTitle[2] = "Dtop Valentines Screen Saver";
productDescription[2] = "Watch as hearts float down your screen, either on your desktop or a custom image. There is also the option to display the large analog heart clock in the center of your screen. Configuration options include, Red screen tint, or full. Custom backgrounds or hearts directly on your desktop.";
productLinks[2] = "<a href='http://www.undeadgames.com/software/dtopval/Dtop%20Valentines%20Demo%20Setup.exe'><img src='images/try_now.gif'/></a>&nbsp; <a href='https://www.plimus.com/jsp/buynow.jsp?contractId=1684893'><img src='images/buy_now.gif'/></a> &nbsp;&nbsp;<a href='http://www.loktar.com/Valentine%20Screensaver.html'><img src='images/learn_more.png'/></a>";
productMedia[3] = "products/media/zombies_mid.png";
productTitle[3] = "Desktop Zombies Screen Saver";
productDescription[3] = "Zombies are infecting everyone! Let your computer screen be the first casualty! ";
productLinks[3] = "<a href='http://www.undeadgames.com/software/zombiess/setup.exe'><img src='images/try_now.gif'/></a>&nbsp; &nbsp;&nbsp;<a href='http://www.loktar.com/Zombies%20Screensaver.html'><img src='images/learn_more.png'/></a>";
productMedia[4] = "products/media/forest_mid.png";
productTitle[4] = "Desktop Forest Screen Saver";
productDescription[4] = "Desktop Forest is a screensaver designed to bring the outdoors to your computer screen.";
productLinks[4] = "<a href='http://www.undeadgames.com/software/dtopforest/Desktop%20Forest%20Demo%20Setup.exe'><img src='images/try_now.gif'/></a>&nbsp; <a href='https://www.plimus.com/jsp/buynow.jsp?contractId=1688658'><img src='images/buy_now.gif'/></a> &nbsp;&nbsp;<a href='http://www.loktar.com/Forest%20Screensaver.html'><img src='images/learn_more.png'/></a>";
productMedia[5] = "products/media/blizzard_mid.png";
productTitle[5] = "Desktop Blizard Screen Saver";
productDescription[5] = "Watch as snow falls on your screen. Lots of options to choose from including having it snow on your desktop or an image of your choosing. Comes with 10 free winter scenes.";
productLinks[5] = "<a href='http://www.undeadgames.com/software/dtopbliz/Dtop%20Blizzard%20Demo%20Setup.exe'><img src='images/try_now.gif'/></a>&nbsp; <a href='https://www.plimus.com/jsp/buynow.jsp?contractId=1677385'><img src='images/buy_now.gif'/></a> &nbsp;&nbsp;<a href='http://www.loktar.com/Blizzard%20Screensaver.html'><img src='images/learn_more.png'/></a>";
           
var counter = 0;
//showImage("products/media/snowmen.gif"); 
 
$(function()
{
$("#title_box").fadeTo("slow", 0.6);
	$("#product_display").everyTime(10000,function(i) {
		counter++;
		if (counter > 5){
			counter = 0;
		}	
		showImage(counter)
	});
	showImage(counter);
});

function showImage(src)
{
$("#product_display img").fadeOut("normal").remove();
var largeImage = new Image();

$(largeImage).load(function()
                        {
                        $(this).hide();
                        $("#product_display").append(this);
                        $("#main_description_content").fadeOut("normal", function(){$("#main_description_content").empty().fadeIn(1000).html(productDescription[src])});
						$("#options").fadeOut("normal", function(){$("#options").empty().fadeIn(1000).html(productLinks[src])});
						$("#title_box").fadeOut("normal", function(){$("#title_box").empty().fadeIn(2000).html( "<span class='t-corners-top'><span></span></span>" + productTitle[src] + "<span class='t-corners-bottom'><span></span></span>")});    						
						$(this).fadeIn(1000);       				
								
                        });
						
$(largeImage).attr("src",  productMedia[src]);                                                             
}



