jQuery.fn.styleForm=function(){
	$(this).each(function(){
		var elem=$(this)
		if(!elem.parent().hasClass('SF_wrapper')){
			var type
			if(elem.is('input')){
				type=elem.attr('type')
				if(type=='text'||type=='date'||type=='password'||type=='email'||type=='number'){type='field'}
				else if(type=='reset'||type=='button'||type=='submit'){type='button'}
			}else{
				type='textarea'
			}
			var wrapperW=elem.innerWidth()
			var wrapperH=elem.innerHeight()
			elem.css('background','transparent')
			elem.wrap("<div class='SF_wrapper'></div>")
			var wrapper=$(this).parent()
			wrapper.css({width: wrapperW+'px',height: wrapperH+'px'})
			
			//FIELDS
			if(type=='field'||type=='textarea'){
				wrapper.prepend("<div class='SF_corner SF_top_l'></div>")
				wrapper.prepend("<div class='SF_top'></div>")
				wrapper.prepend("<div class='SF_corner SF_top_r'></div>")
				wrapper.prepend("<div class='SF_corner SF_bot_l'></div>")
				wrapper.prepend("<div class='SF_bot'></div>")
				wrapper.prepend("<div class='SF_corner SF_bot_r'></div>")
				wrapper.prepend("<div class='SF_mid_l'></div>")
				wrapper.prepend("<div class='SF_mid_r'></div>")
				wrapper.prepend("<div class='SF_mid'></div>")
			}
			
			//BUTTONS
			if(type=='button'){
				wrapper.prepend("<div class='SF_left_button'></div>")
				wrapper.prepend("<div class='SF_mid_button'></div>")
				wrapper.prepend("<div class='SF_right_button'></div>")
			}
			
			//EFFECTS
			elem.focus(function(){
				$(this).parent().addClass('active')
				$(this).mouseover(function(){
					$(this).parent().removeClass('hover')
				})
				$(this).parent().removeClass('hover')
			})
			elem.blur(function(){
				$(this).parent().removeClass('active')
				$(this).mouseover(function(){
					$(this).parent().addClass('hover')
				})
			})
			elem.mouseover(function(){
				$(this).parent().addClass('hover')
			})
			elem.mouseout(function(){
				$(this).parent().removeClass('hover')
			})
		}
	})
}
