inserting javascript in a jquery

inserting javascript in a jquery

i have a jquery plugin for date and time selection. i want to disable weekends and other selected days from it. i have found  the following thread for this purpose. but i don't know how to insert it in my jquery pluging to make it like i want .

  1. /* create an array of days which need to be disabled */ var disabledDays = ["2-21-2010","2-24-2010","2-27-2010","2-28-2010","3-3-2010","3-17-2010","4-2-2010","4-3-2010","4-4-2010","4-5-2010"]; /* utility functions */ function nationalDays(date) { var m = date.getMonth(), d = date.getDate(), y = date.getFullYear();  //console.log('Checking (raw): ' + m + '-' + d + '-' + y); for (i = 0; i < disabledDays.length; i++) { if($.inArray((m+1) + '-' + d + '-' + y,disabledDays) != -1 || new Date() > date) {  //console.log('bad: ' + (m+1) + '-' + d + '-' + y + ' / ' + disabledDays[i]); return [false]; } }  //console.log('good: ' + (m+1) + '-' + d + '-' + y); return [true]; } function noWeekendsOrHolidays(date) { var noWeekend = jQuery.datepicker.noWeekends(date); return noWeekend[0] ? nationalDays(date) : noWeekend; } /* create datepicker */ jQuery(document).ready(function() { jQuery('#date').datepicker({ minDate: new Date(2010, 0, 1), maxDate: new Date(2010, 5, 31), dateFormat: 'DD, MM, d, yy', constrainInput: true, beforeShowDay: noWeekendsOrHolidays }); });

i have the follwing jquery plugin.
1.jquery-1.4.1.min.js
2.jquery.dynDateTime.min.js
3.calendar-en.min.js"
please help me how to insert the above javascript code in my jquery plugin.