I keep getting an error while using DateTimepicker gem `'foundation-datetimepicker-rails'`

The error I keep getting is:

```
Uncaught TypeError: Object [object Object] has no method 'fdatepicker'

```

The html looks like this:

```
<%= f.text_field :due_date_proposed, id: "dp1", value: "31.01.2014" %>

```

Before the `</body>` tag, I have:

```
<script type="text/javascript">
  $('#dp1').fdatepicker();
</script>

```

Can anyone help, please?
Thanks!