(function($) { // $ represents the jQuery obj passed in

	$.html5forms = function() {
		$(initialize);
	};


	// the method that does the initialization
	function initialize() {
		var inputElement = document.createElement('input');

		//placeholder
		if (!('placeholder' in inputElement)) {

			$('input[placeholder]').each(function(n, element) {
				var that = $(this);
				var placeholderValue = that.attr('placeholder');
				that.val(placeholderValue);
				that.addClass('placeholderValue');
				that.parents('form').submit(function(e){
					if (that.val() == that.attr('placeholder')) {
						that.val('');
						that.removeClass('placeholderValue');
					}
				});
			});

			$('input[placeholder]').focus(function() {
				if ($(this).val() == $(this).attr('placeholder')) {
					$(this).val('');
					$(this).removeClass('placeholderValue');
				}
			});

			$('input[placeholder]').blur(function() {
				if ($(this).val().length == 0) {
					$(this).val($(this).attr('placeholder'));
					$(this).addClass('placeholderValue');
				}
			});
		}

	}

})(jQuery); // pass jQuery object in to self enclosing fn

