	// Show Client Details Script
var clientName;
function showClientDetails(clientName) {
	document.getElementById(clientName + "PopupContainer").style.top='-1000px';
	document.getElementById("clientPopupBackground").style.display='block';
	document.getElementById(clientName + "PopupContainer").style.display='block';
	var t1 = setTimeout(function() {
		$("#clientPopupBackground").fadeTo(500, 1);
	}, 50);
	var t2 = setTimeout(function() {
		$("#" + clientName + "PopupContainer").animate({ top: '0px' }, 1000, 'jswing');
	}, 500);
	$("#indexSlides").cycle("pause");
	$("#carisIframe").load(startClientSlideshow(clientName));
}
function hideClientDetails(clientName) {
	$("#" + clientName + "PopupContainer").animate({ top: '1000px' }, 1500, 'jswing', function(){ $("#clientPopupBackground").fadeTo(300, 0); });
	var t = setTimeout(function() {
		document.getElementById(clientName + "PopupContainer").style.display='none';
		document.getElementById("clientPopupBackground").style.display='none';
		$("#" + clientName + "Iframe").contents().find("#infoPager a").remove();
	}, 1800);
	$("#indexSlides").cycle("resume");
	$("#" + clientName + "Iframe").contents().find("#clientPopupMedia").cycle("stop");
	if ($("#" + clientName + "Iframe").contents().find("#clientVideo"))
		$("#" + clientName + "Iframe").contents().find("#clientVideo").get(0).pause();
}

function startClientSlideshow(clientName) {
	$("#" + clientName + "Iframe").contents().find("#clientPopupMedia").css({ display: 'block' }).cycle({
		delay: 0,
		timeout: 5000,
		speed: 2500,
		fastOnEvent: 700,
		next: $("#" + clientName + "Iframe").contents().find("#mediaNextButton"),
		prev: $("#" + clientName + "Iframe").contents().find("#mediaPrevButton"),
		fx: 'scrollHorz',
		easing: 'easeOutExpo',
		pause: 1
	});
	$("#" + clientName + "Iframe").contents().find(".clientPopupInfo").css({ display: 'block' }).cycle({
		delay: 0,
		timeout: 0,
		speed: 800,
		pager: $("#" + clientName + "Iframe").contents().find("#infoPager"),
		rev: 2,
		fx: 'scrollVert',
		easing: 'easeOutSine',
	});
}
