$(document).ready(function(){

    $("#diversityReport").validate();
    $("#consultationRequest").validate();
    $("#diversityReportFooter").validate();
    $("#brochureForm").validate();

    $('#fade').innerfade({ 
	speed: 2000, 
	timeout: 6000, 
	type: 'sequence' 
 }); 

});




$(document).ready(function(){

$('#reportEmail').autofill({
					value: 'Enter email address'
});


$('#reportName').autofill({
					value: 'Enter your name.'
});


$('#diversityReportFooter #name').autofill({
					value: 'Enter your name.'
});

$('#diversityReportFooter #email').autofill({
					value: 'Enter email address'
});


$('#yourName').autofill({
					value: 'Your name....'
});

$('#yourPosition').autofill({
					value: 'Position:'
});

$('#yourCompany').autofill({
					value: 'Company:'
});

$('#emailAddress').autofill({
					value: 'Email address:'
});

$('#contactTel').autofill({
					value: 'Contact tel:'
});


$('a.newWindow').click(function(){
window.open(this.href, 'event-window', 'width=800,height=600,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0').focus(); return false;
});


});



$(document).ready(function() {

// choose text for the show/hide link
var showText="[+]";
var hideText="[-]";

// append show/hide links to the element directly preceding the element with a class of "toggle"
$(".toggle").prev().append('<a href="#" class="more-link">'+showText+'</a>');

// hide all of the elements with a class of 'toggle'
$('.toggle').hide();

// capture clicks on the toggle links
$('a.more-link').click(function() {

// change the link text depending on whether the element is shown or hidden
if ($(this).text()==showText) {$(this).text(hideText);}
else {$(this).text(showText);}

// toggle the display
$(this).parent().next('.toggle').toggle('slow');

// return false so any link destination is not followed
return false;

});

$('#theTeam div').hide();

$('#teamsList .teamBoard a').click(function() {
$('#theTeam div').hide();
$("#teamBoard").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamBoard a").addClass('here');return false;
});

$('#teamsList .teamAdvisory a').click(function() {
$('#theTeam div').hide();
$("#teamAdvisory").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamAdvisory a").addClass('here');return false;
});

$('#teamsList .teamUsa a').click(function() {
$('#theTeam div').hide();
$("#teamUsa").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamUsa a").addClass('here');return false;
});

$('#teamsList .teamUk a').click(function() {
$('#theTeam div').hide();
$("#teamUk").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamUk a").addClass('here');return false;
});

$('#teamsList .teamGermany a').click(function() {
$('#theTeam div').hide();
$("#teamGermany").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamGermany a").addClass('here');return false;
});

$('#teamsList .teamBelgium a').click(function() {
$('#theTeam div').hide();
$("#teamBelgium").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamBelgium a").addClass('here');return false;
});

$('#teamsList .teamSwitzerland a').click(function() {
$('#theTeam div').hide();
$("#teamSwitzerland").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamSwitzerland a").addClass('here');return false;
});

$('#teamsList .teamSingapore a').click(function() {
$('#theTeam div').hide();
$("#teamSingapore").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamSingapore a").addClass('here');return false;
});

$('#teamsList .teamHongKong a').click(function() {
$('#theTeam div').hide();
$("#teamHongKong").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamHongKong a").addClass('here');return false;
});

$('#teamsList .teamAustralia a').click(function() {
$('#theTeam div').hide();
$("#teamAustralia").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamAustralia a").addClass('here');return false;
});

$('#teamsList .teamChina a').click(function() {
$('#theTeam div').hide();
$("#teamChina").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamChina a").addClass('here');return false;
});

$('#teamsList .teamSpain a').click(function() {
$('#theTeam div').hide();
$("#teamSpain").slideToggle();
$("#teamsList a").removeClass('here');
$("#teamsList .teamSpain a").addClass('here');return false;
});


});


$(document).ready(function(){

	$("#brochureForm").hide();

	$("#brochureDownload .link").click(function () {
    	$('#brochureForm').slideToggle("slow");
		return false;
	});


	$("#consultationRequest").hide();

	$(".consultation .title").click(function () {
    	$('#consultationRequest').slideToggle("slow");
		return false;
	});



	$("#successSecrets .aspiration a").hover(function () {
    	$('#successSecrets .aspiration span').show();
    	$('#successSend').hide();
	}, function() {
    	$('#successSecrets .aspiration span').hide();
    	$('#successSend').show();
	});


	$("#successSecrets .think a").hover(function () {
    	$('#successSecrets .think span').show();
    	$('#successSend').hide();
	}, function() {
    	$('#successSecrets .think span').hide();
    	$('#successSend').show();
	});


	$("#successSecrets .aspiration a").click(function () {
		return false;
	});


	$("#successSecrets .think a").click(function () {
		return false;
	});

	$('#successSecrets span').prepend('<img src="/img/success-span-bg.gif" width="20" height="53" alt="" />');


});

