//FEMINA namespace window.FEMINA=window.FEMINA||{},function(t){FEMINA.article=FEMINA.article||{};var e=function(e,r,n){FEMINA.ResponsiveBehaviour.call(this,e),this.containter=t(r),this.content=t(".calendar-content",this.containter),this.yearMonth=t(".year-month",this.containter),this.date=new Date,this.months=["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],this.currentMonth=this.date.getMonth(),this.displayedMonth=this.currentMonth,this.win=t(window),this.buttons={prev:t(".prev",this.container),next:t(".next",this.container),reset:t(".reset",this.container)},this.parse(n),this.initEvents()};e.prototype=Object.create(FEMINA.ResponsiveBehaviour.prototype),e.prototype.parent=FEMINA.ResponsiveBehaviour.prototype,e.prototype.constructor=e,FEMINA.article.Calendar=e,e.prototype.initEvents=function(){var t=this;this.buttons.prev.on("click."+this.id,function(){t.prev()}),this.buttons.next.on("click."+this.id,function(){t.next()}),this.buttons.reset.on("click."+this.id,function(){t.reset()})},e.prototype.parse=function(t){t=t||{},this.data={};for(var e in t)if(t.hasOwnProperty(e)){var r=new Date(e);if(isNaN(r.getTime())&&(r=new Date(parseInt(e))),isNaN(r.getTime()))console.error("Invalid date format",e);else{var n=r.getFullYear().toString()+r.getMonth().toString()+r.getDate().toString();this.data[n]=t[e]}}this.showMonth()},e.prototype.prev=function(){this.displayedMonth-=1,this.showMonth()},e.prototype.next=function(){this.displayedMonth+=1,this.showMonth()},e.prototype.reset=function(){this.displayedMonth=this.currentMonth,this.showMonth()},e.prototype.removeCellClickEvents=function(){t("a",this.content).off("click."+this.id)},e.prototype.addCellClickEvents=function(){var e=this;t("a",this.content).on("click."+this.id,function(r){r.preventDefault();var n=t(this).attr("href");e.showIframe(n)})},e.prototype.showIframe=function(e){var r=t('
');t("body").append(r);var n=t(".federer-naptar-overlay iframe");t("#frame-center").focus(),t(".federer-naptar-overlay").css({top:t(document).scrollTop()+"px"}),this.win.height()<=n.height()&&(t("html").css({overflow:"hidden"}),t(".federer-naptar-overlay iframe").height(this.win.height())),t(".federer-naptar-overlay, .federer-naptar-overlay .close-button").click(function(){t(".federer-naptar-overlay").remove(),t("html").css({overflow:"auto"})}),t(".federer-naptar-overlay .frame-centerer").click(function(t){return t.stopPropagation(),!1})},e.prototype.showResetButton=function(){this.displayedMonth===this.currentMonth?this.buttons.reset.hide():this.buttons.reset.show()},e.prototype.showMonth=function(){this.removeCellClickEvents();var e=this.displayedMonth!=this.currentMonth?1:this.date.getDate(),r=new Date(this.date.getFullYear(),this.displayedMonth,e),n=this.date.getDate(),i=r.getMonth(),o=r.getFullYear(),s=new Date(o,i,1),a=new Date(o,i+1,1),h=s.getDay(),l=Math.round((a.getTime()-s.getTime())/864e5);this.yearMonth.html(o+" "+this.months[i]);var c="| H | K | Sz | Cs | P | Szo | V |
| "),f="";if(this.displayedMonth===this.currentMonth&&e===n&&u.addClass("current-day"),v){var y=t("");y.addClass("info-link"),y.attr("href",v),y.html(e),f=y}else f=''+e+"";u.html(f),c+=u[0].outerHTML,d++}c+=" |