$(document).ready(function() {
	
	//$.cookie('ageverified', 'no', { expires: 7, path: '/' });
	if($.cookie('ageverified') != 'yes') {
		//$('#wrapper').animate({opacity: 0}, 250);
		$('#wrapper').css({'height': 0, 'overflow': 'hidden'});
		$('#age_verification').css({'display': 'block', 'opacity': 0}).html("<div id='av_wrapper'><div id='av_inner'><p>Tin Roof Brewing Company encourages responsible enjoyment of alcoholic beverages. By clicking below and entering this site you certify that you are 21 years of age or older.</p><a href='' title='Enter Tin Roof' id='enter_site'>Enter</a></div></div>").animate({opacity: 1}, 1000);
	}
	
	$('#enter_site').live('click',function() {
		$.cookie('ageverified', 'yes', { expires: 7, path: '/' });
		$('#age_verification').animate({opacity: 0}, 500, function() {
			$(this).css('display','none').html('');
		});
		$('#wrapper').css({'height': 'auto', 'overflow': 'visible'});
		//$('#wrapper').animate({opacity: 1}, 500);
		return false;
	});
	
	$('#newsletter .input_field').focus(function() {
		if($(this).attr('value') == $(this).prev('label').text()) {
			$(this).attr('value','');
		}
		$(this).css('color','#FFF');
	});
	$('#newsletter .input_field').blur(function() {
		if($(this).attr('value') == '') {
			$(this).attr('value',$(this).prev('label').text());
			$(this).css('color','#1F1814');
		}
	});
	
	
});
