jQuery(function($) {
	
	$("a.app").fancybox();
	
	$("a.app2").fancybox();
	$("a.app3").fancybox();
	$("a.app4").fancybox();
	
	$("div.service_tab_container ul li").bind('click', function() {  
		tabClicked(this);		
	});	
	
	initLogo();
});


function tabClicked(obj)
{
	var secRel = $("a", $(obj)).attr('rel'); 
	$('div.tab_c').hide();	
	$('div.' + secRel).show();	
	// Remove current class from all items i.e. unset from all and then ...
	$("div.service_tab_container ul li").removeClass('current');
	$(obj).addClass('current');
}


function initLogo()
{
	setTimeout("changeLogo()", 2000);
}

var defaultLinkIndex = 0;

function changeLogo()
{
	//alert('hii');	
	defaultLinkIndex = defaultLinkIndex + 1;
	if (defaultLinkIndex == parseInt($("#clientLogos li").length)) {
		defaultLinkIndex = 0;
	}
	
	$("#clientLogos li").hide();
	
	//alert(defaultLinkIndex);
	
	$($("#clientLogos li").eq(defaultLinkIndex)).show();
	
	setTimeout("changeLogo()", 2000);
}
