jQuery(document).ready(function($) {
	var imgSearch = $('input#ImageSearch');
	imgSearch.inputHint();

});

(function($) {
    $.fn.inputHint = function(options) {

	    var defaults = {
	        text: 'enter keywords'
	    };
   
	    var options = $.extend(defaults, options);
	
	    function defaultAction(el) {
	        if(el.val() == options.text){
	            el.val('');
	        }
	    }
	    return this.each(function() {
	        $(this).focus(function() {
	            defaultAction($(this));
	        });
       
	        $(this).blur(function() {
    	        if($(this).val() == ''){
	                $(this).val(options.text);
	            }
	        });
       
	        var self = $(this);
	        $(this).parents("form").submit(function () {
	            defaultAction(self);
	        });
	       
	        $(this).blur();
    	});
	};
})(jQuery);

