$(function()
{
	Start.init();
});

Start =
{
	init:function()
	{
		this.show_input_help('searchtip');
	},
	
	show_input_help:function(module)
	{
		var $form = $('#' + module).find('form');
		
		if (!$form.size())
		{
			return false;
		}
		
		var $help_notes = $form.find('span.input-help');
		
		if (!$help_notes.size())
		{
			return false;
		}
		
		$help_notes.each(function()
		{
			var $this = $(this);
			
			var $input = $this.parent('p').find('input');
			
			$input.focus(function()
			{
				$form.find('p.sel').removeClass('sel');
				$(this).parents('p').addClass('sel');
			});
			
			$input.blur(function()
			{
				$(this).parents('p').removeClass('sel');
			});
		});
	}
};
