/* /\/\ -|- ]\[ */
$(function(){addDropShadow("keywordSuggest","keywordSuggestWrapper");$("#keywordInput").autocomplete("/services/service.ashx",{minChars:1,max:20,cacheLength:20,multiple:true,selectFirst:false,extraParams:{method:"suggest_keyword"}})
});function toggleSuggest(A){togglePopup("keywordSuggestWrapper",A,-15,110);if($("#keywordSuggestWrapper:visible").length>0){$("#suggestedKeywordsWrapper").redrawShadow();
$("#keywordInput").focus()}return false}function addKeywords(){var B=$("meta[name='productid']").attr("content");
var A=$("#keywordInput").val();if(A.length>0){$.ajax({type:"POST",url:"/services/service.ashx",complete:keywordResponse,data:{method:"add_keywords",pid:B,keywordList:A}})
}return false}function keywordResponse(F,C){try{$(".noKeywords").hide();if(F.status===200){var B=F.responseXML;
if($("rsp",B).attr("stat")=="ok"){$("#keywordInput").val("");var D=$("#keywordList");
var A=$("suggestion",B).each(function(){var H=$("keyword",this).text();var G=$("status",this).text();
D.append($('<div class="wlsecondarytext"></div>').text(H+" ("+G+")"))})}else{logError(new Error("status = fail\n\n"+C+"\n\n"+F.responseText),"keywordResponse()");
$("#keywordList").append('<div class="wlsecondarytext noKeywords">Unable to add keywords at this time. Please try again later.</div>')
}toggleSuggest(null)}else{logError(new Error("XmlHttpRequest.Status "+F.status+"\n"+C),"keywordResponse()");
$("#keywordList").append('<div class="wlsecondarytext noKeywords">Unable to add keywords at this time. Please try again later.</div>')
}}catch(E){logError(E,"keywordResponse(catch)")}};