$(document).ready( function () {
	/*$('#leftColumn').scrollFollow({
		speed: 0,
		offset: 0,
		delay: 0
	}); 
	*/
	$('.backTop').click(function() { 
		$('html, body').animate({scrollTop:0}, 'slow');
		return false;
	});
	
	/*** This controls all the tool tips and their content ****/
	
	$('.qtooltip').qtip({
		position: {
			content: false,
		  	target: 'mouse',
		  	adjust: { screen: true }
		}
	});
	
	
	$('.tip_is').qtip({
		content: 'Some basic content for the tooltip',
		position: {
		   target: 'mouse',
		   adjust: { mouse: true }
		}
	});
	
	$('#contactUs').click(function() {
		if($("#contactFooter").is(":hidden")) {
			$("#contactFooter").slideDown("slow");
			$("#contactUs > span").css("background-image", "url(http://www.divecreative.com/images/contactArrow.png)");
			$('html, body').animate({scrollTop:$(document).height()}, 'slow');
		} else {
			$("#contactFooter").slideUp("slow");
			$("#contactUs > span").css("background-image", "url(http://www.divecreative.com/images/contactArrow2.png)");
		}
		return false;
	});
	
	
	$('.contact').click(function() {
		if($("#contactFooter").is(":hidden")) {
			$("#contactFooter").slideDown("slow");
			$('html, body').animate({scrollTop:$(document).height()}, 'slow');
		} else {
			$("#contactFooter").slideDown("slow");
			$('html, body').animate({scrollTop:$(document).height()}, 'slow');
		}
		return false;
	});
	
	
	
	
	$(".ic_services").carouFredSel({
		auto : false,
		items: 1,
		circular: true,
		infinite: true,
		width: 419,
		prev : {	
			button	: ".prev",
			key		: "left"
		},
		next : { 
			button	: ".next",
			key		: "right"
		}
	});
	
	$(".rchome").carouFredSel({
		auto : false,
		items: 3,
		circular: true,
		infinite: true,
		width: 956,
		prev : {	
			button	: ".prev",
			key		: "left"
		},
		next : { 
			button	: ".next",
			key		: "right"
		}
	});
	
	$(".rchome > section:nth-child(4)").css("margin-left","0");
	
	
});
