﻿$(function() {
    $('a[rel*=facebox]').facebox()
});
function openLogin() {

    $("div.topbar").slideUp(100);
    $("div.cerceve").slideDown(200);
    return false;
}
function loginClose() {
    $("div.cerceve").slideUp(200);
    $("div.topbar").slideDown(100);
    return false;
}

$().ready(function() {

    $("#txtMainbhgsearxh").autocomplete("search.ashx", {
    width: 302,
        selectFirst: false,
        max: 20,
        highlight: false,
        scroll: false,
        minChars: 3,
        multiple: false,
        mustMatch: false,
        autoFill: false
    }).result(function(event, data, formatted) {
        if (data) {
            location.href = 'gate.aspx?did=' + data[1];
            $("#hdselected").val(data[1]);
            $("#selctType").val("id");
        }
    });

});
function searchresult() {
    if ($("#txtMainbhgsearxh").val() != "")
        location.href = "dara.aspx?k=" + $("#txtMainbhgsearxh").val();
}