$(document).ready(function(){
		
	// ------- 	 Navigation menu glow Effect (image replacement). --------------------------------------------------------
		$('#nav')
		.find('a')
		// We Insert a <span> tag here inside each anchor link.
		.append('<span class="hover" />').each(function(){
		
			// this <span> tag has a class of hover which has our background image inside the CSS.
			var $span = $('> span.hover', this).css({display: 'none'}); // Do not show the <span> tag by default.
		
			// This is the hover function that will show / hide our glow effect.
			$(this).hover(function(){
				$span.css({display: 'block', cursor: 'pointer'});
			}, function(){
				$span.css({display: 'none'});
			});
		});
	
	// -------------------------------------------------------------------------------------------------------------------
		
	$('ul#links li:last').append('<li></li>'); // Hack for IE to display entire block on links menu.
	
	// This animates the blocks at the bottom in our footer when moused over. (for the links section)
	$('.bottomlink').hover(function(){
		$(this).stop().animate({backgroundColor: '#3ea1a6'}, 350).css({'color' : '#24221f'});
	}, function(){
		$(this).stop().animate({backgroundColor: '#1b1a19'}, 350).css({'color' : '#645647'});
	});
	
	// Only support the .fade class if the browser currently renders opacity change correctly. (IE Does NOT)
	if(jQuery.support.opacity){
		$('.fade').css({'opacity':'1'});
		$('.fade').hover(function(){
			$(this).stop().animate({opacity: '.7'});
		}, function(){
			$(this).stop().animate({opacity: '1'});
		});
	};	
	
	// Change the border color on mouseover for the Latest Works Sections
	$('.portfolio_preview').hover(function(){
		$(this).css({'borderColor' : '#1c150f'});	
	}, function(){
		$(this).css({'borderColor' : '#756457'});
	});
	
	
		// Watermark for our input textbox. Removes the default value
			// and changes the font color to the standard font color for the input field.
		 $('input[type="text"]').css({'color' : '#9b9b9b'});	
	     $('input[type="text"]').focus(function() {  
	         if (this.value == this.defaultValue){  
				 $(this).css({'color' : '#000', 'borderColor' : '#4ea79b'});
	             this.value = '';  
	         }  
	         if(this.value != this.defaultValue){  
	             this.select();  
	         }  
	     });  
	     $('input[type="text"]').blur(function() {  
	         if (this.value == ''){  
				 $(this).css({'color' : '#9b9b9b', 'borderColor' : '#7b7b7b'});
	             this.value = (this.defaultValue ? this.defaultValue : '');  
	         }  
	     });
});