//Copyright © [Year(s)] Nokia Corporation and/or its subsidiary(-ies).
Fp.Modules={moduleLoader:null,moduleContent:null,placeId:null,maximised:false,moduleClass:"module-content",init:function(){this.moduleLoader=Fp.byId("module-loading");this.moduleContent=Fp.byId(this.moduleClass);Fp.Modules.Manager.init();this.setLanguage();},load:function(){Fp.Modules.Manager.load();},lib:{OwnerContent:{title:"places.details",desc:"",icon:"",initialised:false,setUpNav:true,check:function(){if(Fp.POI.ownerContent&&Fp.POI.ownerContent!==null){return true;}return false;}},PremiumContent:{title:"places.guides",desc:"",icon:"",initialised:false,setUpNav:true,check:function(){if(Fp.POI.premiumContent&&Fp.POI.premiumContent!==null){return true;}return false;}},Reviews:{title:"places.modules.reviews",desc:"",icon:"",initialised:false,setUpNav:false,check:function(){if(Fp.openData.isPlace&&Fp.openData.placeId&&Fp.openData.online){return true;}return false;}},Recommendations:{title:"places.modules.recommendations",desc:"",icon:"",setUpNav:false,initialised:false,check:function(){if(Fp.openData.online){return true;}return false;}}},setLanguage:function(){for(var a in this.lib){if(this.lib.hasOwnProperty(a)&&typeof this.lib[a]=="object"){this.lib[a].title=Language[this.lib[a].title];}}},toggleLoader:function(a){if(!a){this.moduleLoader.className="hidden";this.moduleContent.className="";}else{this.moduleLoader.className=this.moduleClass;this.moduleContent.className="loading";}},maximise:function(b){var a=(typeof b==="string")?b:Fp.Modules.Manager.loadedModules[Fp.Modules.Manager.vars.currentModule].id;if(Fp.byId(a+"-max")){Fp.Utils.removeClass(Fp.byId(a+"-max"),"hidden");Fp.Utils.removeClass(Fp.byId(a+"-min"),"visible");Fp.Utils.addClass(Fp.byId(a+"-max"),"visible");Fp.Utils.addClass(Fp.byId(a+"-min"),"hidden");}Fp.Utils.addClass(this.moduleContent,"max");Fp.Modules.maximised=true;},minimise:function(b){var a=(typeof b==="string")?b:Fp.Modules.Manager.loadedModules[Fp.Modules.Manager.vars.currentModule].id;if(Fp.byId(a+"-max")){Fp.Utils.addClass(Fp.byId(a+"-max"),"hidden");Fp.Utils.addClass(Fp.byId(a+"-min"),"visible");Fp.Utils.removeClass(Fp.byId(a+"-min"),"hidden");Fp.Utils.removeClass(Fp.byId(a+"-max"),"visible");}Fp.Utils.removeClass(this.moduleContent,"max");Fp.Modules.maximised=false;if(Fp.Modules[a].refresh){Fp.Modules[a].refresh();}}};