$(document).ready(function(){$('.insights_list').each(function(i){if(i==0)
$(this).css('display','block');else
$(this).css('display','none');});});
function selInsight(a){$('#insightTabs').children().each(function(i){if(i==a)
$(this).addClass('selected');else
$(this).removeClass('selected');});$('.insights_list').each(function(i){if(i==a)
$(this).css('display','block');else
$(this).css('display','none');});}
function showHideServices(n){$('#graphicContentDef').addClass('hide');$('#graphicTitles').children().each(function(i){if(i==n)
$(this).addClass('selected');else
$(this).removeClass('selected');});for(j=0;j<4;j++){if(j==n)
$('#graphicContent'+n).css('display','block');else
$('#graphicContent'+j).css('display','none');}}
function thumbOver(id,src){num=src.substring(src.length-6,src.length-5);document.getElementById(id).src="/CognizantDotcomImages/newCognizant-images/cbc-"+num+"2.jpg";}
function thumbOut(id,src){num=src.substring(src.length-6,src.length-5);mainImg=$("#photo-cbcNew").css('background-image');currNum=mainImg.substring(mainImg.length-6,mainImg.length-5);if(currNum!=num)
document.getElementById(id).src="/CognizantDotcomImages/newCognizant-images/cbc-"+num+"1.jpg";}
//function changeMainImg(src){num=parseInt(src.substring(src.length-6,src.length-5));document.getElementById("photo-cbcNew").style.backgroundImage="url(../../../../images/newCognizant-images/cbc-"+num+".jpg)";for(j=1;j<4;j++){if(j==num)
//document.getElementById('thumb'+j).src="../../../../images/newCognizant-images/cbc-"+j+"2.jpg";else
//document.getElementById('thumb'+j).src="../../../../images/newCognizant-images/cbc-"+j+"1.jpg";}}
//this.$(document).ready(function(){num = Math.floor(Math.random()*3)+1;
//document.getElementById("photo-cbcNew").style.backgroundImage="url(../../../../images/newCognizant-images/cbc-"+num+".jpg)";
//for(j=1;j<4;j++){if(j==num)
//document.getElementById('thumb'+j).src="../../../../images/newCognizant-images/cbc-"+j+"2.jpg";else
//document.getElementById('thumb'+j).src="../../../../images/newCognizant-images/cbc-"+j+"1.jpg";}});

/* script for horizontal tab sections */

var pos3=new Array(60,213,365);function showContent3(n){var IE=false;for(i=1;i<=3;i++){if(i==n){document.getElementById('con'+i).style.display='block';document.getElementById('commTab'+i).className='comm-tabSel2';if(IE)document.getElementById('commArrow').style.left=pos3[i-1];else document.getElementById('commArrow').style.left=pos3[i-1]+'px'}else{document.getElementById('con'+i).style.display='none';document.getElementById('commTab'+i).className='comm-tabUnsel2'}}}var pos4=new Array(45,156,267,378);function showContent4(n){var IE=false;for(i=1;i<=4;i++){if(i==n){document.getElementById('con'+i).style.display='block';document.getElementById('commTab'+i).className='comm-tabSel';if(IE)document.getElementById('commArrow').style.left=pos4[i-1];else document.getElementById('commArrow').style.left=pos4[i-1]+'px'}else{document.getElementById('con'+i).style.display='none';document.getElementById('commTab'+i).className='comm-tabUnsel'}}}



var pos6 = new Array(60, 213, 365, 60, 213, 365);
function showContent6(n) {
    var IE = false;
    for (i = 1; i <= 6; i++) {
        if (i == n) {
            document.getElementById('con' + i).style.display = 'block';
            document.getElementById('commTab' + i).className = 'comm-tabSel2';
            if (IE) document.getElementById('commArrow').style.left = pos6[i - 1];
            else document.getElementById('commArrow').style.left = pos6[i - 1] + 'px'
			
			/*tabs top arrow position*/
			if (IE) document.getElementById('commArrow').style.top = '60';
            else document.getElementById('commArrow').style.top = '60px';
			document.getElementById('commArrow').style.background = "url('/CognizantDotcomImages/newCognizant-images/bpo-tab-arrow.gif') no-repeat";
			
/*tabs down arrow position*/
			if(i>3){
				document.getElementById('commTab' + i).className = 'comm-tabSeldown';
				document.getElementById('commArrow').style.background = "url('/CognizantDotcomImages/newCognizant-images/bpo-tab-arrow-up.png') no-repeat";
				if (IE) document.getElementById('commArrow').style.top = '289';
            	else document.getElementById('commArrow').style.top = '289px';
			
			}
        } else {
            document.getElementById('con' + i).style.display = 'none';
            document.getElementById('commTab' + i).className = 'comm-tabUnsel2'
        }
    }
}

	
var pos4 = new Array(45, 156, 267, 378);

function showContent4(n) {
    var IE = false;
    for (i = 1; i <= 4; i++) {
        if (i == n) {
            document.getElementById('con' + i).style.display = 'block';
            document.getElementById('commTab' + i).className = 'comm-tabSel';
            if (IE) document.getElementById('commArrow').style.left = pos4[i - 1];
            else document.getElementById('commArrow').style.left = pos4[i - 1] + 'px'
        } else {
            document.getElementById('con' + i).style.display = 'none';
            document.getElementById('commTab' + i).className = 'comm-tabUnsel'
        }
    }
} 
/* script for vertical tab sections */
var posV5=new Array(16,60,104,148,192);var posV6=new Array(16,60,104,148,192,236);function showVcontent(n,m){var IE=false;for(i=1;i<=m;i++){if(i==n){document.getElementById('con'+i).style.display='block';document.getElementById('vTab'+i).className='vTabSel';if(m==5)tempArr=posV5;else tempArr=posV6;if(IE)document.getElementById('vArrow').style.top=tempArr[i-1];else document.getElementById('vArrow').style.top=tempArr[i-1]+'px'}else{document.getElementById('con'+i).style.display='none';document.getElementById('vTab'+i).className='vTabUnsel'}}}
