


jQuery(document).ready(function($) {

	$("a.thickbox").fancybox({
		'zoomOpacity':		true,
		'overlayOpacity':	.7
	});
	
	$('textarea#comment').focus( function(){
		if ( $(this).val() == "don't be bashful"  ){
			$(this).val("");
		}
	});
	

		
	
	var pos = $('.back_button').position();
	$('.back_button').hover( 
		function(){
			$(this).stop();
			$(this).animate({'top':pos.top-5},100);
		},
		function(){
			$(this).animate({'top':pos.top},100);
		}
	);
	
	
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
	        	$('html,body').animate({scrollTop: targetOffset}, 1800);
	       		return false;
	     	}
	   	}
	});
	
	
	$('#respond form').hide();
	var cmmnt_btn = $('<a href="#" class="generic_button" id="show_comment_form_btn">Leave a Comment</a>').appendTo('#respond');
	cmmnt_btn.click( function(){
			$(this).hide().parents('#respond').find('form').slideDown();
			return false;
		})
	
	
});

