$(document).ready(function() {

//function for homebage background change rollover
	  $(function(){
			//$('.home_recent_thumb').fadeTo(1, 0.6);
	        $('.home_recent_thumb, .worx_recent_thumb').hover(function () {
	            //$(this).stop().fadeTo(300, 1);
				$(this).css('background-color', '#E3E3E3');
	        },
	        function () {
	            //$(this).stop().fadeTo(300, 0.6);
				$(this).stop().css('background-color', '#fafafa');
	        });
	    })
	  
	  
	  
//function to hide journal excerpt
	 
	//hide it fool
	$('li.journal_extmeta').hide();
		
	//toggle component
	$('.journal_metabtn').click(function() {
			$(this).toggle().next('li.journal_extmeta').slideToggle();
			
	return false;
	})
	
	
//function for searchbar focus

$(function(){
	$('#searchbar').attr('value', 'Whatcha looking for?');
	
	var text = 'Whatcha looking for?';
	
	$('#searchbar').focus(function() {
			$(this).addClass('active');
			if($(this).attr('value') == text) $(this).attr('value', '');
								   })
	
	$('#searchbar').blur(function() {
			$(this).removeClass('active');
			if($(this).attr('value') == '') $(this).attr('value', text);
								  })
	
		   })

//functions for contact form focus & COMPRESS into tighter function when you get some time.  Dang!

$(function(){
	$('#contact_name').attr('value', 'Enter your full name');
	
	var text = 'Enter your full name';
	
	$('#contact_name').focus(function() {
			$(this).addClass('active');
			if($(this).attr('value') == text) $(this).attr('value', '');
								   })
	
	$('#contact_name').blur(function() {
			$(this).removeClass('active');
			if($(this).attr('value') == '') $(this).attr('value', text);
								  })
	
		   })


$(function(){
	$('#contact_email').attr('value', 'Enter your email address');
	
	var text = 'Enter your email address';
	
	$('#contact_email').focus(function() {
			$(this).addClass('active');
			if($(this).attr('value') == text) $(this).attr('value', '');
								   })
	
	$('#contact_email').blur(function() {
			$(this).removeClass('active');
			if($(this).attr('value') == '') $(this).attr('value', text);
								  })
	
		   })

$(function(){
	$('#contact_phone').attr('value', 'Enter your ten digit phone number');
	
	var text = 'Enter your ten digit phone number';
	
	$('#contact_phone').focus(function() {
			$(this).addClass('active');
			if($(this).attr('value') == text) $(this).attr('value', '');
								   })
	
	$('#contact_phone').blur(function() {
			$(this).removeClass('active');
			if($(this).attr('value') == '') $(this).attr('value', text);
								  })
	
		   })

$(function(){
	$('#contact_message').attr('value', 'Enter message with as much information as possible');
	
	var text = 'Enter message with as much information as possible';
	
	$('#contact_message').focus(function() {
			$(this).addClass('active');
			if($(this).attr('value') == text) $(this).attr('value', '');
								   })
	
	$('#contact_message').blur(function() {
			$(this).removeClass('active');
			if($(this).attr('value') == '') $(this).attr('value', text);
								  })
	
		   })

//scroll to top
$('a.totop').click(function(){
     $('html, body').animate({scrollTop: '0'}, 'slow');
     return false;
});

});



// It's my birthday fools!!!!
//Set the two dates
var birthday =new Date(1982, 9, 14) //Month is 0-11 in JavaScript
today=new Date()
//Get 1 day in milliseconds
var one_day=1000*60*60*24






