File Manager
function ai1ec_convert_entities(a){var b,c;b=function(a){if(/&[^;]+;/.test(a)){var b=document.createElement("div");return b.innerHTML=a,b.firstChild?b.firstChild.nodeValue:a}return a};if(typeof a=="string")return b(a);if(typeof a=="object")for(c in a)typeof a[c]=="string"&&(a[c]=b(a[c]));return a}function get_hashless_url(){var a=window.location.href,b=window.location.hash,c=a.indexOf(b)||a.length,d=a.substr(0,c);return d}jQuery(document).ready(function(a){function g(){var a=document.location.hash,b=ai1ec_convert_entities(ai1ec_calendar.default_hash);if(d!=a&&(a!=""||d!=b)){var c=a;c||(c=b),h(c)}}function h(b){a("#ai1ec-calendar-view-loading").fadeIn("fast"),a("#ai1ec-calendar-view").fadeTo("fast",.3,function(){var c=b.substring(1);a.post(ai1ec_calendar.ajaxurl,c,function(b){var c=a("body").attr("class");c=c.replace(/\s?\bai1ec-[\w-]+\b/g,""),c+=" "+b.body_class,a("body").attr("class",c);var d=a("#ai1ec-calendar-view-container");d.height(d.height());var e=a("#ai1ec-calendar-view").html(b.html).height();d.animate({height:e},{complete:function(){d.height("auto")}}),a("#ai1ec-calendar-view-loading").fadeOut("fast"),a("#ai1ec-calendar-view").fadeTo("fast",1),y()},"json")}),d=b}function j(){a("#ai1ec-print-button").toggle(a(".ai1ec-agenda-view").length!=0)}function l(){var b=a(this).prev();b.removeClass("ai1ec-event-popup-allround");if(a(this.parentNode).is(".ai1ec-multiday")){var c="."+this.parentNode.className.replace(" ai1ec-multiday-bar","").replace(/\s+/igm,"."),d=a(c);d.each(function(c){var e=a(".ai1ec-event-popup",d[c]);b[0]!=e[0]&&e.addClass("ai1ec-event-popup-allround").css("visibility","visible").fadeIn(100)})}if(!b.data("ai1ec_offset")){b.css("visibility","hidden").show();var e=a("#ai1ec-calendar-view-container"),f=b.width(),g=b.offset(),h=e.offset(),i=h.left+e.width(),j=a(".ai1ec-event-summary",b);g.left+f>i&&b.offset({left:i-f,top:g.top}),j.offset().left<h.left&&b.addClass("ai1ec-shifted-right"),b.hide().css("visibility","visible"),b.data("ai1ec_offset",!0)}b.css({"z-index":++k}).fadeIn(100,Modernizr.touch?null:function(){a(this).data("ai1ec_mouseinside")||a(this).each(m)});if(Modernizr.touch)return a(".ai1ec-month-view .ai1ec-event-popup, .ai1ec-week-view .ai1ec-event-popup").not(b).fadeOut(100,function(){a(this).parent().css({zIndex:"auto"})}),!1}function m(){var b="."+this.parentNode.className.replace(" ai1ec-multiday-bar","").replace(/\s+/igm,"."),c=a(b+" .ai1ec-event-popup");a(c).fadeOut(100,function(){a(this).parent().css({zIndex:"auto"})}).data("ai1ec_mouseinside",!1)}function n(){a(".ai1ec-month-view").length&&(s(),a(".ai1ec-month-view .ai1ec-day").each(function(){var b=5,c=80,d=-1,e=a(".ai1ec-event-container:visible",this);e.each(function(a){this.offsetTop>=c&&d==-1&&(d=a>1?a-1:0)});if(d!=-1){var f=document.createElement("div");f.className="ai1ec-event-dropdown",a(f).css({top:e[d].offsetTop,display:"none"});for(var g=d;g<e.length;g++)r(e[g]),a(e[g]).hasClass("ai1ec-multiday")&&a(e[g]).append(p(1,e[g].style.backgroundColor)),a(f).append(e[g]);$scroll_down=a('<a href="#" class="ai1ec-scroll-down"></a>'),$scroll_down.bind("hover click",function(){return a(f).fadeIn(100),!1});var h=a(this).find(".ai1ec-date");parseInt(h.css("marginBottom"))>c&&(h.css({marginBottom:c-15+"px"}),a(f).css({top:c+"px"})),a(this).append(f),a(this).append($scroll_down),Modernizr.touch?($scroll_up=a('<a href="#" class="ai1ec-scroll-up"></a>'),$scroll_up.bind("click",function(){return a(f).fadeOut(100),!1}),a(f).append($scroll_up)):a(f).bind("mouseleave",function(){a(this).fadeOut(100)})}}))}function o(){q();var b=a(".ai1ec-day");a(".ai1ec-month-view .ai1ec-multiday:visible").each(function(){var c=this.parentNode,d=a(this).outerHeight(!0),e=a(c).width()+1,f=a(".ai1ec-event-title",this).first(),g=a(this).data("endDay"),h=a(".ai1ec-date",c),i=h.html(),j=a(this).data("endTruncated");j&&(g=a(".ai1ec-date",b[b.length-1]).html());var k=a(this),l=a(".ai1ec-event",k)[0].style.backgroundColor,m=0,n=g-i+1,o=n,q=0;b.each(function(d){var e=a(".ai1ec-date",this),f=a(this.parentNode);cellNum=f.index();var h=parseInt(e.html());if(h>=i&&h<=g){h==i&&(marginSize=parseInt(e.css("marginBottom"))+16);if(cellNum!=0)m==0&&(q=f.offset().left+f.width()-a(c).offset().left);else if(h>i&&o!=0){var j=k.clone(!1);e.parent().append(j),j.addClass("ai1ec-multiday-bar ai1ec-multiday-clone"),j.css({position:"absolute",left:"1px",top:parseInt(e.css("marginBottom"))+13,backgroundColor:l});var n=o>7?d+7-1:d+o-1,r=a(b[n]).offset().left+a(b[n]).width()-a(b[n].parentNode.parentNode).offset().left;j.css("width",r-3),o>7&&j.append(p(1,l)),j.append(p(2,l)),m++}m==0?e.css({marginBottom:marginSize+"px"}):e.css({marginBottom:"+=16px"}),o--}});if(j){var r=a("."+k[0].className.replace(/\s+/igm,".")).last();r.append(p(1,l))}a(this).css({position:"absolute",top:h.outerHeight(!0)-d-1+"px",left:"1px",width:q+"px"}),m>0&&a(this).append(p(1,l)),a(this).data("startTruncated")&&a(this).append(p(2,l)).addClass("ai1ec-multiday-bar")})}function p(b,c){var d=a('<div class="ai1ec-multiday-arrow'+b+'"></div>');return b==1?d.css({borderLeftColor:c}):d.css({borderTopColor:c,borderRightColor:c,borderBottomColor:c}),d}function q(){var b=a(".ai1ec-month-view");a(".ai1ec-date",b).each(function(){a(this).css({marginBottom:"1px"})}),a(".ai1ec-multiday-clone",b).remove(),a(".ai1ec-multiday",b).each(function(){r(this)})}function r(b){a(b).css({position:"relative",left:"auto",top:"auto",width:"auto"});var c="."+b.className.replace(/\s+/igm,".")+".ai1ec-multiday-clone";a(c).remove(),a(".ai1ec-multiday-arrow1, ai1ec-multiday-arrow2",b).remove()}function s(){a(".ai1ec-month-view .ai1ec-event-dropdown").each(function(){var b=this.parentNode;a(this).find(".ai1ec-event-container").each(function(){b.appendChild(this)})}),a(".ai1ec-month-view .ai1ec-event-dropdown").remove(),a(".ai1ec-month-view .ai1ec-scroll-down").remove()}function t(){a(this).hide().parent().addClass("ai1ec-expanded").end().prev().show().find(".ai1ec-event-description").hide().slideDown("fast")}function u(){a(this).next().slideUp("fast",function(){a(this).parent().parent().removeClass("ai1ec-expanded").end().hide().next().show()})}function v(b){var c=!1;return b.find("ol.ai1ec-date-events li.ai1ec-event").each(function(){a(this).css("display")!="none"&&(c=!0)}),c}function w(){var b=new Array,c=a(".ai1ec-filters-container .ai1ec-dropdown.active + #ai1ec-selected-categories").val();c?(b.push(c),c="&ai1ec_cat_ids="+c):c="";var d=a(".ai1ec-filters-container .ai1ec-dropdown.active + #ai1ec-selected-tags").val();d?(b.push(d),d="&ai1ec_tag_ids="+d):d="",b=b.join();var f=ai1ec_convert_entities(ai1ec_calendar.export_url);b.length?(f+=c+d,a(".ai1ec-subscribe-filtered").fadeIn("fast")):a(".ai1ec-subscribe-filtered").fadeOut("fast"),a(".ai1ec-subscribe").attr("href",f),a(".ai1ec-subscribe-google").attr("href","http://www.google.com/calendar/render?cid="+escape(f.replace("webcal://","http://")));var g={action:"ai1ec_term_filter",ai1ec_post_ids:e,ai1ec_term_ids:b},h=a("#ai1ec-calendar-view-loading").delay(500).fadeIn("fast"),i=a("#ai1ec-calendar-view").delay(500).fadeTo("fast",.3);a.post(ai1ec_calendar.ajaxurl,g,function(b){h.clearQueue().fadeOut("fast"),i.clearQueue().fadeTo("fast",1);var c=[];a.each(b.matching_ids,function(a,b){c.push("#ai1ec-calendar-view .ai1ec-event-id-"+b)}),a(c.join()).css("display","block"),c=[],a.each(b.unmatching_ids,function(a,b){c.push("#ai1ec-calendar-view .ai1ec-event-id-"+b)}),a(c.join()).css("display","none"),a("ol.ai1ec-agenda-view > li.ai1ec-date").each(function(){v(a(this))?a(this).slideDown("fast"):a(this).slideUp("fast")}),a(".ai1ec-month-view .ai1ec-multiday").length&&(q(),o())},"json")}function x(){a(".ai1ec-filter-selector-container").each(function(){a("li.ai1ec-selected",this).length?a(".ai1ec-dropdown",this).addClass("active btn-info"):a(".ai1ec-dropdown",this).removeClass("active btn-info")}),a(".ai1ec-filters-container .ai1ec-selected").length?a(".ai1ec-clear-filters").fadeIn("fast"):a(".ai1ec-clear-filters").fadeOut("fast"),w()}function y(){var b=a("body").attr("class").split(" ");for(i in b){var c=/ai1ec-action-([\w]+)/.exec(b[i]);if(c!=null)break}var d=a("#ai1ec-view-"+c[1]);a("#ai1ec-current-view").contents().remove().end().prepend(d.contents().clone()).append('<span class="caret"></span>'),a("#ai1ec-view-dropdown .dropdown-menu li").removeClass("active"),d.parent().addClass("active"),e=new Array,a(".ai1ec-post-id").each(function(){e.push(this.value)}),e=e.join(),a("table.ai1ec-week-view-original").tableScroll({height:400,containerClass:"ai1ec-week-view"}),a("table.ai1ec-oneday-view-original").tableScroll({height:400,containerClass:"ai1ec-oneday-view"}),a(".ai1ec-active-event:first").length?(a(".ai1ec-month-view .ai1ec-active-event:first, .ai1ec-oneday-view .ai1ec-active-event:first, .ai1ec-week-view .ai1ec-active-event:first").each(function(){a(this).each(l).prev().data("ai1ec_mouseinside",!0)}),a(".ai1ec-agenda-view .ai1ec-active-event:first > .ai1ec-event-click").each(t),a.scrollTo(".ai1ec-active-event:first",1e3,{offset:{left:0,top:-window.innerHeight/2+100}})):(a(".ai1ec-week-view").length||a(".ai1ec-oneday-view").length)&&a(".ai1ec-oneday-view .tablescroll_wrapper, .ai1ec-week-view .tablescroll_wrapper").scrollTo(".ai1ec-hour-marker:eq(6)"),a(".ai1ec-dropdown.active").length&&(a(".ai1ec-month-view .ai1ec-event-container, .ai1ec-oneday-view .ai1ec-event-container, .ai1ec-week-view .ai1ec-event-container, .ai1ec-agenda-view .ai1ec-event").hide(),w()),a(".ai1ec-month-view .ai1ec-multiday").length&&(q(),o()),j()}if(ai1ec_calendar.selector!=undefined&&ai1ec_calendar.selector!=""&&a(ai1ec_calendar.selector).length==1){var b=a(":header:contains("+ai1ec_calendar.title+"):first");b.length||(b=a('<h1 class="page-title"></h1>'),b.text(ai1ec_calendar.title));var c=a("#ai1ec-container").detach().before(b);a(ai1ec_calendar.selector).empty().append(c).hide().css("visibility","visible").fadeIn("fast")}var d="",e,f=a("body").attr("class");f==undefined&&(f=""),f.match(/\s?\bai1ec-[\w-]+\b/)==null&&(f+=" "+ai1ec_calendar.body_class,a("body").attr("class",f)),setInterval(g,300),a("a.ai1ec-load-view").live("click",function(){h(a(this).attr("href"))}),a("#ai1ec-print-button").click(function(a){a.preventDefault();var b=get_hashless_url(),c=b+"&print=true"+window.location.hash;window.open(c,"Print page")});var k=999;a(".ai1ec-month-view .ai1ec-event, .ai1ec-oneday-view .ai1ec-event, .ai1ec-week-view .ai1ec-event").live(Modernizr.touch?"click":"mouseenter",l),Modernizr.touch||a(".ai1ec-month-view .ai1ec-event-popup, .ai1ec-oneday-view .ai1ec-event-popup, .ai1ec-week-view .ai1ec-event-popup").live("mouseleave",m).live("mousemove",function(){a(this).data("ai1ec_mouseinside",!0)}),a(".ai1ec-month-view, .ai1ec-oneday-view, .ai1ec-week-view").length&&a(window).blur(function(){a(".ai1ec-event-popup:visible").each(m)}),a(".ai1ec-oneday-view .ai1ec-oneday a.ai1ec-event-container, .ai1ec-week-view .ai1ec-week a.ai1ec-event-container").live("mouseenter",function(){a(this).delay(500).queue(function(){a(this).css("z-index",5)})}).live("mouseleave",function(){a(this).clearQueue().css("z-index","auto")}),a(".ai1ec-agenda-view .ai1ec-event > .ai1ec-event-click").live("click",t),a(".ai1ec-agenda-view .ai1ec-event-summary > .ai1ec-event-click").live("click",u),a(".ai1ec-action-agenda #ai1ec-expand-all").live("click",function(){a(".ai1ec-event > .ai1ec-event-click:visible").click()}),a(".ai1ec-action-agenda #ai1ec-collapse-all").live("click",function(){a(".ai1ec-event-summary > .ai1ec-event-click:visible").click()}),element_selector(".ai1ec-category-filter-selector li","ai1ec-selected","ai1ec-categories","#ai1ec-selected-categories"),element_selector(".ai1ec-tag-filter-selector li","ai1ec-selected","ai1ec-tags","#ai1ec-selected-tags"),a(".ai1ec-filter-selector li").click(x),a(".ai1ec-clear-filters").click(function(){a(".ai1ec-filter-selector-container li").removeClass("ai1ec-selected"),x()});var z=a("#ai1ec-selected-categories").val(),A=a("#ai1ec-selected-tags").val();(typeof z=="string"&&z!=""||typeof A=="string"&&A!="")&&x(),y()});
File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com