Problem with reassigning datepicker in a fancybox popup

Problem with reassigning datepicker in a fancybox popup

Hi everyone,
i have a problem with reassigning datepicker in a fancybox popup. On firebug console there is no error or warning.
The situation is like following:
- There is a main site for selecting users for who a message should be written in the fancybox popup.
- The main site can be filtered by two date fields.
- In a message the user can specify another two dates.
- Each date field should provide a jquery ui datepicker.
- The main site and the fancybox popup contains a header, in both headers theres is a call to datepicker for the unique id's of all datefield (two calls in each header).
- When the datepicker is activated for the main site, the popup doesnt show the datepicker.
- When i remove the call to datepicker form the header of the main site, the datepicker shows up in fanybox like it should.

Header with datepicker calls for main site:
  1.                 <script type="text/javascript">
                        $(document).ready(function() {
                            $("#userTableForm").bind("submit", function() {
                                $.ajax({
                                    minWidth    : 400,
                                    type        : "POST",
                                    cache       : false,
                                    url         : "<?php echo $this->webroot . 'UserPresence/writeMessageTo' ?>",
                                    data        : $(this).serializeArray(),
                                    success: function(responseText) {
                                        $.fancybox({
                                            'minWidth' : 400,
                                            'content' : responseText
                                        });
                                    }
                                });
                                return false;
                            });
                        });
                    </script>
                    <script>
                        $(function() {
                            $( "#datepicker-11" ).datepicker(); // when commenting these two lines,
                            $( "#datepicker-12" ).datepicker(); // the datepicker works fine in fancybox
                        });
                    </script>
The header for the fancybox:
  1.                 <script type="text/javascript">
                        $(document).ready(function() {
                            $("#writeMessageForm").bind("submit", function() {
                                $.ajax({
                                    type        : "POST",
                                    cache       : false,
                                    url         : "<?php echo $this->webroot . 'UserPresence/writeMessageTo' ?>",
                                    data        : $(this).serializeArray(),
                                    success: function(responseText) {
                                        $.fancybox({
                                            'minWidth' : 400,
                                            'content'  : responseText
                                        });
                                    }
                                });
                                return false;
                            });
                        });
                    </script>
                    <script>
                        $(function() {
                            $( "#datepicker-13" ).datepicker();
                            $( "#datepicker-14" ).datepicker();
                        });
                    </script>
As you see, its the same calls for both header, with different id's for date fields.
The ajax call is needed, for passing the form data to fancybox again, because the success or error messages should be displayed in fancybox.

When activating the datepicker for both, the datepicker isnt shown, but the date format is like for datepicker fields, that means only taking yyyy/mm/dd, no other symbols allowed.

Any held appreciated, i am searching the web for several hours.

Thanks.