<div class="product-search pull-right">
	<form class="form-inline form-search">
    	<div class="input-group">
    		<input class="form-control" type="text" id="product-search"
                placeholder="Product Search...">
    		<span class="input-group-btn">
    			<button class="btn btn-default" type="button" id="btn-product-search">
    				<i class="icon-search"></i></button>
    		</span>
    	</div>
    </form>
</div>
<script>
frappe.ready(function() {
	$("#btn-product-search").click(function() {
		var txt = $("#product-search").val();
		if(txt) {
			window.location.href="/product_search?q=" + txt;
		}
		return false;
	});
	$("#product-search").keypress(function(e) {
		if(e.which==13) $("#btn-product-search").click();
	});
	$(".form-search").on("submit", function() { return false; });

});
</script>
