function hasPlaceHolder() {
    return 'placeholder' in document.createElement('input');
}

function html5forms() {
    var formPlaceholder = hasPlaceHolder();
    if(formPlaceholder === false) { // Fallback for non-supporting browsers
        $('input[type=text],input[type=password').each(function(){
            if($(this).attr('placeholder')) {
                var placeholderText = $(this).attr('placeholder');
                $(this).attr('value',placeholderText);
            }
        });
        emptyTextBox();
    }
}

function emptyTextBox() {
	$('input[type=text],input[type=password').each(function(){
		if($(this).attr('value')){
			var inputText = $(this).attr('value');
			$(this).focus(function(){
				if($(this).attr('value') == inputText){
					$(this).val('');
				}
			}).blur(function(){
				if($(this).attr('value') == ''){
					$(this).val(inputText);
				}					
			});
		} // end if
   }); // end each
} // end function

$(document).ready(function() {
	html5forms();
});

// Clear search form on focus

