Added positioning feature

I have added a feature which determines if there is enough space to show the datepicker below the input field without it being off-screen. If not, it displays the datepicker above the input field instead.

I have made these changes to the standard version and the jquery version but I have not minified either of them.

I hope it will be to some use for someone else than me!