var pixelsPerDay=20;var pixelsPerMonth=pixelsPerDay*31;var pixelsPerEvent=252;var minEventsHigh=5;var $timeline=jQuery(".timeline");jQuery(".month",$timeline).width(pixelsPerMonth);$timeline.width(42110);jQuery.ajax({url:ANZACCENT.ajaxurl,data:{action:"get_tl_events"},dataType:"JSON",success:function(d){var a,k;var b;var e,j;var h=1;var c=0;var m=getExplodedQueryString();var l;for(var f=0;f'+a.date_start_pretty+": "+HTMLEscape(a.title.trunc(85-a.date_start_pretty.length,true))+"")}}var g=jQuery("html").hasClass("lt-ie8");jQuery("a",$timeline).each(function(i){var n=jQuery(this);n.css("left",n.data("offset"));if(g){n.css("z-index",9999-i).parent().css("z-index",9999-i).parent().css("z-index",9999-i).parent().css("z-index",9999-i).parent().css("z-index",9999-i).parent().css("z-index",9999-i)}else{n.css("z-index",9999-i)}n.click(function(o){o.preventDefault();jQuery("a",$timeline).removeClass("active");n.addClass("active");jQuery.ajax({url:ANZACCENT.ajaxurl,data:{action:"get_tl_events",id:jQuery(this).data("id")},dataType:"JSON",success:function(q){var r;var p="";if(0";p+="
";p+="

"+HTMLEscape(r.title)+"

";p+="

"+r.date_pretty+"

";p+="
";p+=r.HTML_content;p+=""}jQuery("#pageR6").find("article").fadeOut(400,function(){var s=jQuery(this);s.after(jQuery(p).hide().fadeIn(400,function(){s.remove();jQuery("html, body").animate({scrollTop:jQuery("#pageR6").offset().top},500);jQuery("#back-to-timeline").focus()}))})},error:function(p){alert("Error communicating with WP-AJAX");console.log(p)}})})});jQuery(".month",$timeline).each(function(){var q=jQuery(this);var o=parseInt(q.data("month"));var n=parseInt(q.data("year"));var p=jQuery(("#month_"+n)+(o-1));if(0');console.log("Inserted spacer "+v+" of "+s);r.data("idx",++u);console.log("Incremented current event's index to: "+u);i(r)}}}jQuery(jQuery(".events li",q).get().reverse()).each(function(){var t=jQuery(this);var u=parseInt(t.data("idx"));var r=u;var s=0;i(t);r=parseInt(t.data("idx"));s=r-u;console.log("Event-index prior to accomodation: "+u);console.log("Event-index following accomodation: "+r);console.log("Indices need shifting by: "+s);if(0c){c=i}});console.log("Highest stack: "+c);if(c0;o--){p.prepend('
  • ')}});if(m.ev){l=jQuery('a[data-id="'+m.ev+'"]',$timeline).trigger("click");jQuery("#timeline-viewport").animate({scrollLeft:l.closest(".month").position().left},500)}},error:function(a){alert("Error communicating with WP-AJAX");console.log(a)}});jQuery("#back-to-timeline").bind("click keydown",function(a){if(1==a.which||13==a.which){a.preventDefault();jQuery("html, body").animate({scrollTop:jQuery("#contentStart").offset().top},500);jQuery("a.active",$timeline).focus()}});