﻿$(document).ready(function () {
    (function ($) {
        $.fn.tbHinter = function (options) {

            var defaults = { text: 'Enter a text ...', clas: '' };

            var options = $.extend(defaults, options);

            return this.each(function () {

                $(this).focus(function () {
                    if ($(this).val() == options.text) {
                        $(this).val('');
                        $(this).removeClass(options.clas);
                    }
                });

                $(this).blur(function () {
                    if ($(this).val() == '') {
                        $(this).val(options.text);
                        $(this).addClass(options.clas);
                    }
                });

                $(this).blur();

            });
        };
    })(jQuery);


    $('#txtZoeken').tbHinter({
        text: 'Geef hier uw zoekopdracht in...',
        clas: 'light_grey'
    });
});
