
(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 placeholderValue = $(this).attr('placeholder');
			  $(this).val(placeholderValue);
			  $(this).addClass('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

