"mololo.content".namespace();
mololo.content.EventInfo=Class.create({marker:null,eventJson:null,initialize:function(A){this.marker=A;
this.eventJson=A.getMarkerJson()
},getParentId:function(){return null
},getEventId:function(){return this.eventJson.eId
},getId:function(){if(this.isState()||this.isCity()){return this.getEventId()
}return this.getHashId()
},getHashId:function(){return this.eventJson.hId
},getTitle:function(){return this.eventJson.n
},getSubTitle:function(){return this.eventJson.t
},getRandomEventUserId:function(){return this.eventJson.rnd.uId
},getRandomEventCityStr:function(){return this.eventJson.rnd.rc
},getRandomEventName:function(){return this.eventJson.rnd.rn
},getRandomEventHashId:function(){return this.eventJson.rnd.rhId
},getRandomEventCityId:function(){return(this.eventJson.rnd.rcId==undefined)?this.eventJson.rnd.rcId:this.eventJson.rnd.id
},getRandomEventImageType:function(){return this.eventJson.rnd.rIt
},getTitleSidebar:function(){return mololo.StringUtils.getMaxLenString(this.getTitle(),25)
},getCategory:function(){return this.eventJson.k
},getCategorySidebar:function(){return mololo.StringUtils.getMaxLenString(this.getCategory(),15)
},getAddress:function(){return this.eventJson.i
},getDate:function(){return this.eventJson.d
},getCity:function(){return this.getAddress()==null?this.getAddress():this.getAddress().slice(this.getAddress().lastIndexOf(" ")+1)
},getScore:function(){return this.eventJson.sc
},getImageType:function(){return this.eventJson.it
},hasImage:function(){return this.getImageType()!=null
},getUserId:function(){return this.eventJson.uId
},getCategoryCode:function(){return this.eventJson.kk
},getPosterUrl:function(){if(this.getImageType()!=null){return mololo.content.ContentUtils.createPosterThumbUrl(this.getUserId(),this.getHashId(),this.getImageType())
}else{if(this.getCategoryCode()!=null){return mololo.globals.CONTEXT.getImagesPath(true)+"extwindow/default_image_thumb.jpg"
}}return mololo.globals.CONTEXT.getImagesPath(true)+"extwindow/default_image_thumb.jpg"
},iconImageLink:function(C,B,D){var A=mololo.globals.CONTEXT.getImagesPath();
if(B!=null&&B){return A+"map/zoom-levels/event/large/"+C.toLowerCase().substr(0,2)+".png"
}else{if(D){return A+"map/zoom-levels/event/normal/permanent/"+C.toLowerCase().substr(0,2)+".png"
}}return A+"map/zoom-levels/event/normal/temporal/"+C.toLowerCase().substr(0,2)+".png"
},createDivWithBorder:function(C,B,D,A){return'<div id="sidebarItemFullImage-'+this.getId()+'" title="'+this.getTitle()+'" class="'+C+'" style="background:url('+B+');background-position:center center">'+this.showMaximizedLink('<img src="'+mololo.globals.CONTEXT.getImagesPath()+D+'" alt="'+this.altMessage()+'"/>')+"</div>"
},createDivWithBorderSize:function(E,D,F,B,C,A){return'<div id="sidebarItemImage-'+this.getId()+'" class="'+E+'" style="background:url('+D+");width:"+C+"px;height:"+A+'px;background-position:center center">'+this.showMaximizedLink('<img src="'+mololo.globals.CONTEXT.getImagesPath()+F+'" alt="'+this.altMessage()+'"/>')+"</div>"
},altMessage:function(){if(this.getTitle()!=null){return this.getTitle().replaceAll('"',"")
}return""
},getSidebarContent:function(H,J){var C=mololo.globals.CONTEXT.getImagesPath();
var D="";
var F="div";
if(J==mololo.AppViewSidebarTypeEnum.FULL){var G=this.createDivWithBorder("fullSize",this.getPosterUrl(),"search/fullsizeborder.png");
return G
}else{var G='<div id="sidebarItem-'+this.getId()+'" class="sidebarItem">';
if(J==mololo.AppViewSidebarTypeEnum.MEDIUM){if(this.isState()||this.isCity()){var M=mololo.content.ContentUtils.createPosterThumbUrl(this.getRandomEventUserId(),this.getRandomEventHashId(),this.getRandomEventImageType());
G+=this.createDivWithBorderSize("image",M,"events/ramkawoj.png","abc",73,71)
}else{G+=this.createDivWithBorder("image",this.getPosterUrl(),"search/fullsizeborder.png")
}}else{D="Small";
F="span";
if(this.getPremium()>=5){}}G+='<div id="sidebarItemDesc-'+this.getId()+'" class="desc">';
if(this.isState()||this.isCity()){var E='<div id="sidebarItemDescHeader-'+this.getId()+"\" class='styleItemDescHeader"+D+"'>";
G+=this.showMaximizedLink(E+this.getTitle()+"</div>")
}else{G+='<p id="sidebarItemDescEvent-'+this.getId()+'" class="event">'+this.showSidebarItemLink(this.getTitle())+"</p>"
}if(this.isEvent()){G+='<p id="sidebarItemDescDate-'+this.getId()+'" class="date">'+this.showSidebarItemLink(this.getDate())+"</p>";
G+='<p id="sidebarItemDescLocation-'+this.getId()+'" class="location">'+this.showSidebarItemLink(this.getCity())+"</p>"
}else{var B=(mololo.globals.RIGHT_SIDE_EVENT_PANEL.getAppViewEventType()==mololo.AppViewEventTypeEnum.PLACES)?"miejsc":"wydarzeń";
var K="<"+F+' id="sidebarItemDescCount-'+this.getId()+"\" class='styleCount"+D+"'>";
var L="<"+F+' id="sidebarItemDescCountLabel-'+this.getId()+"\" class='styleCountLabel"+D+"'>";
var I='<div id="sidebarItemDescRandomEventLabel-'+this.getId()+"\" class='styleEventLabel"+D+"' title='"+this.getRandomEventName().unescapeHTML()+"'>";
var A='<div id="sidebarItemDescRandomEventCityLabel-'+this.getId()+"\" class='styleEventCityLabel"+D+"'>";
G+=((F=="span")?"<div>":"")+L+"Ilość "+B+": </"+F+">"+K+this.getCity()+"</"+F+">"+((F=="span")?"</div>":"");
G+=I+mololo.content.ContentUtils.createEventMarkerLink(mololo.content.ContentUtils.fitStringToContentPanel(this.getRandomEventName()),this.getRandomEventHashId())+"</div>";
G+=A+this.getRandomEventCityStr()+"</div>"
}G+="</div></div>";
return G
}},showMaximizedLink:function(B,A){return this.printLink(B,"mololo.globals.RIGHT_SIDE_EVENT_PANEL.showEventMaximized",A)
},showSidebarItemLink:function(B,A){return this.printLink(B,"mololo.globals.RIGHT_SIDE_EVENT_PANEL.showSidebarItem",A)
},printLink:function(F,D,C){var E=(this.getParentId()==null)?"":", '"+this.getParentId()+"'";
var A=F!=null?F:"";
if(C!=null&&A.length>C){A=A.substring(0,C)+"..."
}var B='<a href="'+this.eventLink()+"/\" onclick=\"javascript:var x=this.href;this.href='#';"+D+"('"+this.getId()+"');this.href=x;return false;\">"+A+"</a>";
if(C!=null){return'<span title="'+F+'">'+B+"</span>"
}return B
},eventLink:function(){return mololo.globals.CONTEXT.getRootPath()+"/wydarzenie/"+this.getId()
},isEvent:function(){return this.eventJson.tp==null
},isState:function(){if(this.eventJson.tp!=null&&this.eventJson.tp=="state"){return true
}return false
},isCity:function(){if(this.eventJson.tp!=null&&this.eventJson.tp=="city"){return true
}return false
},getEventJson:function(){return this.eventJson
},getMarker:function(){return this.marker
},getPremium:function(){return this.eventJson.p
}});
mololo.content.ContentControllerEvent=Class.create({eventJson:null,action:null,markerController:null,marker:null,map:null,initialize:function(D,C,B,A,E){this.action=D;
this.eventJson=C;
this.markerController=B;
this.marker=A;
this.map=E
},getMap:function(){return this.map
},getMarker:function(){return this.marker
},getMarkerController:function(){return this.markerController
},getAction:function(){return this.action
},getEventJson:function(){return this.eventJson
}});
mololo.content.ContentChangeEvent=Class.create({url:null,initialize:function(A){this.url=A
},getUrl:function(){return this.url
}});
mololo.content.RandomEventsChangeEvent=Class.create({json:null,initialize:function(A){this.json=A
},getJson:function(){return this.json
},getCityId:function(){return(this.json.rcId!=undefined)?this.json.rcId:this.json.id
}});
mololo.content.ContainerEvent=Class.create({paramStr:null,initialize:function(A){this.paramStr=A
},getParamStr:function(){return this.paramStr
}});