cc.LoaderScene.getInstance().draw=function(){var b=(cc.canvas.width-this._logo.width)/2;var a=(cc.canvas.height-this._logo.height)/2;cc.renderContext.clearRect(0,-cc.canvas.height,cc.canvas.width,cc.canvas.height);cc.renderContext.fillStyle="#202020";cc.renderContext.fillRect(0,-cc.canvas.height,cc.canvas.width,cc.canvas.height);cc.drawingUtil.drawImage(this._logo,cc.p(b,a));cc.renderContext.fillStyle="#828483";cc.renderContext.font="Bold 12px Verdana";cc.renderContext.textAlign="left";cc.drawingUtil.fillText("Loading "+cc.Loader.getInstance().getProgressBar()+"%",120,35)};var cocos2dApp=cc.Application.extend({config:document.ccConfig,ctor:function(a){this._super();this.startScene=a;cc.COCOS2D_DEBUG=this.config.COCOS2D_DEBUG;cc.initDebugSetting();cc.setup(this.config.tag);cc.container.style.margin="0px auto";cc.LoaderScene.getInstance()._logo.width=320;cc.LoaderScene.getInstance()._logo.height=480;cc.Loader.getInstance().onloading=function(){cc.LoaderScene.getInstance().draw()};cc.Loader.getInstance().onload=function(){cc.AppController.shareAppController().didFinishLaunchingWithOptions()};cc.Loader.getInstance().preload(g_ressources)},applicationDidFinishLaunching:function(){var a=cc.Director.getInstance();a.setDisplayStats(this.config.showFPS);a.setAnimationInterval(1/this.config.frameRate);a.runWithScene(new this.startScene());return true}});var myApp=new cocos2dApp(FQTitleScene);window.addEventListener("pagehide",function(){FQSoundManager.getInstance().pause()});window.addEventListener("pageshow",function(){FQSoundManager.getInstance().resume()});var ua=navigator.userAgent;if(/iPhone/.test(ua)||/iPad/.test(ua)){ua.match(/[iPhone|iPad|CPU] OS (\w+){1,3}/g);var version=(RegExp.$1.replace(/_/g,"")+"00").slice(0,3);if(version>=600){var d=document;var meta=d.createElement("meta");meta.setAttribute("name","viewport");meta.setAttribute("content","width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no");d.getElementsByTagName("head")[0].appendChild(meta)}else{var d=document;var meta=d.createElement("meta");meta.setAttribute("name","viewport");meta.setAttribute("content","width=device-width,initial-scale=0.8,minimum-scale=0.8,maximum-scale=0.8,user-scalable=no");d.getElementsByTagName("head")[0].appendChild(meta)}}else{var d=document;var meta=d.createElement("meta");meta.setAttribute("name","viewport");meta.setAttribute("content","width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no");d.getElementsByTagName("head")[0].appendChild(meta)};