/* Author:@coderDx */


/* Dx Slideshow */

var interval = 6000;
var random_display = 0;
var imageDir = "img/";
var imageNum = 0;

imageArray = new Array();
imageArrayText = new Array();

imageArray[imageNum++] = new imageItem(imageDir + "home1.jpg");
imageArray[imageNum++] = new imageItem(imageDir + "home2.jpg");
imageArray[imageNum++] = new imageItem(imageDir + "home3.jpg");
imageArray[imageNum++] = new imageItem(imageDir + "home4.jpg");

imageNum=3;

var totalImages = imageArray.length;

function imageItem(image_location) {
	this.image_item = new Image();
	this.image_item.src = image_location;
}

function get_ImageItemLocation(imageObj) {
	return(imageObj.image_item.src)
}

function getNextImage() {
	if (random_display) {
		imageNum = randNum(0, totalImages-1);
	}
	else {
		imageNum = (imageNum+1) % totalImages;
	}
	
	var new_image = get_ImageItemLocation(imageArray[imageNum]);
	return(new_image);
}

function switchImage(place) {
	var new_image = getNextImage();
	document[place].src = new_image;
	var recur_call = "switchImage('"+place+"')";
	timerID = setTimeout(recur_call, interval);
}

/* Dx home page circle rollovers */

var defaultText="<p class='text'>Web design is more than just creating clean code and sharp graphics.</p>" +
	"<p class='text'>A site that really works fulfills your strategic objectives while meeting the needs of your users. " +
	"Even the best content and the most sophisticated technology won't help you balance those goals without a cohesive, " +
	"consistent user experience to support it.</p>" +
	"<p class='text'>At KerBob, we make your visitors' experience the best it can be.</p>";

  $("#circleBlue").mouseover(function() {
		document.getElementById("circleBlue").setAttribute("opacity", "1.0");
		document.getElementById("squareRight").style.backgroundColor="#c3d9ff";
		document.getElementById("squareRight").innerHTML="<p class='text'>Website visitors today demand " +
		"more from websites than flat, static pages. Engage them using interactive activities the help " +
		"reinforce your brand or product with:</p>" +
		"" +
		"<ul class='interactiveList'>" +
			"<li>Blog Sites</li>" +
			"<li>Dynamic Content</li>" +
			"<li>Social Media Content</li>" +
			"<li>Comments</li>" +
			"<li>Discussion Forums</li>" +
			"<li>Online Games</li>" +
			"<li>Interactive Forms</li>" +
		"</ul>";
		
		
  }).mouseout(function(){
		document.getElementById("circleBlue").setAttribute("opacity", "0.5");
		document.getElementById("squareRight").style.backgroundColor="white";
		document.getElementById("squareRight").innerHTML=defaultText;
  });

  $("#circleGreen").mouseover(function() {
		document.getElementById("circleGreen").setAttribute("opacity", "1.0");
		document.getElementById("squareRight").style.backgroundColor="#e5f4c4";		
		document.getElementById("squareRight").innerHTML="<p class='text'>By dynamically collecting information from " +
		"your visitors, your website can filter it's content, giving your visitors only the information they need, " +
		"and not what they don't.</p>" +
		"" +
		"<ul class='interactiveList'>" +
			"<li>Customer Logins</li>" +
			"<li>Account Information</li>" +
			"<li>User Preferences</li>" +
			"<li>Order Information</li>" +
			"<li>Product News/Updates</li>" +
			"<li>Customization</li>" +
			"<li>Availability</li>" +
		"</ul>";		
		
  }).mouseout(function(){
		document.getElementById("circleGreen").setAttribute("opacity", "0.5");
		document.getElementById("squareRight").style.backgroundColor="white";
		document.getElementById("squareRight").innerHTML=defaultText;
  });
	
	$("#circleRed").mouseover(function() {
		document.getElementById("circleRed").setAttribute("opacity", "1.0");
		document.getElementById("squareRight").style.backgroundColor="#fde7e0";
		document.getElementById("squareRight").innerHTML="<p class='text'>Using exciting new technologies, " +
		"your site has the ability to entertain as well as inform. Use today's technology to keep your visitors " +
		"entertained while they are visiting your site.</p>" +
		"" +
		"<ul class='interactiveList'>" +
			"<li>Social Media Content</li>" +
			"<li>Video/Audio Clips</li>" +
			"<li>Online Games</li>" +
			"<li>Visitor Polls</li>" +
			"<li>Comments</li>" +
			"<li>Dynamic Content</li>" +
			"<li>Visual Effects</li>" +
		"</ul>";		
  }).mouseout(function(){
		document.getElementById("circleRed").setAttribute("opacity", "0.5");
		document.getElementById("squareRight").style.backgroundColor="white";
		document.getElementById("squareRight").innerHTML=defaultText;		
  });


