
window.onload = function() {
//if( !IE6 )
{
    $("input.autocomplete").each( function () {
				
        $(this).autocomplete('smartsearch.php', {
            minChars: 2,
            max: 50,
            width: $(this).width(),
            selectFirst: false
        } );
    });

    var text = '';
    function hideTip_sz(obj) {
        obj.attr('title', text);
        $('#tooltip2').css('display', 'none');
    }
    var toolTipOver_sz = false;
    function showTip_sz(obj, e) {
        $('#tooltip2').css('display', 'block');
        text = obj.attr('title');
        if( text.length == 0 ) return;
        obj.attr('title', '');
        $('#tooltip2content').html(text);
        $('#tooltip2').css('display', 'block');

        $('#tooltip2').css('left', e.pageX - $('#tooltip2').get(0).offsetWidth - 5 + 'px');
        $('#tooltip2').css('top', e.pageY - $('#tooltip2').get(0).offsetHeight - 5 + 'px');
    }

    $('.tt_rollover').hover(function(e) {
        var handle = $(this);
        $(this).css('cursor', 'default');
        showTip_sz(handle, e);
    }, function() {
        hideTip_sz($(this));
    });
}
}
