//Start of the Custom animation Script
//Added by Satya V Narayana

//Variables to store different ID's of elements in the banner
var bannerItems = ["customers", "innovation", "enterprise", "people"];
var currItem = 0;


function do_animate(elem)
{
	$("#bl_"+elem).fadeIn(500, function(){
		fadeInEl($("#bl_"+elem+" .banner_text ul li:first"));
		$("#"+bannerItems[currItem]+"_button").addClass("sel");
	});
}

var timeOutId;

function fadeInEl(el){
	$(el).fadeIn(500, function(){
		//alert($(this).next().length);
		if($(this).next().length != 0) {
			fadeInEl($(this).next());
		}
		else
		{
			timeOutId = setTimeout(function(){fadeOutEl(currItem);}, 6000);
		}
	});
}

function fadeOutEl(el){
	if(currItem > 2) {
		currItem = 0;
	}
	else
	{
		currItem++;
	}
	
	$("#bl_"+bannerItems[el]+", #bl_"+bannerItems[el]+" .banner_text ul li").hide();
	for(i=0; i<4; i++){
		$("#"+bannerItems[i]+"_button").removeClass("sel");
	}
	do_animate(bannerItems[currItem]);
}

var csItems = ["mobile", "social", "web"];
var ilItems = ["ra", "md", "es", "ms"];
var cont="";

function nextPrevcs(tohide, toshow)
{
	$("#"+tohide).fadeOut(200, function(){
								$("#"+toshow).fadeIn(200);
								showHidearrw(tohide, toshow);
							});
}

function showHideInno(tohide, toshow)
{
	nextPrevcs(tohide, toshow);
}

function showHidearrw(tohide, toshow)
{
	$("#"+tohide+"_np").hide();
	$("#"+toshow+"_np").show();
}

$(document).ready(function() {
		window.setTimeout(function() {
			$('.skype_pnh_container').html('');
			$('.skype_pnh_print_container').removeClass('skype_pnh_print_container');
		}, 800);
	});

