// JavaScript Document
function setTopSearch(index) {
    $("#topsearch>ul>li").click(function() {
        var index = $("#topsearch>ul").children("*").index(this);
        $("#topsearch>ul>li").removeClass("focus")
		  .eq(index).addClass("focus");
        $("#topsearch>ul~div").css("display", "none")
		  .eq(index).css("display", "block");
    }).eq(index).click();
}

function syncInput(str) {
    $("#topsearch>ul~div>input:text").val(str);
}
