/*function findValue(li) {
	if( li == null ) return alert("No match!");

	// if coming from an AJAX call, let's use the CityId as the value
	if( !!li.extra ) var sValue = li.extra[0];

	// otherwise, let's just display the value in the text box
	else var sValue = li.selectValue;

	alert("The value you selected was: " + sValue);
}

function selectItem(li) {
	findValue(li);
}
/**/
(function ($) {

/**
 * EventCard
 * @constructor jQuery
 */
$.widget('ui.SearchToolbar', $.extend({}, $.ui.Component.prototype, {
    type: 'SearchToolbar',
    init: function () {
        var self = this;
        
        /*
        $(".inpBg", this.element).autocomplete("/ajax/SearchToolbar/" + self.element.attr("id"), {
                selectFirst: false,
                minChars: 3
                //onSelectItem: selectItem
        });*/
        $(".inpBg").focus(function(){
                if (this.value == this.alt) {
                        this.value = '';
                }
        });
        $(".inpBg").blur(function(){
                if (this.value == '' && this.name == 'search') {
                        this.value = this.alt;
                }
        });
/*
        $('div.usualBlock a.more').click(
                function(){
                        $(this).parents('div.absoluteBlock').addClass("openBlock");
                        if($.browser.msie){
                                $(this).parents('div.absoluteBlock').width($(this).parents('div.absoluteBlock').find('ul').length*140);
                        }
                        $(this).parents('div.usualBlock').height($(this).parents('div.usualBlock').find('div.absoluteBlock').height()+13);
                        return false;
                }
        );
        $('div.usualBlock a.closeBlock').click(
                function(){
                        $(this).parents('div.absoluteBlock').removeClass("openBlock");
                        if($.browser.msie){
                                $(this).parents('div.absoluteBlock').width(160);
                        }
                        $(this).parents('div.usualBlock').height($(this).parents('div.usualBlock').find('div.absoluteBlock').height()+13); return false;
                }
        );
        /**/
     }
}));

})(jQuery);