$(function() {

	// safari bug fixes
		if ($.browser.safari) {
		
			$('#contactForm #submit').css({'left':'76px'});
			$('#contactForm #message').css({"min-width":"295px","width":"295px","max-width":"295px"});
			$('#post #postCancel').css({"clear":"all"});
			
			//$('#post #buttons').css({"height":"18px","clear":"all","margin-bottom":"20px"});
			
		}
		
	// mozilla bug fixes
	if ($.browser.mozilla) {
	
		$('#contactForm #message').css({"min-width":"299px","width":"299px","max-width":"299px"});
		$('#contactForm .input input').css({"min-width":"297px","width":"297px","max-width":"297px"});
		
		$('#post #postCancel').css({"clear":"all"});
		
		//$('#post').css({"padding-bottom":"20px"});
		
	}


	$('input, textarea').focus(function () {
		if ($(this).val().length == 0) {
			$(this).parents('.input').children('label').fadeTo('fast',0.50);//.addClass('focus');
			$(this).parents('.input').children('label').addClass('focus');
		}
		else {
			$(this).parents('.input').children('label').fadeTo('fast',0.00);
		}
	});
	
	$('input, textarea').keydown(function (event) {
		if ($(this).val().length == 0) {
			$(this).parents('.input').children('label').fadeTo('fast',0.00);			
		}
	});
	
	$('input, textarea').blur(function (event) {
		//alert('s');
		if ($(this).val().length == 0) {
			$(this).parents('.input').children('label').fadeTo('fast',0.99);
			$(this).parents('.input').children('label').removeClass('focus');
		}
	});
});