var arrPhotos = new Array('#clientImageCnt-1', '#clientImageCnt-2', '#clientImageCnt-3', '#clientImageCnt-4', '#clientImageCnt-5');
var selectedPhoto = 0;
var transLock = false;


var arramirkhan = new Array('#clientImageCnt-51', '#clientImageCnt-52', '#clientImageCnt-53', '#clientImageCnt-54');
var selectedamirkhan = 0;
var lockamirkhan  = false;


var arrgeoffburch = new Array('#clientImageCnt-41', '#clientImageCnt-42', '#clientImageCnt-43', '#clientImageCnt-44');
var selectedgeoffburch = 0;
var lockgeoffburch  = false;

var arrsportscorp = new Array('#clientImageCnt-26', '#clientImageCnt-27', '#clientImageCnt-28');
var selectedsportscorp = 0;
var locksportscorp  = false;

var arreurosmartpack = new Array('#clientImageCnt-31', '#clientImageCnt-32', '#clientImageCnt-33', '#clientImageCnt-34');
var selectedeurosmartpack = 0;
var lockeurosmartpack  = false;

var arrBusinessPolitics = new Array('#clientImageCnt-6', '#clientImageCnt-7', '#clientImageCnt-8', '#clientImageCnt-9', '#clientImageCnt-10');
var selectedBusinessPolitics = 0;
var lockBusinessPolitics  = false;

var arrJjacobs = new Array('#clientImageCnt-11', '#clientImageCnt-12', '#clientImageCnt-13', '#clientImageCnt-14', '#clientImageCnt-15');
var selectedJjacobs = 0;
var lockJjacobs  = false;

var arriCompli = new Array('#clientImageCnt-16', '#clientImageCnt-17', '#clientImageCnt-18', '#clientImageCnt-19', '#clientImageCnt-20');
var selectediCompli = 0;
var lockiCompli  = false;


var arrNtmusic = new Array('#clientImageCnt-21', '#clientImageCnt-22', '#clientImageCnt-23', '#clientImageCnt-24', '#clientImageCnt-25');
var selectedNtmusic = 0;
var lockNtmusic  = false;

var arrVideos = new Array('#video-container-1', '#video-container-2');
var selectedVideos = 0;
var LockVideo = false;

$(document).ready(function() {

	$('#previous-btn-sportscorp').click(function() {
		if(locksportscorp ) return;
		else locksportscorp  = true;
		
		
		$(arrsportscorp[selectedsportscorp]).fadeOut('slow', function(){
			
			selectedsportscorp--;
			if(selectedsportscorp < 0) selectedsportscorp = arrsportscorp.length - 1;
			
			moveTosportscorp(selectedsportscorp);
		});
	});
	
	$('#next-btn-sportscorp').click(function() {
		if(locksportscorp ) return;
		else locksportscorp  = true;
		
		
		$(arrsportscorp[selectedsportscorp]).fadeOut('fast', function(){
			
			selectedsportscorp++;
			if(selectedsportscorp > arrsportscorp.length - 1) selectedsportscorp = 0;
			
			moveTosportscorp(selectedsportscorp);
		});
	});

	moveTosportscorp(selectedsportscorp);


	$('#previous-btn-geoffburch').click(function() {
		if(lockgeoffburch ) return;
		else lockgeoffburch  = true;
		
		
		$(arrgeoffburch[selectedgeoffburch]).fadeOut('slow', function(){
			
			selectedgeoffburch--;
			if(selectedgeoffburch < 0) selectedgeoffburch = arrgeoffburch.length - 1;
			
			moveTogeoffburch(selectedgeoffburch);
		});
	});
	
	$('#next-btn-geoffburch').click(function() {
		if(lockgeoffburch ) return;
		else lockgeoffburch  = true;
		
		
		$(arrgeoffburch[selectedgeoffburch]).fadeOut('fast', function(){
			
			selectedgeoffburch++;
			if(selectedgeoffburch > arrgeoffburch.length - 1) selectedgeoffburch = 0;
			
			moveTogeoffburch(selectedgeoffburch);
		});
	});

	moveTogeoffburch(selectedgeoffburch);


	$('#previous-btn-eurosmartpack').click(function() {
		if(lockeurosmartpack ) return;
		else lockeurosmartpack  = true;
		
		
		$(arreurosmartpack[selectedeurosmartpack]).fadeOut('slow', function(){
			
			selectedeurosmartpack--;
			if(selectedeurosmartpack < 0) selectedeurosmartpack = arreurosmartpack.length - 1;
			
			moveToeurosmartpack(selectedeurosmartpack);
		});
	});
	
	$('#next-btn-eurosmartpack').click(function() {
		if(lockeurosmartpack ) return;
		else lockeurosmartpack  = true;
		
		
		$(arreurosmartpack[selectedeurosmartpack]).fadeOut('fast', function(){
			
			selectedeurosmartpack++;
			if(selectedeurosmartpack > arreurosmartpack.length - 1) selectedeurosmartpack = 0;
			
			moveToeurosmartpack(selectedeurosmartpack);
		});
	});

	moveToeurosmartpack(selectedeurosmartpack);




	$('#previous-btn-amirkhan').click(function() {
		if(lockamirkhan ) return;
		else lockamirkhan  = true;
		
		
		$(arramirkhan[selectedamirkhan]).fadeOut('slow', function(){
			
			selectedamirkhan--;
			if(selectedamirkhan < 0) selectedamirkhan = arramirkhan.length - 1;
			
			moveToamirkhan(selectedamirkhan);
		});
	});
	
	$('#next-btn-amirkhan').click(function() {
		if(lockamirkhan ) return;
		else lockamirkhan  = true;
		
		
		$(arramirkhan[selectedamirkhan]).fadeOut('fast', function(){
			
			selectedamirkhan++;
			if(selectedamirkhan > arramirkhan.length - 1) selectedamirkhan = 0;
			
			moveToamirkhan(selectedamirkhan);
		});
	});

	moveToamirkhan(selectedamirkhan);
	
	
	




	$('#previous-btn-images').click(function() {
		if(transLock) return;
		else transLock = true;
		
		
		$(arrPhotos[selectedPhoto]).fadeOut('slow', function(){
			
			selectedPhoto--;
			if(selectedPhoto < 0) selectedPhoto = arrPhotos.length - 1;
			
			moveToImg(selectedPhoto);
		});
	});
	
	$('#next-btn-images').click(function() {
		if(transLock) return;
		else transLock = true;
		
		
		$(arrPhotos[selectedPhoto]).fadeOut('fast', function(){
			
			selectedPhoto++;
			if(selectedPhoto > arrPhotos.length - 1) selectedPhoto = 0;;
			
			moveToImg(selectedPhoto);
		});
	});

	moveToImg(selectedPhoto);









	$('#previous-btn-businessPolitics').click(function() {
		if(lockBusinessPolitics ) return;
		else lockBusinessPolitics  = true;
		
		
		$(arrBusinessPolitics[selectedBusinessPolitics]).fadeOut('slow', function(){
			
			selectedBusinessPolitics--;
			if(selectedBusinessPolitics < 0) selectedBusinessPolitics = arrBusinessPolitics.length - 1;
			
			moveToBusinessPolitics(selectedBusinessPolitics);
		});
	});
	
	$('#next-btn-businessPolitics').click(function() {
		if(lockBusinessPolitics ) return;
		else lockBusinessPolitics  = true;
		
		
		$(arrBusinessPolitics[selectedBusinessPolitics]).fadeOut('fast', function(){
			
			selectedBusinessPolitics++;
			if(selectedBusinessPolitics > arrBusinessPolitics.length - 1) selectedBusinessPolitics = 0;
			
			moveToBusinessPolitics(selectedBusinessPolitics);
		});
	});

	moveToBusinessPolitics(selectedBusinessPolitics);











	$('#previous-btn-jjacobs').click(function() {
		if(lockJjacobs ) return;
		else lockJjacobs  = true;
		
		
		$(arrJjacobs[selectedJjacobs]).fadeOut('slow', function(){
			
			selectedJjacobs--;
			if(selectedJjacobs < 0) selectedJjacobs = arrJjacobs.length - 1;
			
			moveTojJacobs(selectedJjacobs);
		});
	});
	
	$('#next-btn-jjacobs').click(function() {
		if(lockJjacobs ) return;
		else lockJjacobs  = true;
		
		
		$(arrJjacobs[selectedJjacobs]).fadeOut('fast', function(){
			
			selectedJjacobs++;
			if(selectedJjacobs > arrJjacobs.length - 1) selectedJjacobs = 0;
			
			moveTojJacobs(selectedJjacobs);
		});
	});

moveTojJacobs(selectedJjacobs);




	$('#previous-btn-iCompli').click(function() {
		if(lockiCompli ) return;
		else lockiCompli  = true;
		
		
		$(arriCompli[selectediCompli]).fadeOut('slow', function(){
			
			selectediCompli--;
			if(selectediCompli < 0) selectediCompli = arriCompli.length - 1;
			
			moveToiCompli(selectediCompli);
		});
	});
	
	$('#next-btn-iCompli').click(function() {
		if(lockiCompli ) return;
		else lockiCompli  = true;
		
		
		$(arriCompli[selectediCompli]).fadeOut('fast', function(){
			
			selectediCompli++;
			if(selectediCompli > arriCompli.length - 1) selectediCompli = 0;
			
			moveToiCompli(selectediCompli);
		});
	});

moveToiCompli(selectediCompli);



	$('#previous-btn-Ntmusic').click(function() {
		if(lockNtmusic ) return;
		else lockNtmusic  = true;
		
		
		$(arrNtmusic[selectedNtmusic]).fadeOut('slow', function(){
			
			selectedNtmusic--;
			if(selectedNtmusic < 0) selectedNtmusic = arrNtmusic.length - 1;
			
			moveToNtmusic(selectedNtmusic);
		});
	});
	
	$('#next-btn-Ntmusic').click(function() {
		if(lockNtmusic ) return;
		else lockNtmusic  = true;
		
		
		$(arrNtmusic[selectedNtmusic]).fadeOut('fast', function(){
			
			selectedNtmusic++;
			if(selectedNtmusic > arrNtmusic.length - 1) selectedNtmusic = 0;
			
			moveToNtmusic(selectedNtmusic);
		});
	});

moveToNtmusic(selectedNtmusic);






    $('div.clientList_head001').hover(function () { 
	$("div.clientList_head001").css({"background-position":"0px -32px"});
	$("div.clientList_head001").css({"background-position-x":"0px"});
	$("div.clientList_head001").css({"background-position-y":"-32px"});
 	},
	function () {
	$("div.clientList_head001").css({"background-position":"0px 0px"});
	$("div.clientList_head001").css({"background-position-x":"0px"});
	$("div.clientList_head001").css({"background-position-y":"0px"});
	}
	);
	
	
	
    $('div.clientList_head002').hover(function () {
	$("div.clientList_head002").css({"background-position":"0px -32px"}); 
 	},
	function () {
	$("div.clientList_head002").css({"background-position":"0px 0px"});
	}
	);	

	
    $('div.clientList_head003').hover(function () {
	$("div.clientList_head003").css({"background-position":"0px -32px"}); 
 	},
	function () {
	$("div.clientList_head003").css({"background-position":"0px 0px"});
	}
	);	

    $('div.clientList_head004').hover(function () {
	$("div.clientList_head004").css({"background-position":"0px -32px"}); 
 	},
	function () {
	$("div.clientList_head004").css({"background-position":"0px 0px"});
	}
	);



    $('div.clientList_head005').hover(function () {
	$("div.clientList_head005").css({"background-position":"0px -32px"}); 
 	},
	function () {
	$("div.clientList_head005").css({"background-position":"0px 0px"});
	}
	);


    $('div.clientList_head006').hover(function () {
	$("div.clientList_head006").css({"background-position":"0px -32px"}); 
 	},
	function () {
	$("div.clientList_head006").css({"background-position":"0px 0px"});
	}
	);



    $('div.clientList_head007').hover(function () {
	$("div.clientList_head007").css({"background-position":"0px -32px"}); 
 	},
	function () {
	$("div.clientList_head007").css({"background-position":"0px 0px"});
	}
	);


    $('div.clientList_head008').hover(function () {
	$("div.clientList_head008").css({"background-position":"0px -32px"}); 
 	},
	function () {
	$("div.clientList_head008").css({"background-position":"0px 0px"});
	}
	);



    $('div.closeBtn007').click(function () {
	$(this).parent().slideToggle('normal');
	
	
    });



    $('div.clientList_head001').click(function () {
	$('div.clientList_content001').slideToggle('normal');
	
	
    });
	
    $('div.clientList_head002').click(function () {
	$('div.clientList_content002').slideToggle('normal');
    });	

    $('div.clientList_head003').click(function () {
	$('div.clientList_content003').slideToggle('normal');
    });
	
    $('div.clientList_head004').click(function () {
	$('div.clientList_content004').slideToggle('normal');
    });
	
    $('div.clientList_head005').click(function () {
	$('div.clientList_content005').slideToggle('normal');
    });
	
    $('div.clientList_head006').click(function () {
	$('div.clientList_content006').slideToggle('normal');
    });
	
    $('div.clientList_head007').click(function () {
	$('div.clientList_content007').slideToggle('normal');
    });

    $('div.clientList_head008').click(function () {
	$('div.clientList_content008').slideToggle('normal');
    });

    $('div.clientList_head009').click(function () {
	$('div.clientList_content009').slideToggle('normal');
    });
	
    $('.slideshow').cycle({
		fx: 'turnUp', 
		speed:         1500,
		pause:         1000,
		timeout:       8000
	});
	    $('.election2010-slides').cycle({
		fx: 'fade', 
		speed:         1000,
		pause:         3000,
		timeout:       3000
	});
	    $('.slideshowbloginner').cycle({
		fx: 'fade', 
		speed:         1000,
		pause:         3000,
		timeout:       3000
	});

});



function moveToImg(id)
{
	$(arrPhotos[id]).fadeIn('slow', function(){
		transLock = false;
	});
}



function moveTosportscorp(id)
{
	$(arrsportscorp[id]).fadeIn('slow', function(){
		locksportscorp  = false;
	});
}

function moveTogeoffburch(id)
{
	$(arrgeoffburch[id]).fadeIn('slow', function(){
		lockgeoffburch  = false;
	});
}

function moveToeurosmartpack(id)
{
	$(arreurosmartpack[id]).fadeIn('slow', function(){
		lockeurosmartpack  = false;
	});
}


function moveToamirkhan(id)
{
	$(arramirkhan[id]).fadeIn('slow', function(){
		lockamirkhan  = false;
	});
}

function moveToBusinessPolitics(id)
{
	$(arrBusinessPolitics[id]).fadeIn('slow', function(){
		lockBusinessPolitics  = false;
	});
}


function moveTojJacobs(id)
{
	$(arrJjacobs[id]).fadeIn('slow', function(){
		lockJjacobs  = false;
	});
} 


function moveToiCompli(id)
{
	$(arriCompli[id]).fadeIn('slow', function(){
		lockiCompli  = false;
	});
} 


function moveToNtmusic(id)
{
	$(arrNtmusic[id]).fadeIn('slow', function(){
		lockNtmusic  = false;
	});
} 

function moveToVideo(id)
{
	$(arrVideos[id]).fadeIn('slow', function(){
		LockVideo = false;
	});
}
