Event.observe(window, 'load', function() {
	var suggestionQuickSearch = new SuggestionQuickSearch(
								'quickSearchText',
								'quickSearchForm',
								'quickSearchTextSuggestion',
								'h3',
								'QuickSearch Search Keyword Suggestion Result',
								'quickSearchForm',
								'images/suggestionLoading.gif',
								'images/suggestionPrev.gif',
								'images/suggestionNext.gif',
								'quickSearchSuggestionAction.do',
								'post');
});

var SuggestionQuickSearch = Class.create();
Object.extend(SuggestionQuickSearch.prototype, Suggestion.prototype);
Object.extend(SuggestionQuickSearch.prototype, {

	// パラメーターを作成します。 (オーバーライド)
	createParameter: function(inputString) {
		var param = new String;
		param += "&name=" + encodeURIComponent(inputString);

		param += "&quickSearchText=" + encodeURIComponent(inputString);

		return param;
	},
	
	// 候補キーワードリストの位置をブラウザごとに微調整を行います。 (オーバーライド)
	adjustSuggestion: function(left, top, width) {
		if (this.client.isWinOS && this.client.isIE) {
			left -= 99; top -= 2; width += 100;

		} else if (this.client.isWinOS && this.client.isFirefox) {
			left -= 102; top -= 0; width += 100;

		} else if (this.client.isWinOS && this.client.isSafari) {
			left -= 98; top -= 0; width += 100;

		} else if (this.client.isWinOS && this.client.isOpera) {
			left -= 102; top -= 1; width += 100;

		}  else if (this.client.isMacOS && this.client.isFirefox) {
			left -= 103; top += 0; width += 100;

		} else if (this.client.isMacOS && this.client.isSafari) {
			left -= 98; top += 1; width += 100;

		} else if (this.client.isLinuxOS && this.client.isFirefox) {
			left -= 102; top -= 1; width += 100;
		}

		return '{left: ' + left + ', top: ' + top + ', width: '+ width +'}';
	}
});

