/* Plugin limpa.campos
*  Plugin responsável por limpar os labels dos campos inputs e textarea.
*  Modo de usar todo campo seja imput ou textarea deve ter um param igual ao value
*  Ex: <input type="text" name="e-mail" value="E-mail" param="E-mail" />
*
*  @Author: Braz Leonardo
*
*  @E-mail: leonardok3b@gmail.com
*
*  @Date: 24 de dezembro de 2010
*
*/

(function(){

	
    $.fn.limpaCampos = function() {

        //var param = "";

        var label = "";
                

        /*$("input[type='text'], textarea, input[type='password']").live("click", function(){

				param = $(this).attr("param");
				
				label = $(this).val();
            
				if(param == label){

					$(this).val("");
				}

				
			}).live("blur", function(){
			
				tam = $(this).val().length;
				
				if( tam < 1 ){

					$(this).val(param);
				}

			});*/


        $("input[type='text'], textarea, input[type='password']").live("keypress", function(){

            

            $(this).prev("span").hide(800, "linear");

        }).live("blur", function(){

            if($(this).val() == ""){
                $(this).prev("span").show(300, "linear");
            }

        });

		
    };

		
})(jQuery);

$().limpaCampos();

