$(function(){

	//png fix
	$(document).pngFix();
	
	//heightfix
	var MasterHeight = $(document).height();
	$('#content').height(MasterHeight - 50);
	$('#root-content-container').height(MasterHeight);
	$('#root-navigation').height(MasterHeight);
	$('#root-container').height(MasterHeight);
	
	//Navigation dropdown list
	//root-navigation #parent-navigation .child

//	$('#parent-navigation li .sub-menu').hide();
//	$('#parent-navigation li.current-menu-item .sub-menu').show();
//	$('#parent-navigation li .sub-menu li .sub-menu').show();
//	$('#parent-navigation li.current-menu-item').parents('.sub-menu').show();
//	
//	$('#parent-navigation li').hover(function(){
//		if($(this).children().length > 1){
//			$(this).children().slideDown();
//		}
//	}, function(){
//		if($(this).children().length > 1 && !$(this).parent('.sub-menu').length > 0 && $(this).parent('.sub-menu').style('display') == 'block' && !$(this).parent('li').hasClass('current-menu-ancestor')){
//			$(this).children('.sub-menu').slideUp();
//		}
//	});
	
	//CONTACT US PAGE
	//Instant Quote Form
	$("input[name='submit']").attr('value','SEND');
	function firstClear(obj){
		if($(obj).hasClass('fresh')){
			obj.value = '';
			$(obj).removeClass('fresh');
		}
	}
	
	$('.wpcf7-form input').focusin(function(){
		var value = "";
		var value = $(this).val();
		firstClear(this);

		$(this).focusout(function(){							   
			if($(this).val() == null || $(this).val() == ""){
				$(this).addClass('fresh');
				$(this).attr('value',value);
			}
		});										  
												  
	});
	
	$('.wpcf7-form textarea').focusin(function(){
		var value = "";
		var value = $(this).val();
		firstClear(this);

		$(this).focusout(function(){							   
			if($(this).val() == null || $(this).val() == ""){
				$(this).addClass('fresh');
				$(this).attr('value',value);
			}
		});	
	});
	
	$('.wpcf7-submit').attr('value', '');
});
