/*
Reset INT
creator (firebal_ - Michal Matuška)
edited by (Tomáš Krejčí)
*/ 
(function ($) {
    $.fn.inputText = function (sett) {
        var o = $.extend({
            text: 'Defaultní text'
        }, sett);
        return this.each(function () {
            if (this.type && (this.type == 'text' || this.type == 'password')) {
                var text = this.value == '' ? o.text : this.value,
                    that = this;
                $(this).val(text).focus(function () {
                    if (this.value == text) this.value = ''
                }).blur(function () {
                    if (this.value == '') this.value = text
                });
                $(this.form).submit(function () {
                    if (that.value == text) that.value = ''
                });
            }
        });
    }
}(jQuery));
