/*
jQuery Placeholder Plugin
Author: Eymen Gunay
Web: http://www.egunay.com/
*/
(function ($) {
	$.fn.placeHolder = function (options) {
		var eo = this;
		var settings = {
			'text': '',
			'placeholder': '#999',
			'active': '#000'
		};
		return this.each(function () {
			if (options) {
				$.extend(settings, options);
			}
			if (settings.text == '' && eo.attr('placeholder') != '')
				settings.text = eo.attr('placeholder');
			eo.val(settings.text);
			eo.css("color", settings.placeholder);
			eo.removeAttr('placeholder');
			eo.focus(function () {
				if (eo.val() == settings.text) {
					eo.css("color", settings.active);
					eo.val("");
				}
			});
			eo.blur(function () {
				if (eo.val() == "" || eo.val() == settings.text) {
					eo.val(settings.text);
					eo.css("color", settings.placeholder);
				}
			});
		});

	};
})(jQuery);
