Editorial Calendar - Version 2.2

Version Description

The calendar is using JavaScript compression to load less data and run faster.

We've added a new mechanism to load the unscheduled drafts which spaces out the loading so the calendar responds super fast even when you have hundreds of unscheduled drafts.

Added a new button to jump to the last post in the calendar.

Added a namespace to fix a small issue of potential JavaScript file conflict with wp_enqueue_script().

Download this release

Release Info

Developer zgrossbart
Plugin Icon wp plugin Editorial Calendar
Version 2.2
Comparing to
See all releases

Code changes from version 2.1.1 to 2.2

Files changed (7) hide show
  1. edcal.css +4 -0
  2. edcal.js +80 -38
  3. edcal.min.js +65 -0
  4. edcal.php +54 -5
  5. edcal_test.js +39 -3
  6. lib/edcallib.min.js +44 -44
  7. readme.txt +11 -5
edcal.css CHANGED
@@ -593,3 +593,7 @@ TinyMCE Rich Editor and Media buttons are not currently used
593
  margin-left: 1em;
594
  }
595
 
 
 
 
 
593
  margin-left: 1em;
594
  }
595
 
596
+
597
+ #moveToToday {
598
+ margin-left: 1.5em;
599
+ }
edcal.js CHANGED
@@ -321,7 +321,6 @@ var edcal = {
321
  //edcal.output("evt.ctrlKey: " + evt.ctrlKey);
322
 
323
  if (evt.keyCode === 27) { //escape key
324
- edcal.hideForm();
325
  return false;
326
  }
327
 
@@ -360,6 +359,21 @@ var edcal = {
360
  return false;
361
  });
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  jQuery('#prevmonth').click(function() {
364
  edcal.move(edcal.weeksPref, false);
365
  return false;
@@ -404,7 +418,7 @@ var edcal = {
404
  jQuery('#newPostScheduleButton').addClass('disabled');
405
  }
406
 
407
- if (evt.keyCode == 13) { // enter key
408
  /*
409
  * If the user presses enter we want to save the draft.
410
  */
@@ -423,7 +437,7 @@ var edcal = {
423
  jQuery('#edcal_applyoptions').addClass('disabled');
424
  }
425
 
426
- if (evt.keyCode == 13) { // enter key
427
  edcal.saveOptions();
428
  }
429
 
@@ -468,7 +482,7 @@ var edcal = {
468
  jQuery('#cal_cont').css({ 'margin-right': drawerwidthmargin });
469
  jQuery('#draftsdrawer_cont').css({ display:'block', width:drawerwidth });
470
  showhideElement.html(edcal.str_hidedrafts);
471
- } else {
472
  // edcal.output('hiding draftsdrawer');
473
  jQuery('#cal_cont').css({ 'margin-right': '0' });
474
  jQuery('#draftsdrawer_cont').css({ display:'none', width:'0' });
@@ -528,7 +542,7 @@ var edcal = {
528
  }).mouseover(function() {
529
  jQuery('#unscheduledNewLink').show();
530
  });
531
- },
532
 
533
  /*
534
  This function aligns the grid in two directions. There
@@ -536,7 +550,7 @@ var edcal = {
536
  grid for each week with a list of days.
537
  */
538
  alignGrid: function(/*string*/ gridid, /*int*/ cols, /*int*/ cellWidth, /*int*/ cellHeight, /*int*/ padding) {
539
- if (jQuery(gridid).parent().attr('id')=='draftsdrawer') {
540
  return;
541
  }
542
 
@@ -578,8 +592,8 @@ var edcal = {
578
  count++;
579
  }
580
  } else {
581
- for (var i = children.length - 1; i > -1; i--) {
582
- children.eq(i).css({
583
  width: cellWidth + '%',
584
  height: cellHeight + '%',
585
  position: 'absolute',
@@ -759,7 +773,7 @@ var edcal = {
759
  sprintf(edcal.str_newpost, edcal.chineseAposWorkaround(_date.toString(Date.CultureInfo.formatPatterns.monthDay))) + '" ' +
760
  'onclick="return false;">' + edcal.str_addPostLink + '</a>';
761
 
762
- if (_date.toString('dd') == '01') {
763
  newrow += '<div class="daylabel">' + _date.toString('MMM d');
764
  } else {
765
  newrow += '<div class="daylabel">' + _date.toString('d');
@@ -878,7 +892,7 @@ var edcal = {
878
  jQuery('#' + newDate + ' .postlist').append(edcal.createPostItem(post, newDate));
879
 
880
 
881
- if (dayId == newDate) {
882
  /*
883
  If they dropped back on to the day they started with we
884
  don't want to go back to the server.
@@ -1064,7 +1078,8 @@ var edcal = {
1064
 
1065
  /*
1066
  This is a simple function that creates the AJAX URL with the
1067
- nonce value generated in edcal.php.
 
1068
  */
1069
  ajax_url: function() {
1070
  return ajaxurl + '?_wpnonce=' + edcal.wp_nonce;
@@ -1342,7 +1357,7 @@ var edcal = {
1342
 
1343
 
1344
 
1345
- if (edcal.getDayFromDayId(post.date).compareTo(Date.today()) == -1) {
1346
  /*
1347
  * We only allow drafts in the past
1348
  */
@@ -1432,7 +1447,6 @@ var edcal = {
1432
  if (edcal.findPostForId(dayobjId, postId)) {
1433
  for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
1434
  if (edcal.posts[dayobjId][i] && 'post-' + edcal.posts[dayobjId][i].id === postId) {
1435
- //edcal.output('(#' + postId+').remove() - post-'+edcal.posts[dayobjId][i].id);
1436
  edcal.posts[dayobjId][i] = null;
1437
  jQuery('#' + postId).remove();
1438
  }
@@ -1446,17 +1460,47 @@ var edcal = {
1446
  */
1447
  getPostItems: function(/*string*/ dayobjId) {
1448
  var postsString = '';
1449
-
1450
  if (edcal.posts[dayobjId]) {
1451
- for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
1452
- if (edcal.posts[dayobjId][i]) {
1453
- postsString += edcal.getPostItemString(edcal.posts[dayobjId][i]);
 
 
 
 
 
 
1454
  }
1455
- }
 
 
 
 
 
 
1456
  }
1457
 
1458
  return postsString;
1459
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1460
 
1461
  /*
1462
  This function shows the action links for the post with the
@@ -1511,7 +1555,7 @@ var edcal = {
1511
  var elem = jQuery('#' + postid + ' > div.postactions');
1512
  elem.slideUp();
1513
  edcal.actionLinksElem = null;
1514
- }, 125);
1515
  },
1516
 
1517
  /*
@@ -1666,7 +1710,7 @@ var edcal = {
1666
  backward it will be the first row. If we switch direction we need
1667
  to bump up our date by 11 rows times 7 days a week or 77 days.
1668
  */
1669
- if (edcal.currentDirection != direction) {
1670
  if (direction) { // into the future
1671
  edcal._wDate = edcal._wDate.add((edcal.weeksPref + 7) * 7).days();
1672
  } else { // into the past
@@ -1894,7 +1938,7 @@ var edcal = {
1894
  * risk conflicts with other plugins.
1895
  */
1896
  endsWith: function(/*string*/ str, /*string*/ expr) {
1897
- return (str.match(expr + '$') == expr);
1898
  },
1899
 
1900
  /*
@@ -2064,10 +2108,10 @@ var edcal = {
2064
  */
2065
  changeDate: function(/*string*/ newdate, /*Post*/ post, /*function*/ callback) {
2066
  edcal.output('changeDate(' + newdate + ', ' + post + ')');
2067
- var move_to_drawer = newdate === edcal.NO_DATE;
2068
- var move_from_drawer = post.date_gmt === edcal.NO_DATE;
2069
- var newdateFormatted = move_to_drawer ? '0000-00-00' : edcal.getDayFromDayId(newdate).toString(edcal.wp_dateFormat);
2070
- // edcal.output('newdate='+newdate+'\nnewdateFormatted='+newdateFormatted);
2071
 
2072
  var olddate = move_from_drawer ? post.date_gmt : edcal.getDayFromDayId(post.date).toString(edcal.wp_dateFormat);
2073
 
@@ -2111,15 +2155,12 @@ var edcal = {
2111
  }
2112
  }
2113
 
2114
- // edcal.output(res.post.date);
2115
  // var container = newdateFormatted == '0000-00-00' ?
2116
 
2117
  var removecont = move_to_drawer ? '00000000' : res.post.date;
2118
  var addcont = move_from_drawer ? newdate : removecont;
2119
- if ( res.post.date_gmt=='01011970' ) {
2120
- // do somthing else
2121
- }
2122
-
2123
  edcal.removePostItem(removecont, 'post-' + res.post.id);
2124
  // edcal.output('remove post from: '+removecont+', add post to: '+addcont);
2125
  edcal.addPostItem(res.post, addcont);
@@ -2147,10 +2188,10 @@ var edcal = {
2147
  specified dates.
2148
  */
2149
  getPosts: function(/*Date*/ from, /*Date*/ to, /*function*/ callback) {
2150
- if ( !to )
2151
  to = '';
2152
- // edcal.output('Getting posts from ' + from + ' to ' + to);
2153
-
2154
  var shouldGet = edcal.cacheDates[from];
2155
 
2156
  if (shouldGet) {
@@ -2184,7 +2225,7 @@ var edcal = {
2184
  timeout: 100000,
2185
  dataType: 'text',
2186
  success: function(res) {
2187
- // edcal.output(res);
2188
  jQuery('#loading').hide();
2189
  /*
2190
  * These result here can get pretty large on a busy blog and
@@ -2224,10 +2265,11 @@ var edcal = {
2224
  * case to make sure we don't get into trouble.
2225
  */
2226
  post.date = post.date.replace(post.date.substring(2, 3), post.date.substring(2, 3).toUpperCase());
2227
- if ( from=='00000000' )
2228
  post.date = from;
 
2229
 
2230
- // edcal.output(post.date + ', post-' + post.id);
2231
  edcal.removePostItem(post.date, 'post-' + post.id);
2232
  edcal.addPostItem(post, post.date);
2233
  // edcal.output(post.id + ', ' + post.date);
@@ -2390,7 +2432,7 @@ var edcal = {
2390
  '<select id="edcal_weeks_pref" ' + 'class="screen-per-page" title="' + edcal.str_weekstt + '"> ';
2391
 
2392
  var weeks = parseInt(edcal.weeksPref, 10);
2393
- for (i = 1; i < 9; i++) {
2394
  if (i === weeks) {
2395
  optionsHtml += '<option selected="true">' + i + '</option>';
2396
  } else {
@@ -2582,7 +2624,7 @@ var edcal = {
2582
  edcal.str_fatal_error + message + '<br></p></div>');
2583
 
2584
  if (window.console) {
2585
- console.error(msg);
2586
  }
2587
  },
2588
 
321
  //edcal.output("evt.ctrlKey: " + evt.ctrlKey);
322
 
323
  if (evt.keyCode === 27) { //escape key
 
324
  return false;
325
  }
326
 
359
  return false;
360
  });
361
 
362
+ jQuery('#moveToLast').click(function() {
363
+ if (edcal.lastPostDate === '-1') {
364
+ /*
365
+ * This happens when the blog doesn't have any posts
366
+ */
367
+ return;
368
+ }
369
+
370
+ var d = Date.parseExact(edcal.lastPostDate, 'ddMMyyyy');
371
+ edcal.moveTo(d);
372
+ edcal.getPosts(edcal.nextStartOfWeek(d).add(-3).weeks(),
373
+ edcal.nextStartOfWeek(d).add(edcal.weeksPref + 3).weeks());
374
+ return false;
375
+ });
376
+
377
  jQuery('#prevmonth').click(function() {
378
  edcal.move(edcal.weeksPref, false);
379
  return false;
418
  jQuery('#newPostScheduleButton').addClass('disabled');
419
  }
420
 
421
+ if (evt.keyCode === 13) { // enter key
422
  /*
423
  * If the user presses enter we want to save the draft.
424
  */
437
  jQuery('#edcal_applyoptions').addClass('disabled');
438
  }
439
 
440
+ if (evt.keyCode === 13) { // enter key
441
  edcal.saveOptions();
442
  }
443
 
482
  jQuery('#cal_cont').css({ 'margin-right': drawerwidthmargin });
483
  jQuery('#draftsdrawer_cont').css({ display:'block', width:drawerwidth });
484
  showhideElement.html(edcal.str_hidedrafts);
485
+ } else {
486
  // edcal.output('hiding draftsdrawer');
487
  jQuery('#cal_cont').css({ 'margin-right': '0' });
488
  jQuery('#draftsdrawer_cont').css({ display:'none', width:'0' });
542
  }).mouseover(function() {
543
  jQuery('#unscheduledNewLink').show();
544
  });
545
+ },
546
 
547
  /*
548
  This function aligns the grid in two directions. There
550
  grid for each week with a list of days.
551
  */
552
  alignGrid: function(/*string*/ gridid, /*int*/ cols, /*int*/ cellWidth, /*int*/ cellHeight, /*int*/ padding) {
553
+ if (jQuery(gridid).parent().attr('id') === 'draftsdrawer') {
554
  return;
555
  }
556
 
592
  count++;
593
  }
594
  } else {
595
+ for (var j = children.length - 1; j > -1; j--) {
596
+ children.eq(j).css({
597
  width: cellWidth + '%',
598
  height: cellHeight + '%',
599
  position: 'absolute',
773
  sprintf(edcal.str_newpost, edcal.chineseAposWorkaround(_date.toString(Date.CultureInfo.formatPatterns.monthDay))) + '" ' +
774
  'onclick="return false;">' + edcal.str_addPostLink + '</a>';
775
 
776
+ if (_date.toString('dd') === '01') {
777
  newrow += '<div class="daylabel">' + _date.toString('MMM d');
778
  } else {
779
  newrow += '<div class="daylabel">' + _date.toString('d');
892
  jQuery('#' + newDate + ' .postlist').append(edcal.createPostItem(post, newDate));
893
 
894
 
895
+ if (dayId === newDate) {
896
  /*
897
  If they dropped back on to the day they started with we
898
  don't want to go back to the server.
1078
 
1079
  /*
1080
  This is a simple function that creates the AJAX URL with the
1081
+ nonce value generated in edcal.php. The ajaxurl variable is
1082
+ defined by WordPress in all of the admin pages.
1083
  */
1084
  ajax_url: function() {
1085
  return ajaxurl + '?_wpnonce=' + edcal.wp_nonce;
1357
 
1358
 
1359
 
1360
+ if (edcal.getDayFromDayId(post.date).compareTo(Date.today()) === -1) {
1361
  /*
1362
  * We only allow drafts in the past
1363
  */
1447
  if (edcal.findPostForId(dayobjId, postId)) {
1448
  for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
1449
  if (edcal.posts[dayobjId][i] && 'post-' + edcal.posts[dayobjId][i].id === postId) {
 
1450
  edcal.posts[dayobjId][i] = null;
1451
  jQuery('#' + postId).remove();
1452
  }
1460
  */
1461
  getPostItems: function(/*string*/ dayobjId) {
1462
  var postsString = '';
1463
+
1464
  if (edcal.posts[dayobjId]) {
1465
+ var posts = edcal.posts[dayobjId];
1466
+ if (posts.length < 50) {
1467
+ /*
1468
+ * If there are fewer than 50 posts then we just load them
1469
+ */
1470
+ for (var i = 0; i < posts.length; i++) {
1471
+ if (posts[i]) {
1472
+ postsString += edcal.getPostItemString(posts[i]);
1473
+ }
1474
  }
1475
+ } else {
1476
+ /*
1477
+ If there are more than 50 posts then we want to batch
1478
+ the load so it doesn't slow down the browser.
1479
+ */
1480
+ edcal.addPostItems(dayobjId, 0, 50);
1481
+ }
1482
  }
1483
 
1484
  return postsString;
1485
  },
1486
+
1487
+ addPostItems: function(/*string*/ dayobjId, /*int*/ index, /*int*/ length) {
1488
+ var posts = edcal.posts[dayobjId];
1489
+ var postsString = '';
1490
+ setTimeout(function() {
1491
+ for (var i = index; i < index + length && i < posts.length; i++) {
1492
+ if (posts[i]) {
1493
+ postsString += edcal.getPostItemString(posts[i]);
1494
+ }
1495
+ }
1496
+
1497
+ jQuery('#' + dayobjId + ' ul').append(postsString);
1498
+
1499
+ if (index + length < posts.length) {
1500
+ edcal.addPostItems(dayobjId, index + length, 50);
1501
+ }
1502
+ }, 100);
1503
+ },
1504
 
1505
  /*
1506
  This function shows the action links for the post with the
1555
  var elem = jQuery('#' + postid + ' > div.postactions');
1556
  elem.slideUp();
1557
  edcal.actionLinksElem = null;
1558
+ }, 1000);
1559
  },
1560
 
1561
  /*
1710
  backward it will be the first row. If we switch direction we need
1711
  to bump up our date by 11 rows times 7 days a week or 77 days.
1712
  */
1713
+ if (edcal.currentDirection !== direction) {
1714
  if (direction) { // into the future
1715
  edcal._wDate = edcal._wDate.add((edcal.weeksPref + 7) * 7).days();
1716
  } else { // into the past
1938
  * risk conflicts with other plugins.
1939
  */
1940
  endsWith: function(/*string*/ str, /*string*/ expr) {
1941
+ return (str.match(expr + '$') === expr);
1942
  },
1943
 
1944
  /*
2108
  */
2109
  changeDate: function(/*string*/ newdate, /*Post*/ post, /*function*/ callback) {
2110
  edcal.output('changeDate(' + newdate + ', ' + post + ')');
2111
+ var move_to_drawer = newdate === edcal.NO_DATE;
2112
+ var move_from_drawer = post.date_gmt === edcal.NO_DATE;
2113
+ var newdateFormatted = move_to_drawer ? '0000-00-00' : edcal.getDayFromDayId(newdate).toString(edcal.wp_dateFormat);
2114
+ // edcal.output('newdate='+newdate+'\nnewdateFormatted='+newdateFormatted);
2115
 
2116
  var olddate = move_from_drawer ? post.date_gmt : edcal.getDayFromDayId(post.date).toString(edcal.wp_dateFormat);
2117
 
2155
  }
2156
  }
2157
 
2158
+ // edcal.output(res.post.date);
2159
  // var container = newdateFormatted == '0000-00-00' ?
2160
 
2161
  var removecont = move_to_drawer ? '00000000' : res.post.date;
2162
  var addcont = move_from_drawer ? newdate : removecont;
2163
+
 
 
 
2164
  edcal.removePostItem(removecont, 'post-' + res.post.id);
2165
  // edcal.output('remove post from: '+removecont+', add post to: '+addcont);
2166
  edcal.addPostItem(res.post, addcont);
2188
  specified dates.
2189
  */
2190
  getPosts: function(/*Date*/ from, /*Date*/ to, /*function*/ callback) {
2191
+ if (!to) {
2192
  to = '';
2193
+ }
2194
+
2195
  var shouldGet = edcal.cacheDates[from];
2196
 
2197
  if (shouldGet) {
2225
  timeout: 100000,
2226
  dataType: 'text',
2227
  success: function(res) {
2228
+ // edcal.output(res);
2229
  jQuery('#loading').hide();
2230
  /*
2231
  * These result here can get pretty large on a busy blog and
2265
  * case to make sure we don't get into trouble.
2266
  */
2267
  post.date = post.date.replace(post.date.substring(2, 3), post.date.substring(2, 3).toUpperCase());
2268
+ if (from === '00000000') {
2269
  post.date = from;
2270
+ }
2271
 
2272
+ // edcal.output(post.date + ', post-' + post.id);
2273
  edcal.removePostItem(post.date, 'post-' + post.id);
2274
  edcal.addPostItem(post, post.date);
2275
  // edcal.output(post.id + ', ' + post.date);
2432
  '<select id="edcal_weeks_pref" ' + 'class="screen-per-page" title="' + edcal.str_weekstt + '"> ';
2433
 
2434
  var weeks = parseInt(edcal.weeksPref, 10);
2435
+ for (var i = 1; i < 9; i++) {
2436
  if (i === weeks) {
2437
  optionsHtml += '<option selected="true">' + i + '</option>';
2438
  } else {
2624
  edcal.str_fatal_error + message + '<br></p></div>');
2625
 
2626
  if (window.console) {
2627
+ console.error(message);
2628
  }
2629
  },
2630
 
edcal.min.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var edcal={NO_DATE:"00000000",weeksPref:3,statusPref:!0,authorPref:!1,timePref:!0,doFeedbackPref:!0,isMoving:!1,inDrag:!1,isDragScrolling:!1,internalDateFormat:"ddMMyyyy",position:null,firstDayOfMonth:null,firstDayOfNextMonth:null,wp_dateFormat:"yyyy-MM-dd",cacheDates:[],tID:null,steps:0,CONCURRENCY_ERROR:4,PERMISSION_ERROR:5,NONCE_ERROR:6,currentDirection:!0,_wDate:Date.today(),moveDate:null,startOfWeek:null,posts:[],windowHeight:0,ltr:"ltr",isDraftsDrawerVisible:!1,init:function(){if(0!==jQuery("#edcal_scrollable").length){edcal.addFeedbackSection();
2
+ "true"===jQuery.cookie("edcal_drafts_drawer")&&(edcal.isDraftsDrawerVisible=!0,edcal.setDraftsDrawerVisible(edcal.isDraftsDrawerVisible));jQuery("#loading").hide();jQuery("#edcal_scrollable").css("height",edcal.getCalHeight()+"px");edcal.windowHeight=jQuery(window).height();edcal.createDaysHeader();jQuery("#edcal_scrollable").scrollable({vertical:!0,size:edcal.weeksPref,keyboard:!1,keyboardSteps:1,speed:100,easing:"linear"});var a=jQuery("#edcal_scrollable").scrollable();a.getConf().keyboard=!1;var b=
3
+ jQuery.cookie("edcal_date");b?(b=Date.parseExact(b,"yyyy-dd-MM"),edcal.output("Resetting to date from the edcal_Date cookie: "+b)):b=Date.today();edcal.moveTo(b.clone());jQuery("#edcal_scrollable").bind("mousewheel",function(a,b){var e=b>0?false:true,f=Math.abs(b);edcal.output(e+" at a velocity of "+f);!edcal.isMoving&&f>0.2&&edcal.move(1,e);return false});a.onBeforeSeek(function(){return false});jQuery(document).bind("keydown",function(a){if(a.keyCode===27)return false;if(!jQuery("#edcal_quickedit").is(":visible")){if(a.keyCode===
4
+ 40&&!a.altKey&&!a.ctrlKey){edcal.move(1,true);return false}if(a.keyCode===38&&!a.altKey&&!a.ctrlKey){edcal.move(1,false);return false}if(a.keyCode===34&&!a.altKey&&!a.ctrlKey||a.keyCode===40&&a.ctrlKey){edcal.move(edcal.weeksPref,true);return false}if(a.keyCode===33&&!a.altKey&&!a.ctrlKey||a.keyCode===38&&a.ctrlKey){edcal.move(edcal.weeksPref,false);return false}}});edcal.getPosts(edcal.nextStartOfWeek(b).add(-3).weeks(),edcal.nextStartOfWeek(b).add(edcal.weeksPref+3).weeks());jQuery("#moveToToday").click(function(){edcal.moveTo(Date.today());
5
+ edcal.getPosts(edcal.nextStartOfWeek(Date.today()).add(-3).weeks(),edcal.nextStartOfWeek(Date.today()).add(edcal.weeksPref+3).weeks());return false});jQuery("#moveToLast").click(function(){if(edcal.lastPostDate!=="-1"){var a=Date.parseExact(edcal.lastPostDate,"ddMMyyyy");edcal.moveTo(a);edcal.getPosts(edcal.nextStartOfWeek(a).add(-3).weeks(),edcal.nextStartOfWeek(a).add(edcal.weeksPref+3).weeks());return false}});jQuery("#prevmonth").click(function(){edcal.move(edcal.weeksPref,false);return false});
6
+ jQuery("#nextmonth").click(function(){edcal.move(edcal.weeksPref,true);return false});jQuery("#newPostScheduleButton").live("click",function(){if(jQuery(this).hasClass("disabled"))return false;jQuery(this).addClass("disabled");return edcal.savePost(null,false,true)});jQuery("#edcal-title-new-field").bind("keyup",function(a){jQuery("#edcal-title-new-field").val().length>0&&jQuery("#edcal-time").val().length>0?jQuery("#newPostScheduleButton").removeClass("disabled"):jQuery("#newPostScheduleButton").addClass("disabled");
7
+ if(a.keyCode===13)return edcal.savePost(null,true)});jQuery("#edcal-status").bind("change",function(){edcal.updatePublishButton()});jQuery("#edcal_weeks_pref").live("keyup",function(a){jQuery("#edcal_weeks_pref").val().length>0?jQuery("#edcal_applyoptions").removeClass("disabled"):jQuery("#edcal_applyoptions").addClass("disabled");a.keyCode===13&&edcal.saveOptions()});edcal.savePosition();edcal.addOptionsSection();jQuery("#edcal-time").timePicker({show24Hours:"H:i"===edcal.timeFormat,separator:":",
8
+ step:30});jQuery("#showdraftsdrawer").click(function(){edcal.setDraftsDrawerVisible(!edcal.isDraftsDrawerVisible)})}},setDraftsDrawerVisible:function(a,b){var c=jQuery("#showdraftsdrawer");c.hasClass("isLoaded")?b&&b():(c.addClass("isLoaded"),edcal.setupDraftsdrawer(b));a?(jQuery("#cal_cont").css({"margin-right":"13.5%"}),jQuery("#draftsdrawer_cont").css({display:"block",width:"13%"}),c.html(edcal.str_hidedrafts)):(jQuery("#cal_cont").css({"margin-right":"0"}),jQuery("#draftsdrawer_cont").css({display:"none",
9
+ width:"0"}),c.html(edcal.str_showdrafts));edcal.isDraftsDrawerVisible=a;jQuery.cookie("edcal_drafts_drawer",a,{expires:2060})},setupDraftsdrawer:function(a){jQuery("#draftsdrawer_loading").css({display:"block"});edcal.getPosts(edcal.NO_DATE,null,function(){edcal.initDraftsdrawer();a&&a()})},initDraftsdrawer:function(){var a;a=""+('<a href="#" adddate="'+edcal.NO_DATE+'" class="daynewlink" style="margin-top: 5px;"title="'+edcal.str_newdraft+'" id="unscheduledNewLink" onclick="edcal.addDraft(); return false;">'+
10
+ edcal.str_addDraftLink+"</a>");a=a+'<ul class="postlist">'+edcal.getPostItems(edcal.NO_DATE);a+="</ul>";edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");edcal.makeDroppable(jQuery("#draftsdrawer div.day"));jQuery("#unscheduled").append(a);jQuery("#draftsdrawer_loading").css({display:"none"});a=jQuery("#cal_cont");jQuery("#unscheduled ul.postlist").css("min-height",a.height()-10-jQuery("#draftsdrawer .draftsdrawerheadcont").height()-jQuery("#unscheduledNewLink").outerHeight());
11
+ jQuery("#unscheduled").mouseout(function(){jQuery("#unscheduledNewLink").hide()}).mouseover(function(){jQuery("#unscheduledNewLink").show()})},alignGrid:function(a,b,c,d,e){if("draftsdrawer"!==jQuery(a).parent().attr("id")){var f=0,g=0,h=1;jQuery(a).each(function(){jQuery(this).css("position","relative");var a=jQuery(this).children("div");if(1===b||"ltr"===edcal.ltr)for(var i=0;i<a.length;i++)a.eq(i).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:g+"%"}),0===h%b?(f=0,g+=d+e):f+=
12
+ c+e,h++;else for(i=a.length-1;-1<i;i--)a.eq(i).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:g+"%"}),0===h%b?(f=0,g+=d+e):f+=c+e,h++})}},alignCal:function(){edcal.alignGrid("#cal",1,100,100/edcal.weeksPref-1,1)},createDaysHeader:function(){var a=Date.today().next().sunday();edcal.nextStartOfWeek(a);var b='<div class="dayheadcont"><div class="dayhead firstday">'+a.add(edcal.startOfWeek).days().toString("dddd")+"</div>",b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+
13
+ "</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead lastday">'+a.add(1).days().toString("dddd")+"</div>");jQuery("#cal_cont").prepend(b);edcal.alignGrid(".dayheadcont",7,13.8,100,0.5)},getDateClass:function(a){var b,c;c=-1===a.compareTo(Date.today())?
14
+ "beforeToday":"todayAndAfter";edcal.firstDayOfMonth||(edcal.firstDayOfMonth=Date.today().moveToFirstDayOfMonth().clearTime(),edcal.firstDayOfNextMonth=Date.today().moveToLastDayOfMonth().clearTime());a.between(edcal.firstDayOfMonth,edcal.firstDayOfNextMonth)?b="month-present":1===a.compareTo(edcal.firstDayOfMonth)?b="month-future":-1===a.compareTo(edcal.firstDayOfNextMonth)&&(b="month-past");"01"===a.toString("dd")&&(c+=" firstOfMonth");return b+" "+c},showAddPostLink:function(a){edcal.inDrag||(a=
15
+ jQuery("#"+a+" a.daynewlink"),a.css("display","block"),a.bind("click",edcal.addPost))},hideAddPostLink:function(a){jQuery("#"+a+" a.daynewlink").hide().unbind("click",edcal.addPost)},createRow:function(a,b){for(var c=edcal._wDate.clone(),d='<div class="rowcont" id="row'+edcal._wDate.toString(edcal.internalDateFormat)+'"><div id="row'+edcal._wDate.toString(edcal.internalDateFormat)+'row" class="row">',e=0;7>e;e++)d+="<div onmouseover=\"edcal.showAddPostLink('"+c.toString(edcal.internalDateFormat)+
16
+ "');\" onmouseout=\"edcal.hideAddPostLink('"+c.toString(edcal.internalDateFormat)+'\');" id="'+c.toString(edcal.internalDateFormat)+'" class="day '+edcal.getDateClass(c)+" "+c.toString("dddd").toLowerCase()+" month-"+c.toString("MM").toLowerCase()+'">',d+='<div class="dayobj">',d+='<a href="#" adddate="'+c.toString("MMMM d")+'" class="daynewlink" title="'+sprintf(edcal.str_newpost,edcal.chineseAposWorkaround(c.toString(Date.CultureInfo.formatPatterns.monthDay)))+'" onclick="return false;">'+edcal.str_addPostLink+
17
+ "</a>",d="01"===c.toString("dd")?d+('<div class="daylabel">'+c.toString("MMM d")):d+('<div class="daylabel">'+c.toString("d")),d+="</div>",d+='<ul class="postlist">',d+=edcal.getPostItems(c.toString(edcal.internalDateFormat)),d+="</ul>",d+="</div>",d+="</div>",c.add(1).days();d+="</div></div>";b?a.append(d):a.prepend(d);edcal.alignGrid("#row"+edcal._wDate.toString(edcal.internalDateFormat)+"row",7,13.9,100,0.5);edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");
18
+ edcal.makeDroppable(jQuery("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" > div > div.day"));return jQuery("row"+edcal._wDate.toString(edcal.internalDateFormat))},makeDroppable:function(a){a.droppable({hoverClass:"day-active",accept:function(a){return jQuery(this).hasClass("beforeToday")?a.hasClass("draft")?!0:!1:!0},greedy:!0,tolerance:"pointer",drop:function(a,c){var d=c.draggable.parent().parent().parent().attr("id");edcal.doDrop(d,c.draggable.attr("id"),jQuery(this).attr("id"))}})},
19
+ doDrop:function(a,b,c,d){var e=edcal.findPostForId(a,b);edcal.removePostFromMap(a,b);var f=jQuery("#"+b);f.detach();setTimeout(function(){f.remove()},500);jQuery("#"+c+" .postlist").append(edcal.createPostItem(e,c));a===c?edcal.draggablePost("#"+c+" .post"):edcal.changeDate(c,e,d)},draggablePost:function(a){jQuery(a).each(function(){var a=edcal.findPostForId(jQuery(this).parent().parent().parent().attr("id"),jQuery(this).attr("id"));edcal.isPostMovable(a)&&(jQuery(this).draggable({revert:"invalid",
20
+ appendTo:"body",helper:"clone",distance:1,addClasses:!1,start:function(){edcal.inDrag=!0},stop:function(){edcal.inDrag=!1},drag:function(a,b){edcal.handleDrag(a,b)},scroll:!1,refreshPositions:!0}),jQuery(this).addClass("draggable"))})},handleDrag:function(a){!edcal.isMoving&&!edcal.isDragScrolling&&(edcal.isDragScrolling=!0,a.pageY<edcal.position.top+10?edcal.move(1,!1):a.pageY>edcal.position.bottom-10&&edcal.move(1,!0),setTimeout(function(){edcal.isDragScrolling=!1},300))},removePostFromMap:function(a,
21
+ b){if(edcal.posts[a])for(var c=0;c<edcal.posts[a].length;c++)if(edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b)return edcal.posts[a][c]=null,!0;return!1},addPostItem:function(a,b){jQuery("#"+b+" > div > ul").append(edcal.createPostItem(a,b))},addPostItemDragAndToolltip:function(a){edcal.draggablePost("#"+a+" > div > ul > li")},deletePost:function(a,b){var c=edcal.ajax_url()+"&action=edcal_deletepost&postid="+a;jQuery.ajax({url:c,type:"POST",processData:!1,timeout:1E5,dataType:"json",success:function(a){a.post.date_gmt===
22
+ edcal.NO_DATE?edcal.removePostItem(a.post.date_gmt,"post-"+a.post.id):edcal.removePostItem(a.post.date,"post-"+a.post.id);a.error?a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error):edcal.output('Finished deleting the post: "'+a.post.title+'"');b&&b(a)},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("deletePost xhr.responseText: "+a.responseText)}})},confirmDelete:function(a){return confirm(edcal.str_del_msg1+a+edcal.str_del_msg2)?!0:!1},ajax_url:function(){return ajaxurl+
23
+ "?_wpnonce="+edcal.wp_nonce},getMediaBar:function(){return jQuery("#cal_mediabar").html()},addPost:function(){jQuery("#newPostScheduleButton").addClass("disabled");var a=jQuery(this).parent().parent().attr("id"),b="10:00";"H:i"!==edcal.timeFormat&&"G:i"!==edcal.timeFormat&&(b+=" AM");a={id:0,date:a,formatteddate:edcal.getDayFromDayId(a).toString(edcal.previewDateFormat),time:b};edcal.showForm(a);return!1},addDraft:function(){jQuery("#newPostScheduleButton").addClass("disabled");var a={id:0,date:Date.today(),
24
+ formatteddate:edcal.NO_DATE,time:edcal.NO_DATE,status:"draft"};edcal.showForm(a);return!1},editPost:function(a){jQuery("#newPostScheduleButton").removeClass("disabled");edcal.getPost(a,edcal.showForm);return!1},savePost:function(a,b,c,d){if("undefined"===typeof a||null===a)a=edcal.serializePost();if(!a.title||""===a.title)return!1;edcal.output("savePost("+a.date+", "+a.title+")");jQuery("#edit-slug-buttons").addClass("tiploading");var e=a.time.toUpperCase();"12"===e.slice(0,2)&&"PM"===e.slice(e.length-
25
+ 2,e.length)?a.time="12:"+e.slice(3,5):"12"===e.slice(0,2)&&"AM"===e.slice(a.time.length-2,a.time.length)&&(a.time="00:"+e.slice(3,5));var e=""!==a.time?Date.parse(a.time):Date.parse("10:00:00"),f;if(null!==e&&e!==edcal.NO_DATE){var g=e.format("H:i:s");f=encodeURIComponent(edcal.getDayFromDayId(a.date).toString(edcal.wp_dateFormat)+" "+g)}else f=encodeURIComponent(a.date.toString(edcal.wp_dateFormat+" H:i:s"));g=edcal.ajax_url()+"&action=edcal_savepost";a="date="+f+"&title="+encodeURIComponent(a.title)+
26
+ "&content="+encodeURIComponent(a.content)+"&id="+encodeURIComponent(a.id)+"&status="+encodeURIComponent(a.status);if(null===e||e===edcal.NO_DATE)a+="&date_gmt="+encodeURIComponent("0000-00-00 00:00:00");edcal.getUrlVars().post_type&&(a+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type));c&&(a+="&dopublish="+encodeURIComponent("future"));jQuery.ajax({url:g,type:"POST",processData:!1,data:a,timeout:1E5,dataType:"json",success:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");
27
+ jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=true;if(a.error){a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error);return false}if(a.post)if(b)window.location=a.post.editlink.replace("&amp;","&");else{var c=a.post.date;if(a.post.date_gmt===edcal.NO_DATE)c=a.post.date_gmt;a.post.id&&edcal.removePostItem(c,"post-"+a.post.id);edcal.addPostItem(a.post,c);edcal.addPostItemDragAndToolltip(c)}else edcal.showError("There was an error creating a new post for your blog.");
28
+ d&&d(a);return true},error:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=true;edcal.showError(edcal.general_error);a.responseText&&edcal.output("savePost xhr.responseText: "+a.responseText)}});return!1},serializePost:function(){var a={};jQuery("#edcal_quickedit").find("input, textarea, select").each(function(){a[this.name]=this.value});return a},showForm:function(a){edcal.resetForm();
29
+ a.formatteddate===edcal.NO_DATE||a.date_gmt===edcal.NO_DATE?jQuery("#timeEditControls").hide():jQuery("#timeEditControls").show();jQuery("#edcal_quickedit").center().show();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!1;a.id?(jQuery("#tooltiptitle").text(sprintf(edcal.str_edit_post_title,a.typeTitle,edcal.getDayFromDayId(a.date).toString(edcal.previewDateFormat))),jQuery("#edcal-title-new-field").val(a.title),jQuery("#content").val(a.content)):a.formatteddate===edcal.NO_DATE?
30
+ jQuery("#tooltiptitle").text(edcal.str_newdraft_title):jQuery("#tooltiptitle").text(edcal.str_newpost_title+a.formatteddate);"future"===a.status&&jQuery("#newPostScheduleButton").text(edcal.str_update);a.status?(jQuery("#edcal-status").val(a.status),edcal.updatePublishButton()):(jQuery("#edcal-status").val("draft"),jQuery("#newPostScheduleButton").text(edcal.str_save));a.status&&("draft"!==a.status&&"future"!==a.status&&"pending"!==a.status)&&(jQuery("#edcal-status").attr("disabled","true"),jQuery("#edcal-status").append('<option class="temp" value="'+
31
+ a.status+'">'+a.status+"</option>"),jQuery("#edcal-status").val(a.status));-1===edcal.getDayFromDayId(a.date).compareTo(Date.today())&&jQuery("#edcal-status").attr("disabled","true");var b=a.time;jQuery("#edcal-time").val(b);jQuery("#edcal-date").val(a.date);jQuery("#edcal-id").val(a.id);jQuery("#edcal-title-new-field").focus();jQuery("#edcal-title-new-field").select()},hideForm:function(){jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;edcal.resetForm()},
32
+ resetForm:function(){jQuery("#edcal_quickedit").find("input, textarea, select").each(function(){this.value=""});jQuery("#edcal-status").removeAttr("disabled");jQuery("#newPostScheduleButton").text(edcal.str_publish);jQuery("#tooltiptitle").text("");jQuery("#edcal-status").removeAttr("disabled");jQuery("#edcal-status .temp").remove()},createPostItem:function(a,b){edcal.posts[b]||(edcal.posts[b]=[]);edcal.posts[b][edcal.posts[b].length]=a;return edcal.getPostItemString(a)},findPostForId:function(a,
33
+ b){if(edcal.posts[a])for(var c=0;c<edcal.posts[a].length;c++)if(edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b)return edcal.posts[a][c];return null},removePostItem:function(a,b){if(edcal.findPostForId(a,b))for(var c=0;c<edcal.posts[a].length;c++)edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b&&(edcal.posts[a][c]=null,jQuery("#"+b).remove())},getPostItems:function(a){var b="";if(edcal.posts[a]){var c=edcal.posts[a];if(50>c.length)for(a=0;a<c.length;a++)c[a]&&(b+=edcal.getPostItemString(c[a]));
34
+ else edcal.addPostItems(a,0,50)}return b},addPostItems:function(a,b,c){var d=edcal.posts[a],e="";setTimeout(function(){for(var f=b;f<b+c&&f<d.length;f++)d[f]&&(e+=edcal.getPostItemString(d[f]));jQuery("#"+a+" ul").append(e);b+c<d.length&&edcal.addPostItems(a,b+c,50)},100)},showActionLinks:function(a){edcal.actionTimer&&clearTimeout(edcal.actionTimer);var b=edcal.findPostForId(jQuery("#"+a).parent().parent().parent().attr("id"),a);if(!edcal.inDrag&&edcal.isPostEditable(b)){var c=jQuery("#"+a+" > div.postactions");
35
+ edcal.actionLinksElem&&edcal.actionLinksElem.get(0)!==c.get(0)&&edcal.actionLinksElem.slideUp();edcal.actionLinksElem=c;edcal.actionTimer=setTimeout(function(){c.slideDown();if(c.parent().position().top+c.parent().height()>c.parent().parent().height()){var b=jQuery("#"+a+" > div.postactions").parent().parent();b.scrollTop(b.scrollTop()+45)}},250)}},hideActionLinks:function(a){edcal.actionTimer&&clearTimeout(edcal.actionTimer);edcal.actionTimer=setTimeout(function(){jQuery("#"+a+" > div.postactions").slideUp();
36
+ edcal.actionLinksElem=null},1E3)},isPostMovable:function(a){return a.editlink&&"publish"!==a.status},isPostEditable:function(a){return a.editlink},getPostEditableClass:function(a){return a.editlink?"":"readonly"},getPostItemString:function(a){var b=a.title;""===b&&(b="[No Title]");edcal.statusPref&&("draft"===a.status&&"1"===a.sticky?b+=edcal.str_draft_sticky:"pending"===a.status&&"1"===a.sticky?b+=edcal.str_pending_sticky:"1"===a.sticky?b+=edcal.str_sticky:"pending"===a.status?b+=edcal.str_pending:
37
+ "draft"===a.status?b+=edcal.str_draft:"publish"!==a.status&&("future"!==a.status&&"pending"!==a.status)&&(b+=" ["+a.status+"]"));edcal.timePref&&(b='<span class="posttime">'+a.formattedtime+"</span> "+b);edcal.authorPref&&(b=sprintf(edcal.str_by,b,'<span class="postauthor">'+a.author+"</span>"));return edcal.isPostMovable(a)?"<li onmouseover=\"edcal.showActionLinks('post-"+a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+
38
+ '"><div class="postlink "><span>'+b+'</span></div><div class="postactions"><a href="'+a.editlink+'">'+edcal.str_edit+'</a> | <a href="#" onclick="edcal.editPost('+a.id+'); return false;">'+edcal.str_quick_edit+'</a> | <a href="'+a.dellink+'" onclick="return edcal.confirmDelete(\''+a.title+"');\">"+edcal.str_del+'</a> | <a href="'+a.permalink+'">'+edcal.str_view+"</a></div></li>":"<li onmouseover=\"edcal.showActionLinks('post-"+a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+
39
+ a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+'"><div class="postlink "><span>'+b+'</span></div><div class="postactions"><a href="'+a.editlink+'">'+edcal.str_republish+'</a> | <a href="'+a.permalink+'">'+edcal.str_view+"</a></div></li>"},setClassforToday:function(){jQuery("#"+Date.today().toString(edcal.internalDateFormat)).addClass("today")},getCalHeight:function(){var a=jQuery(window).height()-jQuery("#footer").height()-jQuery("#wphead").height()-150;return Math.max(a,500)},move:function(a,
40
+ b,c){if(!jQuery("#edcal_quickedit").is(":visible")){edcal.currentDirection!==b&&(edcal._wDate=b?edcal._wDate.add(7*(edcal.weeksPref+7)).days():edcal._wDate.add(-(7*(edcal.weeksPref+7))).days(),edcal.steps=0,edcal.moveDate=edcal._wDate);edcal.currentDirection=b;var d;if(b)for(d=0;d<a;d++)jQuery("#cal > div:first").remove(),edcal.createRow(jQuery("#cal"),!0),edcal._wDate.add(7).days();else for(d=0;d<a;d++)jQuery("#cal > div:last").remove(),edcal.createRow(jQuery("#cal"),!1),edcal._wDate.add(-7).days();
41
+ edcal.alignCal();edcal.setClassforToday();edcal.setDateLabel();edcal.steps+=a;edcal.tID?clearTimeout(edcal.tID):edcal.moveDate=edcal._wDate;edcal.tID=setTimeout(function(){b?edcal.getPosts(edcal._wDate.clone().add(-7*(edcal.steps+1)).days(),edcal._wDate.clone(),c):edcal.getPosts(edcal._wDate.clone(),edcal._wDate.clone().add(7*(edcal.steps+1)).days(),c);edcal.steps=0;edcal.tID=null;edcal.moveDate=edcal._wDate},1E3);b?jQuery.cookie("edcal_date",edcal._wDate.clone().add(-(edcal.weeksPref+4)).weeks().toString("yyyy-dd-MM")):
42
+ jQuery.cookie("edcal_date",edcal._wDate.clone().add(3).weeks().toString("yyyy-dd-MM"))}},getDayFromDayId:function(a){return Date.parseExact(a.substring(2,4)+"/"+a.substring(0,2)+"/"+a.substring(4),"MM/dd/yyyy")},setDateLabel:function(){var a=jQuery("#edcal_scrollable").scrollable().getVisibleItems(),b=edcal.getDayFromDayId(a.eq(0).children(".row").children(".day:first").attr("id")),a=edcal.getDayFromDayId(a.eq(edcal.weeksPref-1).children(".row").children(".day:last").attr("id"));jQuery("#currentRange").text(edcal.chineseAposWorkaround(b.toString(Date.CultureInfo.formatPatterns.yearMonth))+
43
+ " - "+edcal.chineseAposWorkaround(a.toString(Date.CultureInfo.formatPatterns.yearMonth)))},nextStartOfWeek:function(a){a=a.clone();if(null===edcal.startOfWeek)if(edcal.locale){var b=edcal.locale.toUpperCase();edcal.startOfWeek=edcal.endsWith(b,"AS")||edcal.endsWith(b,"AZ")||edcal.endsWith(b,"BW")||edcal.endsWith(b,"CA")||edcal.endsWith(b,"CN")||edcal.endsWith(b,"FO")||edcal.endsWith(b,"GB")||edcal.endsWith(b,"GE")||edcal.endsWith(b,"GL")||edcal.endsWith(b,"GU")||edcal.endsWith(b,"HK")||edcal.endsWith(b,
44
+ "IE")||edcal.endsWith(b,"IL")||edcal.endsWith(b,"IN")||edcal.endsWith(b,"IS")||edcal.endsWith(b,"JM")||edcal.endsWith(b,"JP")||edcal.endsWith(b,"KG")||edcal.endsWith(b,"KR")||edcal.endsWith(b,"LA")||edcal.endsWith(b,"MH")||edcal.endsWith(b,"MN")||edcal.endsWith(b,"MO")||edcal.endsWith(b,"MP")||edcal.endsWith(b,"MT")||edcal.endsWith(b,"NZ")||edcal.endsWith(b,"PH")||edcal.endsWith(b,"PK")||edcal.endsWith(b,"SG")||edcal.endsWith(b,"SY")||edcal.endsWith(b,"TH")||edcal.endsWith(b,"TT")||edcal.endsWith(b,
45
+ "TW")||edcal.endsWith(b,"UM")||edcal.endsWith(b,"US")||edcal.endsWith(b,"UZ")||edcal.endsWith(b,"VI")||edcal.endsWith(b,"ZW")?0:edcal.endsWith(b,"MV")?5:edcal.endsWith(b,"AF")||edcal.endsWith(b,"BH")||edcal.endsWith(b,"DJ")||edcal.endsWith(b,"DZ")||edcal.endsWith(b,"EG")||edcal.endsWith(b,"ER")||edcal.endsWith(b,"ET")||edcal.endsWith(b,"IQ")||edcal.endsWith(b,"IR")||edcal.endsWith(b,"JO")||edcal.endsWith(b,"KE")||edcal.endsWith(b,"KW")||edcal.endsWith(b,"LY")||edcal.endsWith(b,"MA")||edcal.endsWith(b,
46
+ "OM")||edcal.endsWith(b,"QA")||edcal.endsWith(b,"SA")||edcal.endsWith(b,"SD")||edcal.endsWith(b,"SO")||edcal.endsWith(b,"TN")||edcal.endsWith(b,"YE")?6:1}else edcal.startOfWeek=0;return a.next().sunday().add(edcal.startOfWeek).days()},endsWith:function(a,b){return a.match(b+"$")===b},moveTo:function(a){edcal.isMoving=!0;jQuery("#cal").empty();jQuery.cookie("edcal_date",a.toString("yyyy-dd-MM"));edcal._wDate=edcal.nextStartOfWeek(a).add(-21).days();edcal.currentDirection=!0;for(var a=edcal.weeksPref+
47
+ 6,b=0;b<a;b++)edcal.createRow(jQuery("#cal"),!0),edcal._wDate.add(7).days();edcal.alignCal();jQuery("#edcal_scrollable").scrollable().move(2);edcal.setDateLabel();edcal.setClassforToday();edcal.isMoving=!1},savePosition:function(){var a=jQuery("#edcal_scrollable"),b=jQuery("#cal_cont");edcal.position={top:a.offset().top,bottom:a.offset().top+a.height()};jQuery("#edcal_poststyle").remove();a=jQuery(".rowcont:eq(2) .dayobj:first").height()-jQuery(".rowcont:eq(2) .daylabel:first").height()-6;jQuery("head").append('<style id="edcal_poststyle" type="text/css">.ui-draggable-dragging {width: '+
48
+ (jQuery(".rowcont:eq(2) .day:first").width()-5)+"px;}.postlist {height: "+a+"px;}</style>");jQuery("#draftsdrawer").css("height",b.height());jQuery("#draftsdrawer .day").css("min-height",b.height()-10-jQuery("#draftsdrawer .draftsdrawerheadcont").height())},addFeedbackSection:function(){3<edcal.visitCount&&edcal.doFeedbackPref&&jQuery("#edcal_main_title").after(edcal.str_feedbackmsg)},doFeedback:function(){jQuery.getScript("http://www.zackgrossbart.com/edcal/mint/?js",function(){edcal.saveFeedbackPref()})},
49
+ noFeedback:function(){jQuery("#feedbacksection").hide("fast");edcal.saveFeedbackPref()},saveFeedbackPref:function(){var a=edcal.ajax_url()+"&action=edcal_saveoptions&dofeedback="+encodeURIComponent("done");jQuery.ajax({url:a,type:"POST",processData:!1,timeout:1E5,dataType:"text",success:function(){jQuery("#feedbacksection").html(edcal.str_feedbackdone);setTimeout(function(){jQuery("#feedbacksection").hide("slow")},5E3)},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("saveOptions xhr.responseText: "+
50
+ a.responseText)}})},updatePublishButton:function(){"future"===jQuery("#edcal-status").val()&&jQuery("#newPostScheduleButton").text(edcal.str_publish);"pending"===jQuery("#edcal-status").val()?jQuery("#newPostScheduleButton").text(edcal.str_review):jQuery("#newPostScheduleButton").text(edcal.str_save)},changeDate:function(a,b,c){edcal.output("changeDate("+a+", "+b+")");var d=a===edcal.NO_DATE,e=b.date_gmt===edcal.NO_DATE,f=d?"0000-00-00":edcal.getDayFromDayId(a).toString(edcal.wp_dateFormat),g=e?b.date_gmt:
51
+ edcal.getDayFromDayId(b.date).toString(edcal.wp_dateFormat);d&&(b.status="draft");f=edcal.ajax_url()+"&action=edcal_changedate&postid="+b.id+"&postStatus="+b.status+"&newdate="+f+"&olddate="+g;jQuery("#post-"+b.id).addClass("loadingclass");jQuery.ajax({url:f,type:"POST",processData:!1,timeout:1E5,dataType:"json",success:function(b){edcal.output("res.post.date="+b.post.date);edcal.output(b.post);if(b.error){edcal.removePostItem(a,"post-"+b.post.id);b.error===edcal.CONCURRENCY_ERROR?edcal.displayMessage(edcal.concurrency_error+
52
+ "<br />"+b.post.title):b.error===edcal.PERMISSION_ERROR?edcal.displayMessage(edcal.permission_error):b.error===edcal.NONCE_ERROR&&edcal.displayMessage(edcal.checksum_error)}var f=d?"00000000":b.post.date,g=e?a:f;edcal.removePostItem(f,"post-"+b.post.id);edcal.addPostItem(b.post,g);edcal.addPostItemDragAndToolltip(g);c&&c(b)},error:function(a,b,c){edcal.showError(edcal.general_error);edcal.output("textStatus: "+b);edcal.output("error: "+c);a.responseText&&edcal.output("changeDate xhr.responseText: "+
53
+ a.responseText)}})},getPosts:function(a,b,c){b||(b="");edcal.cacheDates[a]?c&&c():(edcal.cacheDates[a]=!0,b=edcal.ajax_url()+"&action=edcal_posts&from="+a.toString("yyyy-MM-dd")+"&to="+b.toString("yyyy-MM-dd"),edcal.getUrlVars().post_type&&(b+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type)),jQuery("#loading").show(),jQuery.ajax({url:b,type:"GET",processData:!1,timeout:1E5,dataType:"text",success:function(b){jQuery("#loading").hide();var e=JSON.parseIt(b);if(e.error)e.error===edcal.NONCE_ERROR&&
54
+ edcal.showError(edcal.checksum_error);else{for(var f=[],g=e.length;0<=g;g--){var h=e[g];h&&"trash"!==h.status&&(h.date=h.date.replace(h.date.substring(2,3),h.date.substring(2,3).toUpperCase()),"00000000"===a&&(h.date=a),edcal.removePostItem(h.date,"post-"+h.id),edcal.addPostItem(h,h.date),f[f.length]=h.date)}setTimeout(function(){jQuery.each(f,function(a,b){edcal.addPostItemDragAndToolltip(b)})},300);c&&c(b)}},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("getPosts xhr.responseText: "+
55
+ a.responseText)}}))},getPost:function(a,b){if(0===a)return!1;jQuery("#loading").show();var c=edcal.ajax_url()+"&action=edcal_getpost&postid="+a;edcal.getUrlVars().post_type&&(c+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type));jQuery.ajax({url:c,type:"GET",processData:!1,timeout:1E5,dataType:"json",success:function(a){jQuery("#loading").hide();edcal.output("xhr for getPost returned: "+a);if(a.error)return a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error),!1;"function"===
56
+ typeof b&&b(a.post);return a.post},error:function(a){jQuery("#loading").hide();edcal.showError(edcal.general_error);a.responseText&&edcal.output("getPost xhr.responseText: "+a.responseText);return!1}});return!0},addOptionsSection:function(){var a='<div class="hide-if-no-js screen-meta-toggle" id="screen-options-link-wrap"><a class="show-settings" id="show-edcal-settings-link" onclick="edcal.toggleOptions(); return false;" href="#" >'+edcal.str_screenoptions+"</a></div>";0===jQuery("#screen-meta-links").length&&
57
+ jQuery("#screen-meta").after('<div id="screen-meta-links"></div>');jQuery("#screen-meta-links").append(a)},toggleOptions:function(){if(edcal.helpMeta)jQuery("#contextual-help-wrap").slideUp("fast"),jQuery("#contextual-help-wrap").html(edcal.helpMeta),edcal.helpMeta=null,jQuery("#show-edcal-settings-link").removeClass("screen-meta-active"),jQuery("#contextual-help-link-wrap").css("visibility","");else{edcal.helpMeta=jQuery("#contextual-help-wrap").html();for(var a='<div class="metabox-prefs" id="calendar-fields-prefs"><h5>'+
58
+ edcal.str_show_opts+'</h5><label for="author-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.authorPref)+'value="true" id="author-hide" name="author-hide" class="hide-column-tog" />'+edcal.str_opt_author+'</label><label for="status-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.statusPref)+'value="true" id="status-hide" name="status-hide" class="hide-column-tog" />'+edcal.str_opt_status+'</label><label for="time-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.timePref)+
59
+ 'value="true" id="time-hide" name="time-hide" class="hide-column-tog" />'+edcal.str_opt_time+"</label></div>",a=a+('<div class="metabox-prefs"><h5>'+edcal.str_show_title+'</h5><select id="edcal_weeks_pref" class="screen-per-page" title="'+edcal.str_weekstt+'"> '),b=parseInt(edcal.weeksPref,10),c=1;9>c;c++)a=c===b?a+('<option selected="true">'+c+"</option>"):a+("<option>"+c+"</option>");a+="</select>"+edcal.str_opt_weeks+"</div>";a+='<br /><button id="edcal_applyoptions" onclick="edcal.saveOptions(); return false;" class="save button">'+
60
+ edcal.str_apply+"</button>";jQuery("#contextual-help-wrap").html(a);jQuery("#contextual-help-link-wrap").css("visibility","hidden");jQuery("#contextual-help-wrap").slideDown("normal");jQuery("#screen-meta").show();jQuery("#show-edcal-settings-link").addClass("screen-meta-active")}},generateColorPicker:function(a,b,c){var a='<div id="'+b+'" class="optionscolorrow">'+('<span style="background-color: '+c+';" class="colorlabel"> '+a+"</span> "),d="lightred orange yellow lightgreen lightblue purple lightgray".split(" ");
61
+ edcal.output("colors.length: "+d.length);for(var e=0;e<d.length;e++)a+='<a href="#" class="optionscolor ',d[e]===c&&(a+="colorselected"),a+='" class='+b+d[e]+'" style="background-color: '+d[e]+"; left: "+(20*e+50)+'px" onclick="edcal.selectColor(\''+b+"', '"+d[e]+"'); return false;\"></a>";return a+"</div>"},selectColor:function(a,b){edcal.output("selectColor("+a+", "+b+")");jQuery("#"+a+" .colorlabel").css("background-color",b);jQuery("#"+a+" .colorselected").removeClass("colorselected");jQuery("#"+
62
+ a+"value").addClass("colorselected")},isPrefChecked:function(a){return a?' checked="checked" ':""},saveOptions:function(){var a=parseInt(jQuery("#edcal_weeks_pref").val(),10);if(1>a||8<a)humanMsg.displayMsg(edcal.str_weekserror);else{var b=edcal.ajax_url()+"&action=edcal_saveoptions&weeks="+encodeURIComponent(jQuery("#edcal_weeks_pref").val());jQuery("#calendar-fields-prefs").find("input, textarea, select").each(function(){b+="&"+encodeURIComponent(this.name)+"="+encodeURIComponent(this.checked)});
63
+ jQuery.ajax({url:b,type:"POST",processData:!1,timeout:1E5,dataType:"text",success:function(){window.location.href=window.location.href},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("saveOptions xhr.responseText: "+a.responseText)}})}},output:function(a){window.console&&console.info(a)},showError:function(a){window.console&&console.error(a);edcal.displayMessage(a)},displayMessage:function(a){humanMsg.displayMsg(a)},getUrlVars:function(){for(var a=[],b,c=window.location.href.slice(window.location.href.indexOf("?")+
64
+ 1).split("&"),d=0;d<c.length;d++)b=c[d].split("="),a.push(b[0]),a[b[0]]=b[1];return a},showFatalError:function(a){jQuery("#edcal_main_title").after('<div class="updated below-h2" id="message"><p>'+edcal.str_fatal_error+a+"<br></p></div>");window.console&&console.error(a)},chineseAposWorkaround:function(a){return 0===Date.CultureInfo.name.indexOf("zh")||0===Date.CultureInfo.name.indexOf("ja")?a.replace(/'/g,""):a}};
65
+ jQuery.fn.center=function(){this.css("position","absolute");this.css("top",(jQuery(window).height()-this.outerHeight())/2+jQuery(window).scrollTop()+"px");this.css("left",(jQuery(window).width()-this.outerWidth())/2+jQuery(window).scrollLeft()+"px");return this};jQuery(document).ready(function(){try{edcal.init()}catch(a){edcal.output("Error loading calendar: "+a),edcal.showFatalError(a.description)}edcal.getUrlVars().qunit&&edcal_test.runTests()});
edcal.php CHANGED
@@ -18,7 +18,7 @@
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
21
- Version: 2.1.1
22
  Author: Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
  Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
@@ -234,7 +234,7 @@ class EdCal {
234
  <?php
235
  }
236
  ?>
237
-
238
  <?php
239
  if (get_option("edcal_do_feedback") != "done") {
240
  ?>
@@ -244,6 +244,8 @@ class EdCal {
244
  }
245
  ?>
246
 
 
 
247
  edcal.startOfWeek = <?php echo(get_option("start_of_week")); ?>;
248
  edcal.timeFormat = "<?php echo(get_option("time_format")); ?>";
249
  edcal.previewDateFormat = "MMMM d";
@@ -363,7 +365,11 @@ class EdCal {
363
  <?php
364
  echo '<!-- This is the code from edcal.js -->';
365
  echo '<script type="text/javascript">';
366
- $this->edcal_echoFile(dirname( __FILE__ ) . "/edcal.js");
 
 
 
 
367
  echo '</script>';
368
 
369
  ?>
@@ -379,11 +385,14 @@ class EdCal {
379
  <div id="topbar" class="tablenav clearfix">
380
  <div id="topleft" class="tablenav-pages alignleft">
381
  <h3>
382
- <a href="#" title="<?php echo(__('Jump back', 'editorial-calendar')) ?>" class="prev page-numbers" id="prevmonth">&laquo;</a>
383
  <span id="currentRange"></span>
384
- <a href="#" title="<?php echo(__('Skip ahead', 'editorial-calendar')) ?>" class="next page-numbers" id="nextmonth">&raquo;</a>
 
385
 
386
  <a class="save button" title="<?php echo(__('Scroll the calendar and make the today visible', 'editorial-calendar')) ?>" id="moveToToday"><?php echo(__('Show Today', 'editorial-calendar')) ?></a>
 
 
387
  </h3>
388
  </div>
389
 
@@ -599,6 +608,46 @@ class EdCal {
599
  die();
600
  }
601
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
602
  /*
603
  * This is for an AJAX call that returns a post with the specified ID
604
  */
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
21
+ Version: 2.2
22
  Author: Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
  Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
234
  <?php
235
  }
236
  ?>
237
+
238
  <?php
239
  if (get_option("edcal_do_feedback") != "done") {
240
  ?>
244
  }
245
  ?>
246
 
247
+ <?php $this->edcal_getLastPost(); ?>
248
+
249
  edcal.startOfWeek = <?php echo(get_option("start_of_week")); ?>;
250
  edcal.timeFormat = "<?php echo(get_option("time_format")); ?>";
251
  edcal.previewDateFormat = "MMMM d";
365
  <?php
366
  echo '<!-- This is the code from edcal.js -->';
367
  echo '<script type="text/javascript">';
368
+ if (isset($_GET['debug'])) {
369
+ $this->edcal_echoFile(dirname( __FILE__ ) . "/edcal.js");
370
+ } else {
371
+ $this->edcal_echoFile(dirname( __FILE__ ) . "/edcal.min.js");
372
+ }
373
  echo '</script>';
374
 
375
  ?>
385
  <div id="topbar" class="tablenav clearfix">
386
  <div id="topleft" class="tablenav-pages alignleft">
387
  <h3>
388
+ <a href="#" title="<?php echo(__('Jump back', 'editorial-calendar')) ?>" class="prev page-numbers" id="prevmonth">&lsaquo;</a>
389
  <span id="currentRange"></span>
390
+ <a href="#" title="<?php echo(__('Skip ahead', 'editorial-calendar')) ?>" class="next page-numbers" id="nextmonth">&rsaquo;</a>
391
+ <a class="save button" title="<?php echo(__('Scroll the calendar and make the last post visible', 'editorial-calendar')) ?>" id="moveToLast">&raquo;</a>
392
 
393
  <a class="save button" title="<?php echo(__('Scroll the calendar and make the today visible', 'editorial-calendar')) ?>" id="moveToToday"><?php echo(__('Show Today', 'editorial-calendar')) ?></a>
394
+
395
+
396
  </h3>
397
  </div>
398
 
608
  die();
609
  }
610
 
611
+ /*
612
+ * This filter specifies a special WHERE clause so we just get the posts we're
613
+ * interested in for the last post.
614
+ */
615
+ function edcal_lastpost_filter_where($where = '') {
616
+ $where .= " AND (`post_status` = 'draft' OR `post_status` = 'publish' OR `post_status` = 'future')";
617
+ return $where;
618
+ }
619
+
620
+ /*
621
+ * Get information about the last post (the one furthest in the future) and make
622
+ * that information available to the JavaScript code so it can make the last post
623
+ * button work.
624
+ */
625
+ function edcal_getLastPost() {
626
+ $args = array(
627
+ 'posts_per_page' => -1,
628
+ 'post_parent' => null,
629
+ 'order' => 'DESC'
630
+ );
631
+
632
+ add_filter( 'posts_where', array(&$this, 'edcal_lastpost_filter_where' ));
633
+ $myposts = query_posts($args);
634
+ remove_filter( 'posts_where', array(&$this, 'edcal_lastpost_filter_where' ));
635
+
636
+ if (sizeof($myposts) > 0) {
637
+ $post = $myposts[0];
638
+ setup_postdata($post);
639
+ ?>
640
+ edcal.lastPostDate = '<?php echo(date('dmY',strtotime($post->post_date))); ?>';
641
+ edcal.lastPostId = '<?php echo($post->ID); ?>';
642
+ <?php
643
+ } else {
644
+ ?>
645
+ edcal.lastPostDate = '-1';
646
+ edcal.lastPostId = '-1';
647
+ <?php
648
+ }
649
+ }
650
+
651
  /*
652
  * This is for an AJAX call that returns a post with the specified ID
653
  */
edcal_test.js CHANGED
@@ -111,7 +111,7 @@ var edcal_test = {
111
  /*
112
  * Now we'll move 4 weeks into the future
113
  */
114
- asyncTest('Move 4 week in the future and check visible dates', function() {
115
  expect(2);
116
 
117
  edcal.move(4, true, function() {
@@ -136,7 +136,7 @@ var edcal_test = {
136
  /*
137
  * Now 8 weeks into the past
138
  */
139
- asyncTest('Move 8 week in the past and check visible dates', function() {
140
  expect(2);
141
 
142
  edcal.move(8, false, function() {
@@ -147,13 +147,49 @@ var edcal_test = {
147
 
148
  edcal.move(8, true, function() {
149
  start();
150
- edcal_test.testCreatePost();
151
  });
152
  });
153
 
154
 
155
  });
156
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
  testCreatePost: function() {
159
  /*
111
  /*
112
  * Now we'll move 4 weeks into the future
113
  */
114
+ asyncTest('Move 4 weeks in the future and check visible dates', function() {
115
  expect(2);
116
 
117
  edcal.move(4, true, function() {
136
  /*
137
  * Now 8 weeks into the past
138
  */
139
+ asyncTest('Move 8 weeks in the past and check visible dates', function() {
140
  expect(2);
141
 
142
  edcal.move(8, false, function() {
147
 
148
  edcal.move(8, true, function() {
149
  start();
150
+ edcal_test.testMoveToLast();
151
  });
152
  });
153
 
154
 
155
  });
156
  },
157
+
158
+ testMoveToLast: function() {
159
+ if (edcal.lastPostDate === '-1') {
160
+ /*
161
+ * Then there aren't any posts and we can't go
162
+ * to the last one so we just skip this test.
163
+ */
164
+ edcal_test.testCreatePost();
165
+ return;
166
+ }
167
+
168
+ var d = Date.parseExact(edcal.lastPostDate, 'ddMMyyyy');
169
+ var curSunday = edcal.nextStartOfWeek(d).add(-1).weeks();
170
+
171
+ /*
172
+ * Now move to the last post, get the post date, and make sure the post
173
+ * is there with the correct ID.
174
+ */
175
+ asyncTest('Move to the last post', function() {
176
+ expect(1);
177
+
178
+ edcal.moveTo(d);
179
+ edcal.getPosts(edcal.nextStartOfWeek(d).add(-3).weeks(),
180
+ edcal.nextStartOfWeek(d).add(edcal.weeksPref + 3).weeks(), function() {
181
+
182
+ equals(jQuery('#post-' + edcal.lastPostId).length, 1, 'The post should be added at ' +
183
+ d.toString(Date.CultureInfo.formatPatterns.longDate));
184
+
185
+ edcal.moveTo(Date.today());
186
+ start();
187
+ edcal_test.testCreatePost();
188
+ });
189
+
190
+
191
+ });
192
+ },
193
 
194
  testCreatePost: function() {
195
  /*
lib/edcallib.min.js CHANGED
@@ -4,57 +4,57 @@ jQuery("#humanMsgClose").show()}else{humanMsg.setLogHeight();jQuery(this).siblin
4
  200,function(){e&&humanMsg.log(a)}),humanMsg.t1&&clearTimeout(humanMsg.t1),humanMsg.t2&&clearTimeout(humanMsg.t2),humanMsg.t1=setTimeout(function(){humanMsg.bindEvents()},3E3),humanMsg.t2=setTimeout(function(){humanMsg.removeMsg()},5E3))},log:function(a){jQuery("#"+humanMsg.logID).show().children("ul").prepend("<li>"+a+"</li>").children("li:first").slideDown(200);"none"==jQuery("#"+humanMsg.logID+" ul").css("display")?jQuery("#"+humanMsg.logID+" p").animate({bottom:40},200,"linear",function(){jQuery(this).animate({bottom:0},
5
  300,"swing",function(){jQuery(this).css({bottom:0})})}):humanMsg.setLogHeight();jQuery("#humanMsgClose").show();jQuery("#"+humanMsg.logID+" p").removeClass("minimized")},activateLog:function(){jQuery("#"+humanMsg.logID+" p").removeClass("faded");clearTimeout(humanMsg.t3);humanMsg.t3=setTimeout(humanMsg.fadeLog,15E3)},setLogHeight:function(){if("Microsoft Internet Explorer"===navigator.appName){var a=Math.min(48*jQuery("#"+humanMsg.logID+" ul").children("li").length,112);jQuery("#"+humanMsg.logID+
6
  " ul").css("height",a+10+"px");jQuery("#"+humanMsg.logID).css("top","-"+(a+56+humanMsg.logTop)+"px")}else a=Math.min(14*jQuery("#"+humanMsg.logID+" ul").children("li").length,56),jQuery("#"+humanMsg.logID+" ul").css("height",a+10+"px"),jQuery("#"+humanMsg.logID).css("top","-"+(a+112+humanMsg.logTop)+"px")},bindEvents:function(){jQuery(window).mousemove(humanMsg.removeMsg).click(humanMsg.removeMsg).keypress(humanMsg.removeMsg)},removeMsg:function(){jQuery(window).unbind("mousemove",humanMsg.removeMsg).unbind("click",
7
- humanMsg.removeMsg).unbind("keypress",humanMsg.removeMsg);jQuery("#"+humanMsg.msgID).fadeOut()},fadeLog:function(){"none"===jQuery("#"+humanMsg.logID+" ul").css("display")&&jQuery("#"+humanMsg.logID+" p").addClass("faded")}};jQuery(document).ready(function(){humanMsg.setup()});(function(a){function e(b){var f=b||window.event,c=[].slice.call(arguments,1),g=0,d=0,e=0,b=a.event.fix(f);b.type="mousewheel";f.wheelDelta&&(g=f.wheelDelta/120);f.detail&&(g=-f.detail/3);e=g;void 0!==f.axis&&f.axis===f.HORIZONTAL_AXIS&&(e=0,d=-1*g);void 0!==f.wheelDeltaY&&(e=f.wheelDeltaY/120);void 0!==f.wheelDeltaX&&(d=-1*f.wheelDeltaX/120);c.unshift(b,g,d,e);return(a.event.dispatch||a.event.handle).apply(this,c)}var g=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var d=g.length;d;)a.event.fixHooks[g[--d]]=
8
- a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var b=g.length;b;)this.addEventListener(g[--b],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var b=g.length;b;)this.removeEventListener(g[--b],e,!1);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(b){return b?this.bind("mousewheel",b):this.trigger("mousewheel")},unmousewheel:function(b){return this.unbind("mousewheel",b)}})})(jQuery);var sprintf=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}var e=function(){e.cache.hasOwnProperty(arguments[0])||(e.cache[arguments[0]]=e.parse(arguments[0]));return e.format.call(null,e.cache[arguments[0]],arguments)};e.format=function(g,d){var b=1,f=g.length,c="",m=[],e,k,h,j;for(e=0;e<f;e++)if(c=a(g[e]),"string"===c)m.push(g[e]);else if("array"===c){h=g[e];if(h[2]){c=d[b];for(k=0;k<h[2].length;k++){if(!c.hasOwnProperty(h[2][k]))throw sprintf('[sprintf] property "%s" does not exist',
9
- h[2][k]);c=c[h[2][k]]}}else c=h[1]?d[h[1]]:d[b++];if(/[^s]/.test(h[8])&&"number"!=a(c))throw sprintf("[sprintf] expecting number but found %s",a(c));switch(h[8]){case "b":c=c.toString(2);break;case "c":c=String.fromCharCode(c);break;case "d":c=parseInt(c,10);break;case "e":c=h[7]?c.toExponential(h[7]):c.toExponential();break;case "f":c=h[7]?parseFloat(c).toFixed(h[7]):parseFloat(c);break;case "o":c=c.toString(8);break;case "s":c=(c=""+c)&&h[7]?c.substring(0,h[7]):c;break;case "u":c=Math.abs(c);break;
10
- case "x":c=c.toString(16);break;case "X":c=c.toString(16).toUpperCase()}c=/[def]/.test(h[8])&&h[3]&&0<=c?"+"+c:c;k=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ";j=h[6]-(""+c).length;if(h[6]){for(var p=[];0<j;p[--j]=k);k=p.join("")}else k="";m.push(h[5]?c+k:k+c)}return m.join("")};e.cache={};e.parse=function(a){for(var d=[],b=[],f=0;a;){if(null!==(d=/^[^\x25]+/.exec(a)))b.push(d[0]);else if(null!==(d=/^\x25{2}/.exec(a)))b.push("%");else if(null!==(d=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a))){if(d[2]){var f=
11
- f|1,c=[],m=d[2],e=[];if(null!==(e=/^([a-z_][a-z_\d]*)/i.exec(m)))for(c.push(e[1]);""!==(m=m.substring(e[0].length));)if(null!==(e=/^\.([a-z_][a-z_\d]*)/i.exec(m)))c.push(e[1]);else if(null!==(e=/^\[(\d+)\]/.exec(m)))c.push(e[1]);else throw"[sprintf] huh?";else throw"[sprintf] huh?";d[2]=c}else f|=2;if(3===f)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";b.push(d)}else throw"[sprintf] huh?";a=a.substring(d[0].length)}return b};return e}(),vsprintf=function(a,e){e.unshift(a);
12
- return sprintf.apply(null,e)};jQuery.cookie=function(a,e,g){if("undefined"!=typeof e){g=g||{};null===e&&(e="",g.expires=-1);var d="";if(g.expires&&("number"==typeof g.expires||g.expires.toUTCString))"number"==typeof g.expires?(d=new Date,d.setTime(d.getTime()+864E5*g.expires)):d=g.expires,d="; expires="+d.toUTCString();var b=g.path?"; path="+g.path:"",f=g.domain?"; domain="+g.domain:"",g=g.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(e),d,b,f,g].join("")}else{e=null;if(document.cookie&&""!=document.cookie){g=
13
- document.cookie.split(";");for(d=0;d<g.length;d++)if(b=jQuery.trim(g[d]),b.substring(0,a.length+1)==a+"="){e=decodeURIComponent(b.substring(a.length+1));break}}return e}};(function(a){a.fn.bgIframe=a.fn.bgiframe=function(e){if(a.browser.msie&&6>=parseInt(a.browser.version)){var e=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:!0,src:"javascript:false;"},e||{}),g=function(a){return a&&a.constructor==Number?a+"px":a},d='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+e.src+'"style="display:block;position:absolute;z-index:-1;'+(!1!==e.opacity?"filter:Alpha(Opacity='0');":"")+"top:"+("auto"==e.top?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
14
- g(e.top))+";left:"+("auto"==e.left?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":g(e.left))+";width:"+("auto"==e.width?"expression(this.parentNode.offsetWidth+'px')":g(e.width))+";height:"+("auto"==e.height?"expression(this.parentNode.offsetHeight+'px')":g(e.height))+';"/>';return this.each(function(){0==a("> iframe.bgiframe",this).length&&this.insertBefore(document.createElement(d),this.firstChild)})}return this};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(e,g){a.event.special[g]={setup:function(){if(a.browser.msie)return!1;this.addEventListener(e,a.event.special[g].handler,!0)},teardown:function(){if(a.browser.msie)return!1;this.removeEventListener(e,a.event.special[g].handler,!0)},handler:function(d){arguments[0]=a.event.fix(d);arguments[0].type=g;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(e,g,d){return this.bind(e,function(b){var f=a(b.target);if(f.is(g))return d.apply(f,
15
- arguments)})},triggerEvent:function(e,g){return this.triggerHandler(e,[a.event.fix({type:e,target:g})])}})})(jQuery);(function(a){function e(d,b){function f(c){var f=a(c);return b.globalNav?f:d.parent().find(c)}var c=this,e=a(this),q=!b.vertical,k=d.children(),h=0,j;g||(g=c);a.each(b,function(c,b){a.isFunction(b)&&e.bind(c,b)});1<k.length&&(k=a(b.items,d));d.data("finder",f);var p=f(b.prev),i=f(b.next),o=f(b.prevPage),r=f(b.nextPage);a.extend(c,{getIndex:function(){return h},getClickIndex:function(){var a=c.getItems();return a.index(a.filter("."+b.activeClass))},getConf:function(){return b},getSize:function(){return c.getItems().size()},
16
- getPageAmount:function(){return Math.ceil(this.getSize()/b.size)},getPageIndex:function(){return Math.ceil(h/b.size)},getNaviButtons:function(){return p.add(i).add(o).add(r)},getRoot:function(){return d},getItemWrap:function(){return k},getItems:function(){return k.children(b.item)},getVisibleItems:function(){return c.getItems().slice(h,h+b.size)},seekTo:function(f,d,j){function l(){j&&j.call(c,f);e.trigger("onSeek",[f])}0>f&&(f=0);if(h===f)return c;a.isFunction(d)&&(j=d);if(f>c.getSize()-b.size)return b.loop?
17
- c.begin():this.end();var n=c.getItems().eq(f);if(!n.length)return c;var s=a.Event("onBeforeSeek");e.trigger(s,[f]);if(s.isDefaultPrevented())return c;if(void 0===d||a.isFunction(d))d=b.speed;q?k.animate({left:-n.position().left},d,b.easing,l):k.animate({top:-n.position().top},d,b.easing,l);g=c;h=f;s=a.Event("onStart");e.trigger(s,[f]);if(s.isDefaultPrevented())return c;p.add(o).toggleClass(b.disabledClass,0===f);i.add(r).toggleClass(b.disabledClass,f>=c.getSize()-b.size);return c},move:function(c,
18
- a,b){j=0<c;return this.seekTo(h+c,a,b)},next:function(c,a){return this.move(1,c,a)},prev:function(c,a){return this.move(-1,c,a)},movePage:function(c,a,f){j=0<c;var d=b.size*c,e=h%b.size;0<e&&(d+=0<c?-e:b.size-e);return this.move(d,a,f)},prevPage:function(c,a){return this.movePage(-1,c,a)},nextPage:function(c,a){return this.movePage(1,c,a)},setPage:function(c,a,f){return this.seekTo(c*b.size,a,f)},begin:function(c,a){j=!1;return this.seekTo(0,c,a)},end:function(a,f){j=!0;var d=this.getSize()-b.size;
19
- return 0<d?this.seekTo(d,a,f):c},reload:function(){e.trigger("onReload");return c},focus:function(){return g=c},click:function(a){var f=c.getItems().eq(a),d=b.activeClass,e=b.size;if(0>a||a>=c.getSize())return c;if(1==e){if(b.loop)return c.next();if(0===a||a==c.getSize()-1)j=void 0===j?!0:!j;return!1===j?c.prev():c.next()}return 2==e?(a==h&&a--,c.getItems().removeClass(d),f.addClass(d),c.seekTo(a,time,fn)):!f.hasClass(d)&&(c.getItems().removeClass(d),f.addClass(d),f=a-Math.floor(e/2),f>c.getSize()-
20
- e&&(f=c.getSize()-e),f!==a)?c.seekTo(f):c},bind:function(a,b){e.bind(a,b);return c},unbind:function(a){e.unbind(a);return c}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,b){c[b]=function(a){return c.bind(b,a)}});p.addClass(b.disabledClass).click(function(){c.prev()});i.click(function(){c.next()});r.click(function(){c.nextPage()});c.getSize()<b.size&&i.add(r).addClass(b.disabledClass);o.addClass(b.disabledClass).click(function(){c.prevPage()});var n=b.hoverClass,l="keydown."+
21
- Math.random().toString().substring(10);c.onReload(function(){n&&c.getItems().hover(function(){a(this).addClass(n)},function(){a(this).removeClass(n)});b.clickable&&c.getItems().each(function(b){a(this).unbind("click.scrollable").bind("click.scrollable",function(f){if(!a(f.target).is("a"))return c.click(b)})});b.keyboard?a(document).unbind(l).bind(l,function(a){if(!a.altKey&&!a.ctrlKey&&!("static"!=b.keyboard&&g!=c)){var f=b.keyboardSteps;return q&&(37==a.keyCode||39==a.keyCode)?(c.move(37==a.keyCode?
22
- -f:f),a.preventDefault()):!q&&(38==a.keyCode||40==a.keyCode)?(c.move(38==a.keyCode?-f:f),a.preventDefault()):!0}}):a(document).unbind(l)});c.reload()}a.tools=a.tools||{};a.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:!1,speed:400,keyboard:!0,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:!0,activeClass:"active",easing:"swing",loop:!1,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:!1}};var g;a.fn.scrollable=function(d){var b=
23
- this.eq("number"==typeof d?d:0).data("scrollable");if(b)return b;var f=a.extend({},a.tools.scrollable.conf),d=a.extend(f,d);d.keyboardSteps=d.keyboardSteps||d.size;this.each(function(){b=new e(a(this),d);a(this).data("scrollable",b)});return d.api?b:this}})(jQuery);
24
- (function(a){var e=a.tools.scrollable;e.plugins=e.plugins||{};e.plugins.autoscroll={version:"1.0.1",conf:{autoplay:!0,interval:3E3,autopause:!0,steps:1,api:!1}};a.fn.autoscroll=function(g){"number"==typeof g&&(g={interval:g});var d=a.extend({},e.plugins.autoscroll.conf),b;a.extend(d,g);this.each(function(){var f=a(this).scrollable();f&&(b=f);var c,e,g=!0;f.play=function(){c||(g=!1,c=setInterval(function(){f.move(d.steps)},d.interval),f.move(d.steps))};f.pause=function(){c=clearInterval(c)};f.stop=
25
- function(){f.pause();g=!0};d.autopause&&f.getRoot().add(f.getNaviButtons()).hover(function(){f.pause();clearInterval(e)},function(){g||(e=setTimeout(f.play,d.interval))});d.autoplay&&setTimeout(f.play,d.interval)});return d.api?b:this}})(jQuery);
26
- (function(a){var e=a.tools.scrollable;e.plugins=e.plugins||{};e.plugins.navigator={version:"1.0.2",conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,api:!1,idPrefix:null}};a.fn.navigator=function(g){var d=a.extend({},e.plugins.navigator.conf),b;"string"==typeof g&&(g={navi:g});g=a.extend(d,g);this.each(function(){function f(){if(!d.children().length||d.data("navi")==c){d.empty();d.data("navi",c);for(var b=0;b<c.getPageAmount();b++)d.append(a("<"+(g.naviItem||"a")+"/>"));e=d.children().each(function(b){var f=
27
- a(this);f.click(function(a){c.setPage(b);return a.preventDefault()});g.indexed&&f.text(b);g.idPrefix&&f.attr("id",g.idPrefix+b)})}else e=g.naviItem?d.find(g.naviItem):d.children(),e.each(function(b){a(this).click(function(a){c.setPage(b);return a.preventDefault()})});e.eq(0).addClass(g.activeClass)}var c=a(this).scrollable(),d=c.getRoot().data("finder").call(null,g.navi),e=null,k=c.getNaviButtons();c&&(b=c);c.getNaviButtons=function(){return k.add(d)};c.onStart(function(){var a=g.activeClass;e.removeClass(a).eq(c.getPageIndex()).addClass(a)});
28
- c.onReload(function(){f()});f();var h=e.filter("[href="+location.hash+"]");h.length&&c.move(e.index(h))});return g.api?b:this}})(jQuery);
29
  (function(a){function e(b){switch(b.type){case "mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case "DOMMouseScroll":a.extend(b,b.data);b.delta=-b.detail/3;break;case "mousewheel":b.delta=b.wheelDelta/120}b.type="wheel";return a.event.handle.call(this,b,b.delta)}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){a.event.add(this,g,e,{})},teardown:function(){a.event.remove(this,g,e)}};var g=
30
- !a.browser.mozilla?"mousewheel":"DOMMouseScroll"+("1.9">a.browser.version?" mousemove":""),d=a.tools.scrollable;d.plugins=d.plugins||{};d.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(b){var f=a.extend({},d.plugins.mousewheel.conf),c;"number"==typeof b&&(b={speed:b});b=a.extend(f,b);this.each(function(){var f=a(this).scrollable();f&&(c=f);f.getRoot().wheel(function(a,c){f.move(0>c?1:-1,b.speed||50);return!1})});return b.api?c:this}})(jQuery);(function(a){function e(b,c,d){b.value=a(c).text();a(b).change();a.browser.msie||b.focus();d.hide()}function g(a,c){var b=a.getHours(),d=c.show24Hours?b:(b+11)%12+1,d=c.show24Hours?(10>d?"0":"")+d:d,e=a.getMinutes(),a=c.timeFormat,a=a.replace("hh",d),a=a.replace("h",d),a=a.replace("mm",(10>e?"0":"")+e);return a=c.show24Hours?a.replace(" tt",""):a.replace("tt",12>b?c.amDesignator:c.pmDesignator)}function d(a,c){if(a){var d=a.split(c.separator),e=parseFloat(d[0]),d=parseFloat(d[1]);c.show24Hours||(12===
31
- e&&-1!==a.substr(c.amDesignator)?e=0:12!==e&&-1!==a.indexOf(c.pmDesignator)&&(e+=12));return b(new Date(0,0,0,e,d,0))}return null}function b(a){a.setFullYear(2001);a.setMonth(0);a.setDate(0);return a}a.fn.timePicker=function(b){var c=a.extend({},a.fn.timePicker.defaults,b);return this.each(function(){a.timePicker(this,c)})};a.timePicker=function(b,c){var d=a(b)[0];return d.timePicker||(d.timePicker=new jQuery._timePicker(d,c))};a._timePicker=function(f,c){var m=!1,q=!1,k="object"==typeof c.startTime?
32
- b(c.startTime):d(c.startTime,c),h="object"==typeof c.endTime?b(c.endTime):d(c.endTime,c);a(f).attr("autocomplete","OFF");for(var j=[],p=new Date(k);p<=h;)j[j.length]=g(p,c),p=new Date(p.setMinutes(p.getMinutes()+c.step));for(var i=a("<div "+(c.tpDivId?'id="'+c.tpDivId+'" ':"")+'class="time-picker'+(c.show24Hours?"":" time-picker-12hours")+'"></div>'),o=a("<ul></ul>"),p=0;p<j.length;p++)o.append("<li>"+j[p]+"</li>");i.append(o);j=a(f).offset();i.appendTo("body").css({top:j.top-48+"px",left:j.left,
33
- width:a(f).width()+5+"px"}).hide();i.mouseover(function(){m=!0}).mouseout(function(){m=!1});a("li",o).mouseover(function(){q||(a("li.selected",i).removeClass("selected"),a(this).addClass("selected"))}).mousedown(function(){m=!0}).click(function(){e(f,this,i,c);m=!1});var r=function(){if(i.is(":visible"))return!1;a("li",i).removeClass("selected");var e=a(f).offset();i.css({top:e.top+a(f).height()+10+"px",left:e.left,width:a(f).width()+5+"px"});i.show();var m=f.value?d(f.value,c):k,e=60*k.getHours()+
34
- k.getMinutes(),m=60*m.getHours()+m.getMinutes()-e,m=Math.round(m/c.step),e=b(new Date(0,0,0,0,m*c.step+e,0)),e=k<e&&e<=h?e:k,e=a("li:contains("+g(e,c)+")",i);e.length&&(e.addClass("selected"),i[0].scrollTop=e[0].offsetTop);return!0};a(f).focus(r).click(r);a(f).blur(function(){m||i.hide()});j=a.browser.opera||a.browser.mozilla?"keypress":"keydown";a(f)[j](function(b){q=!0;var d=i[0].scrollTop;switch(b.keyCode){case 38:if(r())return!1;var b=a("li.selected",o),g=b.prev().addClass("selected")[0];g?(b.removeClass("selected"),
35
- g.offsetTop<d&&(i[0].scrollTop=d-g.offsetHeight)):(b.removeClass("selected"),g=a("li:last",o).addClass("selected")[0],i[0].scrollTop=g.offsetTop-g.offsetHeight);return!1;case 40:if(r())return!1;b=a("li.selected",o);(g=b.next().addClass("selected")[0])?(b.removeClass("selected"),g.offsetTop+g.offsetHeight>d+i[0].offsetHeight&&(i[0].scrollTop=d+g.offsetHeight)):(b.removeClass("selected"),a("li:first",o).addClass("selected"),i[0].scrollTop=0);return!1;case 13:return i.is(":visible")&&(d=a("li.selected",
36
- o)[0],e(f,d,i,c)),!1;case 27:return i.hide(),!1}return!0});a(f).keyup(function(){q=!1});this.getTime=function(){return d(f.value,c)};this.setTime=function(d){f.value=g(b(d),c);a(f).change()}};a.fn.timePicker.defaults={step:30,startTime:new Date(0,0,0,0,0,0),endTime:new Date(0,0,0,23,30,0),separator:":",show24Hours:!0,timeFormat:"hh:mm tt",amDesignator:"AM",pmDesignator:"PM"}})(jQuery);this.JSON||(this.JSON={});
37
- (function(){function a(a){return a<10?"0"+a:a}function e(a){b.lastIndex=0;return b.test(a)?'"'+a.replace(b,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function g(a,b){var d,m,i,o,r=f,n,l=b[a];l&&typeof l==="object"&&typeof l.toJSON==="function"&&(l=l.toJSON(a));typeof q==="function"&&(l=q.call(b,a,l));switch(typeof l){case "string":return e(l);case "number":return isFinite(l)?""+l:"null";case "boolean":case "null":return""+l;
38
- case "object":if(!l)return"null";f=f+c;n=[];if(Object.prototype.toString.apply(l)==="[object Array]"){o=l.length;for(d=0;d<o;d=d+1)n[d]=g(d,l)||"null";i=n.length===0?"[]":f?"[\n"+f+n.join(",\n"+f)+"\n"+r+"]":"["+n.join(",")+"]";f=r;return i}if(q&&typeof q==="object"){o=q.length;for(d=0;d<o;d=d+1){m=q[d];if(typeof m==="string")(i=g(m,l))&&n.push(e(m)+(f?": ":":")+i)}}else for(m in l)if(Object.hasOwnProperty.call(l,m))(i=g(m,l))&&n.push(e(m)+(f?": ":":")+i);i=n.length===0?"{}":f?"{\n"+f+n.join(",\n"+
39
- f)+"\n"+r+"}":"{"+n.join(",")+"}";f=r;return i}}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 d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
40
- b=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,c,m={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},q;if(typeof JSON.stringify!=="function")JSON.stringify=function(a,b,d){var e;c=f="";if(typeof d==="number")for(e=0;e<d;e=e+1)c=c+" ";else typeof d==="string"&&(c=d);if((q=b)&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw Error("JSON.stringify");return g("",
41
- {"":a})};if(typeof JSON.parseIt!=="function")JSON.parseIt=function(a,b){function c(a,d){var f,e,g=a[d];if(g&&typeof g==="object")for(f in g)if(Object.hasOwnProperty.call(g,f)){e=c(g,f);e!==void 0?g[f]=e:delete g[f]}return b.call(a,d,g)}var f;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
42
- "]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){f=eval("("+a+")");return typeof b==="function"?c({"":f},""):f}throw new SyntaxError("JSON.parseIt");}})();(function(a){function e(d,b){function f(c){var f=a(c);return b.globalNav?f:d.parent().find(c)}var c=this,e=a(this),q=!b.vertical,k=d.children(),h=0,j;g||(g=c);a.each(b,function(c,b){a.isFunction(b)&&e.bind(c,b)});1<k.length&&(k=a(b.items,d));d.data("finder",f);var p=f(b.prev),i=f(b.next),o=f(b.prevPage),r=f(b.nextPage);a.extend(c,{getIndex:function(){return h},getClickIndex:function(){var a=c.getItems();return a.index(a.filter("."+b.activeClass))},getConf:function(){return b},getSize:function(){return c.getItems().size()},
43
- getPageAmount:function(){return Math.ceil(this.getSize()/b.size)},getPageIndex:function(){return Math.ceil(h/b.size)},getNaviButtons:function(){return p.add(i).add(o).add(r)},getRoot:function(){return d},getItemWrap:function(){return k},getItems:function(){return k.children(b.item)},getVisibleItems:function(){return c.getItems().slice(h,h+b.size)},seekTo:function(d,f,j){function l(){j&&j.call(c,d);e.trigger("onSeek",[d])}0>d&&(d=0);if(h===d)return c;a.isFunction(f)&&(j=f);if(d>c.getSize()-b.size)return b.loop?
44
  c.begin():this.end();var n=c.getItems().eq(d);if(!n.length)return c;var s=a.Event("onBeforeSeek");e.trigger(s,d>h);if(s.isDefaultPrevented())return c;if(void 0===f||a.isFunction(f))f=b.speed;q?k.animate({left:-n.position().left},f,b.easing,l):k.animate({top:-n.position().top},f,b.easing,l);g=c;h=d;s=a.Event("onStart");e.trigger(s,[d]);if(s.isDefaultPrevented())return c;p.add(o).toggleClass(b.disabledClass,0===d);i.add(r).toggleClass(b.disabledClass,d>=c.getSize()-b.size);return c},move:function(a,
45
  b,c){j=0<a;return this.seekTo(h+a,b,c)},next:function(a,b){return this.move(1,a,b)},prev:function(a,b){return this.move(-1,a,b)},movePage:function(a,c,d){j=0<a;var f=b.size*a,e=h%b.size;0<e&&(f+=0<a?-e:b.size-e);return this.move(f,c,d)},prevPage:function(a,b){return this.movePage(-1,a,b)},nextPage:function(a,b){return this.movePage(1,a,b)},setPage:function(a,c,d){return this.seekTo(a*b.size,c,d)},begin:function(a,b){j=!1;return this.seekTo(0,a,b)},end:function(a,d){j=!0;var f=this.getSize()-b.size;
46
  return 0<f?this.seekTo(f,a,d):c},reload:function(){e.trigger("onReload");return c},focus:function(){return g=c},click:function(a){var d=c.getItems().eq(a),f=b.activeClass,e=b.size;if(0>a||a>=c.getSize())return c;if(1==e){if(b.loop)return c.next();if(0===a||a==c.getSize()-1)j=void 0===j?!0:!j;return!1===j?c.prev():c.next()}return 2==e?(a==h&&a--,c.getItems().removeClass(f),d.addClass(f),c.seekTo(a,time,fn)):!d.hasClass(f)&&(c.getItems().removeClass(f),d.addClass(f),d=a-Math.floor(e/2),d>c.getSize()-
47
  e&&(d=c.getSize()-e),d!==a)?c.seekTo(d):c},bind:function(a,b){e.bind(a,b);return c},unbind:function(a){e.unbind(a);return c}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,b){c[b]=function(a){return c.bind(b,a)}});p.addClass(b.disabledClass).click(function(){c.prev()});i.click(function(){c.next()});r.click(function(){c.nextPage()});c.getSize()<b.size&&i.add(r).addClass(b.disabledClass);o.addClass(b.disabledClass).click(function(){c.prevPage()});var n=b.hoverClass,l="keydown."+
48
  Math.random().toString().substring(10);c.onReload(function(){n&&c.getItems().hover(function(){a(this).addClass(n)},function(){a(this).removeClass(n)});b.clickable&&c.getItems().each(function(b){a(this).unbind("click.scrollable").bind("click.scrollable",function(d){if(!a(d.target).is("a"))return c.click(b)})});b.keyboard?a(document).unbind(l).bind(l,function(a){if(!a.altKey&&!a.ctrlKey&&!("static"!=b.keyboard&&g!=c)){var d=b.keyboardSteps;return q&&(37==a.keyCode||39==a.keyCode)?(c.move(37==a.keyCode?
49
- -d:d),a.preventDefault()):!q&&(38==a.keyCode||40==a.keyCode)?(c.move(38==a.keyCode?-d:d),a.preventDefault()):!0}}):a(document).unbind(l)});c.reload()}a.tools=a.tools||{};a.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:!1,speed:400,keyboard:!0,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:!0,activeClass:"active",easing:"swing",loop:!1,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:!1}};var g;a.fn.scrollable=function(d){var b=
50
- this.eq("number"==typeof d?d:0).data("scrollable");if(b)return b;var f=a.extend({},a.tools.scrollable.conf),d=a.extend(f,d);d.keyboardSteps=d.keyboardSteps||d.size;this.each(function(){b=new e(a(this),d);a(this).data("scrollable",b)});return d.api?b:this}})(jQuery);(function(a){function e(b){switch(b.type){case "mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case "DOMMouseScroll":a.extend(b,b.data);b.delta=-b.detail/3;break;case "mousewheel":b.delta=b.wheelDelta/120}b.type="wheel";return a.event.handle.call(this,b,b.delta)}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){a.event.add(this,g,e,{})},teardown:function(){a.event.remove(this,g,e)}};var g=
51
- !a.browser.mozilla?"mousewheel":"DOMMouseScroll"+("1.9">a.browser.version?" mousemove":""),d=a.tools.scrollable;d.plugins=d.plugins||{};d.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(b){var f=a.extend({},d.plugins.mousewheel.conf),c;"number"==typeof b&&(b={speed:b});b=a.extend(f,b);this.each(function(){var d=a(this).scrollable();d&&(c=d);d.getRoot().wheel(function(a,c){d.move(0>c?1:-1,b.speed||50);return!1})});return b.api?c:this}})(jQuery);/*
52
  : Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
53
  @website: http://www.datejs.com/
54
  */
55
- (function(){var a=Date,e=a.prototype,g=[],d=function(a,d){d||(d=2);return("000"+a).slice(-1*d)};a.normalizeFormat=function(a){g=[];(new Date).$format(a);return g.join("")};a.strftime=function(a,d){return(new Date(1E3*d)).$format(a)};a.strtotime=function(b){b=a.parse(b);b.addMinutes(-1*b.getTimezoneOffset());return Math.round(a.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds())/1E3)};e.$format=function(b){var f=this,c,e=
56
- function(a){g.push(a);return f.toString(a)};return b?b.replace(/(%|\\)?.|%%/g,function(b){if("\\"===b.charAt(0)||"%%"===b.substring(0,2))return b.replace("\\","").replace("%%","%");switch(b){case "d":case "%d":return e("dd");case "D":case "%a":return e("ddd");case "j":case "%e":return e("d");case "l":case "%A":return e("dddd");case "N":case "%u":return f.getDay()+1;case "S":return e("S");case "w":case "%w":return f.getDay();case "z":return f.getOrdinalNumber();case "%j":return d(f.getOrdinalNumber(),
57
- 3);case "%U":var b=f.clone().set({month:0,day:1}).addDays(-1).moveToDayOfWeek(0),k=f.clone().addDays(1).moveToDayOfWeek(0,-1);return k<b?"00":d((k.getOrdinalNumber()-b.getOrdinalNumber())/7+1);case "W":case "%V":return f.getISOWeek();case "%W":return d(f.getWeek());case "F":case "%B":return e("MMMM");case "m":case "%m":return e("MM");case "M":case "%b":case "%h":return e("MMM");case "n":return e("M");case "t":return a.getDaysInMonth(f.getFullYear(),f.getMonth());case "L":return a.isLeapYear(f.getFullYear())?
58
- 1:0;case "o":case "%G":return f.setWeek(f.getISOWeek()).toString("yyyy");case "%g":return f.$format("%G").slice(-2);case "Y":case "%Y":return e("yyyy");case "y":case "%y":return e("yy");case "a":case "%p":return e("tt").toLowerCase();case "A":return e("tt").toUpperCase();case "g":case "%I":return e("h");case "G":return e("H");case "h":return e("hh");case "H":case "%H":return e("HH");case "i":case "%M":return e("mm");case "s":case "%S":return e("ss");case "u":return d(f.getMilliseconds(),3);case "I":return f.isDaylightSavingTime()?
59
- 1:0;case "O":return f.getUTCOffset();case "P":return c=f.getUTCOffset(),c.substring(0,c.length-2)+":"+c.substring(c.length-2);case "e":case "T":case "%z":case "%Z":return f.getTimezone();case "Z":return-60*f.getTimezoneOffset();case "B":return b=new Date,Math.floor((3600*b.getHours()+60*b.getMinutes()+b.getSeconds()+60*(b.getTimezoneOffset()+60))/86.4);case "c":return f.toISOString().replace(/\"/g,"");case "U":return a.strtotime("now");case "%c":return e("d")+" "+e("t");case "%C":return Math.floor(f.getFullYear()/
60
  100+1);case "%D":return e("MM/dd/yy");case "%n":return"\\n";case "%t":return"\\t";case "%r":return e("hh:mm tt");case "%R":return e("H:mm");case "%T":return e("H:mm:ss");case "%x":return e("d");case "%X":return e("t");default:return g.push(b),b}}):this._toString()};e.format||(e.format=e.$format)})();
4
  200,function(){e&&humanMsg.log(a)}),humanMsg.t1&&clearTimeout(humanMsg.t1),humanMsg.t2&&clearTimeout(humanMsg.t2),humanMsg.t1=setTimeout(function(){humanMsg.bindEvents()},3E3),humanMsg.t2=setTimeout(function(){humanMsg.removeMsg()},5E3))},log:function(a){jQuery("#"+humanMsg.logID).show().children("ul").prepend("<li>"+a+"</li>").children("li:first").slideDown(200);"none"==jQuery("#"+humanMsg.logID+" ul").css("display")?jQuery("#"+humanMsg.logID+" p").animate({bottom:40},200,"linear",function(){jQuery(this).animate({bottom:0},
5
  300,"swing",function(){jQuery(this).css({bottom:0})})}):humanMsg.setLogHeight();jQuery("#humanMsgClose").show();jQuery("#"+humanMsg.logID+" p").removeClass("minimized")},activateLog:function(){jQuery("#"+humanMsg.logID+" p").removeClass("faded");clearTimeout(humanMsg.t3);humanMsg.t3=setTimeout(humanMsg.fadeLog,15E3)},setLogHeight:function(){if("Microsoft Internet Explorer"===navigator.appName){var a=Math.min(48*jQuery("#"+humanMsg.logID+" ul").children("li").length,112);jQuery("#"+humanMsg.logID+
6
  " ul").css("height",a+10+"px");jQuery("#"+humanMsg.logID).css("top","-"+(a+56+humanMsg.logTop)+"px")}else a=Math.min(14*jQuery("#"+humanMsg.logID+" ul").children("li").length,56),jQuery("#"+humanMsg.logID+" ul").css("height",a+10+"px"),jQuery("#"+humanMsg.logID).css("top","-"+(a+112+humanMsg.logTop)+"px")},bindEvents:function(){jQuery(window).mousemove(humanMsg.removeMsg).click(humanMsg.removeMsg).keypress(humanMsg.removeMsg)},removeMsg:function(){jQuery(window).unbind("mousemove",humanMsg.removeMsg).unbind("click",
7
+ humanMsg.removeMsg).unbind("keypress",humanMsg.removeMsg);jQuery("#"+humanMsg.msgID).fadeOut()},fadeLog:function(){"none"===jQuery("#"+humanMsg.logID+" ul").css("display")&&jQuery("#"+humanMsg.logID+" p").addClass("faded")}};jQuery(document).ready(function(){humanMsg.setup()});(function(a){function e(b){var d=b||window.event,c=[].slice.call(arguments,1),g=0,f=0,e=0,b=a.event.fix(d);b.type="mousewheel";d.wheelDelta&&(g=d.wheelDelta/120);d.detail&&(g=-d.detail/3);e=g;void 0!==d.axis&&d.axis===d.HORIZONTAL_AXIS&&(e=0,f=-1*g);void 0!==d.wheelDeltaY&&(e=d.wheelDeltaY/120);void 0!==d.wheelDeltaX&&(f=-1*d.wheelDeltaX/120);c.unshift(b,g,f,e);return(a.event.dispatch||a.event.handle).apply(this,c)}var g=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var f=g.length;f;)a.event.fixHooks[g[--f]]=
8
+ a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var b=g.length;b;)this.addEventListener(g[--b],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var b=g.length;b;)this.removeEventListener(g[--b],e,!1);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(b){return b?this.bind("mousewheel",b):this.trigger("mousewheel")},unmousewheel:function(b){return this.unbind("mousewheel",b)}})})(jQuery);var sprintf=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}var e=function(){e.cache.hasOwnProperty(arguments[0])||(e.cache[arguments[0]]=e.parse(arguments[0]));return e.format.call(null,e.cache[arguments[0]],arguments)};e.format=function(g,f){var b=1,d=g.length,c="",m=[],e,k,h,j;for(e=0;e<d;e++)if(c=a(g[e]),"string"===c)m.push(g[e]);else if("array"===c){h=g[e];if(h[2]){c=f[b];for(k=0;k<h[2].length;k++){if(!c.hasOwnProperty(h[2][k]))throw sprintf('[sprintf] property "%s" does not exist',
9
+ h[2][k]);c=c[h[2][k]]}}else c=h[1]?f[h[1]]:f[b++];if(/[^s]/.test(h[8])&&"number"!=a(c))throw sprintf("[sprintf] expecting number but found %s",a(c));switch(h[8]){case "b":c=c.toString(2);break;case "c":c=String.fromCharCode(c);break;case "d":c=parseInt(c,10);break;case "e":c=h[7]?c.toExponential(h[7]):c.toExponential();break;case "f":c=h[7]?parseFloat(c).toFixed(h[7]):parseFloat(c);break;case "o":c=c.toString(8);break;case "s":c=(c=""+c)&&h[7]?c.substring(0,h[7]):c;break;case "u":c=Math.abs(c);break;
10
+ case "x":c=c.toString(16);break;case "X":c=c.toString(16).toUpperCase()}c=/[def]/.test(h[8])&&h[3]&&0<=c?"+"+c:c;k=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ";j=h[6]-(""+c).length;if(h[6]){for(var p=[];0<j;p[--j]=k);k=p.join("")}else k="";m.push(h[5]?c+k:k+c)}return m.join("")};e.cache={};e.parse=function(a){for(var f=[],b=[],d=0;a;){if(null!==(f=/^[^\x25]+/.exec(a)))b.push(f[0]);else if(null!==(f=/^\x25{2}/.exec(a)))b.push("%");else if(null!==(f=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a))){if(f[2]){var d=
11
+ d|1,c=[],m=f[2],e=[];if(null!==(e=/^([a-z_][a-z_\d]*)/i.exec(m)))for(c.push(e[1]);""!==(m=m.substring(e[0].length));)if(null!==(e=/^\.([a-z_][a-z_\d]*)/i.exec(m)))c.push(e[1]);else if(null!==(e=/^\[(\d+)\]/.exec(m)))c.push(e[1]);else throw"[sprintf] huh?";else throw"[sprintf] huh?";f[2]=c}else d|=2;if(3===d)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";b.push(f)}else throw"[sprintf] huh?";a=a.substring(f[0].length)}return b};return e}(),vsprintf=function(a,e){e.unshift(a);
12
+ return sprintf.apply(null,e)};jQuery.cookie=function(a,e,g){if("undefined"!=typeof e){g=g||{};null===e&&(e="",g.expires=-1);var f="";if(g.expires&&("number"==typeof g.expires||g.expires.toUTCString))"number"==typeof g.expires?(f=new Date,f.setTime(f.getTime()+864E5*g.expires)):f=g.expires,f="; expires="+f.toUTCString();var b=g.path?"; path="+g.path:"",d=g.domain?"; domain="+g.domain:"",g=g.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(e),f,b,d,g].join("")}else{e=null;if(document.cookie&&""!=document.cookie){g=
13
+ document.cookie.split(";");for(f=0;f<g.length;f++)if(b=jQuery.trim(g[f]),b.substring(0,a.length+1)==a+"="){e=decodeURIComponent(b.substring(a.length+1));break}}return e}};(function(a){a.fn.bgIframe=a.fn.bgiframe=function(e){if(a.browser.msie&&6>=parseInt(a.browser.version)){var e=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:!0,src:"javascript:false;"},e||{}),g=function(a){return a&&a.constructor==Number?a+"px":a},f='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+e.src+'"style="display:block;position:absolute;z-index:-1;'+(!1!==e.opacity?"filter:Alpha(Opacity='0');":"")+"top:"+("auto"==e.top?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
14
+ g(e.top))+";left:"+("auto"==e.left?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":g(e.left))+";width:"+("auto"==e.width?"expression(this.parentNode.offsetWidth+'px')":g(e.width))+";height:"+("auto"==e.height?"expression(this.parentNode.offsetHeight+'px')":g(e.height))+';"/>';return this.each(function(){0==a("> iframe.bgiframe",this).length&&this.insertBefore(document.createElement(f),this.firstChild)})}return this};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(e,g){a.event.special[g]={setup:function(){if(a.browser.msie)return!1;this.addEventListener(e,a.event.special[g].handler,!0)},teardown:function(){if(a.browser.msie)return!1;this.removeEventListener(e,a.event.special[g].handler,!0)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=g;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(e,g,f){return this.bind(e,function(b){var d=a(b.target);if(d.is(g))return f.apply(d,
15
+ arguments)})},triggerEvent:function(e,g){return this.triggerHandler(e,[a.event.fix({type:e,target:g})])}})})(jQuery);(function(a){function e(f,b){function d(c){var d=a(c);return b.globalNav?d:f.parent().find(c)}var c=this,e=a(this),q=!b.vertical,k=f.children(),h=0,j;g||(g=c);a.each(b,function(c,b){a.isFunction(b)&&e.bind(c,b)});1<k.length&&(k=a(b.items,f));f.data("finder",d);var p=d(b.prev),i=d(b.next),o=d(b.prevPage),r=d(b.nextPage);a.extend(c,{getIndex:function(){return h},getClickIndex:function(){var a=c.getItems();return a.index(a.filter("."+b.activeClass))},getConf:function(){return b},getSize:function(){return c.getItems().size()},
16
+ getPageAmount:function(){return Math.ceil(this.getSize()/b.size)},getPageIndex:function(){return Math.ceil(h/b.size)},getNaviButtons:function(){return p.add(i).add(o).add(r)},getRoot:function(){return f},getItemWrap:function(){return k},getItems:function(){return k.children(b.item)},getVisibleItems:function(){return c.getItems().slice(h,h+b.size)},seekTo:function(d,f,j){function l(){j&&j.call(c,d);e.trigger("onSeek",[d])}0>d&&(d=0);if(h===d)return c;a.isFunction(f)&&(j=f);if(d>c.getSize()-b.size)return b.loop?
17
+ c.begin():this.end();var n=c.getItems().eq(d);if(!n.length)return c;var s=a.Event("onBeforeSeek");e.trigger(s,[d]);if(s.isDefaultPrevented())return c;if(void 0===f||a.isFunction(f))f=b.speed;q?k.animate({left:-n.position().left},f,b.easing,l):k.animate({top:-n.position().top},f,b.easing,l);g=c;h=d;s=a.Event("onStart");e.trigger(s,[d]);if(s.isDefaultPrevented())return c;p.add(o).toggleClass(b.disabledClass,0===d);i.add(r).toggleClass(b.disabledClass,d>=c.getSize()-b.size);return c},move:function(c,
18
+ a,b){j=0<c;return this.seekTo(h+c,a,b)},next:function(c,a){return this.move(1,c,a)},prev:function(c,a){return this.move(-1,c,a)},movePage:function(c,a,d){j=0<c;var f=b.size*c,e=h%b.size;0<e&&(f+=0<c?-e:b.size-e);return this.move(f,a,d)},prevPage:function(c,a){return this.movePage(-1,c,a)},nextPage:function(c,a){return this.movePage(1,c,a)},setPage:function(c,a,d){return this.seekTo(c*b.size,a,d)},begin:function(c,a){j=!1;return this.seekTo(0,c,a)},end:function(a,d){j=!0;var f=this.getSize()-b.size;
19
+ return 0<f?this.seekTo(f,a,d):c},reload:function(){e.trigger("onReload");return c},focus:function(){return g=c},click:function(a){var d=c.getItems().eq(a),f=b.activeClass,e=b.size;if(0>a||a>=c.getSize())return c;if(1==e){if(b.loop)return c.next();if(0===a||a==c.getSize()-1)j=void 0===j?!0:!j;return!1===j?c.prev():c.next()}return 2==e?(a==h&&a--,c.getItems().removeClass(f),d.addClass(f),c.seekTo(a,time,fn)):!d.hasClass(f)&&(c.getItems().removeClass(f),d.addClass(f),d=a-Math.floor(e/2),d>c.getSize()-
20
+ e&&(d=c.getSize()-e),d!==a)?c.seekTo(d):c},bind:function(a,b){e.bind(a,b);return c},unbind:function(a){e.unbind(a);return c}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,b){c[b]=function(a){return c.bind(b,a)}});p.addClass(b.disabledClass).click(function(){c.prev()});i.click(function(){c.next()});r.click(function(){c.nextPage()});c.getSize()<b.size&&i.add(r).addClass(b.disabledClass);o.addClass(b.disabledClass).click(function(){c.prevPage()});var n=b.hoverClass,l="keydown."+
21
+ Math.random().toString().substring(10);c.onReload(function(){n&&c.getItems().hover(function(){a(this).addClass(n)},function(){a(this).removeClass(n)});b.clickable&&c.getItems().each(function(b){a(this).unbind("click.scrollable").bind("click.scrollable",function(d){if(!a(d.target).is("a"))return c.click(b)})});b.keyboard?a(document).unbind(l).bind(l,function(a){if(!a.altKey&&!a.ctrlKey&&!("static"!=b.keyboard&&g!=c)){var d=b.keyboardSteps;return q&&(37==a.keyCode||39==a.keyCode)?(c.move(37==a.keyCode?
22
+ -d:d),a.preventDefault()):!q&&(38==a.keyCode||40==a.keyCode)?(c.move(38==a.keyCode?-d:d),a.preventDefault()):!0}}):a(document).unbind(l)});c.reload()}a.tools=a.tools||{};a.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:!1,speed:400,keyboard:!0,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:!0,activeClass:"active",easing:"swing",loop:!1,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:!1}};var g;a.fn.scrollable=function(f){var b=
23
+ this.eq("number"==typeof f?f:0).data("scrollable");if(b)return b;var d=a.extend({},a.tools.scrollable.conf),f=a.extend(d,f);f.keyboardSteps=f.keyboardSteps||f.size;this.each(function(){b=new e(a(this),f);a(this).data("scrollable",b)});return f.api?b:this}})(jQuery);
24
+ (function(a){var e=a.tools.scrollable;e.plugins=e.plugins||{};e.plugins.autoscroll={version:"1.0.1",conf:{autoplay:!0,interval:3E3,autopause:!0,steps:1,api:!1}};a.fn.autoscroll=function(g){"number"==typeof g&&(g={interval:g});var f=a.extend({},e.plugins.autoscroll.conf),b;a.extend(f,g);this.each(function(){var d=a(this).scrollable();d&&(b=d);var c,e,g=!0;d.play=function(){c||(g=!1,c=setInterval(function(){d.move(f.steps)},f.interval),d.move(f.steps))};d.pause=function(){c=clearInterval(c)};d.stop=
25
+ function(){d.pause();g=!0};f.autopause&&d.getRoot().add(d.getNaviButtons()).hover(function(){d.pause();clearInterval(e)},function(){g||(e=setTimeout(d.play,f.interval))});f.autoplay&&setTimeout(d.play,f.interval)});return f.api?b:this}})(jQuery);
26
+ (function(a){var e=a.tools.scrollable;e.plugins=e.plugins||{};e.plugins.navigator={version:"1.0.2",conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,api:!1,idPrefix:null}};a.fn.navigator=function(g){var f=a.extend({},e.plugins.navigator.conf),b;"string"==typeof g&&(g={navi:g});g=a.extend(f,g);this.each(function(){function d(){if(!f.children().length||f.data("navi")==c){f.empty();f.data("navi",c);for(var b=0;b<c.getPageAmount();b++)f.append(a("<"+(g.naviItem||"a")+"/>"));e=f.children().each(function(b){var d=
27
+ a(this);d.click(function(a){c.setPage(b);return a.preventDefault()});g.indexed&&d.text(b);g.idPrefix&&d.attr("id",g.idPrefix+b)})}else e=g.naviItem?f.find(g.naviItem):f.children(),e.each(function(b){a(this).click(function(a){c.setPage(b);return a.preventDefault()})});e.eq(0).addClass(g.activeClass)}var c=a(this).scrollable(),f=c.getRoot().data("finder").call(null,g.navi),e=null,k=c.getNaviButtons();c&&(b=c);c.getNaviButtons=function(){return k.add(f)};c.onStart(function(){var a=g.activeClass;e.removeClass(a).eq(c.getPageIndex()).addClass(a)});
28
+ c.onReload(function(){d()});d();var h=e.filter("[href="+location.hash+"]");h.length&&c.move(e.index(h))});return g.api?b:this}})(jQuery);
29
  (function(a){function e(b){switch(b.type){case "mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case "DOMMouseScroll":a.extend(b,b.data);b.delta=-b.detail/3;break;case "mousewheel":b.delta=b.wheelDelta/120}b.type="wheel";return a.event.handle.call(this,b,b.delta)}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){a.event.add(this,g,e,{})},teardown:function(){a.event.remove(this,g,e)}};var g=
30
+ !a.browser.mozilla?"mousewheel":"DOMMouseScroll"+("1.9">a.browser.version?" mousemove":""),f=a.tools.scrollable;f.plugins=f.plugins||{};f.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(b){var d=a.extend({},f.plugins.mousewheel.conf),c;"number"==typeof b&&(b={speed:b});b=a.extend(d,b);this.each(function(){var d=a(this).scrollable();d&&(c=d);d.getRoot().wheel(function(a,c){d.move(0>c?1:-1,b.speed||50);return!1})});return b.api?c:this}})(jQuery);(function(a){function e(b,c,f){b.value=a(c).text();a(b).change();a.browser.msie||b.focus();f.hide()}function g(a,c){var b=a.getHours(),f=c.show24Hours?b:(b+11)%12+1;c.show24Hours&&(f=(10>f?"0":"")+f);var e=a.getMinutes(),a=c.timeFormat,a=a.replace("hh",f),a=a.replace("h",f),a=a.replace("mm",(10>e?"0":"")+e);return a=c.show24Hours?a.replace(" tt",""):a.replace("tt",12>b?c.amDesignator:c.pmDesignator)}function f(a,c){if(a){var f=a.split(c.separator),e=parseFloat(f[0]),f=parseFloat(f[1]);c.show24Hours||
31
+ (12===e&&-1!==a.substr(c.amDesignator)?e=0:12!==e&&-1!==a.indexOf(c.pmDesignator)&&(e+=12));return b(new Date(0,0,0,e,f,0))}return null}function b(a){a.setFullYear(2001);a.setMonth(0);a.setDate(0);return a}a.fn.timePicker=function(b){var c=a.extend({},a.fn.timePicker.defaults,b);return this.each(function(){a.timePicker(this,c)})};a.timePicker=function(b,c){var f=a(b)[0];return f.timePicker||(f.timePicker=new jQuery._timePicker(f,c))};a._timePicker=function(d,c){var m=!1,q=!1,k="object"==typeof c.startTime?
32
+ b(c.startTime):f(c.startTime,c),h="object"==typeof c.endTime?b(c.endTime):f(c.endTime,c);a(d).attr("autocomplete","OFF");for(var j=[],p=new Date(k);p<=h;)j[j.length]=g(p,c),p=new Date(p.setMinutes(p.getMinutes()+c.step));for(var i=a("<div "+(c.tpDivId?'id="'+c.tpDivId+'" ':"")+'class="time-picker'+(c.show24Hours?"":" time-picker-12hours")+'"></div>'),o=a("<ul></ul>"),p=0;p<j.length;p++)o.append("<li>"+j[p]+"</li>");i.append(o);j=a(d).offset();i.appendTo("body").css({top:j.top-48+"px",left:j.left,
33
+ width:a(d).width()+5+"px"}).hide();i.mouseover(function(){m=!0}).mouseout(function(){m=!1});a("li",o).mouseover(function(){q||(a("li.selected",i).removeClass("selected"),a(this).addClass("selected"))}).mousedown(function(){m=!0}).click(function(){e(d,this,i,c);m=!1});var r=function(){if(i.is(":visible"))return!1;a("li",i).removeClass("selected");var e=a(d).offset();i.css({top:e.top+a(d).height()+10+"px",left:e.left,width:a(d).width()+5+"px"});i.show();var m=d.value?f(d.value,c):k,e=60*k.getHours()+
34
+ k.getMinutes(),m=60*m.getHours()+m.getMinutes()-e,m=Math.round(m/c.step),e=b(new Date(0,0,0,0,m*c.step+e,0)),e=k<e&&e<=h?e:k,e=a("li:contains("+g(e,c)+")",i);e.length&&(e.addClass("selected"),i[0].scrollTop=e[0].offsetTop);return!0};a(d).focus(r).click(r);a(d).blur(function(){m||i.hide()});j=a.browser.opera||a.browser.mozilla?"keypress":"keydown";a(d)[j](function(b){q=!0;var f=i[0].scrollTop;switch(b.keyCode){case 38:if(r())return!1;var b=a("li.selected",o),g=b.prev().addClass("selected")[0];g?(b.removeClass("selected"),
35
+ g.offsetTop<f&&(i[0].scrollTop=f-g.offsetHeight)):(b.removeClass("selected"),g=a("li:last",o).addClass("selected")[0],i[0].scrollTop=g.offsetTop-g.offsetHeight);return!1;case 40:if(r())return!1;b=a("li.selected",o);(g=b.next().addClass("selected")[0])?(b.removeClass("selected"),g.offsetTop+g.offsetHeight>f+i[0].offsetHeight&&(i[0].scrollTop=f+g.offsetHeight)):(b.removeClass("selected"),a("li:first",o).addClass("selected"),i[0].scrollTop=0);return!1;case 13:return i.is(":visible")&&(f=a("li.selected",
36
+ o)[0],e(d,f,i,c)),!1;case 27:return i.hide(),!1}return!0});a(d).keyup(function(){q=!1});this.getTime=function(){return f(d.value,c)};this.setTime=function(f){d.value=g(b(f),c);a(d).change()}};a.fn.timePicker.defaults={step:30,startTime:new Date(0,0,0,0,0,0),endTime:new Date(0,0,0,23,30,0),separator:":",show24Hours:!0,timeFormat:"hh:mm tt",amDesignator:"AM",pmDesignator:"PM"}})(jQuery);this.JSON||(this.JSON={});
37
+ (function(){function a(a){return a<10?"0"+a:a}function e(a){b.lastIndex=0;return b.test(a)?'"'+a.replace(b,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function g(a,b){var f,m,i,o,r=d,n,l=b[a];l&&(typeof l==="object"&&typeof l.toJSON==="function")&&(l=l.toJSON(a));typeof q==="function"&&(l=q.call(b,a,l));switch(typeof l){case "string":return e(l);case "number":return isFinite(l)?""+l:"null";case "boolean":case "null":return""+l;
38
+ case "object":if(!l)return"null";d=d+c;n=[];if(Object.prototype.toString.apply(l)==="[object Array]"){o=l.length;for(f=0;f<o;f=f+1)n[f]=g(f,l)||"null";i=n.length===0?"[]":d?"[\n"+d+n.join(",\n"+d)+"\n"+r+"]":"["+n.join(",")+"]";d=r;return i}if(q&&typeof q==="object"){o=q.length;for(f=0;f<o;f=f+1){m=q[f];if(typeof m==="string")(i=g(m,l))&&n.push(e(m)+(d?": ":":")+i)}}else for(m in l)if(Object.hasOwnProperty.call(l,m))(i=g(m,l))&&n.push(e(m)+(d?": ":":")+i);i=n.length===0?"{}":d?"{\n"+d+n.join(",\n"+
39
+ d)+"\n"+r+"}":"{"+n.join(",")+"}";d=r;return i}}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 f=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
40
+ b=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,d,c,m={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},q;if(typeof JSON.stringify!=="function")JSON.stringify=function(a,b,f){var e;c=d="";if(typeof f==="number")for(e=0;e<f;e=e+1)c=c+" ";else typeof f==="string"&&(c=f);if((q=b)&&typeof b!=="function"&&(typeof b!=="object"||typeof b.length!=="number"))throw Error("JSON.stringify");return g("",
41
+ {"":a})};if(typeof JSON.parseIt!=="function")JSON.parseIt=function(a,b){function c(a,f){var d,e,g=a[f];if(g&&typeof g==="object")for(d in g)if(Object.hasOwnProperty.call(g,d)){e=c(g,d);e!==void 0?g[d]=e:delete g[d]}return b.call(a,f,g)}var d;f.lastIndex=0;f.test(a)&&(a=a.replace(f,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
42
+ "]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){d=eval("("+a+")");return typeof b==="function"?c({"":d},""):d}throw new SyntaxError("JSON.parseIt");}})();(function(a){function e(f,b){function d(c){var d=a(c);return b.globalNav?d:f.parent().find(c)}var c=this,e=a(this),q=!b.vertical,k=f.children(),h=0,j;g||(g=c);a.each(b,function(c,b){a.isFunction(b)&&e.bind(c,b)});1<k.length&&(k=a(b.items,f));f.data("finder",d);var p=d(b.prev),i=d(b.next),o=d(b.prevPage),r=d(b.nextPage);a.extend(c,{getIndex:function(){return h},getClickIndex:function(){var a=c.getItems();return a.index(a.filter("."+b.activeClass))},getConf:function(){return b},getSize:function(){return c.getItems().size()},
43
+ getPageAmount:function(){return Math.ceil(this.getSize()/b.size)},getPageIndex:function(){return Math.ceil(h/b.size)},getNaviButtons:function(){return p.add(i).add(o).add(r)},getRoot:function(){return f},getItemWrap:function(){return k},getItems:function(){return k.children(b.item)},getVisibleItems:function(){return c.getItems().slice(h,h+b.size)},seekTo:function(d,f,j){function l(){j&&j.call(c,d);e.trigger("onSeek",[d])}0>d&&(d=0);if(h===d)return c;a.isFunction(f)&&(j=f);if(d>c.getSize()-b.size)return b.loop?
44
  c.begin():this.end();var n=c.getItems().eq(d);if(!n.length)return c;var s=a.Event("onBeforeSeek");e.trigger(s,d>h);if(s.isDefaultPrevented())return c;if(void 0===f||a.isFunction(f))f=b.speed;q?k.animate({left:-n.position().left},f,b.easing,l):k.animate({top:-n.position().top},f,b.easing,l);g=c;h=d;s=a.Event("onStart");e.trigger(s,[d]);if(s.isDefaultPrevented())return c;p.add(o).toggleClass(b.disabledClass,0===d);i.add(r).toggleClass(b.disabledClass,d>=c.getSize()-b.size);return c},move:function(a,
45
  b,c){j=0<a;return this.seekTo(h+a,b,c)},next:function(a,b){return this.move(1,a,b)},prev:function(a,b){return this.move(-1,a,b)},movePage:function(a,c,d){j=0<a;var f=b.size*a,e=h%b.size;0<e&&(f+=0<a?-e:b.size-e);return this.move(f,c,d)},prevPage:function(a,b){return this.movePage(-1,a,b)},nextPage:function(a,b){return this.movePage(1,a,b)},setPage:function(a,c,d){return this.seekTo(a*b.size,c,d)},begin:function(a,b){j=!1;return this.seekTo(0,a,b)},end:function(a,d){j=!0;var f=this.getSize()-b.size;
46
  return 0<f?this.seekTo(f,a,d):c},reload:function(){e.trigger("onReload");return c},focus:function(){return g=c},click:function(a){var d=c.getItems().eq(a),f=b.activeClass,e=b.size;if(0>a||a>=c.getSize())return c;if(1==e){if(b.loop)return c.next();if(0===a||a==c.getSize()-1)j=void 0===j?!0:!j;return!1===j?c.prev():c.next()}return 2==e?(a==h&&a--,c.getItems().removeClass(f),d.addClass(f),c.seekTo(a,time,fn)):!d.hasClass(f)&&(c.getItems().removeClass(f),d.addClass(f),d=a-Math.floor(e/2),d>c.getSize()-
47
  e&&(d=c.getSize()-e),d!==a)?c.seekTo(d):c},bind:function(a,b){e.bind(a,b);return c},unbind:function(a){e.unbind(a);return c}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,b){c[b]=function(a){return c.bind(b,a)}});p.addClass(b.disabledClass).click(function(){c.prev()});i.click(function(){c.next()});r.click(function(){c.nextPage()});c.getSize()<b.size&&i.add(r).addClass(b.disabledClass);o.addClass(b.disabledClass).click(function(){c.prevPage()});var n=b.hoverClass,l="keydown."+
48
  Math.random().toString().substring(10);c.onReload(function(){n&&c.getItems().hover(function(){a(this).addClass(n)},function(){a(this).removeClass(n)});b.clickable&&c.getItems().each(function(b){a(this).unbind("click.scrollable").bind("click.scrollable",function(d){if(!a(d.target).is("a"))return c.click(b)})});b.keyboard?a(document).unbind(l).bind(l,function(a){if(!a.altKey&&!a.ctrlKey&&!("static"!=b.keyboard&&g!=c)){var d=b.keyboardSteps;return q&&(37==a.keyCode||39==a.keyCode)?(c.move(37==a.keyCode?
49
+ -d:d),a.preventDefault()):!q&&(38==a.keyCode||40==a.keyCode)?(c.move(38==a.keyCode?-d:d),a.preventDefault()):!0}}):a(document).unbind(l)});c.reload()}a.tools=a.tools||{};a.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:!1,speed:400,keyboard:!0,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:!0,activeClass:"active",easing:"swing",loop:!1,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:!1}};var g;a.fn.scrollable=function(f){var b=
50
+ this.eq("number"==typeof f?f:0).data("scrollable");if(b)return b;var d=a.extend({},a.tools.scrollable.conf),f=a.extend(d,f);f.keyboardSteps=f.keyboardSteps||f.size;this.each(function(){b=new e(a(this),f);a(this).data("scrollable",b)});return f.api?b:this}})(jQuery);(function(a){function e(b){switch(b.type){case "mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case "DOMMouseScroll":a.extend(b,b.data);b.delta=-b.detail/3;break;case "mousewheel":b.delta=b.wheelDelta/120}b.type="wheel";return a.event.handle.call(this,b,b.delta)}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){a.event.add(this,g,e,{})},teardown:function(){a.event.remove(this,g,e)}};var g=
51
+ !a.browser.mozilla?"mousewheel":"DOMMouseScroll"+("1.9">a.browser.version?" mousemove":""),f=a.tools.scrollable;f.plugins=f.plugins||{};f.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(b){var d=a.extend({},f.plugins.mousewheel.conf),c;"number"==typeof b&&(b={speed:b});b=a.extend(d,b);this.each(function(){var d=a(this).scrollable();d&&(c=d);d.getRoot().wheel(function(a,c){d.move(0>c?1:-1,b.speed||50);return!1})});return b.api?c:this}})(jQuery);/*
52
  : Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
53
  @website: http://www.datejs.com/
54
  */
55
+ (function(){var a=Date,e=a.prototype,g=[],f=function(a,d){d||(d=2);return("000"+a).slice(-1*d)};a.normalizeFormat=function(a){g=[];(new Date).$format(a);return g.join("")};a.strftime=function(a,d){return(new Date(1E3*d)).$format(a)};a.strtotime=function(b){b=a.parse(b);b.addMinutes(-1*b.getTimezoneOffset());return Math.round(a.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds())/1E3)};e.$format=function(b){var d=this,c,e=
56
+ function(a){g.push(a);return d.toString(a)};return b?b.replace(/(%|\\)?.|%%/g,function(b){if("\\"===b.charAt(0)||"%%"===b.substring(0,2))return b.replace("\\","").replace("%%","%");switch(b){case "d":case "%d":return e("dd");case "D":case "%a":return e("ddd");case "j":case "%e":return e("d");case "l":case "%A":return e("dddd");case "N":case "%u":return d.getDay()+1;case "S":return e("S");case "w":case "%w":return d.getDay();case "z":return d.getOrdinalNumber();case "%j":return f(d.getOrdinalNumber(),
57
+ 3);case "%U":var b=d.clone().set({month:0,day:1}).addDays(-1).moveToDayOfWeek(0),k=d.clone().addDays(1).moveToDayOfWeek(0,-1);return k<b?"00":f((k.getOrdinalNumber()-b.getOrdinalNumber())/7+1);case "W":case "%V":return d.getISOWeek();case "%W":return f(d.getWeek());case "F":case "%B":return e("MMMM");case "m":case "%m":return e("MM");case "M":case "%b":case "%h":return e("MMM");case "n":return e("M");case "t":return a.getDaysInMonth(d.getFullYear(),d.getMonth());case "L":return a.isLeapYear(d.getFullYear())?
58
+ 1:0;case "o":case "%G":return d.setWeek(d.getISOWeek()).toString("yyyy");case "%g":return d.$format("%G").slice(-2);case "Y":case "%Y":return e("yyyy");case "y":case "%y":return e("yy");case "a":case "%p":return e("tt").toLowerCase();case "A":return e("tt").toUpperCase();case "g":case "%I":return e("h");case "G":return e("H");case "h":return e("hh");case "H":case "%H":return e("HH");case "i":case "%M":return e("mm");case "s":case "%S":return e("ss");case "u":return f(d.getMilliseconds(),3);case "I":return d.isDaylightSavingTime()?
59
+ 1:0;case "O":return d.getUTCOffset();case "P":return c=d.getUTCOffset(),c.substring(0,c.length-2)+":"+c.substring(c.length-2);case "e":case "T":case "%z":case "%Z":return d.getTimezone();case "Z":return-60*d.getTimezoneOffset();case "B":return b=new Date,Math.floor((3600*b.getHours()+60*b.getMinutes()+b.getSeconds()+60*(b.getTimezoneOffset()+60))/86.4);case "c":return d.toISOString().replace(/\"/g,"");case "U":return a.strtotime("now");case "%c":return e("d")+" "+e("t");case "%C":return Math.floor(d.getFullYear()/
60
  100+1);case "%D":return e("MM/dd/yy");case "%n":return"\\n";case "%t":return"\\t";case "%r":return e("hh:mm tt");case "%R":return e("H:mm");case "%T":return e("H:mm:ss");case "%x":return e("d");case "%X":return e("t");default:return g.push(b),b}}):this._toString()};e.format||(e.format=e.$format)})();
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 2.8.5
5
- Tested up to: 3.4
6
- Stable tag: 2.1.1
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
@@ -121,7 +121,7 @@ The calendar is written in JavaScript. It contacts your blog when it scrolls to
121
 
122
  = Is the calendar collecting data about my blog? =
123
 
124
- After you use the calendar a few times we'll prompt you to let us collect a little anonymous data about your blog. Information like the size of your browser window and the number of posts you have per day help us make the calendar even better.
125
 
126
  The collected data is all available to the public. Check out the <a href="http://www.zackgrossbart.com/edcal/mint/">Editorial Calendar Statistics</a>.
127
 
@@ -173,9 +173,15 @@ Moving published posts can cause problems with some RSS feeds and is generally n
173
 
174
  == Changelog ==
175
 
176
- = 2.1.1 =
177
 
178
- Added a namespace to fix a small issue of potential javascript file conflict with wp_enqueue_script()
 
 
 
 
 
 
179
 
180
  = 2.1 =
181
 
2
  Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 2.8.5
5
+ Tested up to: 3.4.1
6
+ Stable tag: 2.2
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
121
 
122
  = Is the calendar collecting data about my blog? =
123
 
124
+ After you use the calendar a few times we'll prompt you to let us collect a little data about your blog. Information like the size of your browser window and the number of posts you have per day help us make the calendar even better.
125
 
126
  The collected data is all available to the public. Check out the <a href="http://www.zackgrossbart.com/edcal/mint/">Editorial Calendar Statistics</a>.
127
 
173
 
174
  == Changelog ==
175
 
176
+ = 2.2 =
177
 
178
+ The calendar is using JavaScript compression to load less data and run faster.
179
+
180
+ We've added a new mechanism to load the unscheduled drafts which spaces out the loading so the calendar responds super fast even when you have hundreds of unscheduled drafts.
181
+
182
+ Added a new button to jump to the last post in the calendar.
183
+
184
+ Added a namespace to fix a small issue of potential JavaScript file conflict with wp_enqueue_script().
185
 
186
  = 2.1 =
187