$(document).ready(function() {


	// Set everything up - hide and show things	

 	$('input[type="text"]').addClass("idle");
 	$('textarea').addClass("idle");

	// Highlighting fields on forms when they have focus
	
	$('input[type="text"]:not(.search-input)').focus(function(){
		$(this).animate({
			borderTopColor:"#666",
			borderRightColor:"#666",
			borderBottomColor:"#666",
			borderLeftColor:"#666"},'fast');
     });  
     $('input[type="text"]:not(.search-input)').blur(function(){
     $(this).animate({
	     	borderTopColor:"#ccc",
			borderRightColor:"#ccc",
			borderBottomColor:"#ccc",
			borderLeftColor:"#ccc"},'fast');
     });
	$('textarea').focus(function() {  
		$(this).animate({
			borderTopColor:"#666",
			borderRightColor:"#666",
			borderBottomColor:"#666",
			borderLeftColor:"#666"},'fast');
     });  
     $('textarea').blur(function() {  
		$(this).animate({
			borderTopColor:"#ccc",
			borderRightColor:"#ccc",
			borderBottomColor:"#ccc",
			borderLeftColor:"#ccc"},'fast');
     });

// Spread the word section - switch between social media sites

	$(".spreadthewordbox").hide();

	
	$("#spreadtheword_twitter").click(function(){
		
		if($("#spreadthewordbox_twitter").is(":hidden")){
			$(".spreadthewordbox").slideUp();
			$("#spreadthewordbox_twitter").slideDown();
		}
		else{
			$(".spreadthewordbox").slideUp();
		}
		return false;
	});

	$("#spreadtheword_email").click(function(){
		if($("#spreadthewordbox_email").is(":hidden")){
			$(".spreadthewordbox").slideUp();
			$("#spreadthewordbox_email").slideDown();
		}
		else{
			$(".spreadthewordbox").slideUp();
		}
		return false;
	});

	$("#spreadtheword_facebook").click(function(){
		if($("#spreadthewordbox_facebook").is(":hidden")){
			$(".spreadthewordbox").slideUp();
			$("#spreadthewordbox_facebook").slideDown();
		}
		else{
			$(".spreadthewordbox").slideUp();
		}
		return false;
	});	

});
