

var imgArray = new Array(
	
	{	title:"ONEWAY LINKS ",
		description:"Our One way progressive link building service will have your site ranking high is search results for years to come.",
		},
	
	{	title:"DIRECTORY LINKS",
		description:"We run link building campaigns and get your link on premium directories like DMOZ, Yahoo Directory, business.com and more...",
		},
	
	{	title:"ARTICLES / PRESS RELEASE PLACEMENT",
		description:"Well written articles and press releases help get the word out about your sites and if people are writing about your business they are linking to your website. ",
		},
	
	{	title:"BLOG REVIEWS ",
		description:"We create content that will have your site being mentions all over relevant authoritative blogs throughout the blogosphere.",
		},
	
	{	title:"SOCIAL BOOKMARKING",
		description:"We use social bookmarking in a number of ways to get link flowing to your site. One good article on the front of Digg can earn thousand of organic links.",
		}
);

var currentImg = 0;
var varTimeout;

$(function() {
//	if($.browser.mozilla)
//		$('#subscriber_email').css('padding-top', '4px');

	loadImgs();

	varTimeout = setInterval("loadImgs('next')", 6500);
	
	/*for(var i=0; i < imgArray.length; i++)
	
	$('#left-content #steps li.fnl.next').before($('<li></li>'));
	$('#left-content #steps li:not(.fnl):eq(0)').addClass('current');

	

	$('#left-content #steps .fnl.prev a').click(function() {
		clearInterval(varTimeout);
		loadImgs('prev');
	});

	$('#left-content #steps .fnl.next a').click(function() {
		clearInterval(varTimeout);
		loadImgs('next');
	});

	$('#left-content #steps li:not(.fnl)').click(function() {
		clearInterval(varTimeout);
		loadImgs($('#left-content #steps li:not(.fnl)').index(this));
	});*/

});

/**
 * Load the homepage text and images at the specified index.
 * @param index The zero-based array index to load image data from.
 * @return nothing
 */
function loadImgs(index) {
	// determine the new index to load
	if(typeof(index) == 'string') {
		if(index == 'next')
			currentImg++;
		else if(index == 'prev')
			currentImg--;
	} else if(typeof(index) == 'number')
		currentImg = index;
	else
		currentImg = 0;

	// bound the index inside the array
	if(currentImg >= imgArray.length)
		currentImg = 0;
	else if(currentImg < 0)
		currentImg = imgArray.length - 1;

	// load the data at the requested index into the dom
	val = imgArray[currentImg];
	$('#content .main-title').fadeOut(500, function() {
		$(this).html(val.title).fadeIn(500);
	});
	$('#content .main-desc').fadeOut(500, function() {
		$(this).html(val.description).fadeIn(500);
	});
	
	
}

/* Validate form data */
function validate(form_id,email) {
   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.getElementById(email).value;
   if(reg.test(address) == false) {
      alert('Invalid Email Address');
      return false;
   }
}
/*function expireFeedbackMessage() {
	$('.homepage-social .header.blog .feedback-message').fadeOut('slow', function() {
		$('.homepage-social .header.blog .subscribe-email').fadeIn('slow');
	});
}
*/

