Editorial Calendar - Version 3.2

Version Description

We now have a new option for specifying the default status of a new post and documented the option for specifying the default time of a post.

The calendar is now doing a better job of reporting errors when it can't parse the post information from the blog.

Download this release

Release Info

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

Code changes from version 3.1.1 to 3.2

Files changed (5) hide show
  1. edcal.js +22 -3
  2. edcal.min.js +63 -64
  3. edcal.php +8 -1
  4. lib/edcallib.min.js +60 -59
  5. readme.txt +16 -2
edcal.js CHANGED
@@ -1343,7 +1343,16 @@ var edcal = {
1343
  jQuery('#edcal-status').val(post.status);
1344
  edcal.updatePublishButton();
1345
  } else {
1346
- jQuery('#edcal-status').val('draft');
 
 
 
 
 
 
 
 
 
1347
  jQuery('#newPostScheduleButton').text(edcal.str_save);
1348
  }
1349
 
@@ -2236,7 +2245,17 @@ var edcal = {
2236
  * the JSON parser from JSON.org works faster than the native
2237
  * one used by JQuery.
2238
  */
2239
- var parsedRes = JSON.parseIt(res);
 
 
 
 
 
 
 
 
 
 
2240
 
2241
  if (parsedRes.error) {
2242
  /*
@@ -2624,7 +2643,7 @@ var edcal = {
2624
  */
2625
  showFatalError: function(message) {
2626
  jQuery('#edcal_main_title').after(
2627
- '<div class="updated below-h2" id="message"><p>' +
2628
  edcal.str_fatal_error + message + '<br></p></div>');
2629
 
2630
  if (window.console) {
1343
  jQuery('#edcal-status').val(post.status);
1344
  edcal.updatePublishButton();
1345
  } else {
1346
+ if (0 != jQuery('#edcal-status option[value=' + edcal.defaultStatus + ']').length) {
1347
+ /*
1348
+ * We want to use the default status if it exists in the list and we'll
1349
+ * default to the draft status if the default one is in the list.
1350
+ */
1351
+ jQuery('#edcal-status').val(edcal.defaultStatus);
1352
+ } else {
1353
+ jQuery('#edcal-status').val('draft');
1354
+ }
1355
+
1356
  jQuery('#newPostScheduleButton').text(edcal.str_save);
1357
  }
1358
 
2245
  * the JSON parser from JSON.org works faster than the native
2246
  * one used by JQuery.
2247
  */
2248
+ var parsedRes = null;
2249
+
2250
+ try {
2251
+ parsedRes = JSON.parseIt(res);
2252
+ } catch (e) {
2253
+ edcal.showFatalError(edcal.str_fatal_parse_error + e.message);
2254
+ if (window.console) {
2255
+ console.error(e);
2256
+ }
2257
+ return;
2258
+ }
2259
 
2260
  if (parsedRes.error) {
2261
  /*
2643
  */
2644
  showFatalError: function(message) {
2645
  jQuery('#edcal_main_title').after(
2646
+ '<div class="error below-h2" id="message"><p>' +
2647
  edcal.str_fatal_error + message + '<br></p></div>');
2648
 
2649
  if (window.console) {
edcal.min.js CHANGED
@@ -1,66 +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").on("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").is(":visible")||jQuery("#edcal-time").val().length>0)?jQuery("#newPostScheduleButton").removeClass("disabled"):
7
- jQuery("#newPostScheduleButton").addClass("disabled");if(a.keyCode===13)return edcal.savePost(null,true)});jQuery("#edcal-status").bind("change",function(){edcal.updatePublishButton()});jQuery("#edcal_weeks_pref").on("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"===
8
- edcal.timeFormat,separator:":",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="edcal_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+'" with id:'+a.post.id);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)?
23
- !0:!1},ajax_url:function(){return ajaxurl+"?_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=edcal.defaultTime;"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");
24
- var a={id:0,date:Date.today(),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,
25
- 2)&&"PM"===e.slice(e.length-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(edcal.defaultTime),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="+
26
- f+"&title="+encodeURIComponent(a.title)+"&content="+encodeURIComponent(a.content)+"&id="+encodeURIComponent(a.id)+"&status="+encodeURIComponent(a.status)+"&orig_status="+encodeURIComponent(a.orig_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,
27
- dataType:"json",success:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");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,
28
- c);edcal.addPostItemDragAndToolltip(c)}else edcal.showError("There was an error creating a new post for your blog.");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]=
29
- this.value});return a},showForm:function(a){edcal.resetForm();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)):
30
- a.formatteddate===edcal.NO_DATE?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",
31
- "true"),jQuery("#edcal-status").append('<option class="temp" value="'+a.status+'">'+a.status+"</option>"),jQuery("#edcal-status").val(a.status));a.formatteddate!==edcal.NO_DATE&&-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();
32
- jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;edcal.resetForm()},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]=
33
- a;return edcal.getPostItemString(a)},findPostForId:function(a,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){edcal.output("removePostItem("+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=
34
- edcal.posts[a];if(50>c.length)for(a=0;a<c.length;a++)c[a]&&(b+=edcal.getPostItemString(c[a]));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"),
35
- a);if(!edcal.inDrag&&edcal.isPostEditable(b)){var c=jQuery("#"+a+" > div.postactions");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);
36
- edcal.actionTimer=setTimeout(function(){jQuery("#"+a+" > div.postactions").slideUp();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:
37
- "1"===a.sticky?b+=edcal.str_sticky:"pending"===a.status?b+=edcal.str_pending:"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-"+
38
- a.id+'\');" id="post-'+a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+a.slugs+'"><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-"+
39
- a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+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()-
40
- jQuery("#wphead").height()-150;return Math.max(a,500)},move:function(a,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(),
41
- edcal.createRow(jQuery("#cal"),!1),edcal._wDate.add(-7).days();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",
42
- edcal._wDate.clone().add(-(edcal.weeksPref+4)).weeks().toString("yyyy-dd-MM")):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(".edcal_row").children(".day:first").attr("id")),a=edcal.getDayFromDayId(a.eq(edcal.weeksPref-
43
- 1).children(".edcal_row").children(".day:last").attr("id"));jQuery("#currentRange").text(edcal.chineseAposWorkaround(b.toString(Date.CultureInfo.formatPatterns.yearMonth))+" - "+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,
44
- "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,"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,
45
- "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,"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,
46
- "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,"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();
47
- 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+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+
48
- 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: '+(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())},
49
- 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()})},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,
50
- 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: "+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):
51
- 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: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");
52
- 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+"<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:
53
- 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: "+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"),
54
- 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&&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"===
55
- 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: "+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="+
56
- 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"===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);
57
- 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&&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"),
58
- 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>'+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" />'+
59
- 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)+'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="'+
60
- 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">'+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();
61
- 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(" ");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: "+
62
- (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("#"+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);
63
- 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)});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: "+
64
- a.responseText)}})}},output:function(a){window.console&&console.log(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("?")+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+
65
- 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}};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};
66
- 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()});
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=0<b?!1:!0,f=Math.abs(b);edcal.output(e+" at a velocity of "+f);!edcal.isMoving&&.2<f&&edcal.move(1,e);return!1});a.onBeforeSeek(function(a,b){return!1});jQuery(document).bind("keydown",function(a){if(27===a.keyCode)return!1;if(!jQuery("#edcal_quickedit").is(":visible"))if(40!==
4
+ a.keyCode||a.altKey||a.ctrlKey)if(38!==a.keyCode||a.altKey||a.ctrlKey){if(34===a.keyCode&&!a.altKey&&!a.ctrlKey||40===a.keyCode&&a.ctrlKey)return edcal.move(edcal.weeksPref,!0),!1;if(33===a.keyCode&&!a.altKey&&!a.ctrlKey||38===a.keyCode&&a.ctrlKey)return edcal.move(edcal.weeksPref,!1),!1}else return edcal.move(1,!1),!1;else return edcal.move(1,!0),!1});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!1});jQuery("#moveToLast").click(function(){if("-1"!==edcal.lastPostDate){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!1}});jQuery("#prevmonth").click(function(){edcal.move(edcal.weeksPref,!1);return!1});jQuery("#nextmonth").click(function(){edcal.move(edcal.weeksPref,
6
+ !0);return!1});jQuery("#newPostScheduleButton").on("click",function(a){if(jQuery(this).hasClass("disabled"))return!1;jQuery(this).addClass("disabled");return edcal.savePost(null,!1,!0)});jQuery("#edcal-title-new-field").bind("keyup",function(a){0<jQuery("#edcal-title-new-field").val().length&&(!jQuery("#edcal-time").is(":visible")||0<jQuery("#edcal-time").val().length)?jQuery("#newPostScheduleButton").removeClass("disabled"):jQuery("#newPostScheduleButton").addClass("disabled");if(13===a.keyCode)return edcal.savePost(null,
7
+ !0)});jQuery("#edcal-status").bind("change",function(a){edcal.updatePublishButton()});jQuery("#edcal_weeks_pref").on("keyup",function(a){0<jQuery("#edcal_weeks_pref").val().length?jQuery("#edcal_applyoptions").removeClass("disabled"):jQuery("#edcal_applyoptions").addClass("disabled");13===a.keyCode&&edcal.saveOptions()});edcal.savePosition();edcal.addOptionsSection();jQuery("#edcal-time").timePicker({show24Hours:"H:i"===edcal.timeFormat,separator:":",step:30});jQuery("#showdraftsdrawer").click(function(){edcal.setDraftsDrawerVisible(!edcal.isDraftsDrawerVisible)})}},
8
+ 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",width:"0"}),c.html(edcal.str_showdrafts));edcal.isDraftsDrawerVisible=a;jQuery.cookie("edcal_drafts_drawer",
9
+ 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;">'+edcal.str_addDraftLink+"</a>");a=a+'<ul class="postlist">'+edcal.getPostItems(edcal.NO_DATE);a+=
10
+ "</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());jQuery("#unscheduled").mouseout(function(){jQuery("#unscheduledNewLink").hide()}).mouseover(function(){jQuery("#unscheduledNewLink").show()})},
11
+ alignGrid:function(a,b,c,d,e){if("draftsdrawer"!==jQuery(a).parent().attr("id")){var f=0,g=0,k=1;jQuery(a).each(function(){jQuery(this).css("position","relative");var a=jQuery(this).children("div");if(1===b||"ltr"===edcal.ltr)for(var l=0;l<a.length;l++)a.eq(l).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:g+"%"}),0===k%b?(f=0,g+=d+e):f+=c+e,k++;else for(l=a.length-1;-1<l;l--)a.eq(l).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:g+"%"}),0===k%b?(f=0,g+=d+e):f+=
12
+ c+e,k++})}},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")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).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 lastday">'+a.add(1).days().toString("dddd")+"</div>");jQuery("#cal_cont").prepend(b);edcal.alignGrid(".dayheadcont",7,13.8,100,.5)},getDateClass:function(a){var b,c;c=-1===a.compareTo(Date.today())?"beforeToday":"todayAndAfter";edcal.firstDayOfMonth||(edcal.firstDayOfMonth=Date.today().moveToFirstDayOfMonth().clearTime(),
14
+ 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=jQuery("#"+a+" a.daynewlink"),a.css("display","block"),a.bind("click",edcal.addPost))},hideAddPostLink:function(a){jQuery("#"+
15
+ 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="edcal_row">',e=0;7>e;e++)d+="<div onmouseover=\"edcal.showAddPostLink('"+c.toString(edcal.internalDateFormat)+"');\" onmouseout=\"edcal.hideAddPostLink('"+c.toString(edcal.internalDateFormat)+'\');" id="'+c.toString(edcal.internalDateFormat)+
16
+ '" 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+"</a>",d="01"===c.toString("dd")?d+('<div class="daylabel">'+c.toString("MMM d")):d+('<div class="daylabel">'+c.toString("d")),
17
+ 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,.5);edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");edcal.makeDroppable(jQuery("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" > div > div.day"));return jQuery("row"+edcal._wDate.toString(edcal.internalDateFormat))},
18
+ 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"))}})},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,
19
+ 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",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"))})},
20
+ handleDrag:function(a,b){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,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,
21
+ 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===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: "'+
22
+ a.post.title+'" with id:'+a.post.id);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+"?_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"),
23
+ b=edcal.defaultTime;"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(),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);
24
+ 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-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(edcal.defaultTime),
25
+ 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)+"&content="+encodeURIComponent(a.content)+"&id="+encodeURIComponent(a.id)+"&status="+encodeURIComponent(a.status)+"&orig_status="+encodeURIComponent(a.orig_status);if(null===e||e===edcal.NO_DATE)a+=
26
+ "&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");jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;if(a.error)return a.error===edcal.NONCE_ERROR&&
27
+ edcal.showError(edcal.checksum_error),!1;if(a.post)if(b)window.location=a.post.editlink.replace("&amp;","&");else{var c=a.post.date;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.");d&&d(a);return!0},error:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");jQuery("#edcal_quickedit").hide();
28
+ jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;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();a.formatteddate===edcal.NO_DATE||a.date_gmt===edcal.NO_DATE?jQuery("#timeEditControls").hide():jQuery("#timeEditControls").show();
29
+ 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?jQuery("#tooltiptitle").text(edcal.str_newdraft_title):jQuery("#tooltiptitle").text(edcal.str_newpost_title+a.formatteddate);"future"===
30
+ a.status&&jQuery("#newPostScheduleButton").text(edcal.str_update);a.status?(jQuery("#edcal-status").val(a.status),edcal.updatePublishButton()):(0!=jQuery("#edcal-status option[value="+edcal.defaultStatus+"]").length?jQuery("#edcal-status").val(edcal.defaultStatus):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));a.formatteddate!==edcal.NO_DATE&&-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=
32
+ !0;edcal.resetForm()},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){edcal.output("removePostItem("+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]&&
34
+ (b+=edcal.getPostItemString(c[a]));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=
35
+ jQuery("#"+a+" > div.postactions");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("#"+
36
+ a+" > div.postactions").slideUp();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"===
37
+ a.status?b+=edcal.str_pending:"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 '+
38
+ a.status+" "+edcal.getPostEditableClass(a)+a.slugs+'"><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-"+
39
+ a.id+'\');" id="post-'+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,
40
+ 500)},move:function(a,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(a){var b=jQuery("#edcal_scrollable").scrollable().getVisibleItems();a=edcal.getDayFromDayId(b.eq(0).children(".edcal_row").children(".day:first").attr("id"));b=edcal.getDayFromDayId(b.eq(edcal.weeksPref-1).children(".edcal_row").children(".day:last").attr("id"));jQuery("#currentRange").text(edcal.chineseAposWorkaround(a.toString(Date.CultureInfo.formatPatterns.yearMonth))+
43
+ " - "+edcal.chineseAposWorkaround(b.toString(Date.CultureInfo.formatPatterns.yearMonth)))},nextStartOfWeek:function(a){a=a.clone();if(null===edcal.startOfWeek)if(edcal.locale){var b=edcal.locale.toUpperCase();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,"IE")||edcal.endsWith(b,
44
+ "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,"TW")||edcal.endsWith(b,
45
+ "UM")||edcal.endsWith(b,"US")||edcal.endsWith(b,"UZ")||edcal.endsWith(b,"VI")||edcal.endsWith(b,"ZW")?edcal.startOfWeek=0:edcal.endsWith(b,"MV")?edcal.startOfWeek=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")||
46
+ edcal.endsWith(b,"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")?edcal.startOfWeek=6:edcal.startOfWeek=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();
47
+ edcal.currentDirection=!0;a=edcal.weeksPref+6;for(var 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()-
48
+ 6;jQuery("head").append('<style id="edcal_poststyle" type="text/css">.ui-draggable-dragging {width: '+(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",
49
+ function(){edcal.saveFeedbackPref()})},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(a){jQuery("#feedbacksection").html(edcal.str_feedbackdone);setTimeout(function(){jQuery("#feedbacksection").hide("slow")},5E3)},error:function(a){edcal.showError(edcal.general_error);
50
+ a.responseText&&edcal.output("saveOptions xhr.responseText: "+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":
51
+ edcal.getDayFromDayId(a).toString(edcal.wp_dateFormat),g=e?b.date_gmt: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);b.error&&(edcal.removePostItem(a,
52
+ "post-"+b.post.id),b.error===edcal.CONCURRENCY_ERROR?edcal.displayMessage(edcal.concurrency_error+"<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: "+
53
+ b);edcal.output("error: "+c);a.responseText&&edcal.output("changeDate xhr.responseText: "+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();
54
+ var e=null;try{e=JSON.parseIt(b)}catch(f){edcal.showFatalError(edcal.str_fatal_parse_error+f.message);window.console&&console.error(f);return}if(e.error)e.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error);else{for(var g=[],k=e.length;0<=k;k--){var h=e[k];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),g[g.length]=h.date)}setTimeout(function(){jQuery.each(g,
55
+ 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: "+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();
56
+ edcal.output("xhr for getPost returned: "+a);if(a.error)return a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error),!1;"function"===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="#" >'+
57
+ edcal.str_screenoptions+"</a></div>";0===jQuery("#screen-meta-links").length&&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();
58
+ for(var a='<div class="metabox-prefs" id="calendar-fields-prefs"><h5>'+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" '+
59
+ edcal.isPrefChecked(edcal.timePref)+'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){a='<div id="'+b+'" class="optionscolorrow">'+('<span style="background-color: '+c+';" class="colorlabel"> '+a+"</span> ");var 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(a){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.log(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="error 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: 3.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
@@ -74,6 +74,11 @@ class EdCal {
74
  * we are using 10am, but this could become an option later.
75
  */
76
  $this->default_time = get_option("edcal_default_time") != "" ? get_option("edcal_default_time") : '10:00';
 
 
 
 
 
77
 
78
  /*
79
  * We use these variables to hold the post dates for the filter when
@@ -250,6 +255,7 @@ class EdCal {
250
  edcal.timeFormat = "<?php echo(get_option("time_format")); ?>";
251
  edcal.previewDateFormat = "MMMM d";
252
  edcal.defaultTime = "<?php echo $this->default_time; ?>";
 
253
 
254
  /*
255
  * We want to show the day of the first day of the week to match the user's
@@ -318,6 +324,7 @@ class EdCal {
318
  edcal.str_opt_status = <?php echo($this->edcal_json_encode(__('Status', 'editorial-calendar'))) ?>;
319
  edcal.str_opt_time = <?php echo($this->edcal_json_encode(__('Time of day', 'editorial-calendar'))) ?>;
320
  edcal.str_fatal_error = <?php echo($this->edcal_json_encode(__('An error occurred while loading the calendar: ', 'editorial-calendar'))) ?>;
 
321
 
322
  edcal.str_weekserror = <?php echo($this->edcal_json_encode(__('The calendar can only show between 1 and 8 weeks at a time.', 'editorial-calendar'))) ?>;
323
  edcal.str_weekstt = <?php echo($this->edcal_json_encode(__('Select the number of weeks for the calendar to show.', 'editorial-calendar'))) ?>;
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: 3.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
74
  * we are using 10am, but this could become an option later.
75
  */
76
  $this->default_time = get_option("edcal_default_time") != "" ? get_option("edcal_default_time") : '10:00';
77
+
78
+ /*
79
+ * This is the default status used for creating new posts.
80
+ */
81
+ $this->default_status = get_option("edcal_default_status") != "" ? get_option("edcal_default_status") : 'draft';
82
 
83
  /*
84
  * We use these variables to hold the post dates for the filter when
255
  edcal.timeFormat = "<?php echo(get_option("time_format")); ?>";
256
  edcal.previewDateFormat = "MMMM d";
257
  edcal.defaultTime = "<?php echo $this->default_time; ?>";
258
+ edcal.defaultStatus = "<?php echo $this->default_status; ?>";
259
 
260
  /*
261
  * We want to show the day of the first day of the week to match the user's
324
  edcal.str_opt_status = <?php echo($this->edcal_json_encode(__('Status', 'editorial-calendar'))) ?>;
325
  edcal.str_opt_time = <?php echo($this->edcal_json_encode(__('Time of day', 'editorial-calendar'))) ?>;
326
  edcal.str_fatal_error = <?php echo($this->edcal_json_encode(__('An error occurred while loading the calendar: ', 'editorial-calendar'))) ?>;
327
+ edcal.str_fatal_parse_error = <?php echo($this->edcal_json_encode(__('<br /><br />The calendar was not able to parse the data your blog returned about the posts. This error is most likely caused by a conflict with another plugin on your blog. The actual parse error was:<br/><br/> ', 'editorial-calendar'))) ?>;
328
 
329
  edcal.str_weekserror = <?php echo($this->edcal_json_encode(__('The calendar can only show between 1 and 8 weeks at a time.', 'editorial-calendar'))) ?>;
330
  edcal.str_weekstt = <?php echo($this->edcal_json_encode(__('Select the number of weeks for the calendar to show.', 'editorial-calendar'))) ?>;
lib/edcallib.min.js CHANGED
@@ -1,61 +1,62 @@
1
- var humanMsg={setup:function(a,e,g){humanMsg.msgID="humanMsg";humanMsg.logID="humanMsgLog";a="body";void 0==e&&(e=void 0==humanMsg.logTitle?"Message Log":humanMsg.logTitle);humanMsg.logTop=jQuery("#"+humanMsg.logID).css("top");humanMsg.msgOpacity=0.9;void 0!=g&&(humanMsg.msgOpacity=parseFloat(g));jQuery(a).prepend('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>');jQuery(a).append('<div id="'+humanMsg.logID+'"><p>'+e+'</p><a href="#" id="humanMsgClose">x</a><ul></ul></div>');
2
- jQuery("#humanMsgClose").click(function(){jQuery("#"+humanMsg.logID+" p").addClass("minimized");jQuery("#humanMsgClose").hide();return false});jQuery("#"+humanMsg.logID+" p").click(function(){humanMsg.activateLog();if(jQuery("#"+humanMsg.logID+" p").hasClass("minimized")){jQuery("#humanMsgClose").show();jQuery("#"+humanMsg.logID+" p").removeClass("minimized")}else if(jQuery(this).siblings("ul").css("display")!="none"){jQuery("#"+humanMsg.logID).css("top",humanMsg.logTop);jQuery(this).siblings("ul").hide();
3
- jQuery("#humanMsgClose").show()}else{humanMsg.setLogHeight();jQuery(this).siblings("ul").slideToggle();jQuery("#humanMsgClose").slideToggle()}})},setLogTitle:function(a){humanMsg.logTitle=a;jQuery("#"+humanMsg.logID+" > p").text(a)},displayMsg:function(a,e){""!=a&&(humanMsg.activateLog(),clearTimeout(humanMsg.t2),jQuery("#"+humanMsg.msgID).css("top",jQuery(window).scrollTop()+75+"px"),jQuery("#"+humanMsg.msgID+" p").html(a),jQuery("#"+humanMsg.msgID+"").show().animate({opacity:humanMsg.msgOpacity},
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(d){var f=d||window.event,b=[].slice.call(arguments,1),c=0,g=0,e=0,d=a.event.fix(f);d.type="mousewheel";f.wheelDelta&&(c=f.wheelDelta/120);f.detail&&(c=-f.detail/3);e=c;void 0!==f.axis&&f.axis===f.HORIZONTAL_AXIS&&(e=0,g=-1*c);void 0!==f.wheelDeltaY&&(e=f.wheelDeltaY/120);void 0!==f.wheelDeltaX&&(g=-1*f.wheelDeltaX/120);b.unshift(d,c,g,e);return(a.event.dispatch||a.event.handle).apply(this,b)}var g=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=g.length;c;)a.event.fixHooks[g[--c]]=
8
- a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=g.length;a;)this.addEventListener(g[--a],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=g.length;a;)this.removeEventListener(g[--a],e,!1);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(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,c){var d=1,f=g.length,b="",p=[],e,k,h,i;for(e=0;e<f;e++)if(b=a(g[e]),"string"===b)p.push(g[e]);else if("array"===b){h=g[e];if(h[2]){b=c[d];for(k=0;k<h[2].length;k++){if(!b.hasOwnProperty(h[2][k]))throw sprintf('[sprintf] property "%s" does not exist',
9
- h[2][k]);b=b[h[2][k]]}}else b=h[1]?c[h[1]]:c[d++];if(/[^s]/.test(h[8])&&"number"!=a(b))throw sprintf("[sprintf] expecting number but found %s",a(b));switch(h[8]){case "b":b=b.toString(2);break;case "c":b=String.fromCharCode(b);break;case "d":b=parseInt(b,10);break;case "e":b=h[7]?b.toExponential(h[7]):b.toExponential();break;case "f":b=h[7]?parseFloat(b).toFixed(h[7]):parseFloat(b);break;case "o":b=b.toString(8);break;case "s":b=(b=""+b)&&h[7]?b.substring(0,h[7]):b;break;case "u":b=Math.abs(b);break;
10
- case "x":b=b.toString(16);break;case "X":b=b.toString(16).toUpperCase()}b=/[def]/.test(h[8])&&h[3]&&0<=b?"+"+b:b;k=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ";i=h[6]-(""+b).length;if(h[6]){for(var q=[];0<i;q[--i]=k);k=q.join("")}else k="";p.push(h[5]?b+k:k+b)}return p.join("")};e.cache={};e.parse=function(a){for(var c=[],d=[],f=0;a;){if(null!==(c=/^[^\x25]+/.exec(a)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(a)))d.push("%");else if(null!==(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a))){if(c[2]){var f=
11
- f|1,b=[],e=c[2],m=[];if(null!==(m=/^([a-z_][a-z_\d]*)/i.exec(e)))for(b.push(m[1]);""!==(e=e.substring(m[0].length));)if(null!==(m=/^\.([a-z_][a-z_\d]*)/i.exec(e)))b.push(m[1]);else if(null!==(m=/^\[(\d+)\]/.exec(e)))b.push(m[1]);else throw"[sprintf] huh?";else throw"[sprintf] huh?";c[2]=b}else f|=2;if(3===f)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}else throw"[sprintf] huh?";a=a.substring(c[0].length)}return d};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 c="";if(g.expires&&("number"==typeof g.expires||g.expires.toUTCString))"number"==typeof g.expires?(c=new Date,c.setTime(c.getTime()+864E5*g.expires)):c=g.expires,c="; expires="+c.toUTCString();var d=g.path?"; path="+g.path:"",f=g.domain?"; domain="+g.domain:"",g=g.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(e),c,d,f,g].join("")}else{e=null;if(document.cookie&&""!=document.cookie){g=
13
- document.cookie.split(";");for(c=0;c<g.length;c++)if(d=jQuery.trim(g[c]),d.substring(0,a.length+1)==a+"="){e=decodeURIComponent(d.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},c='<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(c),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(c){arguments[0]=a.event.fix(c);arguments[0].type=g;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(e,g,c){return this.bind(e,function(d){var f=a(d.target);if(f.is(g))return c.apply(f,
15
- arguments)})},triggerEvent:function(e,g){return this.triggerHandler(e,[a.event.fix({type:e,target:g})])}})})(jQuery);(function(a){function e(c,d){function f(b){var f=a(b);return d.globalNav?f:c.parent().find(b)}var b=this,e=a(this),m=!d.vertical,k=c.children(),h=0,i;g||(g=b);a.each(d,function(b,d){a.isFunction(d)&&e.bind(b,d)});1<k.length&&(k=a(d.items,c));c.data("finder",f);var q=f(d.prev),j=f(d.next),o=f(d.prevPage),r=f(d.nextPage);a.extend(b,{getIndex:function(){return h},getClickIndex:function(){var a=b.getItems();return a.index(a.filter("."+d.activeClass))},getConf:function(){return d},getSize:function(){return b.getItems().size()},
16
- getPageAmount:function(){return Math.ceil(this.getSize()/d.size)},getPageIndex:function(){return Math.ceil(h/d.size)},getNaviButtons:function(){return q.add(j).add(o).add(r)},getRoot:function(){return c},getItemWrap:function(){return k},getItems:function(){return k.children(d.item)},getVisibleItems:function(){return b.getItems().slice(h,h+d.size)},seekTo:function(f,c,i){function l(){i&&i.call(b,f);e.trigger("onSeek",[f])}0>f&&(f=0);if(h===f)return b;a.isFunction(c)&&(i=c);if(f>b.getSize()-d.size)return d.loop?
17
- b.begin():this.end();var n=b.getItems().eq(f);if(!n.length)return b;var s=a.Event("onBeforeSeek");e.trigger(s,[f]);if(s.isDefaultPrevented())return b;if(void 0===c||a.isFunction(c))c=d.speed;m?k.animate({left:-n.position().left},c,d.easing,l):k.animate({top:-n.position().top},c,d.easing,l);g=b;h=f;s=a.Event("onStart");e.trigger(s,[f]);if(s.isDefaultPrevented())return b;q.add(o).toggleClass(d.disabledClass,0===f);j.add(r).toggleClass(d.disabledClass,f>=b.getSize()-d.size);return b},move:function(b,
18
- a,d){i=0<b;return this.seekTo(h+b,a,d)},next:function(b,a){return this.move(1,b,a)},prev:function(b,a){return this.move(-1,b,a)},movePage:function(b,a,f){i=0<b;var c=d.size*b,e=h%d.size;0<e&&(c+=0<b?-e:d.size-e);return this.move(c,a,f)},prevPage:function(b,a){return this.movePage(-1,b,a)},nextPage:function(b,a){return this.movePage(1,b,a)},setPage:function(b,a,f){return this.seekTo(b*d.size,a,f)},begin:function(b,a){i=!1;return this.seekTo(0,b,a)},end:function(a,f){i=!0;var c=this.getSize()-d.size;
19
- return 0<c?this.seekTo(c,a,f):b},reload:function(){e.trigger("onReload");return b},focus:function(){return g=b},click:function(a){var f=b.getItems().eq(a),c=d.activeClass,e=d.size;if(0>a||a>=b.getSize())return b;if(1==e){if(d.loop)return b.next();if(0===a||a==b.getSize()-1)i=void 0===i?!0:!i;return!1===i?b.prev():b.next()}return 2==e?(a==h&&a--,b.getItems().removeClass(c),f.addClass(c),b.seekTo(a,time,fn)):!f.hasClass(c)&&(b.getItems().removeClass(c),f.addClass(c),f=a-Math.floor(e/2),f>b.getSize()-
20
- e&&(f=b.getSize()-e),f!==a)?b.seekTo(f):b},bind:function(a,f){e.bind(a,f);return b},unbind:function(a){e.unbind(a);return b}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,f){b[f]=function(a){return b.bind(f,a)}});q.addClass(d.disabledClass).click(function(){b.prev()});j.click(function(){b.next()});r.click(function(){b.nextPage()});b.getSize()<d.size&&j.add(r).addClass(d.disabledClass);o.addClass(d.disabledClass).click(function(){b.prevPage()});var n=d.hoverClass,l="keydown."+
21
- Math.random().toString().substring(10);b.onReload(function(){n&&b.getItems().hover(function(){a(this).addClass(n)},function(){a(this).removeClass(n)});d.clickable&&b.getItems().each(function(f){a(this).unbind("click.scrollable").bind("click.scrollable",function(d){if(!a(d.target).is("a"))return b.click(f)})});d.keyboard?a(document).unbind(l).bind(l,function(a){if(!a.altKey&&!a.ctrlKey&&!("static"!=d.keyboard&&g!=b)){var f=d.keyboardSteps;return m&&(37==a.keyCode||39==a.keyCode)?(b.move(37==a.keyCode?
22
- -f:f),a.preventDefault()):!m&&(38==a.keyCode||40==a.keyCode)?(b.move(38==a.keyCode?-f:f),a.preventDefault()):!0}}):a(document).unbind(l)});b.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(c){var d=
23
- this.eq("number"==typeof c?c:0).data("scrollable");if(d)return d;var f=a.extend({},a.tools.scrollable.conf),c=a.extend(f,c);c.keyboardSteps=c.keyboardSteps||c.size;this.each(function(){d=new e(a(this),c);a(this).data("scrollable",d)});return c.api?d: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 c=a.extend({},e.plugins.autoscroll.conf),d;a.extend(c,g);this.each(function(){var f=a(this).scrollable();f&&(d=f);var b,e,g=!0;f.play=function(){b||(g=!1,b=setInterval(function(){f.move(c.steps)},c.interval),f.move(c.steps))};f.pause=function(){b=clearInterval(b)};f.stop=
25
- function(){f.pause();g=!0};c.autopause&&f.getRoot().add(f.getNaviButtons()).hover(function(){f.pause();clearInterval(e)},function(){g||(e=setTimeout(f.play,c.interval))});c.autoplay&&setTimeout(f.play,c.interval)});return c.api?d: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 c=a.extend({},e.plugins.navigator.conf),d;"string"==typeof g&&(g={navi:g});g=a.extend(c,g);this.each(function(){function f(){if(!c.children().length||c.data("navi")==b){c.empty();c.data("navi",b);for(var f=0;f<b.getPageAmount();f++)c.append(a("<"+(g.naviItem||"a")+"/>"));e=c.children().each(function(f){var d=
27
- a(this);d.click(function(a){b.setPage(f);return a.preventDefault()});g.indexed&&d.text(f);g.idPrefix&&d.attr("id",g.idPrefix+f)})}else e=g.naviItem?c.find(g.naviItem):c.children(),e.each(function(f){a(this).click(function(a){b.setPage(f);return a.preventDefault()})});e.eq(0).addClass(g.activeClass)}var b=a(this).scrollable(),c=b.getRoot().data("finder").call(null,g.navi),e=null,k=b.getNaviButtons();b&&(d=b);b.getNaviButtons=function(){return k.add(c)};b.onStart(function(){var a=g.activeClass;e.removeClass(a).eq(b.getPageIndex()).addClass(a)});
28
- b.onReload(function(){f()});f();var h=e.filter("[href="+location.hash+"]");h.length&&b.move(e.index(h))});return g.api?d:this}})(jQuery);
29
- (function(a){function e(d){switch(d.type){case "mousemove":return a.extend(d.data,{clientX:d.clientX,clientY:d.clientY,pageX:d.pageX,pageY:d.pageY});case "DOMMouseScroll":a.extend(d,d.data);d.delta=-d.detail/3;break;case "mousewheel":d.delta=d.wheelDelta/120}d.type="wheel";return a.event.handle.call(this,d,d.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":""),c=a.tools.scrollable;c.plugins=c.plugins||{};c.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(d){var f=a.extend({},c.plugins.mousewheel.conf),b;"number"==typeof d&&(d={speed:d});d=a.extend(f,d);this.each(function(){var f=a(this).scrollable();f&&(b=f);f.getRoot().wheel(function(a,b){f.move(0>b?1:-1,d.speed||50);return!1})});return d.api?b:this}})(jQuery);(function(a){function e(f,b,d){f.value=a(b).text();a(f).change();a.browser.msie||f.focus();d.hide()}function g(a,b){var d=a.getHours(),c=b.show24Hours?d:(d+11)%12+1;b.show24Hours&&(c=(10>c?"0":"")+c);var e=a.getMinutes(),a=b.timeFormat,a=a.replace("hh",c),a=a.replace("h",c),a=a.replace("mm",(10>e?"0":"")+e);return a=b.show24Hours?a.replace(" tt",""):a.replace("tt",12>d?b.amDesignator:b.pmDesignator)}function c(a,b){if(a){var c=a.split(b.separator),e=parseFloat(c[0]),c=parseFloat(c[1]);b.show24Hours||
31
- (12===e&&-1!==a.substr(b.amDesignator)?e=0:12!==e&&-1!==a.indexOf(b.pmDesignator)&&(e+=12));return d(new Date(0,0,0,e,c,0))}return null}function d(a){a.setFullYear(2001);a.setMonth(0);a.setDate(0);return a}a.fn.timePicker=function(d){var b=a.extend({},a.fn.timePicker.defaults,d);return this.each(function(){a.timePicker(this,b)})};a.timePicker=function(d,b){var c=a(d)[0];return c.timePicker||(c.timePicker=new jQuery._timePicker(c,b))};a._timePicker=function(f,b){var p=!1,m=!1,k="object"==typeof b.startTime?
32
- d(b.startTime):c(b.startTime,b),h="object"==typeof b.endTime?d(b.endTime):c(b.endTime,b);a(f).attr("autocomplete","OFF");for(var i=[],q=new Date(k);q<=h;)i[i.length]=g(q,b),q=new Date(q.setMinutes(q.getMinutes()+b.step));for(var j=a("<div "+(b.tpDivId?'id="'+b.tpDivId+'" ':"")+'class="time-picker'+(b.show24Hours?"":" time-picker-12hours")+'"></div>'),o=a("<ul></ul>"),q=0;q<i.length;q++)o.append("<li>"+i[q]+"</li>");j.append(o);i=a(f).offset();j.appendTo("body").css({top:i.top-48+"px",left:i.left,
33
- width:a(f).width()+5+"px"}).hide();j.mouseover(function(){p=!0}).mouseout(function(){p=!1});a("li",o).mouseover(function(){m||(a("li.selected",j).removeClass("selected"),a(this).addClass("selected"))}).mousedown(function(){p=!0}).click(function(){e(f,this,j,b);p=!1});var r=function(){if(j.is(":visible"))return!1;a("li",j).removeClass("selected");var e=a(f).offset();j.css({top:e.top+a(f).height()+10+"px",left:e.left,width:a(f).width()+5+"px"});j.show();var i=f.value?c(f.value,b):k,e=60*k.getHours()+
34
- k.getMinutes(),i=60*i.getHours()+i.getMinutes()-e,i=Math.round(i/b.step),e=d(new Date(0,0,0,0,i*b.step+e,0)),e=k<e&&e<=h?e:k,e=a("li:contains("+g(e,b)+")",j);e.length&&(e.addClass("selected"),j[0].scrollTop=e[0].offsetTop);return!0};a(f).focus(r).click(r);a(f).blur(function(){p||j.hide()});i=a.browser.opera||a.browser.mozilla?"keypress":"keydown";a(f)[i](function(d){m=!0;var c=j[0].scrollTop;switch(d.keyCode){case 38:if(r())return!1;var d=a("li.selected",o),g=d.prev().addClass("selected")[0];g?(d.removeClass("selected"),
35
- g.offsetTop<c&&(j[0].scrollTop=c-g.offsetHeight)):(d.removeClass("selected"),g=a("li:last",o).addClass("selected")[0],j[0].scrollTop=g.offsetTop-g.offsetHeight);return!1;case 40:if(r())return!1;d=a("li.selected",o);(g=d.next().addClass("selected")[0])?(d.removeClass("selected"),g.offsetTop+g.offsetHeight>c+j[0].offsetHeight&&(j[0].scrollTop=c+g.offsetHeight)):(d.removeClass("selected"),a("li:first",o).addClass("selected"),j[0].scrollTop=0);return!1;case 13:return j.is(":visible")&&(c=a("li.selected",
36
- o)[0],e(f,c,j,b)),!1;case 27:return j.hide(),!1}return!0});a(f).keyup(function(){m=!1});this.getTime=function(){return c(f.value,b)};this.setTime=function(c){f.value=g(d(c),b);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){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b=p[a];return typeof b==="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function g(a,d){var c,p,j,o,r=f,n,l=d[a];l&&(typeof l==="object"&&typeof l.toJSON==="function")&&(l=l.toJSON(a));typeof m==="function"&&(l=m.call(d,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+b;n=[];if(Object.prototype.toString.apply(l)==="[object Array]"){o=l.length;for(c=0;c<o;c=c+1)n[c]=g(c,l)||"null";j=n.length===0?"[]":f?"[\n"+f+n.join(",\n"+f)+"\n"+r+"]":"["+n.join(",")+"]";f=r;return j}if(m&&typeof m==="object"){o=m.length;for(c=0;c<o;c=c+1){p=m[c];if(typeof p==="string")(j=g(p,l))&&n.push(e(p)+(f?": ":":")+j)}}else for(p in l)if(Object.hasOwnProperty.call(l,p))(j=g(p,l))&&n.push(e(p)+(f?": ":":")+j);j=n.length===0?"{}":f?"{\n"+f+n.join(",\n"+
39
- f)+"\n"+r+"}":"{"+n.join(",")+"}";f=r;return j}}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 c=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
40
- d=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,b,p={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},m;if(typeof JSON.stringify!=="function")JSON.stringify=function(a,d,c){var e;b=f="";if(typeof c==="number")for(e=0;e<c;e=e+1)b=b+" ";else typeof c==="string"&&(b=c);if((m=d)&&typeof d!=="function"&&(typeof d!=="object"||typeof d.length!=="number"))throw Error("JSON.stringify");return g("",
41
- {"":a})};if(typeof JSON.parseIt!=="function")JSON.parseIt=function(a,b){function d(a,c){var f,e,g=a[c];if(g&&typeof g==="object")for(f in g)if(Object.hasOwnProperty.call(g,f)){e=d(g,f);e!==void 0?g[f]=e:delete g[f]}return b.call(a,c,g)}var f;c.lastIndex=0;c.test(a)&&(a=a.replace(c,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"?d({"":f},""):f}throw new SyntaxError("JSON.parseIt");}})();(function(a){function e(c,d){function f(b){var f=a(b);return d.globalNav?f:c.parent().find(b)}var b=this,e=a(this),m=!d.vertical,k=c.children(),h=0,i;g||(g=b);a.each(d,function(b,d){a.isFunction(d)&&e.bind(b,d)});1<k.length&&(k=a(d.items,c));c.data("finder",f);var q=f(d.prev),j=f(d.next),o=f(d.prevPage),r=f(d.nextPage);a.extend(b,{getIndex:function(){return h},getClickIndex:function(){var a=b.getItems();return a.index(a.filter("."+d.activeClass))},getConf:function(){return d},getSize:function(){return b.getItems().size()},
43
- getPageAmount:function(){return Math.ceil(this.getSize()/d.size)},getPageIndex:function(){return Math.ceil(h/d.size)},getNaviButtons:function(){return q.add(j).add(o).add(r)},getRoot:function(){return c},getItemWrap:function(){return k},getItems:function(){return k.children(d.item)},getVisibleItems:function(){return b.getItems().slice(h,h+d.size)},seekTo:function(c,f,i){function l(){i&&i.call(b,c);e.trigger("onSeek",[c])}0>c&&(c=0);if(h===c)return b;a.isFunction(f)&&(i=f);if(c>b.getSize()-d.size)return d.loop?
44
- b.begin():this.end();var n=b.getItems().eq(c);if(!n.length)return b;var s=a.Event("onBeforeSeek");e.trigger(s,c>h);if(s.isDefaultPrevented())return b;if(void 0===f||a.isFunction(f))f=d.speed;m?k.animate({left:-n.position().left},f,d.easing,l):k.animate({top:-n.position().top},f,d.easing,l);g=b;h=c;s=a.Event("onStart");e.trigger(s,[c]);if(s.isDefaultPrevented())return b;q.add(o).toggleClass(d.disabledClass,0===c);j.add(r).toggleClass(d.disabledClass,c>=b.getSize()-d.size);return b},move:function(a,
45
- b,d){i=0<a;return this.seekTo(h+a,b,d)},next:function(a,b){return this.move(1,a,b)},prev:function(a,b){return this.move(-1,a,b)},movePage:function(a,b,c){i=0<a;var f=d.size*a,e=h%d.size;0<e&&(f+=0<a?-e:d.size-e);return this.move(f,b,c)},prevPage:function(a,b){return this.movePage(-1,a,b)},nextPage:function(a,b){return this.movePage(1,a,b)},setPage:function(a,b,c){return this.seekTo(a*d.size,b,c)},begin:function(a,b){i=!1;return this.seekTo(0,a,b)},end:function(a,c){i=!0;var f=this.getSize()-d.size;
46
- return 0<f?this.seekTo(f,a,c):b},reload:function(){e.trigger("onReload");return b},focus:function(){return g=b},click:function(a){var c=b.getItems().eq(a),f=d.activeClass,e=d.size;if(0>a||a>=b.getSize())return b;if(1==e){if(d.loop)return b.next();if(0===a||a==b.getSize()-1)i=void 0===i?!0:!i;return!1===i?b.prev():b.next()}return 2==e?(a==h&&a--,b.getItems().removeClass(f),c.addClass(f),b.seekTo(a,time,fn)):!c.hasClass(f)&&(b.getItems().removeClass(f),c.addClass(f),c=a-Math.floor(e/2),c>b.getSize()-
47
- e&&(c=b.getSize()-e),c!==a)?b.seekTo(c):b},bind:function(a,c){e.bind(a,c);return b},unbind:function(a){e.unbind(a);return b}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,c){b[c]=function(a){return b.bind(c,a)}});q.addClass(d.disabledClass).click(function(){b.prev()});j.click(function(){b.next()});r.click(function(){b.nextPage()});b.getSize()<d.size&&j.add(r).addClass(d.disabledClass);o.addClass(d.disabledClass).click(function(){b.prevPage()});var n=d.hoverClass,l="keydown."+
48
- Math.random().toString().substring(10);b.onReload(function(){n&&b.getItems().hover(function(){a(this).addClass(n)},function(){a(this).removeClass(n)});d.clickable&&b.getItems().each(function(c){a(this).unbind("click.scrollable").bind("click.scrollable",function(d){if(!a(d.target).is("a"))return b.click(c)})});d.keyboard?a(document).unbind(l).bind(l,function(a){if(!a.altKey&&!a.ctrlKey&&!("static"!=d.keyboard&&g!=b)){var c=d.keyboardSteps;return m&&(37==a.keyCode||39==a.keyCode)?(b.move(37==a.keyCode?
49
- -c:c),a.preventDefault()):!m&&(38==a.keyCode||40==a.keyCode)?(b.move(38==a.keyCode?-c:c),a.preventDefault()):!0}}):a(document).unbind(l)});b.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(c){var d=
50
- this.eq("number"==typeof c?c:0).data("scrollable");if(d)return d;var f=a.extend({},a.tools.scrollable.conf),c=a.extend(f,c);c.keyboardSteps=c.keyboardSteps||c.size;this.each(function(){d=new e(a(this),c);a(this).data("scrollable",d)});return c.api?d:this}})(jQuery);(function(a){function e(c){switch(c.type){case "mousemove":return a.extend(c.data,{clientX:c.clientX,clientY:c.clientY,pageX:c.pageX,pageY:c.pageY});case "DOMMouseScroll":a.extend(c,c.data);c.delta=-c.detail/3;break;case "mousewheel":c.delta=c.wheelDelta/120}var d=a(this).scrollable();c.preventDefault();d.move(0>c.delta?1:-1,50);return!1}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){this.addEventListener("DOMMouseScroll",e,!1);this.addEventListener("mousewheel",
51
- e,!1)},teardown:function(){this.removeEventListener("DOMMouseScroll",e,!1);this.removeEventListener("mousewheel",e,!1)}};var g=a.tools.scrollable;g.plugins=g.plugins||{};g.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(c){var d=a.extend({},g.plugins.mousewheel.conf),f;"number"==typeof c&&(c={speed:c});c=a.extend(d,c);this.each(function(){var b=a(this).scrollable();b&&(f=b);b.getRoot().wheel(function(a,d){b.move(0>d?1:-1,c.speed||50);return!1})});return c.api?
52
- f:this}})(jQuery);/*
53
- : Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
 
54
  @website: http://www.datejs.com/
55
  */
56
- (function(){var a=Date,e=a.prototype,g=[],c=function(a,c){c||(c=2);return("000"+a).slice(-1*c)};a.normalizeFormat=function(a){g=[];(new Date).$format(a);return g.join("")};a.strftime=function(a,c){return(new Date(1E3*c)).$format(a)};a.strtotime=function(c){c=a.parse(c);c.addMinutes(-1*c.getTimezoneOffset());return Math.round(a.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds())/1E3)};e.$format=function(d){var f=this,b,e=
57
- function(a){g.push(a);return f.toString(a)};return d?d.replace(/(%|\\)?.|%%/g,function(d){if("\\"===d.charAt(0)||"%%"===d.substring(0,2))return d.replace("\\","").replace("%%","%");switch(d){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 c(f.getOrdinalNumber(),
58
- 3);case "%U":var d=f.clone().set({month:0,day:1}).addDays(-1).moveToDayOfWeek(0),k=f.clone().addDays(1).moveToDayOfWeek(0,-1);return k<d?"00":c((k.getOrdinalNumber()-d.getOrdinalNumber())/7+1);case "W":case "%V":return f.getISOWeek();case "%W":return c(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())?
59
- 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 c(f.getMilliseconds(),3);case "I":return f.isDaylightSavingTime()?
60
- 1:0;case "O":return f.getUTCOffset();case "P":return b=f.getUTCOffset(),b.substring(0,b.length-2)+":"+b.substring(b.length-2);case "e":case "T":case "%z":case "%Z":return f.getTimezone();case "Z":return-60*f.getTimezoneOffset();case "B":return d=new Date,Math.floor((3600*d.getHours()+60*d.getMinutes()+d.getSeconds()+60*(d.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()/
61
- 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(d),d}}):this._toString()};e.format||(e.format=e.$format)})();
1
+ var humanMsg={setup:function(a,f,g){humanMsg.msgID="humanMsg";humanMsg.logID="humanMsgLog";a="body";void 0==f&&(f=void 0==humanMsg.logTitle?"Message Log":humanMsg.logTitle);humanMsg.logTop=jQuery("#"+humanMsg.logID).css("top");humanMsg.msgOpacity=.9;void 0!=g&&(humanMsg.msgOpacity=parseFloat(g));jQuery(a).prepend('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>');jQuery(a).append('<div id="'+humanMsg.logID+'"><p>'+f+'</p><a href="#" id="humanMsgClose">x</a><ul></ul></div>');
2
+ jQuery("#humanMsgClose").click(function(){jQuery("#"+humanMsg.logID+" p").addClass("minimized");jQuery("#humanMsgClose").hide();return!1});jQuery("#"+humanMsg.logID+" p").click(function(){humanMsg.activateLog();jQuery("#"+humanMsg.logID+" p").hasClass("minimized")?(jQuery("#humanMsgClose").show(),jQuery("#"+humanMsg.logID+" p").removeClass("minimized")):"none"!=jQuery(this).siblings("ul").css("display")?(jQuery("#"+humanMsg.logID).css("top",humanMsg.logTop),jQuery(this).siblings("ul").hide(),jQuery("#humanMsgClose").show()):
3
+ (humanMsg.setLogHeight(),jQuery(this).siblings("ul").slideToggle(),jQuery("#humanMsgClose").slideToggle())})},setLogTitle:function(a){humanMsg.logTitle=a;jQuery("#"+humanMsg.logID+" > p").text(a)},displayMsg:function(a,f){""!=a&&(humanMsg.activateLog(),clearTimeout(humanMsg.t2),jQuery("#"+humanMsg.msgID).css("top",jQuery(window).scrollTop()+75+"px"),jQuery("#"+humanMsg.msgID+" p").html(a),jQuery("#"+humanMsg.msgID+"").show().animate({opacity:humanMsg.msgOpacity},200,function(){f&&humanMsg.log(a)}),
4
+ 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},300,"swing",
5
+ 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+" ul").css("height",
6
+ 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 f(e){var d=e||window.event,b=[].slice.call(arguments,1),c=0,g=0,f=0;e=a.event.fix(d);e.type="mousewheel";d.wheelDelta&&(c=d.wheelDelta/120);d.detail&&(c=-d.detail/3);f=c;void 0!==d.axis&&d.axis===d.HORIZONTAL_AXIS&&(f=0,g=-1*c);void 0!==d.wheelDeltaY&&(f=d.wheelDeltaY/120);void 0!==d.wheelDeltaX&&(g=-1*d.wheelDeltaX/120);b.unshift(e,c,g,f);return(a.event.dispatch||a.event.handle).apply(this,b)}var g=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=g.length;c;)a.event.fixHooks[g[--c]]=
8
+ a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=g.length;a;)this.addEventListener(g[--a],f,!1);else this.onmousewheel=f},teardown:function(){if(this.removeEventListener)for(var a=g.length;a;)this.removeEventListener(g[--a],f,!1);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);var sprintf=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}var f=function(){f.cache.hasOwnProperty(arguments[0])||(f.cache[arguments[0]]=f.parse(arguments[0]));return f.format.call(null,f.cache[arguments[0]],arguments)};f.format=function(g,c){var e=1,d=g.length,b="",s=[],f,m,h,k;for(f=0;f<d;f++)if(b=a(g[f]),"string"===b)s.push(g[f]);else if("array"===b){h=g[f];if(h[2])for(b=c[e],m=0;m<h[2].length;m++){if(!b.hasOwnProperty(h[2][m]))throw sprintf('[sprintf] property "%s" does not exist',
9
+ h[2][m]);b=b[h[2][m]]}else b=h[1]?c[h[1]]:c[e++];if(/[^s]/.test(h[8])&&"number"!=a(b))throw sprintf("[sprintf] expecting number but found %s",a(b));switch(h[8]){case "b":b=b.toString(2);break;case "c":b=String.fromCharCode(b);break;case "d":b=parseInt(b,10);break;case "e":b=h[7]?b.toExponential(h[7]):b.toExponential();break;case "f":b=h[7]?parseFloat(b).toFixed(h[7]):parseFloat(b);break;case "o":b=b.toString(8);break;case "s":b=(b=String(b))&&h[7]?b.substring(0,h[7]):b;break;case "u":b=Math.abs(b);
10
+ break;case "x":b=b.toString(16);break;case "X":b=b.toString(16).toUpperCase()}b=/[def]/.test(h[8])&&h[3]&&0<=b?"+"+b:b;m=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ";k=h[6]-String(b).length;if(h[6]){for(var t=[];0<k;t[--k]=m);m=t.join("")}else m="";s.push(h[5]?b+m:m+b)}return s.join("")};f.cache={};f.parse=function(a){for(var c=[],e=[],d=0;a;){if(null!==(c=/^[^\x25]+/.exec(a)))e.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(a)))e.push("%");else if(null!==(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a))){if(c[2]){var d=
11
+ d|1,b=[],f=c[2],p=[];if(null!==(p=/^([a-z_][a-z_\d]*)/i.exec(f)))for(b.push(p[1]);""!==(f=f.substring(p[0].length));)if(null!==(p=/^\.([a-z_][a-z_\d]*)/i.exec(f)))b.push(p[1]);else if(null!==(p=/^\[(\d+)\]/.exec(f)))b.push(p[1]);else throw"[sprintf] huh?";else throw"[sprintf] huh?";c[2]=b}else d|=2;if(3===d)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";e.push(c)}else throw"[sprintf] huh?";a=a.substring(c[0].length)}return e};return f}(),vsprintf=function(a,f){f.unshift(a);
12
+ return sprintf.apply(null,f)};jQuery.cookie=function(a,f,g){if("undefined"!=typeof f){g=g||{};null===f&&(f="",g.expires=-1);var c="";g.expires&&("number"==typeof g.expires||g.expires.toUTCString)&&("number"==typeof g.expires?(c=new Date,c.setTime(c.getTime()+864E5*g.expires)):c=g.expires,c="; expires="+c.toUTCString());var e=g.path?"; path="+g.path:"",d=g.domain?"; domain="+g.domain:"";g=g.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(f),c,e,d,g].join("")}else{f=null;if(document.cookie&&""!=document.cookie)for(g=
13
+ document.cookie.split(";"),c=0;c<g.length;c++)if(e=jQuery.trim(g[c]),e.substring(0,a.length+1)==a+"="){f=decodeURIComponent(e.substring(a.length+1));break}return f}};(function(a){a.fn.bgIframe=a.fn.bgiframe=function(f){if(a.browser.msie&&6>=parseInt(a.browser.version)){f=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:!0,src:"javascript:false;"},f||{});var g=function(a){return a&&a.constructor==Number?a+"px":a},c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+f.src+'"style="display:block;position:absolute;z-index:-1;'+(!1!==f.opacity?"filter:Alpha(Opacity='0');":"")+"top:"+("auto"==f.top?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
14
+ g(f.top))+";left:"+("auto"==f.left?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":g(f.left))+";width:"+("auto"==f.width?"expression(this.parentNode.offsetWidth+'px')":g(f.width))+";height:"+("auto"==f.height?"expression(this.parentNode.offsetHeight+'px')":g(f.height))+';"/>';return this.each(function(){0==a("> iframe.bgiframe",this).length&&this.insertBefore(document.createElement(c),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(f,g){a.event.special[g]={setup:function(){if(a.browser.msie)return!1;this.addEventListener(f,a.event.special[g].handler,!0)},teardown:function(){if(a.browser.msie)return!1;this.removeEventListener(f,a.event.special[g].handler,!0)},handler:function(c){arguments[0]=a.event.fix(c);arguments[0].type=g;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(f,g,c){return this.bind(f,function(e){var d=a(e.target);if(d.is(g))return c.apply(d,
15
+ arguments)})},triggerEvent:function(f,g){return this.triggerHandler(f,[a.event.fix({type:f,target:g})])}})})(jQuery);(function(a){function f(c,e){function d(b){var d=a(b);return e.globalNav?d:c.parent().find(b)}var b=this,f=a(this),p=!e.vertical,m=c.children(),h=0,k;g||(g=b);a.each(e,function(b,e){a.isFunction(e)&&f.bind(b,e)});1<m.length&&(m=a(e.items,c));c.data("finder",d);var t=d(e.prev),l=d(e.next),r=d(e.prevPage),u=d(e.nextPage);a.extend(b,{getIndex:function(){return h},getClickIndex:function(){var a=b.getItems();return a.index(a.filter("."+e.activeClass))},getConf:function(){return e},getSize:function(){return b.getItems().size()},
16
+ getPageAmount:function(){return Math.ceil(this.getSize()/e.size)},getPageIndex:function(){return Math.ceil(h/e.size)},getNaviButtons:function(){return t.add(l).add(r).add(u)},getRoot:function(){return c},getItemWrap:function(){return m},getItems:function(){return m.children(e.item)},getVisibleItems:function(){return b.getItems().slice(h,h+e.size)},seekTo:function(d,c,k){function q(){k&&k.call(b,d);f.trigger("onSeek",[d])}0>d&&(d=0);if(h===d)return b;a.isFunction(c)&&(k=c);if(d>b.getSize()-e.size)return e.loop?
17
+ b.begin():this.end();var n=b.getItems().eq(d);if(!n.length)return b;var v=a.Event("onBeforeSeek");f.trigger(v,[d]);if(v.isDefaultPrevented())return b;if(void 0===c||a.isFunction(c))c=e.speed;p?m.animate({left:-n.position().left},c,e.easing,q):m.animate({top:-n.position().top},c,e.easing,q);g=b;h=d;v=a.Event("onStart");f.trigger(v,[d]);if(v.isDefaultPrevented())return b;t.add(r).toggleClass(e.disabledClass,0===d);l.add(u).toggleClass(e.disabledClass,d>=b.getSize()-e.size);return b},move:function(a,
18
+ b,e){k=0<a;return this.seekTo(h+a,b,e)},next:function(a,b){return this.move(1,a,b)},prev:function(a,b){return this.move(-1,a,b)},movePage:function(a,b,d){k=0<a;var c=e.size*a,f=h%e.size;0<f&&(c+=0<a?-f:e.size-f);return this.move(c,b,d)},prevPage:function(a,b){return this.movePage(-1,a,b)},nextPage:function(a,b){return this.movePage(1,a,b)},setPage:function(a,b,d){return this.seekTo(a*e.size,b,d)},begin:function(a,b){k=!1;return this.seekTo(0,a,b)},end:function(a,d){k=!0;var c=this.getSize()-e.size;
19
+ return 0<c?this.seekTo(c,a,d):b},reload:function(){f.trigger("onReload");return b},focus:function(){return g=b},click:function(a){var d=b.getItems().eq(a),c=e.activeClass,f=e.size;if(0>a||a>=b.getSize())return b;if(1==f){if(e.loop)return b.next();if(0===a||a==b.getSize()-1)k=void 0===k?!0:!k;return!1===k?b.prev():b.next()}return 2==f?(a==h&&a--,b.getItems().removeClass(c),d.addClass(c),b.seekTo(a,time,fn)):d.hasClass(c)||(b.getItems().removeClass(c),d.addClass(c),d=a-Math.floor(f/2),d>b.getSize()-
20
+ f&&(d=b.getSize()-f),d===a)?b:b.seekTo(d)},bind:function(a,d){f.bind(a,d);return b},unbind:function(a){f.unbind(a);return b}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,d){b[d]=function(a){return b.bind(d,a)}});t.addClass(e.disabledClass).click(function(){b.prev()});l.click(function(){b.next()});u.click(function(){b.nextPage()});b.getSize()<e.size&&l.add(u).addClass(e.disabledClass);r.addClass(e.disabledClass).click(function(){b.prevPage()});var q=e.hoverClass,n="keydown."+
21
+ Math.random().toString().substring(10);b.onReload(function(){q&&b.getItems().hover(function(){a(this).addClass(q)},function(){a(this).removeClass(q)});e.clickable&&b.getItems().each(function(d){a(this).unbind("click.scrollable").bind("click.scrollable",function(e){if(!a(e.target).is("a"))return b.click(d)})});e.keyboard?a(document).unbind(n).bind(n,function(a){if(!(a.altKey||a.ctrlKey||"static"!=e.keyboard&&g!=b)){var d=e.keyboardSteps;return!p||37!=a.keyCode&&39!=a.keyCode?p||38!=a.keyCode&&40!=
22
+ a.keyCode?!0:(b.move(38==a.keyCode?-d:d),a.preventDefault()):(b.move(37==a.keyCode?-d:d),a.preventDefault())}}):a(document).unbind(n)});b.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(c){var e=
23
+ this.eq("number"==typeof c?c:0).data("scrollable");if(e)return e;var d=a.extend({},a.tools.scrollable.conf);c=a.extend(d,c);c.keyboardSteps=c.keyboardSteps||c.size;this.each(function(){e=new f(a(this),c);a(this).data("scrollable",e)});return c.api?e:this}})(jQuery);
24
+ (function(a){var f=a.tools.scrollable;f.plugins=f.plugins||{};f.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 c=a.extend({},f.plugins.autoscroll.conf),e;a.extend(c,g);this.each(function(){var d=a(this).scrollable();d&&(e=d);var b,f,g=!0;d.play=function(){b||(g=!1,b=setInterval(function(){d.move(c.steps)},c.interval),d.move(c.steps))};d.pause=function(){b=clearInterval(b)};d.stop=
25
+ function(){d.pause();g=!0};c.autopause&&d.getRoot().add(d.getNaviButtons()).hover(function(){d.pause();clearInterval(f)},function(){g||(f=setTimeout(d.play,c.interval))});c.autoplay&&setTimeout(d.play,c.interval)});return c.api?e:this}})(jQuery);
26
+ (function(a){var f=a.tools.scrollable;f.plugins=f.plugins||{};f.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 c=a.extend({},f.plugins.navigator.conf),e;"string"==typeof g&&(g={navi:g});g=a.extend(c,g);this.each(function(){function d(){if(c.children().length&&c.data("navi")!=b)f=g.naviItem?c.find(g.naviItem):c.children(),f.each(function(d){a(this).click(function(a){b.setPage(d);return a.preventDefault()})});
27
+ else{c.empty();c.data("navi",b);for(var d=0;d<b.getPageAmount();d++)c.append(a("<"+(g.naviItem||"a")+"/>"));f=c.children().each(function(d){var e=a(this);e.click(function(a){b.setPage(d);return a.preventDefault()});g.indexed&&e.text(d);g.idPrefix&&e.attr("id",g.idPrefix+d)})}f.eq(0).addClass(g.activeClass)}var b=a(this).scrollable(),c=b.getRoot().data("finder").call(null,g.navi),f=null,m=b.getNaviButtons();b&&(e=b);b.getNaviButtons=function(){return m.add(c)};b.onStart(function(a,d){var e=g.activeClass;
28
+ f.removeClass(e).eq(b.getPageIndex()).addClass(e)});b.onReload(function(){d()});d();var h=f.filter("[href="+location.hash+"]");h.length&&b.move(f.index(h))});return g.api?e:this}})(jQuery);
29
+ (function(a){function f(e){switch(e.type){case "mousemove":return a.extend(e.data,{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY});case "DOMMouseScroll":a.extend(e,e.data);e.delta=-e.detail/3;break;case "mousewheel":e.delta=e.wheelDelta/120}e.type="wheel";return a.event.handle.call(this,e,e.delta)}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){a.event.add(this,g,f,{})},teardown:function(){a.event.remove(this,g,f)}};var g=
30
+ a.browser.mozilla?"DOMMouseScroll"+("1.9">a.browser.version?" mousemove":""):"mousewheel",c=a.tools.scrollable;c.plugins=c.plugins||{};c.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(e){var d=a.extend({},c.plugins.mousewheel.conf),b;"number"==typeof e&&(e={speed:e});e=a.extend(d,e);this.each(function(){var d=a(this).scrollable();d&&(b=d);d.getRoot().wheel(function(a,b){d.move(0>b?1:-1,e.speed||50);return!1})});return e.api?b:this}})(jQuery);(function(a){function f(a,b){var e=a.getHours(),c=b.show24Hours?e:(e+11)%12+1;b.show24Hours&&(c=(10>c?"0":"")+c);var f=a.getMinutes();a=b.timeFormat;a=a.replace("hh",c);a=a.replace("h",c);a=a.replace("mm",(10>f?"0":"")+f);return a=b.show24Hours?a.replace(" tt",""):a.replace("tt",12>e?b.amDesignator:b.pmDesignator)}function g(a,b){return"object"==typeof a?e(a):c(a,b)}function c(a,b){if(a){var c=a.split(b.separator),f=parseFloat(c[0]),c=parseFloat(c[1]);b.show24Hours||(12===f&&-1!==a.substr(b.amDesignator)?
31
+ f=0:12!==f&&-1!==a.indexOf(b.pmDesignator)&&(f+=12));return e(new Date(0,0,0,f,c,0))}return null}function e(a){a.setFullYear(2001);a.setMonth(0);a.setDate(0);return a}a.fn.timePicker=function(e){var b=a.extend({},a.fn.timePicker.defaults,e);return this.each(function(){a.timePicker(this,b)})};a.timePicker=function(e,b){var c=a(e)[0];return c.timePicker||(c.timePicker=new jQuery._timePicker(c,b))};a._timePicker=function(d,b){var s=!1,p=!1,m=g(b.startTime,b),h=g(b.endTime,b);a(d).attr("autocomplete",
32
+ "OFF");for(var k=[],t=new Date(m);t<=h;)k[k.length]=f(t,b),t=new Date(t.setMinutes(t.getMinutes()+b.step));for(var l=a("<div "+(b.tpDivId?'id="'+b.tpDivId+'" ':"")+'class="time-picker'+(b.show24Hours?"":" time-picker-12hours")+'"></div>'),r=a("<ul></ul>"),t=0;t<k.length;t++)r.append("<li>"+k[t]+"</li>");l.append(r);k=a(d).offset();l.appendTo("body").css({top:k.top-48+"px",left:k.left,width:a(d).width()+5+"px"}).hide();l.mouseover(function(){s=!0}).mouseout(function(){s=!1});a("li",r).mouseover(function(){p||
33
+ (a("li.selected",l).removeClass("selected"),a(this).addClass("selected"))}).mousedown(function(){s=!0}).click(function(){d.value=a(this).text();a(d).change();a.browser.msie||d.focus();l.hide();s=!1});var u=function(){if(l.is(":visible"))return!1;a("li",l).removeClass("selected");var g=a(d).offset();l.css({top:g.top+a(d).height()+10+"px",left:g.left,width:a(d).width()+5+"px"});l.show();var k=d.value?c(d.value,b):m,g=60*m.getHours()+m.getMinutes(),k=60*k.getHours()+k.getMinutes()-g,k=Math.round(k/b.step),
34
+ g=e(new Date(0,0,0,0,k*b.step+g,0)),g=m<g&&g<=h?g:m,g=a("li:contains("+f(g,b)+")",l);g.length&&(g.addClass("selected"),l[0].scrollTop=g[0].offsetTop);return!0};a(d).focus(u).click(u);a(d).blur(function(){s||l.hide()});k=a.browser.opera||a.browser.mozilla?"keypress":"keydown";a(d)[k](function(b){p=!0;var e=l[0].scrollTop;switch(b.keyCode){case 38:if(u())return!1;b=a("li.selected",r);var c=b.prev().addClass("selected")[0];c?(b.removeClass("selected"),c.offsetTop<e&&(l[0].scrollTop=e-c.offsetHeight)):
35
+ (b.removeClass("selected"),c=a("li:last",r).addClass("selected")[0],l[0].scrollTop=c.offsetTop-c.offsetHeight);return!1;case 40:if(u())return!1;b=a("li.selected",r);(c=b.next().addClass("selected")[0])?(b.removeClass("selected"),c.offsetTop+c.offsetHeight>e+l[0].offsetHeight&&(l[0].scrollTop=e+c.offsetHeight)):(b.removeClass("selected"),a("li:first",r).addClass("selected"),l[0].scrollTop=0);return!1;case 13:return l.is(":visible")&&(e=a("li.selected",r)[0],d.value=a(e).text(),a(d).change(),a.browser.msie||
36
+ d.focus(),l.hide()),!1;case 27:return l.hide(),!1}return!0});a(d).keyup(function(a){p=!1});this.getTime=function(){return c(d.value,b)};this.setTime=function(c){d.value=f(e(c),b);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 10>a?"0"+a:a}function f(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=s[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function g(a,e){var c,s,l,r,u=d,q,n=e[a];n&&"object"===typeof n&&"function"===typeof n.toJSON&&(n=n.toJSON(a));"function"===typeof p&&(n=p.call(e,a,n));switch(typeof n){case "string":return f(n);case "number":return isFinite(n)?String(n):"null";case "boolean":case "null":return String(n);case "object":if(!n)return"null";
38
+ d+=b;q=[];if("[object Array]"===Object.prototype.toString.apply(n)){r=n.length;for(c=0;c<r;c+=1)q[c]=g(c,n)||"null";l=0===q.length?"[]":d?"[\n"+d+q.join(",\n"+d)+"\n"+u+"]":"["+q.join(",")+"]";d=u;return l}if(p&&"object"===typeof p)for(r=p.length,c=0;c<r;c+=1)s=p[c],"string"===typeof s&&(l=g(s,n))&&q.push(f(s)+(d?": ":":")+l);else for(s in n)Object.hasOwnProperty.call(n,s)&&(l=g(s,n))&&q.push(f(s)+(d?": ":":")+l);l=0===q.length?"{}":d?"{\n"+d+q.join(",\n"+d)+"\n"+u+"}":"{"+q.join(",")+"}";d=u;return l}}
39
+ "function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(b){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(a){return this.valueOf()});var c=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=
40
+ /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,d,b,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},p;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,e,c){var f;b=d="";if("number"===typeof c)for(f=0;f<c;f+=1)b+=" ";else"string"===typeof c&&(b=c);if((p=e)&&"function"!==typeof e&&("object"!==typeof e||"number"!==typeof e.length))throw Error("JSON.stringify");return g("",{"":a})});
41
+ "function"!==typeof JSON.parseIt&&(JSON.parseIt=function(a,b){function e(a,c){var d,f,g=a[c];if(g&&"object"===typeof g)for(d in g)Object.hasOwnProperty.call(g,d)&&(f=e(g,d),void 0!==f?g[d]=f:delete g[d]);return b.call(a,c,g)}var d;c.lastIndex=0;c.test(a)&&(a=a.replace(c,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,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,
42
+ "")))return d=eval("("+a+")"),"function"===typeof b?e({"":d},""):d;throw new SyntaxError("JSON.parseIt");})})();(function(a){function f(c,e){function d(b){var d=a(b);return e.globalNav?d:c.parent().find(b)}var b=this,f=a(this),p=!e.vertical,m=c.children(),h=0,k;g||(g=b);a.each(e,function(b,e){a.isFunction(e)&&f.bind(b,e)});1<m.length&&(m=a(e.items,c));c.data("finder",d);var t=d(e.prev),l=d(e.next),r=d(e.prevPage),u=d(e.nextPage);a.extend(b,{getIndex:function(){return h},getClickIndex:function(){var a=b.getItems();return a.index(a.filter("."+e.activeClass))},getConf:function(){return e},getSize:function(){return b.getItems().size()},
43
+ getPageAmount:function(){return Math.ceil(this.getSize()/e.size)},getPageIndex:function(){return Math.ceil(h/e.size)},getNaviButtons:function(){return t.add(l).add(r).add(u)},getRoot:function(){return c},getItemWrap:function(){return m},getItems:function(){return m.children(e.item)},getVisibleItems:function(){return b.getItems().slice(h,h+e.size)},seekTo:function(c,d,k){function n(){k&&k.call(b,c);f.trigger("onSeek",[c])}0>c&&(c=0);if(h===c)return b;a.isFunction(d)&&(k=d);if(c>b.getSize()-e.size)return e.loop?
44
+ b.begin():this.end();var q=b.getItems().eq(c);if(!q.length)return b;var v=a.Event("onBeforeSeek");f.trigger(v,c>h);if(v.isDefaultPrevented())return b;if(void 0===d||a.isFunction(d))d=e.speed;p?m.animate({left:-q.position().left},d,e.easing,n):m.animate({top:-q.position().top},d,e.easing,n);g=b;h=c;v=a.Event("onStart");f.trigger(v,[c]);if(v.isDefaultPrevented())return b;t.add(r).toggleClass(e.disabledClass,0===c);l.add(u).toggleClass(e.disabledClass,c>=b.getSize()-e.size);return b},move:function(a,
45
+ b,c){k=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,b,c){k=0<a;var d=e.size*a,f=h%e.size;0<f&&(d+=0<a?-f:e.size-f);return this.move(d,b,c)},prevPage:function(a,b){return this.movePage(-1,a,b)},nextPage:function(a,b){return this.movePage(1,a,b)},setPage:function(a,b,c){return this.seekTo(a*e.size,b,c)},begin:function(a,b){k=!1;return this.seekTo(0,a,b)},end:function(a,c){k=!0;var d=this.getSize()-e.size;
46
+ return 0<d?this.seekTo(d,a,c):b},reload:function(){f.trigger("onReload");return b},focus:function(){return g=b},click:function(a){var c=b.getItems().eq(a),d=e.activeClass,f=e.size;if(0>a||a>=b.getSize())return b;if(1==f){if(e.loop)return b.next();if(0===a||a==b.getSize()-1)k=void 0===k?!0:!k;return!1===k?b.prev():b.next()}return 2==f?(a==h&&a--,b.getItems().removeClass(d),c.addClass(d),b.seekTo(a,time,fn)):c.hasClass(d)||(b.getItems().removeClass(d),c.addClass(d),c=a-Math.floor(f/2),c>b.getSize()-
47
+ f&&(c=b.getSize()-f),c===a)?b:b.seekTo(c)},bind:function(a,c){f.bind(a,c);return b},unbind:function(a){f.unbind(a);return b}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,c){b[c]=function(a){return b.bind(c,a)}});t.addClass(e.disabledClass).click(function(){b.prev()});l.click(function(){b.next()});u.click(function(){b.nextPage()});b.getSize()<e.size&&l.add(u).addClass(e.disabledClass);r.addClass(e.disabledClass).click(function(){b.prevPage()});var q=e.hoverClass,n="keydown."+
48
+ Math.random().toString().substring(10);b.onReload(function(){q&&b.getItems().hover(function(){a(this).addClass(q)},function(){a(this).removeClass(q)});e.clickable&&b.getItems().each(function(c){a(this).unbind("click.scrollable").bind("click.scrollable",function(d){if(!a(d.target).is("a"))return b.click(c)})});e.keyboard?a(document).unbind(n).bind(n,function(a){if(!(a.altKey||a.ctrlKey||"static"!=e.keyboard&&g!=b)){var c=e.keyboardSteps;return!p||37!=a.keyCode&&39!=a.keyCode?p||38!=a.keyCode&&40!=
49
+ a.keyCode?!0:(b.move(38==a.keyCode?-c:c),a.preventDefault()):(b.move(37==a.keyCode?-c:c),a.preventDefault())}}):a(document).unbind(n)});b.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(c){var e=
50
+ this.eq("number"==typeof c?c:0).data("scrollable");if(e)return e;var d=a.extend({},a.tools.scrollable.conf);c=a.extend(d,c);c.keyboardSteps=c.keyboardSteps||c.size;this.each(function(){e=new f(a(this),c);a(this).data("scrollable",e)});return c.api?e:this}})(jQuery);(function(a){function f(c){switch(c.type){case "mousemove":return a.extend(c.data,{clientX:c.clientX,clientY:c.clientY,pageX:c.pageX,pageY:c.pageY});case "DOMMouseScroll":a.extend(c,c.data);c.delta=-c.detail/3;break;case "mousewheel":c.delta=c.wheelDelta/120}var e=a(this).scrollable();c.preventDefault();e.move(0>c.delta?1:-1,50);return!1}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){this.addEventListener("DOMMouseScroll",f,!1);this.addEventListener("mousewheel",
51
+ f,!1)},teardown:function(){this.removeEventListener("DOMMouseScroll",f,!1);this.removeEventListener("mousewheel",f,!1)}};var g=a.tools.scrollable;g.plugins=g.plugins||{};g.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(c){var e=a.extend({},g.plugins.mousewheel.conf),d;"number"==typeof c&&(c={speed:c});c=a.extend(e,c);this.each(function(){var b=a(this).scrollable();b&&(d=b);b.getRoot().wheel(function(a,d){b.move(0>d?1:-1,c.speed||50);return!1})});return c.api?
52
+ d:this}})(jQuery);/*
53
+ : Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
54
+ @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
55
  @website: http://www.datejs.com/
56
  */
57
+ (function(){var a=Date,f=a.prototype,g=[],c=function(a,c){c||(c=2);return("000"+a).slice(-1*c)};a.normalizeFormat=function(a){g=[];(new Date).$format(a);return g.join("")};a.strftime=function(a,c){return(new Date(1E3*c)).$format(a)};a.strtotime=function(c){c=a.parse(c);c.addMinutes(-1*c.getTimezoneOffset());return Math.round(a.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds())/1E3)};f.$format=function(e){var d=this,b,f=
58
+ function(a){g.push(a);return d.toString(a)};return e?e.replace(/(%|\\)?.|%%/g,function(e){if("\\"===e.charAt(0)||"%%"===e.substring(0,2))return e.replace("\\","").replace("%%","%");switch(e){case "d":case "%d":return f("dd");case "D":case "%a":return f("ddd");case "j":case "%e":return f("d");case "l":case "%A":return f("dddd");case "N":case "%u":return d.getDay()+1;case "S":return f("S");case "w":case "%w":return d.getDay();case "z":return d.getOrdinalNumber();case "%j":return c(d.getOrdinalNumber(),
59
+ 3);case "%U":e=d.clone().set({month:0,day:1}).addDays(-1).moveToDayOfWeek(0);var m=d.clone().addDays(1).moveToDayOfWeek(0,-1);return m<e?"00":c((m.getOrdinalNumber()-e.getOrdinalNumber())/7+1);case "W":case "%V":return d.getISOWeek();case "%W":return c(d.getWeek());case "F":case "%B":return f("MMMM");case "m":case "%m":return f("MM");case "M":case "%b":case "%h":return f("MMM");case "n":return f("M");case "t":return a.getDaysInMonth(d.getFullYear(),d.getMonth());case "L":return a.isLeapYear(d.getFullYear())?
60
+ 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 f("yyyy");case "y":case "%y":return f("yy");case "a":case "%p":return f("tt").toLowerCase();case "A":return f("tt").toUpperCase();case "g":case "%I":return f("h");case "G":return f("H");case "h":return f("hh");case "H":case "%H":return f("HH");case "i":case "%M":return f("mm");case "s":case "%S":return f("ss");case "u":return c(d.getMilliseconds(),3);case "I":return d.isDaylightSavingTime()?
61
+ 1:0;case "O":return d.getUTCOffset();case "P":return b=d.getUTCOffset(),b.substring(0,b.length-2)+":"+b.substring(b.length-2);case "e":case "T":case "%z":case "%Z":return d.getTimezone();case "Z":return-60*d.getTimezoneOffset();case "B":return e=new Date,Math.floor((3600*e.getHours()+60*e.getMinutes()+e.getSeconds()+60*(e.getTimezoneOffset()+60))/86.4);case "c":return d.toISOString().replace(/\"/g,"");case "U":return a.strtotime("now");case "%c":return f("d")+" "+f("t");case "%C":return Math.floor(d.getFullYear()/
62
+ 100+1);case "%D":return f("MM/dd/yy");case "%n":return"\\n";case "%t":return"\\t";case "%r":return f("hh:mm tt");case "%R":return f("H:mm");case "%T":return f("H:mm:ss");case "%x":return f("d");case "%X":return f("t");default:return g.push(e),e}}):this._toString()};f.format||(f.format=f.$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: 3.0
5
- Tested up to: 3.9
6
- Stable tag: 3.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
 
@@ -175,6 +175,14 @@ For example, if you have a category named "My Category" you might have a slug fo
175
 
176
  You can use any CSS properties to change posts in the calendar based on the post category.
177
 
 
 
 
 
 
 
 
 
178
  == Screenshots ==
179
 
180
  1. The calendar integrates seamlessly into the WordPress administration console
@@ -187,6 +195,12 @@ You can use any CSS properties to change posts in the calendar based on the post
187
 
188
  == Changelog ==
189
 
 
 
 
 
 
 
190
  = 3.1.1 =
191
 
192
  This version is exactly the same as version 3.1, but it's been fully tested against WordPress 3.9.
2
  Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 3.0
5
+ Tested up to: 3.9.2
6
+ Stable tag: 3.2
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
175
 
176
  You can use any CSS properties to change posts in the calendar based on the post category.
177
 
178
+ = Can I change default post time or status when creating new posts? =
179
+
180
+ The calendar allows you to create new posts. The default time for this new posts is 10:00 AM and the default status for this new posts is draft. You can change those values by specifying options in your blog.
181
+
182
+ The `edcal_default_time` property controls the default time for new posts in the calendar. This value is in 24 hour time and you can change it by specifying the time in a format like `11:00`.
183
+
184
+ The `edcal_default_status` property controls the default status for new posts in the calendar. The allowed values are `draft`, `future`, and `pending` for the statuses of `Draft`, `Scheduled`, and `Pending Review` respectively. This value will only be used if the current user doesn't have access to change that status. For example, if you're an author then you can't use a default status of `pending` since you aren't allowed to publish posts.
185
+
186
  == Screenshots ==
187
 
188
  1. The calendar integrates seamlessly into the WordPress administration console
195
 
196
  == Changelog ==
197
 
198
+ = 3.2 =
199
+
200
+ We now have a new option for specifying the default status of a new post and documented the option for specifying the default time of a post.
201
+
202
+ The calendar is now doing a better job of reporting errors when it can't parse the post information from the blog.
203
+
204
  = 3.1.1 =
205
 
206
  This version is exactly the same as version 3.1, but it's been fully tested against WordPress 3.9.