How do I open a new window for this element?

How do I open a new window for this element?

  1. <script type="text/javascript">
                   $(function(){
               
                     function getJsonDate(year, month) {
                         
                         themonth = year.toString() + month.toString();
                         
                       
                   
                         switch (themonth)
                         {
                             case "20108":  // the year 2010 and month 8 august
                   
                                 thefile = "august2010.txt"; //file with the links
                                break;
                               
                            case "20107":
                                 thefile = "july2010.txt";
                                break;
                               
                                default:
                                    thefile = "blank.txt";
                             
                         }
                         
                         $.getJSON(thefile, function(data) {
                             var i = 0;
                             for (i = 0; i < data.data.length; i++)
                             {
                                 $('.ui-datepicker-calendar td a:exactly('+data.data[i]['d']+')')
                                 .css({color: '#f00'})
                                .attr('href',data.data[i]['link'])
                                 .parent().attr('onclick','');
                             }
                         });
                     }
                     $.expr[":"].exactly = function(el, i, m) {
                         var s = m[3];
                         if (!s) return false;
                         return eval("/^" + s + "$/i").test($(el).text());
                    };
                  $('#datepicker').datepicker({
                        inline: true,
                         onSelect: function(dateText, inst) {
                             Date.prototype.toString = function () {return isNaN (this) ? 'NaN' : [this.getDate(), this.getMonth(), this.getFullYear()].join('/')}
                            d = new Date(dateText);
                             getJsonDate(d.getFullYear(), d.getMonth()+1);
                        },
                         onChangeMonthYear: function(year, month, inst) {
                            //alert(year);
                             //alert(month);
                             getJsonDate(year, month);
                         }
                    });
                 });
               
            </script>

























































so obviously the href attr adds the link. Is there something I add to the onclick to make it open a new window instead of loading it in the existing window?



Also, I want to have getJsonDate(); execute when the page loads, how can I achieve this?