document.createElement("header");
document.createElement("footer");
document.createElement("section");
document.createElement("aside");
document.createElement("nav");
document.createElement("article");
document.createElement("figure");
document.createElement("figcaption");
document.createElement("hgroup");
document.createElement("time"); 
(function($){
    $.fn.correctInPartHtml5=function(){
        var html5=true;
        return this.each(function(){
            $(" input, textarea",this).each(function(){
                var $ph=$(this).attr('placeholder');
                var attr=this.type;
                if($(this).is("input[type='text']") || $(this).is("input[type='password']") ){
                    this.setAttribute('type','date');
                    if(this.type!='date'){
                        html5=false;  
                        $("header, footer, section, aside, nav, article, figure, figcaption, hgroup, time").css("display","block");
                    }
                }
                if($ph!=undefined && !html5){
                    if(attr=='password'){
                        $(this).attr('rel','password');
                        attr='text';
                    }
                    this.setAttribute('type',attr);
                    $(this).val($ph);
                    $(this).focus(function(){
                        if($(this).attr('placeholder')==$(this).val()){
                            $(this).val("");
                            if($(this).attr('rel')=='password'){
                                this.setAttribute('type','password');
                            }
                        }
                    });
                    $(this).blur(function(){
                        if($(this).val()==''){
                            $(this).val($(this).attr('placeholder'));
                            if($(this).attr('rel')=='password'){
                                this.setAttribute('type','text');
                            }
                        }
                    });
                }
                this.setAttribute('type',attr);
            });
        });
    };
})(jQuery);


