requirejs(['lib/jquery-1.7.min'], function () {
    requirejs(['lib/jQuery-2.1.3.min'], function () {
        requirejs(['lib/jquery-ui.min', 'lib/1.11.2-jquery-ui.min', 'lib/bootstrap3-wysihtml5.all.min', 'lib/1.10.3-jquery-ui.min'], function () {
            requirejs(['lib/app.min', 'lib/jquery.slimscroll.min', 'lib/jquery.multi-select'], function () {
                requirejs(['app/demo'], function () {
                    requirejs(['pagejs/main-master', 'pagejs/student_custom'], function () {
                        $(document).ready(function () {
                            $('#people').multiSelect();
                            LoadingMessage('Loading Details', '<b>Please Wait ...</b>');
                            $.widget.bridge('uibutton', $.ui.button);
                            window.onresize = ScreenResize;
                            $("#txtFDateOfBirth").datepicker({
                                dateFormat: 'dd/mm/yy', showOn: "button",
                                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                                buttonImageOnly: true
                            });
                            $("#txtTDateOfBirth").datepicker({
                                dateFormat: 'dd/mm/yy', showOn: "button",
                                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                                buttonImageOnly: true
                            });
                            $("#txtFAdminssionDate").datepicker({
                                dateFormat: 'dd/mm/yy', showOn: "button",
                                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                                buttonImageOnly: true
                            });
                            $("#txtTAdminssionDate").datepicker({
                                dateFormat: 'dd/mm/yy', showOn: "button",
                                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                                buttonImageOnly: true
                            });
                            $("#txtFLeftDate").datepicker({
                                dateFormat: 'dd/mm/yy', showOn: "button",
                                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                                buttonImageOnly: true
                            });
                            $("#txtTLeftDate").datepicker({
                                dateFormat: 'dd/mm/yy', showOn: "button",
                                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                                buttonImageOnly: true
                            });
                            $("#AttendanceDate").datepicker({
                                dateFormat: 'dd/mm/yy', showOn: "button",
                                buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
                                buttonImageOnly: true
                            });
                            
                            
                            //$('body').on('focus', ".StuDatePicker", function () {

                            //    if ($(this).hasClass('hasDatepicker') === false) {
                            //        $(this).datepicker();
                            //    }

                            //});
                            BindDropDowns();
                        });
                    });
                });
            });
        });
    });
});