Editorial Calendar - Version 0.5

Version Description

  • Added localization support for strings and dates in the calendar
  • The calendar is no longer showing posts that you have put in your trash
  • Fixed a problem that caused posts to never show up when working with WordPress in Croatian and other Eastern European languages.
  • The calendar now starts the week on the right day based on the configured locale in WordPress.
  • Added language support files for Croatian. Special thanks to Ivan Brezak Brkan.
Download this release

Release Info

Developer MaryVogt
Plugin Icon wp plugin Editorial Calendar
Version 0.5
Comparing to
See all releases

Code changes from version 0.4 to 0.5

edcal.css CHANGED
@@ -45,7 +45,7 @@
45
  height: 100%;
46
  }
47
 
48
- .jan, .mar, .may, .jul, .sep, .nov {
49
  background-color: #F1F1F1;
50
  }
51
 
45
  height: 100%;
46
  }
47
 
48
+ .month-01, .month-03, .month-05, .month-07, .month-09, .month-11 {
49
  background-color: #F1F1F1;
50
  }
51
 
edcal.js CHANGED
@@ -186,17 +186,15 @@ var edcal = {
186
  /*
187
  This function creates the days header at the top of the
188
  calendar.
189
-
190
- TODO: We should localize these values
191
  */
192
  createDaysHeader: function() {
193
- var html = '<div class="dayhead">Sunday</div>';
194
- html += '<div class="dayhead">Monday</div>';
195
- html += '<div class="dayhead">Tuesday</div>';
196
- html += '<div class="dayhead">Wednesday</div>';
197
- html += '<div class="dayhead">Thursday</div>';
198
- html += '<div class="dayhead">Friday</div>';
199
- html += '<div class="dayhead">Saturday</div>';
200
 
201
  jQuery("#rowhead").append(html);
202
 
@@ -210,17 +208,17 @@ var edcal = {
210
  createRow: function(/*jQuery*/ parent, /*bool*/ append) {
211
  var _date = edcal._wDate.clone();
212
 
213
- var newrow = '<div class="rowcont" id="' + 'row' + edcal._wDate.toString("ddMMMyyyy") + '">' +
214
- '<div id="' + 'row' + edcal._wDate.toString("ddMMMyyyy") + 'row" class="row">';
215
  for (var i = 0; i < 7; i++) {
216
- newrow += '<div id="' + _date.toString("ddMMMyyyy") + '" class="day ' +
217
- _date.toString("dddd").toLowerCase() + ' ' +
218
- _date.toString("MMM").toLowerCase() + '">';
219
 
220
  newrow += '<div class="dayobj">';
221
 
222
  newrow += '<div class="daylabel">';
223
- newrow += '<a href="#" adddate="' + _date.toString("MMMM d") + '" class="daynewlink" title="Add new post on ' + _date.toString("MMMM d") + '" ' +
224
  'onclick="return false;">+</a>';
225
  if (_date.toString("dd") == "01") {
226
  newrow += _date.toString("MMM d");
@@ -231,7 +229,7 @@ var edcal = {
231
 
232
  newrow += '<ul class="postlist">';
233
 
234
- newrow += edcal.getPostItems(_date.toString("ddMMMyyyy"));
235
 
236
  newrow += '</ul>';
237
 
@@ -240,7 +238,7 @@ var edcal = {
240
  _date.add(1).days();
241
  }
242
 
243
- newrow += '</div></div';
244
 
245
  if (append) {
246
  parent.append(newrow);
@@ -249,15 +247,15 @@ var edcal = {
249
  parent.prepend(newrow);
250
  }
251
 
252
- edcal.alignGrid("#row" + edcal._wDate.toString("ddMMMyyyy") + "row", 7, 14.2, 100, 0.25);
253
 
254
- jQuery('#row' + edcal._wDate.toString("ddMMMyyyy") + ' .day').each( function() {
255
  edcal.addTooltip(jQuery(this).attr("id"));
256
  });
257
 
258
- edcal.draggablePost('#row' + edcal._wDate.toString("ddMMMyyyy") + ' .post');
259
 
260
- jQuery('#row' + edcal._wDate.toString("ddMMMyyyy") + ' .day').droppable({
261
  hoverClass: 'day-active',
262
  accept: '.post',
263
  greedy: true,
@@ -300,7 +298,7 @@ var edcal = {
300
  }
301
  });
302
 
303
- return jQuery('row' + edcal._wDate.toString("ddMMMyyyy"));
304
  },
305
 
306
  /*
@@ -355,7 +353,7 @@ var edcal = {
355
  },
356
 
357
  /*
358
- * Adds a post to al already existing calendar day.
359
  */
360
  addPostItem: function(/*post*/ post, /*string*/ dayobjId) {
361
  jQuery('#' + dayobjId + ' .postlist').append(edcal.createPostItem(post, dayobjId));
@@ -374,7 +372,7 @@ var edcal = {
374
  * Confirms if you want to delete the specified post
375
  */
376
  confirmDelete: function(/*string*/ posttitle) {
377
- if (confirm('You are about to delete this post ' + posttitle + '.\n\n Press cancel to stop, OK to delete.')) {
378
  return true;
379
  } else {
380
  return false;
@@ -408,7 +406,7 @@ var edcal = {
408
  * post item.
409
  */
410
  if (res.error === edcal.NONCE_ERROR) {
411
- edcal.showError("Invalid checksum for post. This is commonly a cross-site scripting error.");
412
  }
413
  }
414
  edcal.addPostItem(res.post, res.post.date);
@@ -416,7 +414,7 @@ var edcal = {
416
  edcal.output("Finished saving the new title " + jQuery("#edcal-title-edit-field").val() + " for post " + postId);
417
  },
418
  error: function(xhr) {
419
- edcal.showError("There was an error contacting your blog.");
420
  if (xhr.responseText) {
421
  edcal.output("xhr.responseText: " + xhr.responseText);
422
  }
@@ -469,21 +467,21 @@ var edcal = {
469
  var tooltip = '<div class="tooltip">' +
470
  '<a href="#" id="tipclose" onclick="edcal.closeTooltip(); return false;" title="close"> </a>' +
471
  '<h3 id="edcal-title">' + posttitle +
472
- ' <a href="#" onclick="edcal.editTitle(); return false;" class="edit-post-status" id="edcal-title-edit">Edit</a>' +
473
  '</h3>' +
474
  '<div id="edcal-title-box">' +
475
  '<input type="text" postid="' + post.id + '" value="' + post.title + '" id="edcal-title-edit-field"/> &nbsp;&nbsp;' +
476
  '<span id="edit-slug-buttons">' +
477
  '<a class="save button" href="#" onclick="edcal.saveTitle(\'' + post.id + '\'); return false;">Save</a> ' +
478
- '<a href="#" onclick="edcal.cancelEditTitle(\'' + post.title + '\'); return false;" class="cancel">Cancel</a></span>' +
479
  '</div>' +
480
  '<p>' +
481
- '<i>by</i> ' + post.author + ' <i>on</i> ' +
482
- edcal.getDayFromDayId(post.date).toString("MMMM d, yyyy") + ' at ' +
483
  post.time +
484
  '</p>' +
485
  '<p>' +
486
- 'Status<b>: ' + post.status + '</b>' +
487
  '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
488
  if (post.editlink) {
489
  /*
@@ -491,17 +489,17 @@ var edcal = {
491
  * then server won't send the edit link URL and we shouldn't
492
  * show the edit link
493
  */
494
- tooltip += '<a href="' + post.editlink + '" title="Edit ' + post.title +
495
- '">Edit</a>&nbsp; | &nbsp;';
496
  }
497
 
498
  if (post.dellink) {
499
  tooltip += '<a class="submitdelete" href="' + post.dellink + '" ' +
500
  'onclick="return edcal.confirmDelete(\'' + post.title + '\');"' +
501
- 'title="Delete ' + post.title + '">Delete</a> &nbsp; | &nbsp;';
502
  }
503
 
504
- tooltip += '<a href="' + post.permalink + '" title="View ' + post.title + '">View</a>' +
505
  '</p>' +
506
  '</div>';
507
 
@@ -526,15 +524,15 @@ var edcal = {
526
  bodyHandler: function() {
527
  var tooltip = '<div class="tooltip newposttip">' +
528
  '<a href="#" id="tipclose" onclick="jQuery(\'#tooltip\').hide(); return false;" title="close"> </a>' +
529
- '<h3>Add a new post on ' + createLink.attr("adddate") + '</h3>' +
530
  '<div id="edcal-title-new-section">' +
531
- 'Post Title:<br />' +
532
  '<input type="text" class="text_input" id="edcal-title-new-field"/>' +
533
  '</div>' +
534
  '<div id="edit-slug-buttons">' +
535
- '<a class="save button disabled" id="newPostButton" href="#" adddate="' + date + '">Save Draft</a> ' +
536
- '<a class="save button disabled" id="newPostEditButton" href="#" adddate="' + date + '">Save and Edit Draft</a> ' +
537
- '<a href="#" onclick="jQuery(\'#tooltip\').hide(); return false;" class="cancel">Cancel</a>' +
538
  '</div>' +
539
  '</div>';
540
  return tooltip;
@@ -636,7 +634,7 @@ var edcal = {
636
  We want to set a class for the cell that represents the current day so we ca
637
  give it a background color.
638
  */
639
- jQuery('#' + Date.today().toString("ddMMMyyyy")).addClass("today");
640
  },
641
 
642
  /*
@@ -746,7 +744,7 @@ var edcal = {
746
  issue by adding the spaces back before we parse.
747
  */
748
  getDayFromDayId: function(/*dayId*/ day) {
749
- return Date.parse(day.substring(0, 2) + ' ' + day.substring(2, 5) + ' ' + day.substring(5));
750
  },
751
 
752
  /*
@@ -767,6 +765,102 @@ var edcal = {
767
 
768
  jQuery("#currentRange").text(firstDate.toString("MMMM yyyy") + " - " + lastDate.toString("MMMM yyyy"));
769
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
770
 
771
  /*
772
  * Moves the calendar to the specified date.
@@ -779,7 +873,7 @@ var edcal = {
779
  When we first start up our working date is 4 weeks before
780
  the next Sunday.
781
  */
782
- edcal._wDate = date.next().sunday().add(-28).days();
783
 
784
  /*
785
  After we remove and readd all the rows we are back to
@@ -885,8 +979,8 @@ var edcal = {
885
  }
886
  });
887
 
888
- edcal.getPosts(Date.today().next().sunday().add(-28).days(),
889
- Date.today().next().sunday().add(35).days());
890
 
891
  /*
892
  Now we bind the listeners for all of our links and the window
@@ -1002,7 +1096,7 @@ var edcal = {
1002
  * post item.
1003
  */
1004
  if (res.error === edcal.NONCE_ERROR) {
1005
- edcal.showError("Invalid checksum for post. This is commonly a cross-site scripting error.");
1006
  }
1007
  return;
1008
  }
@@ -1026,7 +1120,7 @@ var edcal = {
1026
  error: function(xhr) {
1027
  jQuery("#edit-slug-buttons").removeClass("tiploading");
1028
  jQuery('#tooltip').hide();
1029
- edcal.showError("There was an error contacting your blog.");
1030
  if (xhr.responseText) {
1031
  edcal.output("xhr.responseText: " + xhr.responseText);
1032
  }
@@ -1101,16 +1195,16 @@ var edcal = {
1101
  */
1102
  edcal.removePostItem(newdate, "post-" + res.post.id);
1103
  if (res.error === edcal.CONCURRENCY_ERROR) {
1104
- edcal.showError("Someone else already moved " + res.post.title);
1105
  } else if (res.error === edcal.PERMISSION_ERROR) {
1106
- edcal.showError("You don't have permission to edit posts");
1107
  } else if (res.error === edcal.NONCE_ERROR) {
1108
- edcal.showError("Invalid checksum for post. This is commonly a cross-site scripting error.");
1109
  }
1110
  }
1111
  },
1112
  error: function(xhr) {
1113
- edcal.showError("There was an error contacting your blog.");
1114
  if (xhr.responseText) {
1115
  edcal.output("xhr.responseText: " + xhr.responseText);
1116
  }
@@ -1167,13 +1261,25 @@ var edcal = {
1167
  * post item.
1168
  */
1169
  if (parsedRes.error === edcal.NONCE_ERROR) {
1170
- edcal.showError("Invalid checksum for post. This is commonly a cross-site scripting error.");
1171
  }
1172
  return;
1173
  }
1174
  var postDates = [];
1175
  jQuery.each(parsedRes, function(i, post) {
1176
  if (post) {
 
 
 
 
 
 
 
 
 
 
 
 
1177
  edcal.removePostItem(post.date, "post-" + post.id);
1178
  edcal.addPostItem(post, post.date);
1179
  postDates[postDates.length] = post.date;
@@ -1198,7 +1304,7 @@ var edcal = {
1198
  }, 300);
1199
  },
1200
  error: function(xhr) {
1201
- edcal.showError("There was an error contacting your blog.");
1202
  if (xhr.responseText) {
1203
  edcal.output("xhr.responseText: " + xhr.responseText);
1204
  }
186
  /*
187
  This function creates the days header at the top of the
188
  calendar.
 
 
189
  */
190
  createDaysHeader: function() {
191
+ var html = '<div class="dayhead">' + edcal.str_day1 + '</div>';
192
+ html += '<div class="dayhead">' + edcal.str_day2 + '</div>';
193
+ html += '<div class="dayhead">' + edcal.str_day3 + '</div>';
194
+ html += '<div class="dayhead">' + edcal.str_day4 + '</div>';
195
+ html += '<div class="dayhead">' + edcal.str_day5 + '</div>';
196
+ html += '<div class="dayhead">' + edcal.str_day6 + '</div>';
197
+ html += '<div class="dayhead">' + edcal.str_day7 + '</div>';
198
 
199
  jQuery("#rowhead").append(html);
200
 
208
  createRow: function(/*jQuery*/ parent, /*bool*/ append) {
209
  var _date = edcal._wDate.clone();
210
 
211
+ var newrow = '<div class="rowcont" id="' + 'row' + edcal._wDate.toString("ddMMyyyy") + '">' +
212
+ '<div id="' + 'row' + edcal._wDate.toString("ddMMyyyy") + 'row" class="row">';
213
  for (var i = 0; i < 7; i++) {
214
+ newrow += '<div id="' + _date.toString("ddMMyyyy") + '" class="day ' +
215
+ _date.toString("dddd").toLowerCase() + ' month-' +
216
+ _date.toString("MM").toLowerCase() + '">';
217
 
218
  newrow += '<div class="dayobj">';
219
 
220
  newrow += '<div class="daylabel">';
221
+ newrow += '<a href="#" adddate="' + _date.toString("MMMM d") + '" class="daynewlink" title="' + edcal.str_newpost + _date.toString("MMMM d") + '" ' +
222
  'onclick="return false;">+</a>';
223
  if (_date.toString("dd") == "01") {
224
  newrow += _date.toString("MMM d");
229
 
230
  newrow += '<ul class="postlist">';
231
 
232
+ newrow += edcal.getPostItems(_date.toString("ddMMyyyy"));
233
 
234
  newrow += '</ul>';
235
 
238
  _date.add(1).days();
239
  }
240
 
241
+ newrow += '</div></div>';
242
 
243
  if (append) {
244
  parent.append(newrow);
247
  parent.prepend(newrow);
248
  }
249
 
250
+ edcal.alignGrid("#row" + edcal._wDate.toString("ddMMyyyy") + "row", 7, 14.2, 100, 0.25);
251
 
252
+ jQuery('#row' + edcal._wDate.toString("ddMMyyyy") + ' .day').each( function() {
253
  edcal.addTooltip(jQuery(this).attr("id"));
254
  });
255
 
256
+ edcal.draggablePost('#row' + edcal._wDate.toString("ddMMyyyy") + ' .post');
257
 
258
+ jQuery('#row' + edcal._wDate.toString("ddMMyyyy") + ' .day').droppable({
259
  hoverClass: 'day-active',
260
  accept: '.post',
261
  greedy: true,
298
  }
299
  });
300
 
301
+ return jQuery('row' + edcal._wDate.toString("ddMMyyyy"));
302
  },
303
 
304
  /*
353
  },
354
 
355
  /*
356
+ * Adds a post to an already existing calendar day.
357
  */
358
  addPostItem: function(/*post*/ post, /*string*/ dayobjId) {
359
  jQuery('#' + dayobjId + ' .postlist').append(edcal.createPostItem(post, dayobjId));
372
  * Confirms if you want to delete the specified post
373
  */
374
  confirmDelete: function(/*string*/ posttitle) {
375
+ if (confirm(edcal.str_del_msg1 + posttitle + edcal.str_del_msg2)) {
376
  return true;
377
  } else {
378
  return false;
406
  * post item.
407
  */
408
  if (res.error === edcal.NONCE_ERROR) {
409
+ edcal.showError(edcal.checksum_error);
410
  }
411
  }
412
  edcal.addPostItem(res.post, res.post.date);
414
  edcal.output("Finished saving the new title " + jQuery("#edcal-title-edit-field").val() + " for post " + postId);
415
  },
416
  error: function(xhr) {
417
+ edcal.showError(edcal.general_error);
418
  if (xhr.responseText) {
419
  edcal.output("xhr.responseText: " + xhr.responseText);
420
  }
467
  var tooltip = '<div class="tooltip">' +
468
  '<a href="#" id="tipclose" onclick="edcal.closeTooltip(); return false;" title="close"> </a>' +
469
  '<h3 id="edcal-title">' + posttitle +
470
+ ' <a href="#" onclick="edcal.editTitle(); return false;" class="edit-post-status" id="edcal-title-edit">' + edcal.str_edit + '</a>' +
471
  '</h3>' +
472
  '<div id="edcal-title-box">' +
473
  '<input type="text" postid="' + post.id + '" value="' + post.title + '" id="edcal-title-edit-field"/> &nbsp;&nbsp;' +
474
  '<span id="edit-slug-buttons">' +
475
  '<a class="save button" href="#" onclick="edcal.saveTitle(\'' + post.id + '\'); return false;">Save</a> ' +
476
+ '<a href="#" onclick="edcal.cancelEditTitle(\'' + post.title + '\'); return false;" class="cancel">' + edcal.str_cancel + '</a></span>' +
477
  '</div>' +
478
  '<p>' +
479
+ '<i>' + edcal.str_by + '</i> ' + post.author + ' <i>' + edcal.str_on + '</i> ' +
480
+ edcal.getDayFromDayId(post.date).toString("MMMM d, yyyy") + ' ' + edcal.str_at + ' ' +
481
  post.time +
482
  '</p>' +
483
  '<p>' +
484
+ edcal.str_status + '<b>' + post.status + '</b>' +
485
  '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
486
  if (post.editlink) {
487
  /*
489
  * then server won't send the edit link URL and we shouldn't
490
  * show the edit link
491
  */
492
+ tooltip += '<a href="' + post.editlink + '" title="' + edcal.str_edit + ' ' + post.title +
493
+ '">' + edcal.str_edit + '</a>&nbsp; | &nbsp;';
494
  }
495
 
496
  if (post.dellink) {
497
  tooltip += '<a class="submitdelete" href="' + post.dellink + '" ' +
498
  'onclick="return edcal.confirmDelete(\'' + post.title + '\');"' +
499
+ 'title="' + edcal.str_del + ' ' + post.title + '">' + edcal.str_del + '</a> &nbsp; | &nbsp;';
500
  }
501
 
502
+ tooltip += '<a href="' + post.permalink + '" title="' + edcal.str_view + ' ' + post.title + '">' + edcal.str_view + '</a>' +
503
  '</p>' +
504
  '</div>';
505
 
524
  bodyHandler: function() {
525
  var tooltip = '<div class="tooltip newposttip">' +
526
  '<a href="#" id="tipclose" onclick="jQuery(\'#tooltip\').hide(); return false;" title="close"> </a>' +
527
+ '<h3>' + edcal.str_newpost + createLink.attr("adddate") + '</h3>' +
528
  '<div id="edcal-title-new-section">' +
529
+ edcal.str_posttitle + '<br />' +
530
  '<input type="text" class="text_input" id="edcal-title-new-field"/>' +
531
  '</div>' +
532
  '<div id="edit-slug-buttons">' +
533
+ '<a class="save button disabled" id="newPostButton" href="#" adddate="' + date + '">' + edcal.str_savedraft + '</a> ' +
534
+ '<a class="save button disabled" id="newPostEditButton" href="#" adddate="' + date + '">' + edcal.str_saveandedit + '</a> ' +
535
+ '<a href="#" onclick="jQuery(\'#tooltip\').hide(); return false;" class="cancel">' + edcal.str_cancel + '</a>' +
536
  '</div>' +
537
  '</div>';
538
  return tooltip;
634
  We want to set a class for the cell that represents the current day so we ca
635
  give it a background color.
636
  */
637
+ jQuery('#' + Date.today().toString("ddMMyyyy")).addClass("today");
638
  },
639
 
640
  /*
744
  issue by adding the spaces back before we parse.
745
  */
746
  getDayFromDayId: function(/*dayId*/ day) {
747
+ return Date.parse(day.substring(0, 2) + '/' + day.substring(2, 4) + '/' + day.substring(4));
748
  },
749
 
750
  /*
765
 
766
  jQuery("#currentRange").text(firstDate.toString("MMMM yyyy") + " - " + lastDate.toString("MMMM yyyy"));
767
  },
768
+
769
+ /*
770
+ * We want the calendar to start on the day of the week that matches the country
771
+ * code in the locale. If their full locale is en-US, that means the country
772
+ * code is US.
773
+ *
774
+ * This is the full list of start of the week days from unicode.org
775
+ * http://unicode.org/repos/cldr/trunk/common/supplemental/supplementalData.xml
776
+ */
777
+ nextStartOfWeek: function(/*date*/ date) {
778
+ if (edcal.locale) {
779
+ var local = edcal.locale.toUpperCase();
780
+
781
+ if (edcal.endsWith(local, "AS") ||
782
+ edcal.endsWith(local, "AZ") ||
783
+ edcal.endsWith(local, "BW") ||
784
+ edcal.endsWith(local, "CA") ||
785
+ edcal.endsWith(local, "CN") ||
786
+ edcal.endsWith(local, "FO") ||
787
+ edcal.endsWith(local, "GB") ||
788
+ edcal.endsWith(local, "GE") ||
789
+ edcal.endsWith(local, "GL") ||
790
+ edcal.endsWith(local, "GU") ||
791
+ edcal.endsWith(local, "HK") ||
792
+ edcal.endsWith(local, "IE") ||
793
+ edcal.endsWith(local, "IL") ||
794
+ edcal.endsWith(local, "IN") ||
795
+ edcal.endsWith(local, "IS") ||
796
+ edcal.endsWith(local, "JM") ||
797
+ edcal.endsWith(local, "JP") ||
798
+ edcal.endsWith(local, "KG") ||
799
+ edcal.endsWith(local, "KR") ||
800
+ edcal.endsWith(local, "LA") ||
801
+ edcal.endsWith(local, "MH") ||
802
+ edcal.endsWith(local, "MN") ||
803
+ edcal.endsWith(local, "MO") ||
804
+ edcal.endsWith(local, "MP") ||
805
+ edcal.endsWith(local, "MT") ||
806
+ edcal.endsWith(local, "NZ") ||
807
+ edcal.endsWith(local, "PH") ||
808
+ edcal.endsWith(local, "PK") ||
809
+ edcal.endsWith(local, "SG") ||
810
+ edcal.endsWith(local, "SY") ||
811
+ edcal.endsWith(local, "TH") ||
812
+ edcal.endsWith(local, "TT") ||
813
+ edcal.endsWith(local, "TW") ||
814
+ edcal.endsWith(local, "UM") ||
815
+ edcal.endsWith(local, "US") ||
816
+ edcal.endsWith(local, "UZ") ||
817
+ edcal.endsWith(local, "VI") ||
818
+ edcal.endsWith(local, "ZW")) {
819
+ return date.next().sunday();
820
+ } else if (edcal.endsWith(local, "MV")) {
821
+ return date.next().friday();
822
+ } else if (edcal.endsWith(local, "AF") ||
823
+ edcal.endsWith(local, "BH") ||
824
+ edcal.endsWith(local, "DJ") ||
825
+ edcal.endsWith(local, "DZ") ||
826
+ edcal.endsWith(local, "EG") ||
827
+ edcal.endsWith(local, "ER") ||
828
+ edcal.endsWith(local, "ET") ||
829
+ edcal.endsWith(local, "IQ") ||
830
+ edcal.endsWith(local, "IR") ||
831
+ edcal.endsWith(local, "JO") ||
832
+ edcal.endsWith(local, "KE") ||
833
+ edcal.endsWith(local, "KW") ||
834
+ edcal.endsWith(local, "LY") ||
835
+ edcal.endsWith(local, "MA") ||
836
+ edcal.endsWith(local, "OM") ||
837
+ edcal.endsWith(local, "QA") ||
838
+ edcal.endsWith(local, "SA") ||
839
+ edcal.endsWith(local, "SD") ||
840
+ edcal.endsWith(local, "SO") ||
841
+ edcal.endsWith(local, "TN") ||
842
+ edcal.endsWith(local, "YE")) {
843
+ return date.next().saturday();
844
+ } else {
845
+ return date.next().monday();
846
+ }
847
+ } else {
848
+ /*
849
+ * If we have no locale set we'll assume American style
850
+ */
851
+ return date.next().sunday();
852
+ }
853
+ },
854
+
855
+ /*
856
+ * Just a little helper function to tell if a given string (str)
857
+ * ends with the given expression (expr). I could adding this
858
+ * function to the JavaScript string object, but I don't want to
859
+ * risk conflicts with other plugins.
860
+ */
861
+ endsWith: function(/*string*/ str, /*string*/ expr) {
862
+ return (str.match(expr+"$")==expr);
863
+ },
864
 
865
  /*
866
  * Moves the calendar to the specified date.
873
  When we first start up our working date is 4 weeks before
874
  the next Sunday.
875
  */
876
+ edcal._wDate = edcal.nextStartOfWeek(date).add(-28).days();
877
 
878
  /*
879
  After we remove and readd all the rows we are back to
979
  }
980
  });
981
 
982
+ edcal.getPosts(edcal.nextStartOfWeek(Date.today()).add(-28).days(),
983
+ edcal.nextStartOfWeek(Date.today()).add(35).days());
984
 
985
  /*
986
  Now we bind the listeners for all of our links and the window
1096
  * post item.
1097
  */
1098
  if (res.error === edcal.NONCE_ERROR) {
1099
+ edcal.showError(edcal.checksum_error);
1100
  }
1101
  return;
1102
  }
1120
  error: function(xhr) {
1121
  jQuery("#edit-slug-buttons").removeClass("tiploading");
1122
  jQuery('#tooltip').hide();
1123
+ edcal.showError(edcal.general_error);
1124
  if (xhr.responseText) {
1125
  edcal.output("xhr.responseText: " + xhr.responseText);
1126
  }
1195
  */
1196
  edcal.removePostItem(newdate, "post-" + res.post.id);
1197
  if (res.error === edcal.CONCURRENCY_ERROR) {
1198
+ edcal.showError(edcal.concurrency_error + '<br />' + res.post.title);
1199
  } else if (res.error === edcal.PERMISSION_ERROR) {
1200
+ edcal.showError(edcal.edcal.permission_error);
1201
  } else if (res.error === edcal.NONCE_ERROR) {
1202
+ edcal.showError(edcal.checksum_error);
1203
  }
1204
  }
1205
  },
1206
  error: function(xhr) {
1207
+ edcal.showError(edcal.general_error);
1208
  if (xhr.responseText) {
1209
  edcal.output("xhr.responseText: " + xhr.responseText);
1210
  }
1261
  * post item.
1262
  */
1263
  if (parsedRes.error === edcal.NONCE_ERROR) {
1264
+ edcal.showError(edcal.checksum_error);
1265
  }
1266
  return;
1267
  }
1268
  var postDates = [];
1269
  jQuery.each(parsedRes, function(i, post) {
1270
  if (post) {
1271
+ if (post.status === 'trash') {
1272
+ return;
1273
+ }
1274
+
1275
+ /*
1276
+ * In some non-English locales the date comes back as all lower case.
1277
+ * This is a problem since we use the date as the ID so we replace
1278
+ * the first letter of the month name with the same letter in upper
1279
+ * case to make sure we don't get into trouble.
1280
+ */
1281
+ post.date = post.date.replace(post.date.substring(2, 3), post.date.substring(2, 3).toUpperCase());
1282
+
1283
  edcal.removePostItem(post.date, "post-" + post.id);
1284
  edcal.addPostItem(post, post.date);
1285
  postDates[postDates.length] = post.date;
1304
  }, 300);
1305
  },
1306
  error: function(xhr) {
1307
+ edcal.showError(edcal.general_error);
1308
  if (xhr.responseText) {
1309
  edcal.output("xhr.responseText: " + xhr.responseText);
1310
  }
edcal.php CHANGED
@@ -18,7 +18,7 @@
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: An editorial calendar for managing the dates of your WordPress posts
21
- Version: 0.4
22
  Author: Mary Vogt and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
  */
@@ -29,6 +29,7 @@ add_action('wp_ajax_edcal_changetitle', 'edcal_changetitle' );
29
  add_action('admin_menu', 'edcal_list_add_management_page');
30
  add_action('wp_ajax_edcal_posts', 'edcal_posts' );
31
  add_action("admin_print_scripts", 'edcal_scripts');
 
32
 
33
  /*
34
  * This error code matches CONCURRENCY_ERROR from edcal.js
@@ -45,12 +46,17 @@ $EDCAL_PERMISSION_ERROR = "5";
45
  */
46
  $EDCAL_NONCE_ERROR = "6";
47
 
 
 
 
 
 
48
  /*
49
  * This function adds our calendar page to the admin UI
50
  */
51
  function edcal_list_add_management_page( ) {
52
  if ( function_exists('add_management_page') ) {
53
- $page = add_posts_page( 'Calendar', 'Calendar', 'manage_categories', 'posts_list', 'edcal_list_admin' );
54
  }
55
  }
56
 
@@ -99,10 +105,57 @@ function edcal_list_admin() {
99
  echo '</style>';
100
 
101
  ?>
102
- <!-- This is just a little script so we can pass the AJAX URL -->
103
  <script type="text/javascript">
104
  jQuery(document).ready(function(){
105
  edcal.ajax_url = '<?php echo wp_nonce_url(admin_url("admin-ajax.php"), "edit-calendar"); ?>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  });
107
  </script>
108
 
@@ -134,7 +187,7 @@ function edcal_list_admin() {
134
 
135
  <div class="wrap">
136
  <div class="icon32" id="icon-edit"><br/></div>
137
- <h2>Posts Calendar</h2>
138
 
139
  <div id="loadingcont">
140
  <div id="loading"> </div>
@@ -143,14 +196,14 @@ function edcal_list_admin() {
143
  <div id="topbar">
144
  <div id="topleft">
145
  <h2>
146
- <a href="#" title="Go back four weeks." class="prev page-numbers" id="prevmonth" style="border: none;">&laquo;</a>
147
  <span id="currentRange"></span>
148
- <a href="#" title="Skip ahead four weeks." class="next page-numbers" id="nextmonth" style="border: none;">&raquo;</a>
149
  </h2>
150
  </div>
151
 
152
  <div id="topright">
153
- <a href="#" id="moveToToday">Today</a>
154
  </div>
155
  </div>
156
 
@@ -191,8 +244,15 @@ function edcal_filter_where($where = '') {
191
  *
192
  */
193
  function edcal_scripts() {
194
- //wp_enqueue_script( "edcal-lib", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/edcallib.min.js"), array( 'jquery' ) );
195
- //return;
 
 
 
 
 
 
 
196
 
197
  /*
198
  * If you're using one of the specific libraries you should comment out the two lines
@@ -208,8 +268,6 @@ function edcal_scripts() {
208
  wp_enqueue_script( "tooltip", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/jquery.tooltip.js"), array( 'jquery' ) );
209
  wp_enqueue_script( "humanMsg", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/humanmsg.js"), array( 'jquery' ) );
210
 
211
-
212
- wp_enqueue_script( "date", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/date.js"), array( 'jquery' ) );
213
  wp_enqueue_script( "scrollable", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/tools.scrollable-1.1.2.js"), array( 'jquery' ) );
214
  wp_enqueue_script( "mouse-wheel", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/tools.scrollable.mousewheel-1.0.1.js"), array( 'jquery' ) );
215
 
@@ -273,7 +331,7 @@ function edcal_postJSON($post) {
273
  setup_postdata($post);
274
  ?>
275
  {
276
- "date" : "<?php the_time('d') ?><?php the_time('M') ?><?php the_time('Y') ?>",
277
  "time" : "<?php the_time() ?>",
278
  "url" : "<?php the_permalink(); ?>",
279
  "status" : "<?php echo(get_post_status()); ?>",
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: An editorial calendar for managing the dates of your WordPress posts
21
+ Version: 0.5
22
  Author: Mary Vogt and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
  */
29
  add_action('admin_menu', 'edcal_list_add_management_page');
30
  add_action('wp_ajax_edcal_posts', 'edcal_posts' );
31
  add_action("admin_print_scripts", 'edcal_scripts');
32
+ add_action("init", 'edcal_load_language');
33
 
34
  /*
35
  * This error code matches CONCURRENCY_ERROR from edcal.js
46
  */
47
  $EDCAL_NONCE_ERROR = "6";
48
 
49
+ function edcal_load_language() {
50
+ $plugin_dir = basename(dirname(__FILE__));
51
+ load_plugin_textdomain( 'editorial-calendar', 'wp-content/plugins/' . $plugin_dir . '/languages/', $plugin_dir . '/languages/' );
52
+ }
53
+
54
  /*
55
  * This function adds our calendar page to the admin UI
56
  */
57
  function edcal_list_add_management_page( ) {
58
  if ( function_exists('add_management_page') ) {
59
+ $page = add_posts_page( 'Calendar', __('Calendar', 'editorial-calendar'), 'manage_categories', 'posts_list', 'edcal_list_admin' );
60
  }
61
  }
62
 
105
  echo '</style>';
106
 
107
  ?>
108
+ <!-- This is just a little script so we can pass the AJAX URL and some localized strings -->
109
  <script type="text/javascript">
110
  jQuery(document).ready(function(){
111
  edcal.ajax_url = '<?php echo wp_nonce_url(admin_url("admin-ajax.php"), "edit-calendar"); ?>';
112
+
113
+ /*
114
+ * We want to show the day of the first day of the week to match the user's
115
+ * country code. The problem is that we can't just use the WordPress locale.
116
+ * If the locale was fr-FR so we started the week on Monday it would still
117
+ * say Sunday was the first day if we didn't have a proper language bundle
118
+ * for French. Therefore we must depend on the language bundle writers to
119
+ * specify the locale for the language they are adding.
120
+ *
121
+ */
122
+ edcal.locale = '<?php echo(__('en-US', 'editorial-calendar')) ?>';
123
+
124
+ /*
125
+ * These strings are all localized values. The WordPress localization mechanism
126
+ * doesn't really extend to JavaScript so we localize the strings in PHP and then
127
+ * pass the values to JavaScript.
128
+ */
129
+
130
+ edcal.str_on = '<?php echo(__('on', 'editorial-calendar')) ?>';
131
+ edcal.str_by = '<?php echo(__('by', 'editorial-calendar')) ?>';
132
+ edcal.str_at = '<?php echo(__('at', 'editorial-calendar')) ?>';
133
+
134
+ edcal.str_day1 = '<?php echo(__('Sunday', 'editorial-calendar')) ?>';
135
+ edcal.str_day2 = '<?php echo(__('Monday', 'editorial-calendar')) ?>';
136
+ edcal.str_day3 = '<?php echo(__('Tuesday', 'editorial-calendar')) ?>';
137
+ edcal.str_day4 = '<?php echo(__('Wednesday', 'editorial-calendar')) ?>';
138
+ edcal.str_day5 = '<?php echo(__('Thursday', 'editorial-calendar')) ?>';
139
+ edcal.str_day6 = '<?php echo(__('Friday', 'editorial-calendar')) ?>';
140
+ edcal.str_day7 = '<?php echo(__('Saturday', 'editorial-calendar')) ?>';
141
+
142
+ edcal.str_edit = '<?php echo(__('Edit', 'editorial-calendar')) ?>';
143
+ edcal.str_del = '<?php echo(__('Delete', 'editorial-calendar')) ?>';
144
+ edcal.str_view = '<?php echo(__('View', 'editorial-calendar')) ?>';
145
+ edcal.str_status = '<?php echo(__('Status:', 'editorial-calendar')) ?>';
146
+ edcal.str_cancel = '<?php echo(__('Cancel', 'editorial-calendar')) ?>';
147
+ edcal.str_posttitle = '<?php echo(__('Post Title:', 'editorial-calendar')) ?>';
148
+ edcal.str_savedraft = '<?php echo(__('Save Draft', 'editorial-calendar')) ?>';
149
+ edcal.str_saveandedit = '<?php echo(__('Save and Edit Draft', 'editorial-calendar')) ?>';
150
+ edcal.str_newpost = '<?php echo(__('Add a new post on ', 'editorial-calendar')) ?>';
151
+
152
+ edcal.str_del_msg1 = '<?php echo(__('You are about to delete this post ', 'editorial-calendar')) ?>';
153
+ edcal.str_del_msg2 = '<?php echo(__('Press cancel to stop, OK to delete.', 'editorial-calendar')) ?>';
154
+
155
+ edcal.concurrency_error = '<?php echo(__('Looks like someone else already moved this post.', 'editorial-calendar')) ?>';
156
+ edcal.permission_error = '<?php echo(__('You do not have permission to edit posts.', 'editorial-calendar')) ?>';
157
+ edcal.checksum_error = '<?php echo(__('Invalid checksum for post. This is commonly a cross-site scripting error.', 'editorial-calendar')) ?>';
158
+ edcal.general_error = '<?php echo(__('There was an error contacting your blog.', 'editorial-calendar')) ?>';
159
  });
160
  </script>
161
 
187
 
188
  <div class="wrap">
189
  <div class="icon32" id="icon-edit"><br/></div>
190
+ <h2><?php echo(__('Posts Calendar', 'editorial-calendar')) ?></h2>
191
 
192
  <div id="loadingcont">
193
  <div id="loading"> </div>
196
  <div id="topbar">
197
  <div id="topleft">
198
  <h2>
199
+ <a href="#" title="<?php echo(__('Go back four weeks.', 'editorial-calendar')) ?>" class="prev page-numbers" id="prevmonth" style="border: none;">&laquo;</a>
200
  <span id="currentRange"></span>
201
+ <a href="#" title="<?php echo(__('Skip ahead four weeks.', 'editorial-calendar')) ?>" class="next page-numbers" id="nextmonth" style="border: none;">&raquo;</a>
202
  </h2>
203
  </div>
204
 
205
  <div id="topright">
206
+ <a href="#" id="moveToToday"><?php echo(__('Today', 'editorial-calendar')) ?></a>
207
  </div>
208
  </div>
209
 
244
  *
245
  */
246
  function edcal_scripts() {
247
+ /*
248
+ * To get proper localization for dates we need to include the correct JavaScript file for the current
249
+ * locale. We can do this based on the locale in the localized bundle to make sure the date locale matches
250
+ * the locale for the other strings.
251
+ */
252
+ wp_enqueue_script( "date", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/languages/date-".__('en-US', 'editorial-calendar').".js"), array( 'jquery' ) );
253
+
254
+ wp_enqueue_script( "edcal-lib", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/edcallib.min.js"), array( 'jquery' ) );
255
+ return;
256
 
257
  /*
258
  * If you're using one of the specific libraries you should comment out the two lines
268
  wp_enqueue_script( "tooltip", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/jquery.tooltip.js"), array( 'jquery' ) );
269
  wp_enqueue_script( "humanMsg", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/humanmsg.js"), array( 'jquery' ) );
270
 
 
 
271
  wp_enqueue_script( "scrollable", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/tools.scrollable-1.1.2.js"), array( 'jquery' ) );
272
  wp_enqueue_script( "mouse-wheel", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/tools.scrollable.mousewheel-1.0.1.js"), array( 'jquery' ) );
273
 
331
  setup_postdata($post);
332
  ?>
333
  {
334
+ "date" : "<?php the_time('d') ?><?php the_time('m') ?><?php the_time('Y') ?>",
335
  "time" : "<?php the_time() ?>",
336
  "url" : "<?php the_permalink(); ?>",
337
  "status" : "<?php echo(get_post_status()); ?>",
languages/editorial-calendar-hr.mo ADDED
Binary file
languages/editorial-calendar-hr.po ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of the WordPress plugin by .
2
+ # Copyright (C) 2010
3
+ # This file is distributed under the same license as the package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: \n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
10
+ "POT-Creation-Date: 2010-01-02 21:49+0000\n"
11
+ "PO-Revision-Date: 2010-01-02 18:01-0500\n"
12
+ "Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=utf-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+
18
+ #: edcal.php:53
19
+ msgid "Calendar"
20
+ msgstr "Kalendar"
21
+
22
+ #: edcal.php:116
23
+ msgid "en-US"
24
+ msgstr "hr-HR"
25
+
26
+ #: edcal.php:124
27
+ msgid "on"
28
+ msgstr "na"
29
+
30
+ #: edcal.php:125
31
+ msgid "by"
32
+ msgstr "do"
33
+
34
+ #: edcal.php:126
35
+ msgid "at"
36
+ msgstr "u"
37
+
38
+ #: edcal.php:128
39
+ msgid "Sunday"
40
+ msgstr "Nedjelja"
41
+
42
+ #: edcal.php:129
43
+ msgid "Monday"
44
+ msgstr "Ponedjeljak"
45
+
46
+ #: edcal.php:130
47
+ msgid "Tuesday"
48
+ msgstr "Utorak"
49
+
50
+ #: edcal.php:131
51
+ msgid "Wednesday"
52
+ msgstr "Srijeda"
53
+
54
+ #: edcal.php:132
55
+ msgid "Thursday"
56
+ msgstr "Cetvrtak"
57
+
58
+ #: edcal.php:133
59
+ msgid "Friday"
60
+ msgstr "Petar"
61
+
62
+ #: edcal.php:134
63
+ msgid "Saturday"
64
+ msgstr "Subota"
65
+
66
+ #: edcal.php:136
67
+ msgid "Edit"
68
+ msgstr "Uredi"
69
+
70
+ #: edcal.php:137
71
+ msgid "Delete"
72
+ msgstr "Izbrisi"
73
+
74
+ #: edcal.php:138
75
+ msgid "View"
76
+ msgstr "Pregledaj"
77
+
78
+ #: edcal.php:139
79
+ msgid "Status:"
80
+ msgstr "Status:"
81
+
82
+ #: edcal.php:140
83
+ msgid "Cancel"
84
+ msgstr "Prekini"
85
+
86
+ #: edcal.php:141
87
+ msgid "Post Title:"
88
+ msgstr "Naslov clanka:"
89
+
90
+ #: edcal.php:142
91
+ msgid "Save Draft"
92
+ msgstr "Spremite predlozak"
93
+
94
+ #: edcal.php:143
95
+ msgid "Save and Edit Draft"
96
+ msgstr "Spremite predlozak i uredite ga"
97
+
98
+ #: edcal.php:144
99
+ msgid "Add a new post on "
100
+ msgstr "Dodajte novi clanak za "
101
+
102
+ #: edcal.php:146
103
+ msgid "You are about to delete this post "
104
+ msgstr "Izbrisati cete clanak "
105
+
106
+ #: edcal.php:147
107
+ msgid "Press cancel to stop, OK to delete."
108
+ msgstr "Kliknite prekini kako biste zaustavili akciju, Ok kako biste izbrisali."
109
+
110
+ #: edcal.php:149
111
+ msgid "Looks like someone else already moved this post."
112
+ msgstr "Cini se da je netko vec premjestio ovaj clanak."
113
+
114
+ #: edcal.php:150
115
+ msgid "You do not have permission to edit posts."
116
+ msgstr "Niste ovlasteni za uredivanje clanaka."
117
+
118
+ #: edcal.php:151
119
+ msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
120
+ msgstr "Invalid checksum za clanak. Ovo je cesta cross-site scripting greska."
121
+
122
+ #: edcal.php:152
123
+ msgid "There was an error contacting your blog."
124
+ msgstr "Doslo je do greske prilikom kontaktiranja vaseg bloga."
125
+
126
+ #: edcal.php:184
127
+ msgid "Posts Calendar"
128
+ msgstr "Kalendar clanaka."
129
+
130
+ #: edcal.php:193
131
+ msgid "Go back four weeks."
132
+ msgstr "Vratite se 4 tjedna unazad."
133
+
134
+ #: edcal.php:195
135
+ msgid "Skip ahead four weeks."
136
+ msgstr "Preskocite 4 tjedna."
137
+
138
+ #: edcal.php:200
139
+ msgid "Today"
140
+ msgstr "Danas"
141
+
lib/edcallib.min.js CHANGED
@@ -1,134 +1,99 @@
1
- var a;
2
- Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb",
3
- "Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,
4
- feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,
5
- tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",
6
- PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};Date.getMonthNumberFromName=function(b){var c=Date.CultureInfo.monthNames,d=Date.CultureInfo.abbreviatedMonthNames;b=b.toLowerCase();for(var e=0;e<c.length;e++)if(c[e].toLowerCase()==b||d[e].toLowerCase()==b)return e;return-1};
7
- Date.getDayNumberFromName=function(b){var c=Date.CultureInfo.dayNames,d=Date.CultureInfo.abbreviatedDayNames;b=b.toLowerCase();for(var e=0;e<c.length;e++)if(c[e].toLowerCase()==b||d[e].toLowerCase()==b)return e;return-1};Date.isLeapYear=function(b){return b%4===0&&b%100!==0||b%400===0};Date.getDaysInMonth=function(b,c){return[31,Date.isLeapYear(b)?29:28,31,30,31,30,31,31,30,31,30,31][c]};Date.getTimezoneOffset=function(b,c){return c?Date.CultureInfo.abbreviatedTimeZoneDST[b.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[b.toUpperCase()]};
8
- Date.getTimezoneAbbreviation=function(b,c){c=c?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard;var d;for(d in c)if(c[d]===b)return d;return null};a=Date.prototype;a.clone=function(){return new Date(this.getTime())};a.compareTo=function(b){if(isNaN(this))throw new Error(this);if(b instanceof Date&&!isNaN(b))return this>b?1:this<b?-1:0;else throw new TypeError(b);};a.equals=function(b){return this.compareTo(b)===0};
9
- a.between=function(b,c){var d=this.getTime();return d>=b.getTime()&&d<=c.getTime()};a.addMilliseconds=function(b){this.setMilliseconds(this.getMilliseconds()+b);return this};a.addSeconds=function(b){return this.addMilliseconds(b*1E3)};a.addMinutes=function(b){return this.addMilliseconds(b*6E4)};a.addHours=function(b){return this.addMilliseconds(b*36E5)};a.addDays=function(b){return this.addMilliseconds(b*864E5)};a.addWeeks=function(b){return this.addMilliseconds(b*6048E5)};
10
- a.addMonths=function(b){var c=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+b);this.setDate(Math.min(c,this.getDaysInMonth()));return this};a.addYears=function(b){return this.addMonths(b*12)};
11
- a.add=function(b){if(typeof b=="number"){this._orient=b;return this}if(b.millisecond||b.milliseconds)this.addMilliseconds(b.millisecond||b.milliseconds);if(b.second||b.seconds)this.addSeconds(b.second||b.seconds);if(b.minute||b.minutes)this.addMinutes(b.minute||b.minutes);if(b.hour||b.hours)this.addHours(b.hour||b.hours);if(b.month||b.months)this.addMonths(b.month||b.months);if(b.year||b.years)this.addYears(b.year||b.years);if(b.day||b.days)this.addDays(b.day||b.days);return this};
12
- Date._validate=function(b,c,d,e){if(typeof b!="number")throw new TypeError(b+" is not a Number.");else if(b<c||b>d)throw new RangeError(b+" is not a valid value for "+e+".");return true};Date.validateMillisecond=function(b){return Date._validate(b,0,999,"milliseconds")};Date.validateSecond=function(b){return Date._validate(b,0,59,"seconds")};Date.validateMinute=function(b){return Date._validate(b,0,59,"minutes")};Date.validateHour=function(b){return Date._validate(b,0,23,"hours")};
13
- Date.validateDay=function(b,c,d){return Date._validate(b,1,Date.getDaysInMonth(c,d),"days")};Date.validateMonth=function(b){return Date._validate(b,0,11,"months")};Date.validateYear=function(b){return Date._validate(b,1,9999,"seconds")};a=Date.prototype;
14
- a.set=function(b){if(!b.millisecond&&b.millisecond!==0)b.millisecond=-1;if(!b.second&&b.second!==0)b.second=-1;if(!b.minute&&b.minute!==0)b.minute=-1;if(!b.hour&&b.hour!==0)b.hour=-1;if(!b.day&&b.day!==0)b.day=-1;if(!b.month&&b.month!==0)b.month=-1;if(!b.year&&b.year!==0)b.year=-1;b.millisecond!=-1&&Date.validateMillisecond(b.millisecond)&&this.addMilliseconds(b.millisecond-this.getMilliseconds());b.second!=-1&&Date.validateSecond(b.second)&&this.addSeconds(b.second-this.getSeconds());b.minute!=-1&&
15
- Date.validateMinute(b.minute)&&this.addMinutes(b.minute-this.getMinutes());b.hour!=-1&&Date.validateHour(b.hour)&&this.addHours(b.hour-this.getHours());b.month!==-1&&Date.validateMonth(b.month)&&this.addMonths(b.month-this.getMonth());b.year!=-1&&Date.validateYear(b.year)&&this.addYears(b.year-this.getFullYear());b.day!=-1&&Date.validateDay(b.day,this.getFullYear(),this.getMonth())&&this.addDays(b.day-this.getDate());b.timezone&&this.setTimezone(b.timezone);b.timezoneOffset&&this.setTimezoneOffset(b.timezoneOffset);
16
- return this};a.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};a.isLeapYear=function(){var b=this.getFullYear();return b%4===0&&b%100!==0||b%400===0};a.isWeekday=function(){return!(this.is().sat()||this.is().sun())};a.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())};a.moveToFirstDayOfMonth=function(){return this.set({day:1})};a.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()})};
17
- a.moveToDayOfWeek=function(b,c){b=(b-this.getDay()+7*(c||+1))%7;return this.addDays(b===0?(b+=7*(c||+1)):b)};a.moveToMonth=function(b,c){b=(b-this.getMonth()+12*(c||+1))%12;return this.addMonths(b===0?(b+=12*(c||+1)):b)};a.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/864E5)};
18
- a.getWeekOfYear=function(b){var c=this.getFullYear(),d=this.getMonth(),e=this.getDate();b=b||Date.CultureInfo.firstDayOfWeek;var g=8-(new Date(c,0,1)).getDay();if(g==8)g=1;d=(Date.UTC(c,d,e,0,0,0)-Date.UTC(c,0,1,0,0,0))/864E5+1;d=Math.floor((d-g+7)/7);if(d===b){c--;c=8-(new Date(c,0,1)).getDay();d=c==2||c==8?53:52}return d};a.isDST=function(){console.log("isDST");return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D"};
19
- a.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST())};a.setTimezoneOffset=function(b){var c=this.getTimezoneOffset();this.addMinutes(Number(b)*-6/10-c);return this};a.setTimezone=function(b){return this.setTimezoneOffset(Date.getTimezoneOffset(b))};a.getUTCOffset=function(){var b=this.getTimezoneOffset()*-10/6;if(b<0){b=(b-1E4).toString();return b[0]+b.substr(2)}else{b=(b+1E4).toString();return"+"+b.substr(1)}};
20
- a.getDayName=function(b){return b?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()]};a.getMonthName=function(b){return b?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()]};a._toString=Date.prototype.toString;
21
- a.toString=function(b){var c=this,d=function(e){return e.toString().length==1?"0"+e:e};return b?b.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(e){switch(e){case "hh":return d(c.getHours()<13?c.getHours():c.getHours()-12);case "h":return c.getHours()<13?c.getHours():c.getHours()-12;case "HH":return d(c.getHours());case "H":return c.getHours();case "mm":return d(c.getMinutes());case "m":return c.getMinutes();case "ss":return d(c.getSeconds());case "s":return c.getSeconds();
22
- case "yyyy":return c.getFullYear();case "yy":return c.getFullYear().toString().substring(2,4);case "dddd":return c.getDayName();case "ddd":return c.getDayName(true);case "dd":return d(c.getDate());case "d":return c.getDate().toString();case "MMMM":return c.getMonthName();case "MMM":return c.getMonthName(true);case "MM":return d(c.getMonth()+1);case "M":return c.getMonth()+1;case "t":return c.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return c.getHours()<
23
- 12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "zzz":case "zz":case "z":return""}}):this._toString()};Date.now=function(){return new Date};Date.today=function(){return Date.now().clearTime()};a=Date.prototype;a._orient=+1;a.next=function(){this._orient=+1;return this};a.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this};a._is=false;a.is=function(){this._is=true;return this};Number.prototype._dateElement="day";
24
- Number.prototype.fromNow=function(){var b={};b[this._dateElement]=this;return Date.now().add(b)};Number.prototype.ago=function(){var b={};b[this._dateElement]=this*-1;return Date.now().add(b)};
25
- (function(){for(var b=Date.prototype,c=Number.prototype,d="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),e="january february march april may june july august september october november december".split(/\s/),g="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),m=function(k){return function(){if(this._is){this._is=false;return this.getDay()==k}return this.moveToDayOfWeek(k,this._orient)}},f=0;f<d.length;f++)b[d[f]]=b[d[f].substring(0,3)]=m(f);d=function(k){return function(){if(this._is){this._is=
26
- false;return this.getMonth()===k}return this.moveToMonth(k,this._orient)}};for(m=0;m<e.length;m++)b[e[m]]=b[e[m].substring(0,3)]=d(m);d=function(k){return function(){if(k.substring(k.length-1)!="s")k+="s";return this["add"+k](this._orient)}};m=function(k){return function(){this._dateElement=k;return this}};for(f=0;f<g.length;f++){e=g[f].toLowerCase();b[e]=b[e+"s"]=d(g[f]);c[e]=c[e+"s"]=m(e)}})();a=Date.prototype;a.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ")};
27
- a.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern)};a.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern)};a.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern)};a.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern)};
28
- a.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};
29
- (function(){Date.Parsing={Exception:function(f){this.message="Parse error at '"+f.substring(0,10)+" ...'"}};for(var b=Date.Parsing,c=b.Operators={rtoken:function(f){return function(k){var h=k.match(f);if(h)return[h[0],k.substring(h[0].length)];else throw new b.Exception(k);}},token:function(){return function(f){return c.rtoken(new RegExp("^s*"+f+"s*"))(f)}},stoken:function(f){return c.rtoken(new RegExp("^"+f))},until:function(f){return function(k){for(var h=[],i=null;k.length;){try{i=f.call(this,
30
- k)}catch(l){h.push(i[0]);k=i[1];continue}break}return[h,k]}},many:function(f){return function(k){for(var h=[],i=null;k.length;){try{i=f.call(this,k)}catch(l){return[h,k]}h.push(i[0]);k=i[1]}return[h,k]}},optional:function(f){return function(k){var h=null;try{h=f.call(this,k)}catch(i){return[null,k]}return[h[0],h[1]]}},not:function(f){return function(k){try{f.call(this,k)}catch(h){return[null,k]}throw new b.Exception(k);}},ignore:function(f){return f?function(k){var h=null;h=f.call(this,k);return[null,
31
- h[1]]}:null},product:function(){for(var f=arguments[0],k=Array.prototype.slice.call(arguments,1),h=[],i=0;i<f.length;i++)h.push(c.each(f[i],k));return h},cache:function(f){var k={},h=null;return function(i){try{h=k[i]=k[i]||f.call(this,i)}catch(l){h=k[i]=l}if(h instanceof b.Exception)throw h;else return h}},any:function(){var f=arguments;return function(k){for(var h=null,i=0;i<f.length;i++)if(f[i]!=null){try{h=f[i].call(this,k)}catch(l){h=null}if(h)return h}throw new b.Exception(k);}},each:function(){var f=
32
- arguments;return function(k){for(var h=[],i=null,l=0;l<f.length;l++)if(f[l]!=null){try{i=f[l].call(this,k)}catch(o){throw new b.Exception(k);}h.push(i[0]);k=i[1]}return[h,k]}},all:function(){var f=f;return f.each(f.optional(arguments))},sequence:function(f,k,h){k=k||c.rtoken(/^\s*/);h=h||null;if(f.length==1)return f[0];return function(i){for(var l=null,o=null,q=[],t=0;t<f.length;t++){try{l=f[t].call(this,i)}catch(s){break}q.push(l[0]);try{o=k.call(this,l[1])}catch(p){o=null;break}i=o[1]}if(!l)throw new b.Exception(i);
33
- if(o)throw new b.Exception(o[1]);if(h)try{l=h.call(this,l[1])}catch(v){throw new b.Exception(l[1]);}return[q,l?l[1]:i]}},between:function(f,k,h){h=h||f;var i=c.each(c.ignore(f),k,c.ignore(h));return function(l){l=i.call(this,l);return[[l[0][0],r[0][2]],l[1]]}},list:function(f,k,h){k=k||c.rtoken(/^\s*/);h=h||null;return f instanceof Array?c.each(c.product(f.slice(0,-1),c.ignore(k)),f.slice(-1),c.ignore(h)):c.each(c.many(c.each(f,c.ignore(k))),px,c.ignore(h))},set:function(f,k,h){k=k||c.rtoken(/^\s*/);
34
- h=h||null;return function(i){var l=null;for(var o=l=null,q=null,t=[[],i],s=false,p=0;p<f.length;p++){l=o=null;s=f.length==1;try{l=f[p].call(this,i)}catch(v){continue}q=[[l[0]],l[1]];if(l[1].length>0&&!s)try{o=k.call(this,l[1])}catch(x){s=true}else s=true;if(!s&&o[1].length===0)s=true;if(!s){l=[];for(s=0;s<f.length;s++)p!=s&&l.push(f[s]);l=c.set(l,k).call(this,o[1]);if(l[0].length>0){q[0]=q[0].concat(l[0]);q[1]=l[1]}}if(q[1].length<t[1].length)t=q;if(t[1].length===0)break}if(t[0].length===0)return t;
35
- if(h){try{o=h.call(this,t[1])}catch(j){throw new b.Exception(t[1]);}t[1]=o[1]}return t}},forward:function(f,k){return function(h){return f[k].call(this,h)}},replace:function(f,k){return function(h){h=f.call(this,h);return[k,h[1]]}},process:function(f,k){return function(h){h=f.call(this,h);return[k.call(this,h[0]),h[1]]}},min:function(f,k){return function(h){var i=k.call(this,h);if(i[0].length<f)throw new b.Exception(h);return i}}},d=function(f){return function(){var k=null,h=[];if(arguments.length>
36
- 1)k=Array.prototype.slice.call(arguments);else if(arguments[0]instanceof Array)k=arguments[0];if(k)for(var i=k.shift();0<i.length;){k.unshift(i[0]);h.push(f.apply(null,k));k.shift();return h}else return f.apply(null,arguments)}},e="optional not ignore cache".split(/\s/),g=0;g<e.length;g++)c[e[g]]=d(c[e[g]]);var m=function(f){return function(){return arguments[0]instanceof Array?f.apply(null,arguments[0]):f.apply(null,arguments)}};e="each any all".split(/\s/);for(g=0;g<e.length;g++)c[e[g]]=m(c[e[g]])})();
37
- (function(){var b=function(h){for(var i=[],l=0;l<h.length;l++)if(h[l]instanceof Array)i=i.concat(b(h[l]));else h[l]&&i.push(h[l]);return i};Date.Grammar={};Date.Translator={hour:function(h){return function(){this.hour=Number(h)}},minute:function(h){return function(){this.minute=Number(h)}},second:function(h){return function(){this.second=Number(h)}},meridian:function(h){return function(){this.meridian=h.slice(0,1).toLowerCase()}},timezone:function(h){return function(){var i=h.replace(/[^\d\+\-]/g,
38
- "");if(i.length)this.timezoneOffset=Number(i);else this.timezone=h.toLowerCase()}},day:function(h){var i=h[0];return function(){this.day=Number(i.match(/\d+/)[0])}},month:function(h){return function(){this.month=h.length==3?Date.getMonthNumberFromName(h):Number(h)-1}},year:function(h){return function(){var i=Number(h);this.year=h.length>2?i:i+(i+2E3<Date.CultureInfo.twoDigitYearMax?2E3:1900)}},rday:function(h){return function(){switch(h){case "yesterday":this.days=-1;break;case "tomorrow":this.days=
39
- 1;break;case "today":this.days=0;break;case "now":this.days=0;this.now=true;break}}},finishExact:function(h){h=h instanceof Array?h:[h];var i=new Date;this.year=i.getFullYear();this.month=i.getMonth();this.day=1;for(i=this.second=this.minute=this.hour=0;i<h.length;i++)h[i]&&h[i].call(this);this.hour=this.meridian=="p"&&this.hour<13?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");h=new Date(this.year,this.month,
40
- this.day,this.hour,this.minute,this.second);if(this.timezone)h.set({timezone:this.timezone});else this.timezoneOffset&&h.set({timezoneOffset:this.timezoneOffset});return h},finish:function(h){h=h instanceof Array?b(h):[h];if(h.length===0)return null;for(var i=0;i<h.length;i++)typeof h[i]=="function"&&h[i].call(this);if(this.now)return new Date;h=Date.today();if(this.days!=null||this.orient||this.operator){var l,o;o=this.orient=="past"||this.operator=="subtract"?-1:1;if(this.weekday){this.unit="day";
41
- i=Date.getDayNumberFromName(this.weekday)-h.getDay();l=7;this.days=i?(i+o*l)%l:o*l}if(this.month){this.unit="month";i=this.month-h.getMonth();l=12;this.months=i?(i+o*l)%l:o*l;this.month=null}if(!this.unit)this.unit="day";if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value)this.value=1;if(this.unit=="week"){this.unit="day";this.value*=7}this[this.unit+"s"]=this.value*o}return h.add(this)}else{if(this.meridian&&this.hour)this.hour=this.hour<13&&this.meridian=="p"?this.hour+12:this.hour;
42
- if(this.weekday&&!this.day)this.day=h.addDays(Date.getDayNumberFromName(this.weekday)-h.getDay()).getDate();if(this.month&&!this.day)this.day=1;return h.set(this)}}};var c=Date.Parsing.Operators,d=Date.Grammar,e=Date.Translator,g;d.datePartDelimiter=c.rtoken(/^([\s\-\.\,\/\x27]+)/);d.timePartDelimiter=c.stoken(":");d.whiteSpace=c.rtoken(/^\s*/);d.generalDelimiter=c.rtoken(/^(([\s\,]|at|on)+)/);var m={};d.ctoken=function(h){var i=m[h];if(!i){i=Date.CultureInfo.regexPatterns;for(var l=h.split(/\s+/),
43
- o=[],q=0;q<l.length;q++)o.push(c.replace(c.rtoken(i[l[q]]),l[q]));i=m[h]=c.any.apply(null,o)}return i};d.ctoken2=function(h){return c.rtoken(Date.CultureInfo.regexPatterns[h])};d.h=c.cache(c.process(c.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),e.hour));d.hh=c.cache(c.process(c.rtoken(/^(0[0-9]|1[0-2])/),e.hour));d.H=c.cache(c.process(c.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),e.hour));d.HH=c.cache(c.process(c.rtoken(/^([0-1][0-9]|2[0-3])/),e.hour));d.m=c.cache(c.process(c.rtoken(/^([0-5][0-9]|[0-9])/),e.minute));
44
- d.mm=c.cache(c.process(c.rtoken(/^[0-5][0-9]/),e.minute));d.s=c.cache(c.process(c.rtoken(/^([0-5][0-9]|[0-9])/),e.second));d.ss=c.cache(c.process(c.rtoken(/^[0-5][0-9]/),e.second));d.hms=c.cache(c.sequence([d.H,d.mm,d.ss],d.timePartDelimiter));d.t=c.cache(c.process(d.ctoken2("shortMeridian"),e.meridian));d.tt=c.cache(c.process(d.ctoken2("longMeridian"),e.meridian));d.z=c.cache(c.process(c.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),e.timezone));d.zz=c.cache(c.process(c.rtoken(/^(\+|\-)\s*\d\d\d\d/),e.timezone));
45
- d.zzz=c.cache(c.process(d.ctoken2("timezone"),e.timezone));d.timeSuffix=c.each(c.ignore(d.whiteSpace),c.set([d.tt,d.zzz]));d.time=c.each(c.optional(c.ignore(c.stoken("T"))),d.hms,d.timeSuffix);d.d=c.cache(c.process(c.each(c.rtoken(/^([0-2]\d|3[0-1]|\d)/),c.optional(d.ctoken2("ordinalSuffix"))),e.day));d.dd=c.cache(c.process(c.each(c.rtoken(/^([0-2]\d|3[0-1])/),c.optional(d.ctoken2("ordinalSuffix"))),e.day));d.ddd=d.dddd=c.cache(c.process(d.ctoken("sun mon tue wed thu fri sat"),function(h){return function(){this.weekday=
46
- h}}));d.M=c.cache(c.process(c.rtoken(/^(1[0-2]|0\d|\d)/),e.month));d.MM=c.cache(c.process(c.rtoken(/^(1[0-2]|0\d)/),e.month));d.MMM=d.MMMM=c.cache(c.process(d.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),e.month));d.y=c.cache(c.process(c.rtoken(/^(\d\d?)/),e.year));d.yy=c.cache(c.process(c.rtoken(/^(\d\d)/),e.year));d.yyy=c.cache(c.process(c.rtoken(/^(\d\d?\d?\d?)/),e.year));d.yyyy=c.cache(c.process(c.rtoken(/^(\d\d\d\d)/),e.year));g=function(){return c.each(c.any.apply(null,arguments),
47
- c.not(d.ctoken2("timeContext")))};d.day=g(d.d,d.dd);d.month=g(d.M,d.MMM);d.year=g(d.yyyy,d.yy);d.orientation=c.process(d.ctoken("past future"),function(h){return function(){this.orient=h}});d.operator=c.process(d.ctoken("add subtract"),function(h){return function(){this.operator=h}});d.rday=c.process(d.ctoken("yesterday tomorrow today now"),e.rday);d.unit=c.process(d.ctoken("minute hour day week month year"),function(h){return function(){this.unit=h}});d.value=c.process(c.rtoken(/^\d\d?(st|nd|rd|th)?/),
48
- function(h){return function(){this.value=h.replace(/\D/g,"")}});d.expression=c.set([d.rday,d.operator,d.value,d.unit,d.orientation,d.ddd,d.MMM]);g=function(){return c.set(arguments,d.datePartDelimiter)};d.mdy=g(d.ddd,d.month,d.day,d.year);d.ymd=g(d.ddd,d.year,d.month,d.day);d.dmy=g(d.ddd,d.day,d.month,d.year);d.date=function(h){return(d[Date.CultureInfo.dateElementOrder]||d.mdy).call(this,h)};d.format=c.process(c.many(c.any(c.process(c.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),
49
- function(h){if(d[h])return d[h];else throw Date.Parsing.Exception(h);}),c.process(c.rtoken(/^[^dMyhHmstz]+/),function(h){return c.ignore(c.stoken(h))}))),function(h){return c.process(c.each.apply(null,h),e.finishExact)});var f={},k=function(h){return f[h]=f[h]||d.format(h)[0]};d.formats=function(h){if(h instanceof Array){for(var i=[],l=0;l<h.length;l++)i.push(k(h[l]));return c.any.apply(null,i)}else return k(h)};d._formats=d.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz",
50
- "d"]);d._start=c.process(c.set([d.date,d.time,d.expression],d.generalDelimiter,d.whiteSpace),e.finish);d.start=function(h){try{var i=d._formats.call({},h);if(i[1].length===0)return i}catch(l){}return d._start.call({},h)}})();Date._parse=Date.parse;Date.parse=function(b){var c=null;if(!b)return null;try{c=Date.Grammar.start.call({},b)}catch(d){return null}return c[1].length===0?c[0]:null};
51
- Date.getParseFunction=function(b){var c=Date.Grammar.formats(b);return function(d){var e=null;try{e=c.call({},d)}catch(g){return null}return e[1].length===0?e[0]:null}};Date.parseExact=function(b,c){return Date.getParseFunction(c)(b)};if(!this.JSON)this.JSON={};
52
- (function(){function b(i){return i<10?"0"+i:i}function c(i){g.lastIndex=0;return g.test(i)?'"'+i.replace(g,function(l){var o=k[l];return typeof o==="string"?o:"\\u"+("0000"+l.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'}function d(i,l){var o,q,t=m,s,p=l[i];if(p&&typeof p==="object"&&typeof p.toJSON==="function")p=p.toJSON(i);if(typeof h==="function")p=h.call(l,i,p);switch(typeof p){case "string":return c(p);case "number":return isFinite(p)?String(p):"null";case "boolean":case "null":return String(p);case "object":if(!p)return"null";
53
- m+=f;s=[];if(Object.prototype.toString.apply(p)==="[object Array]"){q=p.length;for(i=0;i<q;i+=1)s[i]=d(i,p)||"null";l=s.length===0?"[]":m?"[\n"+m+s.join(",\n"+m)+"\n"+t+"]":"["+s.join(",")+"]";m=t;return l}if(h&&typeof h==="object"){q=h.length;for(i=0;i<q;i+=1){o=h[i];if(typeof o==="string")if(l=d(o,p))s.push(c(o)+(m?": ":":")+l)}}else for(o in p)if(Object.hasOwnProperty.call(p,o))if(l=d(o,p))s.push(c(o)+(m?": ":":")+l);l=s.length===0?"{}":m?"{\n"+m+s.join(",\n"+m)+"\n"+t+"}":"{"+s.join(",")+"}";
54
- m=t;return l}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
55
- g=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,m,f,k={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h;if(typeof JSON.stringify!=="function")JSON.stringify=function(i,l,o){var q;f=m="";if(typeof o==="number")for(q=0;q<o;q+=1)f+=" ";else if(typeof o==="string")f=o;if((h=l)&&typeof l!=="function"&&(typeof l!=="object"||typeof l.length!=="number"))throw new Error("JSON.stringify");return d("",
56
- {"":i})};if(typeof JSON.parseIt!=="function")JSON.parseIt=function(i,l){function o(q,t){var s,p,v=q[t];if(v&&typeof v==="object")for(s in v)if(Object.hasOwnProperty.call(v,s)){p=o(v,s);if(p!==undefined)v[s]=p;else delete v[s]}return l.call(q,t,v)}e.lastIndex=0;if(e.test(i))i=i.replace(e,function(q){return"\\u"+("0000"+q.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(i.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
57
- "]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){i=eval("("+i+")");return typeof l==="function"?o({"":i},""):i}throw new SyntaxError("JSON.parseIt");}})();(function(b){function c(e,g){function m(j){var n=b(j);return g.globalNav?n:e.parent().find(j)}var f=this,k=b(this),h=!g.vertical,i=e.children(),l=0,o;d||(d=f);b.each(g,function(j,n){b.isFunction(n)&&k.bind(j,n)});if(i.length>1)i=b(g.items,e);e.data("finder",m);var q=m(g.prev),t=m(g.next),s=m(g.prevPage),p=m(g.nextPage);b.extend(f,{getIndex:function(){return l},getClickIndex:function(){var j=f.getItems();return j.index(j.filter("."+g.activeClass))},getConf:function(){return g},getSize:function(){return f.getItems().size()},
58
- getPageAmount:function(){return Math.ceil(this.getSize()/g.size)},getPageIndex:function(){return Math.ceil(l/g.size)},getNaviButtons:function(){return q.add(t).add(s).add(p)},getRoot:function(){return e},getItemWrap:function(){return i},getItems:function(){return i.children(g.item)},getVisibleItems:function(){return f.getItems().slice(l,l+g.size)},seekTo:function(j,n,u){function w(){u&&u.call(f,j);k.trigger("onSeek",[j])}if(j<0)j=0;if(l===j)return f;if(b.isFunction(n))u=n;if(j>f.getSize()-g.size)return g.loop?
59
- f.begin():this.end();var y=f.getItems().eq(j);if(!y.length)return f;var z=b.Event("onBeforeSeek");k.trigger(z,j>l);if(z.isDefaultPrevented())return f;if(n===undefined||b.isFunction(n))n=g.speed;h?i.animate({left:-y.position().left},n,g.easing,w):i.animate({top:-y.position().top},n,g.easing,w);d=f;l=j;z=b.Event("onStart");k.trigger(z,[j]);if(z.isDefaultPrevented())return f;q.add(s).toggleClass(g.disabledClass,j===0);t.add(p).toggleClass(g.disabledClass,j>=f.getSize()-g.size);return f},move:function(j,
60
- n,u){o=j>0;return this.seekTo(l+j,n,u)},next:function(j,n){return this.move(1,j,n)},prev:function(j,n){return this.move(-1,j,n)},movePage:function(j,n,u){o=j>0;var w=g.size*j,y=l%g.size;if(y>0)w+=j>0?-y:g.size-y;return this.move(w,n,u)},prevPage:function(j,n){return this.movePage(-1,j,n)},nextPage:function(j,n){return this.movePage(1,j,n)},setPage:function(j,n,u){return this.seekTo(j*g.size,n,u)},begin:function(j,n){o=false;return this.seekTo(0,j,n)},end:function(j,n){o=true;var u=this.getSize()-
61
- g.size;return u>0?this.seekTo(u,j,n):f},reload:function(){k.trigger("onReload");return f},focus:function(){return d=f},click:function(j){var n=f.getItems().eq(j),u=g.activeClass,w=g.size;if(j<0||j>=f.getSize())return f;if(w==1){if(g.loop)return f.next();if(j===0||j==f.getSize()-1)o=o===undefined?true:!o;return o===false?f.prev():f.next()}if(w==2){j==l&&j--;f.getItems().removeClass(u);n.addClass(u);return f.seekTo(j,time,fn)}if(!n.hasClass(u)){f.getItems().removeClass(u);n.addClass(u);n=Math.floor(w/
62
- 2);n=j-n;if(n>f.getSize()-w)n=f.getSize()-w;if(n!==j)return f.seekTo(n)}return f},bind:function(j,n){k.bind(j,n);return f},unbind:function(j){k.unbind(j);return f}});b.each("onBeforeSeek,onStart,onSeek,onReload".split(","),function(j,n){f[n]=function(u){return f.bind(n,u)}});q.addClass(g.disabledClass).click(function(){f.prev()});t.click(function(){f.next()});p.click(function(){f.nextPage()});f.getSize()<g.size&&t.add(p).addClass(g.disabledClass);s.addClass(g.disabledClass).click(function(){f.prevPage()});
63
- var v=g.hoverClass,x="keydown."+Math.random().toString().substring(10);f.onReload(function(){v&&f.getItems().hover(function(){b(this).addClass(v)},function(){b(this).removeClass(v)});g.clickable&&f.getItems().each(function(j){b(this).unbind("click.scrollable").bind("click.scrollable",function(n){if(!b(n.target).is("a"))return f.click(j)})});g.keyboard?b(document).unbind(x).bind(x,function(j){if(!(j.altKey||j.ctrlKey))if(!(g.keyboard!="static"&&d!=f)){var n=g.keyboardSteps;if(h&&(j.keyCode==37||j.keyCode==
64
- 39)){f.move(j.keyCode==37?-n:n);return j.preventDefault()}if(!h&&(j.keyCode==38||j.keyCode==40)){f.move(j.keyCode==38?-n:n);return j.preventDefault()}return true}}):b(document).unbind(x)});f.reload()}b.tools=b.tools||{};b.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",
65
- nextPage:".nextPage",api:false}};var d;b.fn.scrollable=function(e){var g=this.eq(typeof e=="number"?e:0).data("scrollable");if(g)return g;var m=b.extend({},b.tools.scrollable.conf);e=b.extend(m,e);e.keyboardSteps=e.keyboardSteps||e.size;this.each(function(){g=new c(b(this),e);b(this).data("scrollable",g)});return e.api?g:this}})(jQuery);var humanMsg={setup:function(b,c){humanMsg.msgID="humanMsg";humanMsg.logID="humanMsgLog";if(b==undefined)b="body";humanMsg.msgOpacity=0.8;if(c!=undefined)humanMsg.msgOpacity=parseFloat(c);jQuery(b).append('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>');jQuery("#"+humanMsg.logID+" p").click(function(){jQuery(this).siblings("ul").slideToggle()})},displayMsg:function(b){if(b!=""){clearTimeout(humanMsg.t2);jQuery("#"+humanMsg.msgID+" p").html(b);
66
- jQuery("#"+humanMsg.msgID+"").show().animate({opacity:humanMsg.msgOpacity},200,function(){jQuery("#"+humanMsg.logID).show().children("ul").prepend("<li>"+b+"</li>").children("li:first").slideDown(200);jQuery("#"+humanMsg.logID+" ul").css("display")=="none"&&jQuery("#"+humanMsg.logID+" p").animate({bottom:40},200,"linear",function(){jQuery(this).animate({bottom:0},300,"easeOutBounce",function(){jQuery(this).css({bottom:0})})})});humanMsg.t1=setTimeout("humanMsg.bindEvents()",700);humanMsg.t2=setTimeout("humanMsg.removeMsg()",
67
- 5E3)}},bindEvents:function(){jQuery(window).mousemove(humanMsg.removeMsg).click(humanMsg.removeMsg).keypress(humanMsg.removeMsg)},removeMsg:function(){jQuery(window).unbind("mousemove",humanMsg.removeMsg).unbind("click",humanMsg.removeMsg).unbind("keypress",humanMsg.removeMsg);jQuery("#"+humanMsg.msgID).css("opacity")==humanMsg.msgOpacity&&jQuery("#"+humanMsg.msgID).animate({opacity:0},500,function(){jQuery(this).hide()})}};jQuery(document).ready(function(){humanMsg.setup()});(function(b){function c(g){switch(g.type){case "mousemove":return b.extend(g.data,{clientX:g.clientX,clientY:g.clientY,pageX:g.pageX,pageY:g.pageY});case "DOMMouseScroll":b.extend(g,g.data);g.delta=-g.detail/3;break;case "mousewheel":g.delta=g.wheelDelta/120;break}g.type="wheel";return b.event.handle.call(this,g,g.delta)}b.fn.wheel=function(g){return this[g?"bind":"trigger"]("wheel",g)};b.event.special.wheel={setup:function(){b.event.add(this,d,c,{})},teardown:function(){b.event.remove(this,d,c)}};
68
- var d=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":""),e=b.tools.scrollable;e.plugins=e.plugins||{};e.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};b.fn.mousewheel=function(g){var m=b.extend({},e.plugins.mousewheel.conf),f;if(typeof g=="number")g={speed:g};g=b.extend(m,g);this.each(function(){var k=b(this).scrollable();if(k)f=k;k.getRoot().wheel(function(h,i){k.move(i<0?1:-1,g.speed||50);return false})});return g.api?f:this}})(jQuery);(function(b){b.fn.bgIframe=b.fn.bgiframe=function(c){if(b.browser.msie&&parseInt(b.browser.version)<=6){c=b.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var d=function(g){return g&&g.constructor==Number?g+"px":g},e='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
69
- d(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":d(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":d(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":d(c.height))+';"/>';return this.each(function(){b("> iframe.bgiframe",this).length==0&&this.insertBefore(document.createElement(e),this.firstChild)})}return this};if(!b.browser.version)b.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]})(jQuery);(function(b){b.each({focus:"focusin",blur:"focusout"},function(c,d){b.event.special[d]={setup:function(){if(b.browser.msie)return false;this.addEventListener(c,b.event.special[d].handler,true)},teardown:function(){if(b.browser.msie)return false;this.removeEventListener(c,b.event.special[d].handler,true)},handler:function(e){arguments[0]=b.event.fix(e);arguments[0].type=d;return b.event.handle.apply(this,arguments)}}});b.extend(b.fn,{delegate:function(c,d,e){return this.bind(c,function(g){var m=b(g.target);
70
- if(m.is(d))return e.apply(m,arguments)})},triggerEvent:function(c,d){return this.triggerHandler(c,[b.event.fix({type:c,target:d})])}})})(jQuery);(function(b){b.widget("ui.draggable",b.extend({},b.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
71
- this._mouseDestroy()}},_mouseCapture:function(c){var d=this.options;if(this.helper||d.disabled||b(c.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(c);if(!this.handle)return false;return true},_mouseStart:function(c){var d=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(b.ui.ddmanager)b.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();
72
- this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);d.containment&&this._setContainment();this._trigger("start",c);this._cacheHelperProportions();b.ui.ddmanager&&
73
- !d.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,d){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!d){d=this._uiHash();this._trigger("drag",c,d);this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+
74
- "px";b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);return false},_mouseStop:function(c){var d=false;if(b.ui.ddmanager&&!this.options.dropBehaviour)d=b.ui.ddmanager.drop(this,c);if(this.dropped){d=this.dropped;this.dropped=false}if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===true||b.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){var e=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){e._trigger("stop",
75
- c);e._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(c){var d=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==c.target)d=true});return d},_createHelper:function(c){var d=this.options;c=b.isFunction(d.helper)?b(d.helper.apply(this.element[0],[c])):d.helper=="clone"?this.element.clone():this.element;c.parents("body").length||c.appendTo(d.appendTo=="parent"?
76
- this.element[0].parentNode:d.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(c){if(c.left!=undefined)this.offset.click.left=c.left+this.margins.left;if(c.right!=undefined)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if(c.top!=undefined)this.offset.click.top=c.top+this.margins.top;if(c.bottom!=undefined)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},
77
- _getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),
78
- 10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),
79
- 10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment=="parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(c.containment=="document"?document:window).width()-this.helperProportions.width-
80
- this.margins.left,(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)jQuery/.test(c.containment)&&c.containment.constructor!=Array){var d=b(c.containment)[0];if(d){c=b(c.containment).offset();var e=b(d).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(d).css("borderLeftWidth"),10)||0)+(parseInt(b(d).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(d).css("borderTopWidth"),
81
- 10)||0)+(parseInt(b(d).css("paddingTop"),10)||0)-this.margins.top,c.left+(e?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(b(d).css("borderLeftWidth"),10)||0)-(parseInt(b(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(e?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(b(d).css("borderTopWidth"),10)||0)-(parseInt(b(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(c.containment.constructor==
82
- Array)this.containment=c.containment},_convertPositionTo:function(c,d){if(!d)d=this.position;c=c=="absolute"?1:-1;var e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(e[0].tagName);return{top:d.top+this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:e.scrollTop())*
83
- c),left:d.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:e.scrollLeft())*c)}},_generatePosition:function(c){var d=this.options,e=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(e[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=
84
- document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var m=c.pageX,f=c.pageY;if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.left<this.containment[0])m=this.containment[0]+this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])f=this.containment[1]+this.offset.click.top;if(c.pageX-this.offset.click.left>this.containment[2])m=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])f=
85
- this.containment[3]+this.offset.click.top}if(d.grid){f=this.originalPageY+Math.round((f-this.originalPageY)/d.grid[1])*d.grid[1];f=this.containment?!(f-this.offset.click.top<this.containment[1]||f-this.offset.click.top>this.containment[3])?f:!(f-this.offset.click.top<this.containment[1])?f-d.grid[1]:f+d.grid[1]:f;m=this.originalPageX+Math.round((m-this.originalPageX)/d.grid[0])*d.grid[0];m=this.containment?!(m-this.offset.click.left<this.containment[0]||m-this.offset.click.left>this.containment[2])?
86
- m:!(m-this.offset.click.left<this.containment[0])?m-d.grid[0]:m+d.grid[0]:m}}return{top:f-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:e.scrollTop()),left:m-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:e.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");
87
- this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(c,d,e){e=e||this._uiHash();b.ui.plugin.call(this,c,[d,e]);if(c=="drag")this.positionAbs=this._convertPositionTo("absolute");return b.widget.prototype._trigger.call(this,c,d,e)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));b.extend(b.ui.draggable,{version:"1.7.2",
88
- eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});b.ui.plugin.add("draggable","connectToSortable",{start:function(c,
89
- d){var e=b(this).data("draggable"),g=e.options,m=b.extend({},d,{item:e.element});e.sortables=[];b(g.connectToSortable).each(function(){var f=b.data(this,"sortable");if(f&&!f.options.disabled){e.sortables.push({instance:f,shouldRevert:f.options.revert});f._refreshItems();f._trigger("activate",c,m)}})},stop:function(c,d){var e=b(this).data("draggable"),g=b.extend({},d,{item:e.element});b.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;e.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=
90
- false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;e.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,g)}})},drag:function(c,d){var e=b(this).data("draggable"),g=this;b.each(e.sortables,function(){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;
91
- this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(g).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return d.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=
92
- e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}this.instance.currentItem&&this.instance._mouseDrag(c)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;
93
- this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();e._trigger("fromSortable",c);e.dropped=false}})}});b.ui.plugin.add("draggable","cursor",{start:function(){var c=b("body"),d=b(this).data("draggable").options;if(c.css("cursor"))d._cursor=c.css("cursor");c.css("cursor",
94
- d.cursor)},stop:function(){if(b(this).data("draggable")){var c=b(this).data("draggable").options;c._cursor&&b("body").css("cursor",c._cursor)}}});b.ui.plugin.add("draggable","iframeFix",{start:function(){var c=b(this).data("draggable").options;b(c.iframeFix===true?"iframe":c.iframeFix).each(function(){b('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(b(this).offset()).appendTo("body")})},
95
- stop:function(){b("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add("draggable","opacity",{start:function(c,d){c=b(d.helper);d=b(this).data("draggable").options;if(c.css("opacity"))d._opacity=c.css("opacity");c.css("opacity",d.opacity)},stop:function(c,d){c=b(this).data("draggable").options;c._opacity&&b(d.helper).css("opacity",c._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(){var c=b(this).data("draggable");if(c.scrollParent[0]!=
96
- document&&c.scrollParent[0].tagName!="HTML")c.overflowOffset=c.scrollParent.offset()},drag:function(c){var d=b(this).data("draggable"),e=d.options,g=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-c.pageY<e.scrollSensitivity)d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop+e.scrollSpeed;else if(c.pageY-d.overflowOffset.top<e.scrollSensitivity)d.scrollParent[0].scrollTop=g=d.scrollParent[0].scrollTop-
97
- e.scrollSpeed;if(!e.axis||e.axis!="y")if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-c.pageX<e.scrollSensitivity)d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft+e.scrollSpeed;else if(c.pageX-d.overflowOffset.left<e.scrollSensitivity)d.scrollParent[0].scrollLeft=g=d.scrollParent[0].scrollLeft-e.scrollSpeed}else{if(!e.axis||e.axis!="x")if(c.pageY-b(document).scrollTop()<e.scrollSensitivity)g=b(document).scrollTop(b(document).scrollTop()-e.scrollSpeed);else if(b(window).height()-
98
- (c.pageY-b(document).scrollTop())<e.scrollSensitivity)g=b(document).scrollTop(b(document).scrollTop()+e.scrollSpeed);if(!e.axis||e.axis!="y")if(c.pageX-b(document).scrollLeft()<e.scrollSensitivity)g=b(document).scrollLeft(b(document).scrollLeft()-e.scrollSpeed);else if(b(window).width()-(c.pageX-b(document).scrollLeft())<e.scrollSensitivity)g=b(document).scrollLeft(b(document).scrollLeft()+e.scrollSpeed)}g!==false&&b.ui.ddmanager&&!e.dropBehaviour&&b.ui.ddmanager.prepareOffsets(d,c)}});b.ui.plugin.add("draggable",
99
- "snap",{start:function(){var c=b(this).data("draggable"),d=c.options;c.snapElements=[];b(d.snap.constructor!=String?d.snap.items||":data(draggable)":d.snap).each(function(){var e=b(this),g=e.offset();this!=c.element[0]&&c.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:g.top,left:g.left})})},drag:function(c,d){for(var e=b(this).data("draggable"),g=e.options,m=g.snapTolerance,f=d.offset.left,k=f+e.helperProportions.width,h=d.offset.top,i=h+e.helperProportions.height,l=
100
- e.snapElements.length-1;l>=0;l--){var o=e.snapElements[l].left,q=o+e.snapElements[l].width,t=e.snapElements[l].top,s=t+e.snapElements[l].height;if(o-m<f&&f<q+m&&t-m<h&&h<s+m||o-m<f&&f<q+m&&t-m<i&&i<s+m||o-m<k&&k<q+m&&t-m<h&&h<s+m||o-m<k&&k<q+m&&t-m<i&&i<s+m){if(g.snapMode!="inner"){var p=Math.abs(t-i)<=m,v=Math.abs(s-h)<=m,x=Math.abs(o-k)<=m,j=Math.abs(q-f)<=m;if(p)d.position.top=e._convertPositionTo("relative",{top:t-e.helperProportions.height,left:0}).top-e.margins.top;if(v)d.position.top=e._convertPositionTo("relative",
101
- {top:s,left:0}).top-e.margins.top;if(x)d.position.left=e._convertPositionTo("relative",{top:0,left:o-e.helperProportions.width}).left-e.margins.left;if(j)d.position.left=e._convertPositionTo("relative",{top:0,left:q}).left-e.margins.left}var n=p||v||x||j;if(g.snapMode!="outer"){p=Math.abs(t-h)<=m;v=Math.abs(s-i)<=m;x=Math.abs(o-f)<=m;j=Math.abs(q-k)<=m;if(p)d.position.top=e._convertPositionTo("relative",{top:t,left:0}).top-e.margins.top;if(v)d.position.top=e._convertPositionTo("relative",{top:s-e.helperProportions.height,
102
- left:0}).top-e.margins.top;if(x)d.position.left=e._convertPositionTo("relative",{top:0,left:o}).left-e.margins.left;if(j)d.position.left=e._convertPositionTo("relative",{top:0,left:q-e.helperProportions.width}).left-e.margins.left}if(!e.snapElements[l].snapping&&(p||v||x||j||n))e.options.snap.snap&&e.options.snap.snap.call(e.element,c,b.extend(e._uiHash(),{snapItem:e.snapElements[l].item}));e.snapElements[l].snapping=p||v||x||j||n}else{e.snapElements[l].snapping&&e.options.snap.release&&e.options.snap.release.call(e.element,
103
- c,b.extend(e._uiHash(),{snapItem:e.snapElements[l].item}));e.snapElements[l].snapping=false}}}});b.ui.plugin.add("draggable","stack",{start:function(){var c=b(this).data("draggable").options,d=b.makeArray(b(c.stack.group)).sort(function(e,g){return(parseInt(b(e).css("zIndex"),10)||c.stack.min)-(parseInt(b(g).css("zIndex"),10)||c.stack.min)});b(d).each(function(e){this.style.zIndex=c.stack.min+e});this[0].style.zIndex=c.stack.min+d.length}});b.ui.plugin.add("draggable","zIndex",{start:function(c,d){c=
104
- b(d.helper);d=b(this).data("draggable").options;if(c.css("zIndex"))d._zIndex=c.css("zIndex");c.css("zIndex",d.zIndex)},stop:function(c,d){c=b(this).data("draggable").options;c._zIndex&&b(d.helper).css("zIndex",c._zIndex)}})})(jQuery);(function(b){function c(e,g){function m(j){var n=b(j);return g.globalNav?n:e.parent().find(j)}var f=this,k=b(this),h=!g.vertical,i=e.children(),l=0,o;d||(d=f);b.each(g,function(j,n){b.isFunction(n)&&k.bind(j,n)});if(i.length>1)i=b(g.items,e);e.data("finder",m);var q=m(g.prev),t=m(g.next),s=m(g.prevPage),p=m(g.nextPage);b.extend(f,{getIndex:function(){return l},getClickIndex:function(){var j=f.getItems();return j.index(j.filter("."+g.activeClass))},getConf:function(){return g},getSize:function(){return f.getItems().size()},
105
- getPageAmount:function(){return Math.ceil(this.getSize()/g.size)},getPageIndex:function(){return Math.ceil(l/g.size)},getNaviButtons:function(){return q.add(t).add(s).add(p)},getRoot:function(){return e},getItemWrap:function(){return i},getItems:function(){return i.children(g.item)},getVisibleItems:function(){return f.getItems().slice(l,l+g.size)},seekTo:function(j,n,u){function w(){u&&u.call(f,j);k.trigger("onSeek",[j])}if(j<0)j=0;if(l===j)return f;if(b.isFunction(n))u=n;if(j>f.getSize()-g.size)return g.loop?
106
- f.begin():this.end();var y=f.getItems().eq(j);if(!y.length)return f;var z=b.Event("onBeforeSeek");k.trigger(z,[j]);if(z.isDefaultPrevented())return f;if(n===undefined||b.isFunction(n))n=g.speed;h?i.animate({left:-y.position().left},n,g.easing,w):i.animate({top:-y.position().top},n,g.easing,w);d=f;l=j;z=b.Event("onStart");k.trigger(z,[j]);if(z.isDefaultPrevented())return f;q.add(s).toggleClass(g.disabledClass,j===0);t.add(p).toggleClass(g.disabledClass,j>=f.getSize()-g.size);return f},move:function(j,
107
- n,u){o=j>0;return this.seekTo(l+j,n,u)},next:function(j,n){return this.move(1,j,n)},prev:function(j,n){return this.move(-1,j,n)},movePage:function(j,n,u){o=j>0;var w=g.size*j,y=l%g.size;if(y>0)w+=j>0?-y:g.size-y;return this.move(w,n,u)},prevPage:function(j,n){return this.movePage(-1,j,n)},nextPage:function(j,n){return this.movePage(1,j,n)},setPage:function(j,n,u){return this.seekTo(j*g.size,n,u)},begin:function(j,n){o=false;return this.seekTo(0,j,n)},end:function(j,n){o=true;var u=this.getSize()-
108
- g.size;return u>0?this.seekTo(u,j,n):f},reload:function(){k.trigger("onReload");return f},focus:function(){return d=f},click:function(j){var n=f.getItems().eq(j),u=g.activeClass,w=g.size;if(j<0||j>=f.getSize())return f;if(w==1){if(g.loop)return f.next();if(j===0||j==f.getSize()-1)o=o===undefined?true:!o;return o===false?f.prev():f.next()}if(w==2){j==l&&j--;f.getItems().removeClass(u);n.addClass(u);return f.seekTo(j,time,fn)}if(!n.hasClass(u)){f.getItems().removeClass(u);n.addClass(u);n=Math.floor(w/
109
- 2);n=j-n;if(n>f.getSize()-w)n=f.getSize()-w;if(n!==j)return f.seekTo(n)}return f},bind:function(j,n){k.bind(j,n);return f},unbind:function(j){k.unbind(j);return f}});b.each("onBeforeSeek,onStart,onSeek,onReload".split(","),function(j,n){f[n]=function(u){return f.bind(n,u)}});q.addClass(g.disabledClass).click(function(){f.prev()});t.click(function(){f.next()});p.click(function(){f.nextPage()});f.getSize()<g.size&&t.add(p).addClass(g.disabledClass);s.addClass(g.disabledClass).click(function(){f.prevPage()});
110
- var v=g.hoverClass,x="keydown."+Math.random().toString().substring(10);f.onReload(function(){v&&f.getItems().hover(function(){b(this).addClass(v)},function(){b(this).removeClass(v)});g.clickable&&f.getItems().each(function(j){b(this).unbind("click.scrollable").bind("click.scrollable",function(n){if(!b(n.target).is("a"))return f.click(j)})});g.keyboard?b(document).unbind(x).bind(x,function(j){if(!(j.altKey||j.ctrlKey))if(!(g.keyboard!="static"&&d!=f)){var n=g.keyboardSteps;if(h&&(j.keyCode==37||j.keyCode==
111
- 39)){f.move(j.keyCode==37?-n:n);return j.preventDefault()}if(!h&&(j.keyCode==38||j.keyCode==40)){f.move(j.keyCode==38?-n:n);return j.preventDefault()}return true}}):b(document).unbind(x)});f.reload()}b.tools=b.tools||{};b.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",
112
- nextPage:".nextPage",api:false}};var d;b.fn.scrollable=function(e){var g=this.eq(typeof e=="number"?e:0).data("scrollable");if(g)return g;var m=b.extend({},b.tools.scrollable.conf);e=b.extend(m,e);e.keyboardSteps=e.keyboardSteps||e.size;this.each(function(){g=new c(b(this),e);b(this).data("scrollable",g)});return e.api?g:this}})(jQuery);
113
- (function(b){var c=b.tools.scrollable;c.plugins=c.plugins||{};c.plugins.autoscroll={version:"1.0.1",conf:{autoplay:true,interval:3E3,autopause:true,steps:1,api:false}};b.fn.autoscroll=function(d){if(typeof d=="number")d={interval:d};var e=b.extend({},c.plugins.autoscroll.conf),g;b.extend(e,d);this.each(function(){var m=b(this).scrollable();if(m)g=m;var f,k,h=true;m.play=function(){if(!f){h=false;f=setInterval(function(){m.move(e.steps)},e.interval);m.move(e.steps)}};m.pause=function(){f=clearInterval(f)};
114
- m.stop=function(){m.pause();h=true};e.autopause&&m.getRoot().add(m.getNaviButtons()).hover(function(){m.pause();clearInterval(k)},function(){h||(k=setTimeout(m.play,e.interval))});e.autoplay&&setTimeout(m.play,e.interval)});return e.api?g:this}})(jQuery);
115
- (function(b){var c=b.tools.scrollable;c.plugins=c.plugins||{};c.plugins.navigator={version:"1.0.2",conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,api:false,idPrefix:null}};b.fn.navigator=function(d){var e=b.extend({},c.plugins.navigator.conf),g;if(typeof d=="string")d={navi:d};d=b.extend(e,d);this.each(function(){function m(){if(!k.children().length||k.data("navi")==f){k.empty();k.data("navi",f);for(var o=0;o<f.getPageAmount();o++)k.append(b("<"+(d.naviItem||"a")+"/>"));h=k.children().each(function(q){var t=
116
- b(this);t.click(function(s){f.setPage(q);return s.preventDefault()});d.indexed&&t.text(q);d.idPrefix&&t.attr("id",d.idPrefix+q)})}else{h=d.naviItem?k.find(d.naviItem):k.children();h.each(function(q){b(this).click(function(t){f.setPage(q);return t.preventDefault()})})}h.eq(0).addClass(d.activeClass)}var f=b(this).scrollable(),k=f.getRoot().data("finder").call(null,d.navi),h=null,i=f.getNaviButtons();if(f)g=f;f.getNaviButtons=function(){return i.add(k)};f.onStart(function(){var o=d.activeClass;h.removeClass(o).eq(f.getPageIndex()).addClass(o)});
117
- f.onReload(function(){m()});m();var l=h.filter("[href="+location.hash+"]");l.length&&f.move(h.index(l))});return d.api?g:this}})(jQuery);
118
- (function(b){function c(g){switch(g.type){case "mousemove":return b.extend(g.data,{clientX:g.clientX,clientY:g.clientY,pageX:g.pageX,pageY:g.pageY});case "DOMMouseScroll":b.extend(g,g.data);g.delta=-g.detail/3;break;case "mousewheel":g.delta=g.wheelDelta/120;break}g.type="wheel";return b.event.handle.call(this,g,g.delta)}b.fn.wheel=function(g){return this[g?"bind":"trigger"]("wheel",g)};b.event.special.wheel={setup:function(){b.event.add(this,d,c,{})},teardown:function(){b.event.remove(this,d,c)}};
119
- var d=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":""),e=b.tools.scrollable;e.plugins=e.plugins||{};e.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};b.fn.mousewheel=function(g){var m=b.extend({},e.plugins.mousewheel.conf),f;if(typeof g=="number")g={speed:g};g=b.extend(m,g);this.each(function(){var k=b(this).scrollable();if(k)f=k;k.getRoot().wheel(function(h,i){k.move(i<0?1:-1,g.speed||50);return false})});return g.api?f:this}})(jQuery);(function(b){b.widget("ui.droppable",{_init:function(){var c=this.options.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&b.isFunction(this.options.accept)?this.options.accept:function(d){return d.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables[this.options.scope]=b.ui.ddmanager.droppables[this.options.scope]||[];b.ui.ddmanager.droppables[this.options.scope].push(this);this.options.addClasses&&this.element.addClass("ui-droppable")},
120
- destroy:function(){for(var c=b.ui.ddmanager.droppables[this.options.scope],d=0;d<c.length;d++)c[d]==this&&c.splice(d,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(c,d){if(c=="accept")this.options.accept=d&&b.isFunction(d)?d:function(e){return e.is(d)};else b.widget.prototype._setData.apply(this,arguments)},_activate:function(c){var d=b.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);
121
- d&&this._trigger("activate",c,this.ui(d))},_deactivate:function(c){var d=b.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);d&&this._trigger("deactivate",c,this.ui(d))},_over:function(c){var d=b.ui.ddmanager.current;if(!(!d||(d.currentItem||d.element)[0]==this.element[0]))if(this.options.accept.call(this.element[0],d.currentItem||d.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);this._trigger("over",c,this.ui(d))}},
122
- _out:function(c){var d=b.ui.ddmanager.current;if(!(!d||(d.currentItem||d.element)[0]==this.element[0]))if(this.options.accept.call(this.element[0],d.currentItem||d.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",c,this.ui(d))}},_drop:function(c,d){var e=d||b.ui.ddmanager.current;if(!e||(e.currentItem||e.element)[0]==this.element[0])return false;var g=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var m=
123
- b.data(this,"droppable");if(m.options.greedy&&b.ui.intersect(e,b.extend(m,{offset:m.element.offset()}),m.options.tolerance)){g=true;return false}});if(g)return false;if(this.options.accept.call(this.element[0],e.currentItem||e.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",c,this.ui(e));return this.element}return false},ui:function(c){return{draggable:c.currentItem||
124
- c.element,helper:c.helper,position:c.position,absolutePosition:c.positionAbs,offset:c.positionAbs}}});b.extend(b.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});b.ui.intersect=function(c,d,e){if(!d.offset)return false;var g=(c.positionAbs||c.position.absolute).left,m=g+c.helperProportions.width,f=(c.positionAbs||c.position.absolute).top,k=f+c.helperProportions.height,h=d.offset.left,
125
- i=h+d.proportions.width,l=d.offset.top,o=l+d.proportions.height;switch(e){case "fit":return h<g&&m<i&&l<f&&k<o;case "intersect":return h<g+c.helperProportions.width/2&&m-c.helperProportions.width/2<i&&l<f+c.helperProportions.height/2&&k-c.helperProportions.height/2<o;case "pointer":return b.ui.isOver((c.positionAbs||c.position.absolute).top+(c.clickOffset||c.offset.click).top,(c.positionAbs||c.position.absolute).left+(c.clickOffset||c.offset.click).left,l,h,d.proportions.height,d.proportions.width);
126
- case "touch":return(f>=l&&f<=o||k>=l&&k<=o||f<l&&k>o)&&(g>=h&&g<=i||m>=h&&m<=i||g<h&&m>i);default:return false}};b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(c,d){var e=b.ui.ddmanager.droppables[c.options.scope],g=d?d.type:null,m=(c.currentItem||c.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<e.length;f++)if(!(e[f].options.disabled||c&&!e[f].options.accept.call(e[f].element[0],c.currentItem||c.element))){for(var k=0;k<m.length;k++)if(m[k]==e[f].element[0]){e[f].proportions.height=
127
- 0;continue a}e[f].visible=e[f].element.css("display")!="none";if(e[f].visible){e[f].offset=e[f].element.offset();e[f].proportions={width:e[f].element[0].offsetWidth,height:e[f].element[0].offsetHeight};g=="mousedown"&&e[f]._activate.call(e[f],d)}}},drop:function(c,d){var e=false;b.each(b.ui.ddmanager.droppables[c.options.scope],function(){if(this.options){if(!this.options.disabled&&this.visible&&b.ui.intersect(c,this,this.options.tolerance))e=this._drop.call(this,d);if(!this.options.disabled&&this.visible&&
128
- this.options.accept.call(this.element[0],c.currentItem||c.element)){this.isout=1;this.isover=0;this._deactivate.call(this,d)}}});return e},drag:function(c,d){c.options.refreshPositions&&b.ui.ddmanager.prepareOffsets(c,d);b.each(b.ui.ddmanager.droppables[c.options.scope],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var e=b.ui.intersect(c,this,this.options.tolerance);if(e=!e&&this.isover==1?"isout":e&&this.isover==0?"isover":null){var g;if(this.options.greedy){var m=this.element.parents(":data(droppable):eq(0)");
129
- if(m.length){g=b.data(m[0],"droppable");g.greedyChild=e=="isover"?1:0}}if(g&&e=="isover"){g.isover=0;g.isout=1;g._out.call(g,d)}this[e]=1;this[e=="isout"?"isover":"isout"]=0;this[e=="isover"?"_over":"_out"].call(this,d);if(g&&e=="isout"){g.isout=0;g.isover=1;g._over.call(g,d)}}}})}}})(jQuery);(function(b){function c(p){if(!h.parent){h.parent=b('<div id="'+p.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();b.fn.bgiframe&&h.parent.bgiframe();h.body=b("div.body",h.parent)}}function d(p){if(p)return b.data(p,"tooltip");else b("#tooltip").hide()}function e(p){s=!!d(this).track;b(document.body).bind("mousemove",f);f(p)}function g(){if(!(b.tooltip.blocked||this==i||!this.tooltipText&&!d(this).bodyHandler)){i=this;e.apply(i,arguments)}}function m(){if(d(i)){h.parent.css({left:o,
130
- right:q,top:l});var p=k(),v=h.parent[0];if(o+200>p.x+p.cx){o-=v.offsetWidth+d(i).left+(o+225-(p.x+p.cx));h.parent.css({left:o+"px"}).addClass("viewport-right")}if(l+100>p.y+p.cy){l-=v.offsetHeight+100+d(i).top;h.parent.css({top:l+"px"}).addClass("viewport-bottom")}if(p.x+p.cx<v.offsetLeft+v.offsetWidth){o-=v.offsetWidth+20+d(i).left+150;h.parent.css({left:o+"px"}).addClass("viewport-right")}if(p.y+p.cy<v.offsetTop+v.offsetHeight){l-=v.offsetHeight+20+d(i).top;h.parent.css({top:l+"px"}).addClass("viewport-bottom")}if(d(i).bodyHandler){p=
131
- d(i).bodyHandler.call(i);p.nodeType||p.jquery?h.body.empty().append(p):h.body.html(p);h.body.show()}else if(d(i).showBody){p=d(i).showBody;h.body.empty();v=0;for(var x;x=p[v];v++){v>0&&h.body.append("<br/>");h.body.append(x)}h.body.hideWhenEmpty()}else h.body.hide();h.parent.addClass(d(i).extraClass);d(i).fixPNG&&h.parent.fixPNG();if(d(i)){if((!t||!b.fn.bgiframe)&&d(i).fade)if(h.parent.is(":animated"))h.parent.stop().show().fadeTo(d(i).fade,i.tOpacity);else h.parent.is(":visible")?h.parent.fadeTo(d(i).fade,
132
- i.tOpacity):h.parent.fadeIn(d(i).fade);else h.parent.show();d(i).showHandler&&d(i).showHandler.call(i)}}}function f(p){if(!b.tooltip.blocked)if(d(i))if(!(p&&p.target.tagName=="OPTION")){!s&&h.parent.is(":visible")&&b(document.body).unbind("mousemove",f);if(i==null)b(document.body).unbind("mousemove",f);else{h.parent.removeClass("viewport-right").removeClass("viewport-bottom");o=h.parent[0].offsetLeft;l=h.parent[0].offsetTop;if(p){o=p.pageX+d(i).left;l=p.pageY+d(i).top;q="auto";if(d(i).positionLeft){q=
133
- b(window).width()-left;o="auto"}}}}}function k(){return{x:b(window).scrollLeft(),y:b(window).scrollTop(),cx:b(window).width(),cy:b(window).height()}}var h={},i,l,o,q="auto",t=b.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),s=false;b.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){b.tooltip.blocked=!b.tooltip.blocked}};b.fn.extend({tooltip:function(p){p=b.extend({},b.tooltip.defaults,p);c(p);return this.each(function(){b.data(this,
134
- "tooltip",p);this.tOpacity=h.parent.css("opacity")}).mouseover(g).mouseup(function(){m()})},hideWhenEmpty:function(){return this.each(function(){b(this)[b(this).html()?"show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}})})(jQuery);
1
+ var humanMsg={setup:function(a,b){humanMsg.msgID="humanMsg";humanMsg.logID="humanMsgLog";if(a==undefined)a="body";humanMsg.msgOpacity=0.8;if(b!=undefined)humanMsg.msgOpacity=parseFloat(b);jQuery(a).append('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>');jQuery("#"+humanMsg.logID+" p").click(function(){jQuery(this).siblings("ul").slideToggle()})},displayMsg:function(a){if(a!=""){clearTimeout(humanMsg.t2);jQuery("#"+humanMsg.msgID+" p").html(a);
2
+ jQuery("#"+humanMsg.msgID+"").show().animate({opacity:humanMsg.msgOpacity},200,function(){jQuery("#"+humanMsg.logID).show().children("ul").prepend("<li>"+a+"</li>").children("li:first").slideDown(200);jQuery("#"+humanMsg.logID+" ul").css("display")=="none"&&jQuery("#"+humanMsg.logID+" p").animate({bottom:40},200,"linear",function(){jQuery(this).animate({bottom:0},300,"easeOutBounce",function(){jQuery(this).css({bottom:0})})})});humanMsg.t1=setTimeout("humanMsg.bindEvents()",700);humanMsg.t2=setTimeout("humanMsg.removeMsg()",
3
+ 5000)}},bindEvents:function(){jQuery(window).mousemove(humanMsg.removeMsg).click(humanMsg.removeMsg).keypress(humanMsg.removeMsg)},removeMsg:function(){jQuery(window).unbind("mousemove",humanMsg.removeMsg).unbind("click",humanMsg.removeMsg).unbind("keypress",humanMsg.removeMsg);jQuery("#"+humanMsg.msgID).css("opacity")==humanMsg.msgOpacity&&jQuery("#"+humanMsg.msgID).animate({opacity:0},500,function(){jQuery(this).hide()})}};jQuery(document).ready(function(){humanMsg.setup()});(function(a){a.fn.bgIframe=a.fn.bgiframe=function(b){if(a.browser.msie&&parseInt(a.browser.version)<=6){b=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},b||{});var c=function(e){return e&&e.constructor==Number?e+"px":e},d='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+b.src+'"style="display:block;position:absolute;z-index:-1;'+(b.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(b.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
4
+ c(b.top))+";left:"+(b.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":c(b.left))+";width:"+(b.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":c(b.width))+";height:"+(b.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":c(b.height))+';"/>';return this.each(function(){a("> iframe.bgiframe",this).length==0&&this.insertBefore(document.createElement(d),this.firstChild)})}return this};if(!a.browser.version)a.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]})(jQuery);(function(a){a.each({focus:"focusin",blur:"focusout"},function(b,c){a.event.special[c]={setup:function(){if(a.browser.msie)return false;this.addEventListener(b,a.event.special[c].handler,true)},teardown:function(){if(a.browser.msie)return false;this.removeEventListener(b,a.event.special[c].handler,true)},handler:function(d){arguments[0]=a.event.fix(d);arguments[0].type=c;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(b,c,d){return this.bind(b,function(e){var g=a(e.target);
5
+ if(g.is(c))return d.apply(g,arguments)})},triggerEvent:function(b,c){return this.triggerHandler(b,[a.event.fix({type:b,target:c})])}})})(jQuery);(function(a){a.tools=a.tools||{};a.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var b;function c(d,e){var g=this,k=a(this),p=!e.vertical,r=d.children(),f=0,i;b||(b=g);a.each(e,function(h,j){a.isFunction(j)&&k.bind(h,j)});if(r.length>
6
+ 1)r=a(e.items,d);function l(h){var j=a(h);return e.globalNav?j:d.parent().find(h)}d.data("finder",l);var n=l(e.prev),o=l(e.next),q=l(e.prevPage),m=l(e.nextPage);a.extend(g,{getIndex:function(){return f},getClickIndex:function(){var h=g.getItems();return h.index(h.filter("."+e.activeClass))},getConf:function(){return e},getSize:function(){return g.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/e.size)},getPageIndex:function(){return Math.ceil(f/e.size)},getNaviButtons:function(){return n.add(o).add(q).add(m)},
7
+ getRoot:function(){return d},getItemWrap:function(){return r},getItems:function(){return r.children(e.item)},getVisibleItems:function(){return g.getItems().slice(f,f+e.size)},seekTo:function(h,j,t){if(h<0)h=0;if(f===h)return g;if(a.isFunction(j))t=j;if(h>g.getSize()-e.size)return e.loop?g.begin():this.end();var u=g.getItems().eq(h);if(!u.length)return g;var v=a.Event("onBeforeSeek");k.trigger(v,[h]);if(v.isDefaultPrevented())return g;if(j===undefined||a.isFunction(j))j=e.speed;function x(){t&&t.call(g,
8
+ h);k.trigger("onSeek",[h])}p?r.animate({left:-u.position().left},j,e.easing,x):r.animate({top:-u.position().top},j,e.easing,x);b=g;f=h;v=a.Event("onStart");k.trigger(v,[h]);if(v.isDefaultPrevented())return g;n.add(q).toggleClass(e.disabledClass,h===0);o.add(m).toggleClass(e.disabledClass,h>=g.getSize()-e.size);return g},move:function(h,j,t){i=h>0;return this.seekTo(f+h,j,t)},next:function(h,j){return this.move(1,h,j)},prev:function(h,j){return this.move(-1,h,j)},movePage:function(h,j,t){i=h>0;var u=
9
+ e.size*h,v=f%e.size;if(v>0)u+=h>0?-v:e.size-v;return this.move(u,j,t)},prevPage:function(h,j){return this.movePage(-1,h,j)},nextPage:function(h,j){return this.movePage(1,h,j)},setPage:function(h,j,t){return this.seekTo(h*e.size,j,t)},begin:function(h,j){i=false;return this.seekTo(0,h,j)},end:function(h,j){i=true;var t=this.getSize()-e.size;return t>0?this.seekTo(t,h,j):g},reload:function(){k.trigger("onReload");return g},focus:function(){return b=g},click:function(h){var j=g.getItems().eq(h),t=e.activeClass,
10
+ u=e.size;if(h<0||h>=g.getSize())return g;if(u==1){if(e.loop)return g.next();if(h===0||h==g.getSize()-1)i=i===undefined?true:!i;return i===false?g.prev():g.next()}if(u==2){h==f&&h--;g.getItems().removeClass(t);j.addClass(t);return g.seekTo(h,time,fn)}if(!j.hasClass(t)){g.getItems().removeClass(t);j.addClass(t);j=Math.floor(u/2);j=h-j;if(j>g.getSize()-u)j=g.getSize()-u;if(j!==h)return g.seekTo(j)}return g},bind:function(h,j){k.bind(h,j);return g},unbind:function(h){k.unbind(h);return g}});a.each("onBeforeSeek,onStart,onSeek,onReload".split(","),
11
+ function(h,j){g[j]=function(t){return g.bind(j,t)}});n.addClass(e.disabledClass).click(function(){g.prev()});o.click(function(){g.next()});m.click(function(){g.nextPage()});g.getSize()<e.size&&o.add(m).addClass(e.disabledClass);q.addClass(e.disabledClass).click(function(){g.prevPage()});var s=e.hoverClass,w="keydown."+Math.random().toString().substring(10);g.onReload(function(){s&&g.getItems().hover(function(){a(this).addClass(s)},function(){a(this).removeClass(s)});e.clickable&&g.getItems().each(function(h){a(this).unbind("click.scrollable").bind("click.scrollable",
12
+ function(j){if(!a(j.target).is("a"))return g.click(h)})});e.keyboard?a(document).unbind(w).bind(w,function(h){if(!(h.altKey||h.ctrlKey))if(!(e.keyboard!="static"&&b!=g)){var j=e.keyboardSteps;if(p&&(h.keyCode==37||h.keyCode==39)){g.move(h.keyCode==37?-j:j);return h.preventDefault()}if(!p&&(h.keyCode==38||h.keyCode==40)){g.move(h.keyCode==38?-j:j);return h.preventDefault()}return true}}):a(document).unbind(w)});g.reload()}a.fn.scrollable=function(d){var e=this.eq(typeof d=="number"?d:0).data("scrollable");
13
+ if(e)return e;var g=a.extend({},a.tools.scrollable.conf);d=a.extend(g,d);d.keyboardSteps=d.keyboardSteps||d.size;this.each(function(){e=new c(a(this),d);a(this).data("scrollable",e)});return d.api?e:this}})(jQuery);
14
+ (function(a){var b=a.tools.scrollable;b.plugins=b.plugins||{};b.plugins.autoscroll={version:"1.0.1",conf:{autoplay:true,interval:3000,autopause:true,steps:1,api:false}};a.fn.autoscroll=function(c){if(typeof c=="number")c={interval:c};var d=a.extend({},b.plugins.autoscroll.conf),e;a.extend(d,c);this.each(function(){var g=a(this).scrollable();if(g)e=g;var k,p,r=true;g.play=function(){if(!k){r=false;k=setInterval(function(){g.move(d.steps)},d.interval);g.move(d.steps)}};g.pause=function(){k=clearInterval(k)};
15
+ g.stop=function(){g.pause();r=true};d.autopause&&g.getRoot().add(g.getNaviButtons()).hover(function(){g.pause();clearInterval(p)},function(){r||(p=setTimeout(g.play,d.interval))});d.autoplay&&setTimeout(g.play,d.interval)});return d.api?e:this}})(jQuery);
16
+ (function(a){var b=a.tools.scrollable;b.plugins=b.plugins||{};b.plugins.navigator={version:"1.0.2",conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,api:false,idPrefix:null}};a.fn.navigator=function(c){var d=a.extend({},b.plugins.navigator.conf),e;if(typeof c=="string")c={navi:c};c=a.extend(d,c);this.each(function(){var g=a(this).scrollable(),k=g.getRoot(),p=k.data("finder").call(null,c.navi),r=null,f=g.getNaviButtons();if(g)e=g;g.getNaviButtons=function(){return f.add(p)};function i(){if(!p.children().length||
17
+ p.data("navi")==g){p.empty();p.data("navi",g);for(var l=0;l<g.getPageAmount();l++)p.append(a("<"+(c.naviItem||"a")+"/>"));r=p.children().each(function(n){var o=a(this);o.click(function(q){g.setPage(n);return q.preventDefault()});c.indexed&&o.text(n);c.idPrefix&&o.attr("id",c.idPrefix+n)})}else{r=c.naviItem?p.find(c.naviItem):p.children();r.each(function(n){var o=a(this);o.click(function(q){g.setPage(n);return q.preventDefault()})})}r.eq(0).addClass(c.activeClass)}g.onStart(function(){var l=c.activeClass;
18
+ r.removeClass(l).eq(g.getPageIndex()).addClass(l)});g.onReload(function(){i()});i();k=r.filter("[href="+location.hash+"]");k.length&&g.move(r.index(k))});return c.api?e:this}})(jQuery);
19
+ (function(a){a.fn.wheel=function(e){return this[e?"bind":"trigger"]("wheel",e)};a.event.special.wheel={setup:function(){a.event.add(this,b,c,{})},teardown:function(){a.event.remove(this,b,c)}};var b=!a.browser.mozilla?"mousewheel":"DOMMouseScroll"+(a.browser.version<"1.9"?" mousemove":"");function c(e){switch(e.type){case "mousemove":return a.extend(e.data,{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY});case "DOMMouseScroll":a.extend(e,e.data);e.delta=-e.detail/3;break;case "mousewheel":e.delta=
20
+ e.wheelDelta/120;break}e.type="wheel";return a.event.handle.call(this,e,e.delta)}var d=a.tools.scrollable;d.plugins=d.plugins||{};d.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};a.fn.mousewheel=function(e){var g=a.extend({},d.plugins.mousewheel.conf),k;if(typeof e=="number")e={speed:e};e=a.extend(g,e);this.each(function(){var p=a(this).scrollable();if(p)k=p;p.getRoot().wheel(function(r,f){p.move(f<0?1:-1,e.speed||50);return false})});return e.api?k:this}})(jQuery);(function(a){var b={},c,d,e,g="auto",k=a.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),p=false;a.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){a.tooltip.blocked=!a.tooltip.blocked}};a.fn.extend({tooltip:function(m){m=a.extend({},a.tooltip.defaults,m);r(m);return this.each(function(){a.data(this,"tooltip",m);this.tOpacity=b.parent.css("opacity")}).mouseover(l).mouseup(function(){n()})},hideWhenEmpty:function(){return this.each(function(){a(this)[a(this).html()?
21
+ "show":"hide"]()})},url:function(){return this.attr("href")||this.attr("src")}});function r(m){if(!b.parent){b.parent=a('<div id="'+m.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();a.fn.bgiframe&&b.parent.bgiframe();b.body=a("div.body",b.parent)}}function f(m){if(m)return a.data(m,"tooltip");else a("#tooltip").hide()}function i(m){p=!!f(this).track;a(document.body).bind("mousemove",o);o(m)}function l(){if(!(a.tooltip.blocked||this==c||!this.tooltipText&&
22
+ !f(this).bodyHandler)){c=this;i.apply(c,arguments)}}function n(){if(f(c)){b.parent.css({left:e,right:g,top:d});var m=q(),s=b.parent[0];if(e+200>m.x+m.cx){e-=s.offsetWidth+f(c).left+(e+225-(m.x+m.cx));b.parent.css({left:e+"px"}).addClass("viewport-right")}if(d+100>m.y+m.cy){d-=s.offsetHeight+100+f(c).top;b.parent.css({top:d+"px"}).addClass("viewport-bottom")}if(m.x+m.cx<s.offsetLeft+s.offsetWidth){e-=s.offsetWidth+20+f(c).left+150;b.parent.css({left:e+"px"}).addClass("viewport-right")}if(m.y+m.cy<
23
+ s.offsetTop+s.offsetHeight){d-=s.offsetHeight+20+f(c).top;b.parent.css({top:d+"px"}).addClass("viewport-bottom")}if(f(c).bodyHandler){m=f(c).bodyHandler.call(c);m.nodeType||m.jquery?b.body.empty().append(m):b.body.html(m);b.body.show()}else if(f(c).showBody){m=f(c).showBody;b.body.empty();s=0;for(var w;w=m[s];s++){s>0&&b.body.append("<br/>");b.body.append(w)}b.body.hideWhenEmpty()}else b.body.hide();b.parent.addClass(f(c).extraClass);f(c).fixPNG&&b.parent.fixPNG();if(f(c)){if((!k||!a.fn.bgiframe)&&
24
+ f(c).fade)if(b.parent.is(":animated"))b.parent.stop().show().fadeTo(f(c).fade,c.tOpacity);else b.parent.is(":visible")?b.parent.fadeTo(f(c).fade,c.tOpacity):b.parent.fadeIn(f(c).fade);else b.parent.show();f(c).showHandler&&f(c).showHandler.call(c)}}}function o(m){if(!a.tooltip.blocked)if(f(c))if(!(m&&m.target.tagName=="OPTION")){!p&&b.parent.is(":visible")&&a(document.body).unbind("mousemove",o);if(c==null)a(document.body).unbind("mousemove",o);else{b.parent.removeClass("viewport-right").removeClass("viewport-bottom");
25
+ e=b.parent[0].offsetLeft;d=b.parent[0].offsetTop;if(m){e=m.pageX+f(c).left;d=m.pageY+f(c).top;g="auto";if(f(c).positionLeft){g=a(window).width()-left;e="auto"}}}}}function q(){return{x:a(window).scrollLeft(),y:a(window).scrollTop(),cx:a(window).width(),cy:a(window).height()}}})(jQuery);if(!this.JSON)this.JSON={};
26
+ (function(){function a(f){return f<10?"0"+f:f}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var b=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c=
27
+ /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,d,e,g={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;function p(f){c.lastIndex=0;return c.test(f)?'"'+f.replace(c,function(i){var l=g[i];return typeof l==="string"?l:"\\u"+("0000"+i.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function r(f,i){var l,n,o=d,q,m=i[f];if(m&&typeof m==="object"&&typeof m.toJSON==="function")m=m.toJSON(f);
28
+ if(typeof k==="function")m=k.call(i,f,m);switch(typeof m){case "string":return p(m);case "number":return isFinite(m)?String(m):"null";case "boolean":case "null":return String(m);case "object":if(!m)return"null";d+=e;q=[];if(Object.prototype.toString.apply(m)==="[object Array]"){n=m.length;for(f=0;f<n;f+=1)q[f]=r(f,m)||"null";i=q.length===0?"[]":d?"[\n"+d+q.join(",\n"+d)+"\n"+o+"]":"["+q.join(",")+"]";d=o;return i}if(k&&typeof k==="object"){n=k.length;for(f=0;f<n;f+=1){l=k[f];if(typeof l==="string")if(i=
29
+ r(l,m))q.push(p(l)+(d?": ":":")+i)}}else for(l in m)if(Object.hasOwnProperty.call(m,l))if(i=r(l,m))q.push(p(l)+(d?": ":":")+i);i=q.length===0?"{}":d?"{\n"+d+q.join(",\n"+d)+"\n"+o+"}":"{"+q.join(",")+"}";d=o;return i}}if(typeof JSON.stringify!=="function")JSON.stringify=function(f,i,l){var n;e=d="";if(typeof l==="number")for(n=0;n<l;n+=1)e+=" ";else if(typeof l==="string")e=l;if((k=i)&&typeof i!=="function"&&(typeof i!=="object"||typeof i.length!=="number"))throw new Error("JSON.stringify");return r("",
30
+ {"":f})};if(typeof JSON.parseIt!=="function")JSON.parseIt=function(f,i){function l(n,o){var q,m,s=n[o];if(s&&typeof s==="object")for(q in s)if(Object.hasOwnProperty.call(s,q)){m=l(s,q);if(m!==undefined)s[q]=m;else delete s[q]}return i.call(n,o,s)}b.lastIndex=0;if(b.test(f))f=f.replace(b,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(f.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
31
+ "]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){f=eval("("+f+")");return typeof i==="function"?l({"":f},""):f}throw new SyntaxError("JSON.parseIt");}})();(function(a){a.tools=a.tools||{};a.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var b;function c(d,e){var g=this,k=a(this),p=!e.vertical,r=d.children(),f=0,i;b||(b=g);a.each(e,function(h,j){a.isFunction(j)&&k.bind(h,j)});if(r.length>
32
+ 1)r=a(e.items,d);function l(h){var j=a(h);return e.globalNav?j:d.parent().find(h)}d.data("finder",l);var n=l(e.prev),o=l(e.next),q=l(e.prevPage),m=l(e.nextPage);a.extend(g,{getIndex:function(){return f},getClickIndex:function(){var h=g.getItems();return h.index(h.filter("."+e.activeClass))},getConf:function(){return e},getSize:function(){return g.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/e.size)},getPageIndex:function(){return Math.ceil(f/e.size)},getNaviButtons:function(){return n.add(o).add(q).add(m)},
33
+ getRoot:function(){return d},getItemWrap:function(){return r},getItems:function(){return r.children(e.item)},getVisibleItems:function(){return g.getItems().slice(f,f+e.size)},seekTo:function(h,j,t){if(h<0)h=0;if(f===h)return g;if(a.isFunction(j))t=j;if(h>g.getSize()-e.size)return e.loop?g.begin():this.end();var u=g.getItems().eq(h);if(!u.length)return g;var v=a.Event("onBeforeSeek");k.trigger(v,h>f);if(v.isDefaultPrevented())return g;if(j===undefined||a.isFunction(j))j=e.speed;function x(){t&&t.call(g,
34
+ h);k.trigger("onSeek",[h])}p?r.animate({left:-u.position().left},j,e.easing,x):r.animate({top:-u.position().top},j,e.easing,x);b=g;f=h;v=a.Event("onStart");k.trigger(v,[h]);if(v.isDefaultPrevented())return g;n.add(q).toggleClass(e.disabledClass,h===0);o.add(m).toggleClass(e.disabledClass,h>=g.getSize()-e.size);return g},move:function(h,j,t){i=h>0;return this.seekTo(f+h,j,t)},next:function(h,j){return this.move(1,h,j)},prev:function(h,j){return this.move(-1,h,j)},movePage:function(h,j,t){i=h>0;var u=
35
+ e.size*h,v=f%e.size;if(v>0)u+=h>0?-v:e.size-v;return this.move(u,j,t)},prevPage:function(h,j){return this.movePage(-1,h,j)},nextPage:function(h,j){return this.movePage(1,h,j)},setPage:function(h,j,t){return this.seekTo(h*e.size,j,t)},begin:function(h,j){i=false;return this.seekTo(0,h,j)},end:function(h,j){i=true;var t=this.getSize()-e.size;return t>0?this.seekTo(t,h,j):g},reload:function(){k.trigger("onReload");return g},focus:function(){return b=g},click:function(h){var j=g.getItems().eq(h),t=e.activeClass,
36
+ u=e.size;if(h<0||h>=g.getSize())return g;if(u==1){if(e.loop)return g.next();if(h===0||h==g.getSize()-1)i=i===undefined?true:!i;return i===false?g.prev():g.next()}if(u==2){h==f&&h--;g.getItems().removeClass(t);j.addClass(t);return g.seekTo(h,time,fn)}if(!j.hasClass(t)){g.getItems().removeClass(t);j.addClass(t);j=Math.floor(u/2);j=h-j;if(j>g.getSize()-u)j=g.getSize()-u;if(j!==h)return g.seekTo(j)}return g},bind:function(h,j){k.bind(h,j);return g},unbind:function(h){k.unbind(h);return g}});a.each("onBeforeSeek,onStart,onSeek,onReload".split(","),
37
+ function(h,j){g[j]=function(t){return g.bind(j,t)}});n.addClass(e.disabledClass).click(function(){g.prev()});o.click(function(){g.next()});m.click(function(){g.nextPage()});g.getSize()<e.size&&o.add(m).addClass(e.disabledClass);q.addClass(e.disabledClass).click(function(){g.prevPage()});var s=e.hoverClass,w="keydown."+Math.random().toString().substring(10);g.onReload(function(){s&&g.getItems().hover(function(){a(this).addClass(s)},function(){a(this).removeClass(s)});e.clickable&&g.getItems().each(function(h){a(this).unbind("click.scrollable").bind("click.scrollable",
38
+ function(j){if(!a(j.target).is("a"))return g.click(h)})});e.keyboard?a(document).unbind(w).bind(w,function(h){if(!(h.altKey||h.ctrlKey))if(!(e.keyboard!="static"&&b!=g)){var j=e.keyboardSteps;if(p&&(h.keyCode==37||h.keyCode==39)){g.move(h.keyCode==37?-j:j);return h.preventDefault()}if(!p&&(h.keyCode==38||h.keyCode==40)){g.move(h.keyCode==38?-j:j);return h.preventDefault()}return true}}):a(document).unbind(w)});g.reload()}a.fn.scrollable=function(d){var e=this.eq(typeof d=="number"?d:0).data("scrollable");
39
+ if(e)return e;var g=a.extend({},a.tools.scrollable.conf);d=a.extend(g,d);d.keyboardSteps=d.keyboardSteps||d.size;this.each(function(){e=new c(a(this),d);a(this).data("scrollable",e)});return d.api?e:this}})(jQuery);(function(a){a.fn.wheel=function(e){return this[e?"bind":"trigger"]("wheel",e)};a.event.special.wheel={setup:function(){a.event.add(this,b,c,{})},teardown:function(){a.event.remove(this,b,c)}};var b=!a.browser.mozilla?"mousewheel":"DOMMouseScroll"+(a.browser.version<"1.9"?" mousemove":"");function c(e){switch(e.type){case "mousemove":return a.extend(e.data,{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY});case "DOMMouseScroll":a.extend(e,e.data);e.delta=-e.detail/3;break;case "mousewheel":e.delta=
40
+ e.wheelDelta/120;break}e.type="wheel";return a.event.handle.call(this,e,e.delta)}var d=a.tools.scrollable;d.plugins=d.plugins||{};d.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};a.fn.mousewheel=function(e){var g=a.extend({},d.plugins.mousewheel.conf),k;if(typeof e=="number")e={speed:e};e=a.extend(g,e);this.each(function(){var p=a(this).scrollable();if(p)k=p;p.getRoot().wheel(function(r,f){p.move(f<0?1:-1,e.speed||50);return false})});return e.api?k:this}})(jQuery);jQuery.ui||function(a){var b=a.fn.remove,c=a.browser.mozilla&&parseFloat(a.browser.version)<1.9;a.ui={version:"1.7.2",plugin:{add:function(f,i,l){f=a.ui[f].prototype;for(var n in l){f.plugins[n]=f.plugins[n]||[];f.plugins[n].push([i,l[n]])}},call:function(f,i,l){if((i=f.plugins[i])&&f.element[0].parentNode)for(var n=0;n<i.length;n++)f.options[i[n][0]]&&i[n][1].apply(f.element,l)}},contains:function(f,i){return document.compareDocumentPosition?f.compareDocumentPosition(i)&16:f!==i&&f.contains(i)},
41
+ hasScroll:function(f,i){if(a(f).css("overflow")=="hidden")return false;i=i&&i=="left"?"scrollLeft":"scrollTop";var l=false;if(f[i]>0)return true;f[i]=1;l=f[i]>0;f[i]=0;return l},isOverAxis:function(f,i,l){return f>i&&f<i+l},isOver:function(f,i,l,n,o,q){return a.ui.isOverAxis(f,l,o)&&a.ui.isOverAxis(i,n,q)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,
42
+ NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(c){var d=a.attr,e=a.fn.removeAttr,g="http://www.w3.org/2005/07/aaa",k=/^aria-/,p=/^wairole:/;a.attr=function(f,i,l){var n=l!==undefined;return i=="role"?n?d.call(this,f,i,"wairole:"+l):(d.apply(this,arguments)||"").replace(p,""):k.test(i)?n?f.setAttributeNS(g,i.replace(k,"aaa:"),l):d.call(this,f,i.replace(k,"aaa:")):d.apply(this,arguments)};a.fn.removeAttr=function(f){return k.test(f)?
43
+ this.each(function(){this.removeAttributeNS(g,f.replace(k,""))}):e.call(this,f)}}a.fn.extend({remove:function(){a("*",this).add(this).each(function(){a(this).triggerHandler("remove")});return b.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var f;
44
+ f=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||
45
+ !f.length?a(document):f}});a.extend(a.expr[":"],{data:function(f,i,l){return!!a.data(f,l[3])},focusable:function(f){var i=f.nodeName.toLowerCase(),l=a.attr(f,"tabindex");return(/input|select|textarea|button|object/.test(i)?!f.disabled:"a"==i||"area"==i?f.href||!isNaN(l):!isNaN(l))&&!a(f)["area"==i?"parents":"closest"](":hidden").length},tabbable:function(f){var i=a.attr(f,"tabindex");return(isNaN(i)||i>=0)&&a(f).is(":focusable")}});function r(f,i,l,n){function o(m){m=a[f][i][m]||[];return typeof m==
46
+ "string"?m.split(/,?\s+/):m}var q=o("getter");if(n.length==1&&typeof n[0]=="string")q=q.concat(o("getterSetter"));return a.inArray(l,q)!=-1}a.widget=function(f,i){var l=f.split(".")[0];f=f.split(".")[1];a.fn[f]=function(n){var o=typeof n=="string",q=Array.prototype.slice.call(arguments,1);if(o&&n.substring(0,1)=="_")return this;if(o&&r(l,f,n,q)){var m=a.data(this[0],f);return m?m[n].apply(m,q):undefined}return this.each(function(){var s=a.data(this,f);!s&&!o&&a.data(this,f,new a[l][f](this,n))._init();
47
+ s&&o&&a.isFunction(s[n])&&s[n].apply(s,q)})};a[l]=a[l]||{};a[l][f]=function(n,o){var q=this;this.namespace=l;this.widgetName=f;this.widgetEventPrefix=a[l][f].eventPrefix||f;this.widgetBaseClass=l+"-"+f;this.options=a.extend({},a.widget.defaults,a[l][f].defaults,a.metadata&&a.metadata.get(n)[f],o);this.element=a(n).bind("setData."+f,function(m,s,w){if(m.target==n)return q._setData(s,w)}).bind("getData."+f,function(m,s){if(m.target==n)return q._getData(s)}).bind("remove",function(){return q.destroy()})};
48
+ a[l][f].prototype=a.extend({},a.widget.prototype,i);a[l][f].getterSetter="option"};a.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(f,i){var l=f,n=this;if(typeof f=="string"){if(i===undefined)return this._getData(f);l={};l[f]=i}a.each(l,function(o,q){n._setData(o,q)})},_getData:function(f){return this.options[f]},_setData:function(f,
49
+ i){this.options[f]=i;if(f=="disabled")this.element[i?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",i)},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(f,i,l){var n=this.options[f];f=f==this.widgetEventPrefix?f:this.widgetEventPrefix+f;i=a.Event(i);i.type=f;if(i.originalEvent){f=a.event.props.length;for(var o;f;){o=a.event.props[--f];i[o]=i.originalEvent[o]}}this.element.trigger(i,
50
+ l);return!(a.isFunction(n)&&n.call(this.element[0],i,l)===false||i.isDefaultPrevented())}};a.widget.defaults={disabled:false};a.ui.mouse={_mouseInit:function(){var f=this;this.element.bind("mousedown."+this.widgetName,function(i){return f._mouseDown(i)}).bind("click."+this.widgetName,function(i){if(f._preventClickEvent){f._preventClickEvent=false;i.stopImmediatePropagation();return false}});if(a.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable",
51
+ "on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);a.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable)},_mouseDown:function(f){f.originalEvent=f.originalEvent||{};if(!f.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(f);this._mouseDownEvent=f;var i=this,l=f.which==1,n=typeof this.options.cancel=="string"?a(f.target).parents().add(f.target).filter(this.options.cancel).length:false;if(!l||n||!this._mouseCapture(f))return true;
52
+ this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=this._mouseStart(f)!==false;if(!this._mouseStarted){f.preventDefault();return true}}this._mouseMoveDelegate=function(o){return i._mouseMove(o)};this._mouseUpDelegate=function(o){return i._mouseUp(o)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+
53
+ this.widgetName,this._mouseUpDelegate);a.browser.safari||f.preventDefault();return f.originalEvent.mouseHandled=true}},_mouseMove:function(f){if(a.browser.msie&&!f.button)return this._mouseUp(f);if(this._mouseStarted){this._mouseDrag(f);return f.preventDefault()}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,f)!==false)?this._mouseDrag(f):this._mouseUp(f);return!this._mouseStarted},_mouseUp:function(f){a(document).unbind("mousemove."+
54
+ this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=f.target==this._mouseDownEvent.target;this._mouseStop(f)}return false},_mouseDistanceMet:function(f){return Math.max(Math.abs(this._mouseDownEvent.pageX-f.pageX),Math.abs(this._mouseDownEvent.pageY-f.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},
55
+ _mouseStop:function(){},_mouseCapture:function(){return true}};a.ui.mouse.defaults={cancel:null,distance:1,delay:0}}(jQuery);(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
56
+ this._mouseDestroy()}},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(b);if(!this.handle)return false;return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager)a.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();
57
+ this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);c.containment&&this._setContainment();this._trigger("start",b);this._cacheHelperProportions();a.ui.ddmanager&&
58
+ !c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,c){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!c){c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+
59
+ "px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,b);return false},_mouseStop:function(b){var c=false;if(a.ui.ddmanager&&!this.options.dropBehaviour)c=a.ui.ddmanager.drop(this,b);if(this.dropped){c=this.dropped;this.dropped=false}if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",
60
+ b);d._clear()})}else{this._trigger("stop",b);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target)c=true});return c},_createHelper:function(b){var c=this.options;b=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone():this.element;b.parents("body").length||b.appendTo(c.appendTo=="parent"?
61
+ this.element[0].parentNode:c.appendTo);b[0]!=this.element[0]&&!/(fixed|absolute)/.test(b.css("position"))&&b.css("position","absolute");return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined)this.offset.click.left=b.left+this.margins.left;if(b.right!=undefined)this.offset.click.left=this.helperProportions.width-b.right+this.margins.left;if(b.top!=undefined)this.offset.click.top=b.top+this.margins.top;if(b.bottom!=undefined)this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top},
62
+ _getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),
63
+ 10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),
64
+ 10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;if(b.containment=="parent")b.containment=this.helper[0].parentNode;if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-
65
+ this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)jQuery/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment)[0];if(c){b=a(b.containment).offset();var d=a(c).css("overflow")!="hidden";this.containment=[b.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(a(c).css("borderTopWidth"),
66
+ 10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,b.left+(d?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,b.top+(d?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(b.containment.constructor==
67
+ Array)this.containment=b.containment},_convertPositionTo:function(b,c){if(!c)c=this.position;b=b=="absolute"?1:-1;var d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);return{top:c.top+this.offset.relative.top*b+this.offset.parent.top*b-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop())*
68
+ b),left:c.left+this.offset.relative.left*b+this.offset.parent.left*b-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())*b)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=
69
+ document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var g=b.pageX,k=b.pageY;if(this.originalPosition){if(this.containment){if(b.pageX-this.offset.click.left<this.containment[0])g=this.containment[0]+this.offset.click.left;if(b.pageY-this.offset.click.top<this.containment[1])k=this.containment[1]+this.offset.click.top;if(b.pageX-this.offset.click.left>this.containment[2])g=this.containment[2]+this.offset.click.left;if(b.pageY-this.offset.click.top>this.containment[3])k=
70
+ this.containment[3]+this.offset.click.top}if(c.grid){k=this.originalPageY+Math.round((k-this.originalPageY)/c.grid[1])*c.grid[1];k=this.containment?!(k-this.offset.click.top<this.containment[1]||k-this.offset.click.top>this.containment[3])?k:!(k-this.offset.click.top<this.containment[1])?k-c.grid[1]:k+c.grid[1]:k;g=this.originalPageX+Math.round((g-this.originalPageX)/c.grid[0])*c.grid[0];g=this.containment?!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?
71
+ g:!(g-this.offset.click.left<this.containment[0])?g-c.grid[0]:g+c.grid[0]:g}}return{top:k-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");
72
+ this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag")this.positionAbs=this._convertPositionTo("absolute");return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",
73
+ eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(b,
74
+ c){var d=a(this).data("draggable"),e=d.options,g=a.extend({},c,{item:d.element});d.sortables=[];a(e.connectToSortable).each(function(){var k=a.data(this,"sortable");if(k&&!k.options.disabled){d.sortables.push({instance:k,shouldRevert:k.options.revert});k._refreshItems();k._trigger("activate",b,g)}})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=
75
+ false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(b);this.instance.options.helper=this.instance.options._helper;d.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",b,e)}})},drag:function(b,c){var d=a(this).data("draggable"),e=this;a.each(d.sortables,function(){this.instance.positionAbs=d.positionAbs;this.instance.helperProportions=d.helperProportions;
76
+ this.instance.offset.click=d.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(e).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return c.helper[0]};b.target=this.instance.currentItem[0];this.instance._mouseCapture(b,true);this.instance._mouseStart(b,true,true);this.instance.offset.click.top=
77
+ d.offset.click.top;this.instance.offset.click.left=d.offset.click.left;this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top;d._trigger("toSortable",b);d.dropped=this.instance.element;d.currentItem=d.element;this.instance.fromOutside=d}this.instance.currentItem&&this.instance._mouseDrag(b)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;
78
+ this.instance.options.revert=false;this.instance._trigger("out",b,this.instance._uiHash(this.instance));this.instance._mouseStop(b,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();d._trigger("fromSortable",b);d.dropped=false}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),c=a(this).data("draggable").options;if(b.css("cursor"))c._cursor=b.css("cursor");b.css("cursor",
79
+ c.cursor)},stop:function(){if(a(this).data("draggable")){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var b=a(this).data("draggable").options;a(b.iframeFix===true?"iframe":b.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},
80
+ stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(b,c){b=a(c.helper);c=a(this).data("draggable").options;if(b.css("opacity"))c._opacity=b.css("opacity");b.css("opacity",c.opacity)},stop:function(b,c){b=a(this).data("draggable").options;b._opacity&&a(c.helper).css("opacity",b._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");if(b.scrollParent[0]!=
81
+ document&&b.scrollParent[0].tagName!="HTML")b.overflowOffset=b.scrollParent.offset()},drag:function(b){var c=a(this).data("draggable"),d=c.options,e=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!d.axis||d.axis!="x")if(c.overflowOffset.top+c.scrollParent[0].offsetHeight-b.pageY<d.scrollSensitivity)c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop+d.scrollSpeed;else if(b.pageY-c.overflowOffset.top<d.scrollSensitivity)c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop-
82
+ d.scrollSpeed;if(!d.axis||d.axis!="y")if(c.overflowOffset.left+c.scrollParent[0].offsetWidth-b.pageX<d.scrollSensitivity)c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft+d.scrollSpeed;else if(b.pageX-c.overflowOffset.left<d.scrollSensitivity)c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft-d.scrollSpeed}else{if(!d.axis||d.axis!="x")if(b.pageY-a(document).scrollTop()<d.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed);else if(a(window).height()-
83
+ (b.pageY-a(document).scrollTop())<d.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed);if(!d.axis||d.axis!="y")if(b.pageX-a(document).scrollLeft()<d.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed);else if(a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}e!==false&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,b)}});a.ui.plugin.add("draggable",
84
+ "snap",{start:function(){var b=a(this).data("draggable"),c=b.options;b.snapElements=[];a(c.snap.constructor!=String?c.snap.items||":data(draggable)":c.snap).each(function(){var d=a(this),e=d.offset();this!=b.element[0]&&b.snapElements.push({item:this,width:d.outerWidth(),height:d.outerHeight(),top:e.top,left:e.left})})},drag:function(b,c){for(var d=a(this).data("draggable"),e=d.options,g=e.snapTolerance,k=c.offset.left,p=k+d.helperProportions.width,r=c.offset.top,f=r+d.helperProportions.height,i=
85
+ d.snapElements.length-1;i>=0;i--){var l=d.snapElements[i].left,n=l+d.snapElements[i].width,o=d.snapElements[i].top,q=o+d.snapElements[i].height;if(l-g<k&&k<n+g&&o-g<r&&r<q+g||l-g<k&&k<n+g&&o-g<f&&f<q+g||l-g<p&&p<n+g&&o-g<r&&r<q+g||l-g<p&&p<n+g&&o-g<f&&f<q+g){if(e.snapMode!="inner"){var m=Math.abs(o-f)<=g,s=Math.abs(q-r)<=g,w=Math.abs(l-p)<=g,h=Math.abs(n-k)<=g;if(m)c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top;if(s)c.position.top=d._convertPositionTo("relative",
86
+ {top:q,left:0}).top-d.margins.top;if(w)c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left;if(h)c.position.left=d._convertPositionTo("relative",{top:0,left:n}).left-d.margins.left}var j=m||s||w||h;if(e.snapMode!="outer"){m=Math.abs(o-r)<=g;s=Math.abs(q-f)<=g;w=Math.abs(l-k)<=g;h=Math.abs(n-p)<=g;if(m)c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top;if(s)c.position.top=d._convertPositionTo("relative",{top:q-d.helperProportions.height,
87
+ left:0}).top-d.margins.top;if(w)c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left;if(h)c.position.left=d._convertPositionTo("relative",{top:0,left:n-d.helperProportions.width}).left-d.margins.left}if(!d.snapElements[i].snapping&&(m||s||w||h||j))d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[i].item}));d.snapElements[i].snapping=m||s||w||h||j}else{d.snapElements[i].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,
88
+ b,a.extend(d._uiHash(),{snapItem:d.snapElements[i].item}));d.snapElements[i].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var b=a(this).data("draggable").options,c=a.makeArray(a(b.stack.group)).sort(function(d,e){return(parseInt(a(d).css("zIndex"),10)||b.stack.min)-(parseInt(a(e).css("zIndex"),10)||b.stack.min)});a(c).each(function(d){this.style.zIndex=b.stack.min+d});this[0].style.zIndex=b.stack.min+c.length}});a.ui.plugin.add("draggable","zIndex",{start:function(b,c){b=
89
+ a(c.helper);c=a(this).data("draggable").options;if(b.css("zIndex"))c._zIndex=b.css("zIndex");b.css("zIndex",c.zIndex)},stop:function(b,c){b=a(this).data("draggable").options;b._zIndex&&a(c.helper).css("zIndex",b._zIndex)}})})(jQuery);(function(a){a.widget("ui.droppable",{_init:function(){var b=this.options,c=b.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(d){return d.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);this.options.addClasses&&
90
+ this.element.addClass("ui-droppable")},destroy:function(){for(var b=a.ui.ddmanager.droppables[this.options.scope],c=0;c<b.length;c++)b[c]==this&&b.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept")this.options.accept=c&&a.isFunction(c)?c:function(d){return d.is(c)};else a.widget.prototype._setData.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&
91
+ this.element.addClass(this.options.activeClass);c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0]))if(this.options.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
92
+ this._trigger("over",b,this.ui(c))}},_out:function(b){var c=a.ui.ddmanager.current;if(!(!c||(c.currentItem||c.element)[0]==this.element[0]))if(this.options.accept.call(this.element[0],c.currentItem||c.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",b,this.ui(c))}},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
93
+ a.data(this,"droppable");if(g.options.greedy&&a.ui.intersect(d,a.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.options.accept.call(this.element[0],d.currentItem||d.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",b,this.ui(d));return this.element}return false},ui:function(b){return{draggable:b.currentItem||
94
+ b.element,helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(b,c,d){if(!c.offset)return false;var e=(b.positionAbs||b.position.absolute).left,g=e+b.helperProportions.width,k=(b.positionAbs||b.position.absolute).top,p=k+b.helperProportions.height,r=c.offset.left,
95
+ f=r+c.proportions.width,i=c.offset.top,l=i+c.proportions.height;switch(d){case "fit":return r<e&&g<f&&i<k&&p<l;case "intersect":return r<e+b.helperProportions.width/2&&g-b.helperProportions.width/2<f&&i<k+b.helperProportions.height/2&&p-b.helperProportions.height/2<l;case "pointer":d=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left;b=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top;return c=a.ui.isOver(b,d,i,r,c.proportions.height,c.proportions.width);
96
+ case "touch":return(k>=i&&k<=l||p>=i&&p<=l||k<i&&p>l)&&(e>=r&&e<=f||g>=r&&g<=f||e<r&&g>f);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope],e=c?c.type:null,g=(b.currentItem||b.element).find(":data(droppable)").andSelf(),k=0;a:for(;k<d.length;k++)if(!(d[k].options.disabled||b&&!d[k].options.accept.call(d[k].element[0],b.currentItem||b.element))){for(var p=0;p<g.length;p++)if(g[p]==d[k].element[0]){d[k].proportions.height=
97
+ 0;continue a}d[k].visible=d[k].element.css("display")!="none";if(d[k].visible){d[k].offset=d[k].element.offset();d[k].proportions={width:d[k].element[0].offsetWidth,height:d[k].element[0].offsetHeight};e=="mousedown"&&d[k]._activate.call(d[k],c)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance))d=this._drop.call(this,c);if(!this.options.disabled&&this.visible&&
98
+ this.options.accept.call(this.element[0],b.currentItem||b.element)){this.isout=1;this.isover=0;this._deactivate.call(this,c)}}});return d},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c);a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var d=a.ui.intersect(b,this,this.options.tolerance);if(d=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");
99
+ if(g.length){e=a.data(g[0],"droppable");e.greedyChild=d=="isover"?1:0}}if(e&&d=="isover"){e.isover=0;e.isout=1;e._out.call(e,c)}this[d]=1;this[d=="isout"?"isover":"isout"]=0;this[d=="isover"?"_over":"_out"].call(this,c);if(e&&d=="isout"){e.isout=0;e.isover=1;e._over.call(e,c)}}}})}}})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/{date.js → languages/date-en-US.js} RENAMED
File without changes
lib/languages/date-hr-HR.js ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Version: 1.0 Alpha-1
3
+ * Build Date: 13-Nov-2007
4
+ * Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
5
+ * License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
6
+ * Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
7
+ */
8
+ Date.CultureInfo={name:"hr-HR",englishName:"Croatian (Croatia)",nativeName:"hrvatski (Hrvatska)",dayNames:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],abbreviatedDayNames:["ned","pon","uto","sri","čet","pet","sub"],shortestDayNames:["ne","po","ut","sr","če","pe","su"],firstLetterDayNames:["n","p","u","s","č","p","s"],monthNames:["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac"],abbreviatedMonthNames:["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^sij(ečanj)?/i,feb:/^veljača/i,mar:/^ožu(jak)?/i,apr:/^tra(vanj)?/i,may:/^svi(banj)?/i,jun:/^lip(anj)?/i,jul:/^srp(anj)?/i,aug:/^kol(ovoz)?/i,sep:/^ruj(an)?/i,oct:/^lis(topad)?/i,nov:/^stu(deni)?/i,dec:/^pro(sinac)?/i,sun:/^ne(d(jelja)?)?/i,mon:/^po(n(edjeljak)?)?/i,tue:/^ut(o(rak)?)?/i,wed:/^sr(i(jeda)?)?/i,thu:/^če(t(vrtak)?)?/i,fri:/^pe(t(ak)?)?/i,sat:/^su(b(ota)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
9
+ Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
10
+ return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
11
+ return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
12
+ return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
13
+ if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
14
+ var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
15
+ if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
16
+ if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
17
+ if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
18
+ if(x.month||x.months){this.addMonths(x.month||x.months);}
19
+ if(x.year||x.years){this.addYears(x.year||x.years);}
20
+ if(x.day||x.days){this.addDays(x.day||x.days);}
21
+ return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
22
+ return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
23
+ if(!x.second&&x.second!==0){x.second=-1;}
24
+ if(!x.minute&&x.minute!==0){x.minute=-1;}
25
+ if(!x.hour&&x.hour!==0){x.hour=-1;}
26
+ if(!x.day&&x.day!==0){x.day=-1;}
27
+ if(!x.month&&x.month!==0){x.month=-1;}
28
+ if(!x.year&&x.year!==0){x.year=-1;}
29
+ if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
30
+ if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
31
+ if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
32
+ if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
33
+ if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
34
+ if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
35
+ if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
36
+ if(x.timezone){this.setTimezone(x.timezone);}
37
+ if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
38
+ return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
39
+ var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
40
+ return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
41
+ Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
42
+ return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
43
+ var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
44
+ return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
45
+ var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
46
+ return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
47
+ (function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
48
+ break;}
49
+ return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
50
+ rx.push(r[0]);s=r[1];}
51
+ return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
52
+ return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
53
+ throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
54
+ return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
55
+ if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
56
+ try{r=(px[i].call(this,s));}catch(e){r=null;}
57
+ if(r){return r;}}
58
+ throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
59
+ try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
60
+ rx.push(r[0]);s=r[1];}
61
+ return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
62
+ return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
63
+ rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
64
+ s=q[1];}
65
+ if(!r){throw new $P.Exception(s);}
66
+ if(q){throw new $P.Exception(q[1]);}
67
+ if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
68
+ return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
69
+ rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
70
+ if(!last&&q[1].length===0){last=true;}
71
+ if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
72
+ p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
73
+ if(rx[1].length<best[1].length){best=rx;}
74
+ if(best[1].length===0){break;}}
75
+ if(best[0].length===0){return best;}
76
+ if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
77
+ best[1]=q[1];}
78
+ return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
79
+ return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
80
+ if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
81
+ var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
82
+ return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
83
+ this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
84
+ var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
85
+ return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
86
+ for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
87
+ if(this.now){return new Date();}
88
+ var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
89
+ if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
90
+ if(!this.unit){this.unit="day";}
91
+ if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
92
+ if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
93
+ this[this.unit+"s"]=this.value*orient;}
94
+ return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
95
+ if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
96
+ if(this.month&&!this.day){this.day=1;}
97
+ return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
98
+ fn=_C[keys]=_.any.apply(null,px);}
99
+ return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
100
+ return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
101
+ return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
102
+ try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
103
+ return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
104
+ return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
lib/lib.txt CHANGED
@@ -1,6 +1,6 @@
1
  This file lists all of the third-party JavaScript libraries we are using and where they came from. All of these files are compressed and combined into the edcallib.min.js file. This compressed file was made with the Google Closure JavaScript compiler. I haven't checked in that compiler because it is over 4MB and you don't need it for runtime. I haven't been able to figure out a way to make WordPress's Subversion exclude a file when building a plugin.
2
 
3
- date.js
4
  This is an open source JavaScript date library that we use to provide and manipulate dates for the calendar.
5
  http://www.datejs.com/
6
  MIT License
1
  This file lists all of the third-party JavaScript libraries we are using and where they came from. All of these files are compressed and combined into the edcallib.min.js file. This compressed file was made with the Google Closure JavaScript compiler. I haven't checked in that compiler because it is over 4MB and you don't need it for runtime. I haven't been able to figure out a way to make WordPress's Subversion exclude a file when building a plugin.
2
 
3
+ languages/date-*.js
4
  This is an open source JavaScript date library that we use to provide and manipulate dates for the calendar.
5
  http://www.datejs.com/
6
  MIT License
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: MaryVogt, zgrossbart
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 2.8.5
5
  Tested up to: 2.8.6
6
- Stable tag: 0.4
7
 
8
  Editorial calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
@@ -49,6 +49,10 @@ The different color of each post indicates the status. Gray is <code>draft</cod
49
 
50
  The calendar works with three types of post status: <code>draft</code>, <code>publish</code>, and <code>future</code>. If you move a <code>publish</code> post to a date after the current day it becomes a <code>future</code> post. If you drag a <code>future</code> post to a day before the current day it becomes a <code>draft</code> post.
51
 
 
 
 
 
52
  == Screenshots ==
53
 
54
  1. See all of your posts and when they'll be published.
@@ -57,6 +61,13 @@ The calendar works with three types of post status: <code>draft</code>, <code>pu
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
 
 
60
  = 0.4 =
61
  * We are now doing a better job arranging our tooltips and setting GMT dates correctly.
62
  * Fixed a problem with the post times so posts dragged with the calendar don't change their time of day.
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 2.8.5
5
  Tested up to: 2.8.6
6
+ Stable tag: 0.5
7
 
8
  Editorial calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
49
 
50
  The calendar works with three types of post status: <code>draft</code>, <code>publish</code>, and <code>future</code>. If you move a <code>publish</code> post to a date after the current day it becomes a <code>future</code> post. If you drag a <code>future</code> post to a day before the current day it becomes a <code>draft</code> post.
51
 
52
+ = Why doesn't the calendar work with Live Countdown Timer =
53
+
54
+ If you use the plugin <a href="http://wordpress.org/extend/plugins/live-countdown-timer/">Live Countdown Timer</a> the editorial calendar will not work. There is a conflict in some JavaScript libraries. They're working on it. For now you must disable Live Countdown Timer if you want to use the WordPress Editorial Calendar.
55
+
56
  == Screenshots ==
57
 
58
  1. See all of your posts and when they'll be published.
61
 
62
  == Changelog ==
63
 
64
+ = 0.5 =
65
+ * Added localization support for strings and dates in the calendar
66
+ * The calendar is no longer showing posts that you have put in your trash
67
+ * Fixed a problem that caused posts to never show up when working with WordPress in Croatian and other Eastern European languages.
68
+ * The calendar now starts the week on the right day based on the configured locale in WordPress.
69
+ * Added language support files for Croatian. Special thanks to <a href="http://www.ivanbrezakbrkan.com">Ivan Brezak Brkan</a>.
70
+
71
  = 0.4 =
72
  * We are now doing a better job arranging our tooltips and setting GMT dates correctly.
73
  * Fixed a problem with the post times so posts dragged with the calendar don't change their time of day.