(function(){var mzName="com_aquafadas_mz_v1_0";var mz=window[mzName];if(!mz){mz={};window[mzName]=mz;mz.log=false;}
function getFolder(url){if(mz.log)console.log(url);var slashIndex=url.lastIndexOf("/");url=url.slice(0,slashIndex);return url;}
if(!mz.Launcher){var scripts=document.getElementsByTagName("script");var srcPath=getFolder(scripts[scripts.length-1].src);var Launcher=function(){this.banners=[];this.isIOS=((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))||(navigator.userAgent.match(/iPad/i)));this.isWebKit=navigator.userAgent.indexOf("WebKit")>-1;this.loadingWin=null;this.effLoading=false;this.waitingWins=[];};Launcher.prototype.launch=function(win){var that=this;this.win=win;if(!this.publishPath){this.publishPath=getFolder(win.location.toString());}
if(!this.mzId){this.mzId="mzDiv";}
if(mz.log)console.log("mzLauncher#launch - path:"+this.publishPath+" isIOS:"+this.isIOS+" isWebkit:"+this.isWebKit+" forceHTML:"+this.forceHtml+" timeStamp: "+this.timeStamp)
if(this.isIOS||this.forceHtml){this.startHTML5();}else{this.loadScript(win.document,srcPath+"/flash/swfobject.js",this,function(){if(swfobject.hasFlashPlayerVersion("9.0.124")){if(mz.log)console.log("mzLauncher#launch - flash player detected");params={};if(that.transparent)params.wmode="transparent";win.swfobject.embedSWF(that.publishPath+"/mz.swf",that.mzId,"100%","100%","9.0.0",null,null,params);}else{if(mz.log)console.log("mzLauncher#launch - flash player not available");if(that.isWebKit){that.startHTML5();}else{if(mz.log)console.log("mzLauncher#launch - motionComposer can't be launch (no webkit and no flash)");}}});}};Launcher.prototype.startHTML5=function(){var that=this;var loadAndStartJsDoc=function(){that.loadScript(that.win.document,that.publishPath+"/mzDoc.js",that,function(){var mydoc=mz.docs[that.mzId];var p=new mz.Player(mydoc,that.win,that.publishPath,that.timeStamp);});}
if(!mz.Player){this.loadScript(that.win.document,srcPath+"/html5/mz.js",this,loadAndStartJsDoc);}else{loadAndStartJsDoc();}}
Launcher.prototype.loadScript=function(doc,url,that,callback){var script=doc.createElement("script");script.type="text/javascript";if(script.readyState){script.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;if(callback){callback.apply(that);}}};}else{script.onload=function(){if(mz.log)console.log("mzLauncher#script onload: "+url);if(callback){callback.apply(that);}};}
if(this.timeStamp)url+="#"+this.timeStamp;script.src=url;doc.getElementsByTagName("head")[0].appendChild(script);if(mz.log)console.log("mzLauncher#startsLoadingScript: "+url)};mz.Launcher=Launcher;}})();
