// JavaScript Document
$(document).ready(function(){
	
	
	$(function(){
		$('.tweet').tweetable({username: 'rcrstreetperf', time: true, limit: 2, replies: false});
	});
	
	
	
	$('#socialBanners img').fadeTo('fast', 0.6);
	
	$('#socialBanners img').mouseover(function(){
		$(this).fadeTo('fast', 1);
	});
	$('#socialBanners img').mouseout(function(){
		$(this).fadeTo('fast', 0.6);
	});

	$("#newsletterBtn").click(function(){
		$("#newsletterBox").slideToggle();
		$("#newsletterBtn").unbind(function(){
			$("#newsletterBtn").click(function(){
				$("#newsletterBox").slideToggle();
			});	
		});
	});
	
	$("#emailSignup").focus(function(){
		  if($(this).val() == 'Email Address')
				$(this).val("");
	 });
	 $("#emailSignup").blur(function(){
		  if($(this).val() == '')
				$(this).val("Email Address");
	 });
	
	$("#newsletterFormSend").click(function(){
		$("#emailForm").submit(sendForm);
	});
	
	function sendForm() {
		$.post("/includes/emailSignup.php",$(this).serialize(),function(data,status){
			$("#result").html(data);
		});
		return false;
	}
	









});

