jQuery's submit() won't get fired
<p>I have the following code but it doesn't work I assume that the problem is around my function declaration but not sure how to debug it. Any help would be welcome. Thanks in advanced.</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function(){   
if ($('select#prod_category').val() == ''){
          $('select#prod_group').hide();
          }
if ($('select#prod_group').val() == ''){
          $('select#product').hide();
          } 
$("form#g_search select").change(function(){
    $("div#gutschein_filter form#g_search").submit(function(){
        event.preventDefault();
        window.location.href = "/folder/" +
        encodeURI($("#prod_category").val()) + "/" +
        encodeURI($("#prod_group").val());
    });


  });
});
&lt;/script&gt;
</code></pre>
