jQuery.fn.extend( {
	emptyonclick : function(options) {
		return this.each(function() {
			new jQuery.EmptyOnClick(this, options);
		});
	}
});
jQuery.EmptyOnClick = function(element, options) {
	var defaultValue = jQuery(element).val();
	jQuery(element).bind("focus", function(e) {
		if (defaultValue == jQuery(this).val())
			jQuery(this).val('');
	}).bind("blur", function(e) {
		if (!jQuery(this).val()) {
			jQuery(this).val(defaultValue);
		}
	});
	jQuery(element).bind('reset', function(e) {
		jQuery(element).val(defaultValue);
		jQuery(element).removeClass(options.changeClass);
	}).bind('submit', function(e) {
		if (jQuery(element).val() == defaultValue)
			jQuery(element).val('');
	});
};
jQuery(document).ready(function() {
	jQuery("p#lisaa a,div#lisaa-matkajuttuja").hover(function() {
		jQuery("div#lisaa-matkajuttuja").show();
	}, function() {
		jQuery("div#lisaa-matkajuttuja").hide();
	});
	jQuery('input,textarea').emptyonclick();
});
