$(document).ready(function(){
	
	$('#content').corner();
	$('#footer').corner();
	$('#footer_conference').corner();
	
	$('#footer_right').cycle({ fx:'scrollDown', speed: 1500, timeout:  8000, delay: -1500, random: 1});
	
	
	$.boxstate = "open";

	$('.minimise').click(
	function(){
		if ($.boxstate == "open"){
			$("#left1 .greytext").hide("slow");
			$(".casestudy").animate( { top:"245px", height:"50px" } , "slow" );
			$(".minimise").css('backgroundImage','url(../images/maximise.gif )');
			$.boxstate = "closed";
			return false;
		}else{
			$("#left1 .greytext").show("slow");
			$(".casestudy").animate( { top:"165px", height:"130px" } , "slow" )
			$(".minimise").css('backgroundImage','url(../images/minimise.gif )');
			$.boxstate = "open"; 
			return false;
		}

	});
	
	$('.minimise-pres').click(
	function(){
		if ($.boxstate == "open"){
			$("#left1 .greytext").hide("slow");
			$(".casestudy").animate( { top:"275px", height:"20px" } , "slow" );
			$(".minimise").css('backgroundImage','url(../images/maximise.gif )');
			$.boxstate = "closed";
			return false;
		}else{
			$("#left1 .greytext").show("slow");
			$(".casestudy").animate( { top:"185px", height:"100px" } , "slow" )
			$(".minimise").css('backgroundImage','url(../images/minimise.gif )');
			$.boxstate = "open"; 
			return false;
		}

	});
	
	
	function onBefore() { 
		if ($.boxstate == "open"){
			$("#left1 .greytext").show();
		}else{
			$("#left1 .greytext").hide();
		}

	}
	
	$('#left1').cycle({
    fx:     'scrollHorz',
    speed:  'slow',
    timeout: 0,
    next:   '.next1',
    prev:   '.previous1',
	before:   onBefore
	});

	
	$.timer(15000, function (timer) 
	{

			$("#next1").click();

	});	
	
});
