//	Firstly we must hide the text bits we are going to selectively display
//	and then reveal then as we hover over their title
$(document).ready(function(){
	hideText();		//	Hides the text (non-JS users get all of it) to save room on the page
	showText();	//	Handles all the hiding/unhiding of text using JQuery
	$("a[rel='colorbox']").colorbox({current:""});	//	Colorbox now handles the pictures
    $(".title").hover(function(){	//	Changes cursor to a hand when a title is hovered over
		$(this).css({'cursor' : 'pointer'});
    }, function(){
		$(this).css({'cursor' : 'auto'});
    });
	$(".arrow").show();	//	Shows the arrows
});

function hideText()
{	//	The following are JQuery calls
	$("#partnerText").hide("fast");
	$("#clientsText").hide("fast");
	$("#differenceText").hide("fast");
	$("#saidText").hide("fast");
	$("#contactText").hide("fast");
/*	$("#websiteText").hide("fast");	*/

}

function showText()
{	//	Contains some JavaScript to change the image
	$("#partnerTitle").toggle(function()
	{
		document.getElementById("partnerArrow").src="images/arrow_up.png";
		$("#partnerText").slideDown(800);
	}, function()
	{
		document.getElementById("partnerArrow").src="images/arrow_down.png";
		$("#partnerText").slideUp(800);
	});
	
	$("#clientsTitle").toggle(function()
	{
		document.getElementById("clientsArrow").src="images/arrow_up.png";
		$("#clientsText").slideDown(800);
	}, function()
	{
		document.getElementById("clientsArrow").src="images/arrow_down.png";
		$("#clientsText").slideUp(800);
	});
	
	$("#differenceTitle").toggle(function()
	{
		document.getElementById("differenceArrow").src="images/arrow_up.png";
		$("#differenceText").slideDown(800);
	}, function()
	{
		document.getElementById("differenceArrow").src="images/arrow_down.png";
		$("#differenceText").slideUp(800);
	});
	
	$("#saidTitle").toggle(function()
	{
		document.getElementById("saidArrow").src="images/arrow_up.png";
		$("#saidText").slideDown(800);
	}, function()
	{
		document.getElementById("saidArrow").src="images/arrow_down.png";
		$("#saidText").slideUp(800);
	});
	
	$("#contactTitle").toggle(function()
	{
		document.getElementById("contactArrow").src="images/arrow_up.png";
		$("#contactText").slideDown(600);
	}, function()
	{
		document.getElementById("contactArrow").src="images/arrow_down.png";
		$("#contactText").slideUp(600);
	});
	
/*	$("#websiteTitle").toggle(function()
	{
		$("#websiteText").slideDown(600);
	}, function()
	{
		$("#websiteText").slideUp(600);
	});*/
	
}

