var TimeredSearch = ObjClass.extend({
	timer: null,
	controller: null,
	$html: null,
	init: function(conf)
	{
		var $this = this;
		this.controller = conf.controller;
		this.$html = $(conf.$html);
		
		this.$html.bind("keyup", function()
		{
			$this.onKeyPress()
		}).focus().closest("form").submit(function()
		{	
			return false;
		});
		
	},
	getValue: function()
	{
		return this.$html.val().toLowerCase();
	},
	onKeyPress: function()
	{
		var $this = this;
		clearTimeout(this.timer);
		this.timer = setTimeout(function()
		{
			$this.controller.checkDomain($this.getValue());
		},Settings.search_timeout);
	}
});
