var sf_position = '0'; var sf_templates = "See more results for \"{search_value}\"<\/span>Displaying top {total} results<\/span><\/a>"; var sf_input = '.sf_input'; jQuery(document).ready(function(){ jQuery(sf_input).ajaxyLiveSearch({"expand":false,"searchUrl":"http:\/\/9trainers.com\/?s=%s","text":"Search","delay":500,"iwidth":180,"width":315,"ajaxUrl":"http:\/\/9trainers.com\/wp-admin\/admin-ajax.php","rtl":0}); jQuery(".sf_ajaxy-selective-input").keyup(function() { var width = jQuery(this).val().length * 8; if(width < 50) { width = 50; } jQuery(this).width(width); }); jQuery(".sf_ajaxy-selective-search").click(function() { jQuery(this).find(".sf_ajaxy-selective-input").focus(); }); jQuery(".sf_ajaxy-selective-close").click(function() { jQuery(this).parent().remove(); }); });