var _STRINGS={Ad:{Mobile:{Preroll:{ReadyIn:"The game is ready in ",Loading:"Your game is loading...",Close:"Close"},Header:{ReadyIn:"The game is ready in ",Loading:"Your game is loading...",Close:"Close"},End:{ReadyIn:"Advertisement ends in ",Loading:"Please wait ...",Close:"Close"}}},Splash:{Loading:"Loading ...",LogoLine1:"Some text here",LogoLine2:"powered by MarketJS",LogoLine3:"none",TapToStart:"TAP TO START"},Game:{SelectPlayer:"Select Player",Win:"You win!",Lose:"You lose!",Score:"Score",Time:"Time"}, Results:{Title:"High score"}};var _SETTINGS={API:{Enabled:!1,Log:{Events:{InitializeGame:!1,EndGame:!1,Level:{Begin:!1,End:!1,Win:!1,Lose:!1,Draw:!1}}}},Ad:{Mobile:{Preroll:{Enabled:!1,Duration:5,Width:300,Height:250,Rotation:{Enabled:!1,Weight:{MobileAdInGamePreroll:40,MobileAdInGamePreroll2:40,MobileAdInGamePreroll3:20}}},Header:{Enabled:!1,Duration:5,Width:320,Height:50,Rotation:{Enabled:!1,Weight:{MobileAdInGameHeader:40,MobileAdInGameHeader2:40,MobileAdInGameHeader3:20}}},Footer:{Enabled:!1,Duration:5,Width:320,Height:50, Rotation:{Enabled:!1,Weight:{MobileAdInGameFooter:40,MobileAdInGameFooter2:40,MobileAdInGameFooter3:20}}},End:{Enabled:!1,Duration:1,Width:300,Height:250,Rotation:{Enabled:!1,Weight:{MobileAdInGameEnd:40,MobileAdInGameEnd2:40,MobileAdInGameEnd3:20}}}}},Language:{Default:"en"},DeveloperBranding:{Splash:{Enabled:!0},Logo:{Enabled:!1,Link:"http://google.com",LinkEnabled:!0,NewWindow:!0,Width:166,Height:61}},Branding:{Splash:{Enabled:!1},Logo:{Enabled:!1,Link:"http://google.com",LinkEnabled:!1,NewWindow:!1, Width:166,Height:61}},TapToStartAudioUnlock:{Enabled:!0},MoreGames:{Enabled:!0,Link:"http://google.com/",NewWindow:!0},Gamecenter:{Enabled:!1}};var MobileAdInGamePreroll={ad_duration:_SETTINGS.Ad.Mobile.Preroll.Duration,ad_width:_SETTINGS.Ad.Mobile.Preroll.Width,ad_height:_SETTINGS.Ad.Mobile.Preroll.Height,ready_in:_STRINGS.Ad.Mobile.Preroll.ReadyIn,loading:_STRINGS.Ad.Mobile.Preroll.Loading,close:_STRINGS.Ad.Mobile.Preroll.Close+"          ",Initialize:function(){if(_SETTINGS.Ad.Mobile.Preroll.Rotation.Enabled){var b=_SETTINGS.Ad.Mobile.Preroll.Rotation.Weight,c=b.MobileAdInGamePreroll,d= c+b.MobileAdInGamePreroll2,b=d+b.MobileAdInGamePreroll3,f=Math.floor(100*Math.random());console.log("seed: ",f);f<=c?this.selectedOverlayName="MobileAdInGamePreroll":f<=d?this.selectedOverlayName="MobileAdInGamePreroll2":f<=b&&(this.selectedOverlayName="MobileAdInGamePreroll3");console.log("Ad rotating preroll enabled")}else this.selectedOverlayName="MobileAdInGamePreroll",console.log("Ad rotating preroll disabled");console.log("selected:",this.selectedOverlayName);this.overlay=$("#"+this.selectedOverlayName); this.box=$("#"+this.selectedOverlayName+"-Box");this.game=$("#game");this.boxContents={footer:$("#"+this.selectedOverlayName+"-Box-Footer"),header:$("#"+this.selectedOverlayName+"-Box-Header"),close:$("#"+this.selectedOverlayName+"-Box-Close"),body:$("#"+this.selectedOverlayName+"-Box-Body")};this.box.width(this.ad_width);this.box.height(this.ad_height);this.box.css("left",(this.overlay.width()-this.box.width())/2);this.box.css("top",(this.overlay.height()-this.box.height()-this.boxContents.header.height()- this.boxContents.footer.height())/2);this.overlay.show(this.Timer(this.ad_duration))},Timer:function(b){var c=b,d=setInterval(function(){MobileAdInGamePreroll.boxContents.header.text(MobileAdInGamePreroll.ready_in+c+"...");MobileAdInGamePreroll.boxContents.footer.text(MobileAdInGamePreroll.loading);c--;0>c&&(clearInterval(d),MobileAdInGamePreroll.boxContents.close.css("left",MobileAdInGamePreroll.boxContents.body.width()-23),MobileAdInGamePreroll.boxContents.close.show(),MobileAdInGamePreroll.boxContents.header.html(MobileAdInGamePreroll.close), MobileAdInGamePreroll.boxContents.footer.text(""))},1E3)},Close:function(){this.boxContents.close.hide();this.overlay.hide()}};var MobileAdInGameHeader={ad_duration:_SETTINGS.Ad.Mobile.Header.Duration,ad_width:_SETTINGS.Ad.Mobile.Header.Width,ad_height:_SETTINGS.Ad.Mobile.Header.Height,Initialize:function(){if(_SETTINGS.Ad.Mobile.Header.Rotation.Enabled){var b=_SETTINGS.Ad.Mobile.Header.Rotation.Weight,c=b.MobileAdInGameHeader,d=c+b.MobileAdInGameHeader2,b=d+b.MobileAdInGameHeader3,f=Math.floor(100*Math.random());console.log("seed: ",f);f<=c?this.selectedOverlayName="MobileAdInGameHeader":f<=d?this.selectedOverlayName="MobileAdInGameHeader2": f<=b&&(this.selectedOverlayName="MobileAdInGameHeader3");console.log("Ad rotating header enabled")}else this.selectedOverlayName="MobileAdInGameHeader",console.log("Ad rotating header disabled");this.div=$("#"+this.selectedOverlayName);this.game=$("#game");this.div.width(this.ad_width);this.div.height(this.ad_height);this.div.css("left",this.game.position().left+(this.game.width()-this.div.width())/2);this.div.css("top",0);this.div.show(this.Timer(this.ad_duration))},Timer:function(b){var c=setInterval(function(){b--; 0>b&&(MobileAdInGameHeader.div.hide(),clearInterval(c))},1E3)}};var MobileAdInGameFooter={ad_duration:_SETTINGS.Ad.Mobile.Footer.Duration,ad_width:_SETTINGS.Ad.Mobile.Footer.Width,ad_height:_SETTINGS.Ad.Mobile.Footer.Height,Initialize:function(){if(_SETTINGS.Ad.Mobile.Footer.Rotation.Enabled){var b=_SETTINGS.Ad.Mobile.Footer.Rotation.Weight,c=b.MobileAdInGameFooter,d=c+b.MobileAdInGameFooter2,b=d+b.MobileAdInGameFooter3,f=Math.floor(100*Math.random());console.log("seed: ",f);f<=c?this.selectedOverlayName="MobileAdInGameFooter":f<=d?this.selectedOverlayName="MobileAdInGameFooter2": f<=b&&(this.selectedOverlayName="MobileAdInGameFooter3");console.log("Ad rotating footer enabled")}else this.selectedOverlayName="MobileAdInGameFooter",console.log("Ad rotating footer disabled");this.div=$("#"+this.selectedOverlayName);this.game=$("#game");this.div.width(this.ad_width);this.div.height(this.ad_height);this.div.css("left",this.game.position().left+(this.game.width()-this.div.width())/2);this.div.css("top",this.game.height()-this.div.height()-5);this.div.show(this.Timer(this.ad_duration))}, Timer:function(b){var c=setInterval(function(){b--;0>b&&(MobileAdInGameFooter.div.hide(),clearInterval(c))},1E3)}};var MobileAdInGameEnd={ad_duration:_SETTINGS.Ad.Mobile.End.Duration,ad_width:_SETTINGS.Ad.Mobile.End.Width,ad_height:_SETTINGS.Ad.Mobile.End.Height,ready_in:_STRINGS.Ad.Mobile.End.ReadyIn,loading:_STRINGS.Ad.Mobile.End.Loading,close:_STRINGS.Ad.Mobile.End.Close+"          ",Initialize:function(){if(_SETTINGS.Ad.Mobile.End.Rotation.Enabled){var b=_SETTINGS.Ad.Mobile.End.Rotation.Weight,c=b.MobileAdInGameEnd,d=c+b.MobileAdInGameEnd2,b=d+b.MobileAdInGameEnd3, f=Math.floor(100*Math.random());console.log("seed: ",f);f<=c?this.selectedOverlayName="MobileAdInGameEnd":f<=d?this.selectedOverlayName="MobileAdInGameEnd2":f<=b&&(this.selectedOverlayName="MobileAdInGameEnd3");console.log("Ad rotating end enabled")}else this.selectedOverlayName="MobileAdInGameEnd",console.log("Ad rotating end disabled");console.log("selected:",this.selectedOverlayName);this.overlay=$("#"+this.selectedOverlayName);this.box=$("#"+this.selectedOverlayName+"-Box");this.game=$("#game"); this.boxContents={footer:$("#"+this.selectedOverlayName+"-Box-Footer"),header:$("#"+this.selectedOverlayName+"-Box-Header"),close:$("#"+this.selectedOverlayName+"-Box-Close"),body:$("#"+this.selectedOverlayName+"-Box-Body")};this.box.width(this.ad_width);this.box.height(this.ad_height);this.box.css("left",(this.overlay.width()-this.box.width())/2);this.box.css("top",(this.overlay.height()-this.box.height()-this.boxContents.header.height()-this.boxContents.footer.height())/2);this.overlay.show(this.Timer(this.ad_duration))}, Timer:function(b){var c=b,d=setInterval(function(){MobileAdInGameEnd.boxContents.header.text(MobileAdInGameEnd.ready_in+c+"...");MobileAdInGameEnd.boxContents.footer.text(MobileAdInGameEnd.loading);c--;0>c&&(clearInterval(d),MobileAdInGameEnd.boxContents.close.css("left",MobileAdInGameEnd.boxContents.body.width()-23),MobileAdInGameEnd.boxContents.close.show(),MobileAdInGameEnd.boxContents.header.html(MobileAdInGameEnd.close),MobileAdInGameEnd.boxContents.footer.text(""))},1E3)},Close:function(){this.boxContents.close.hide(); this.overlay.hide()}};(function(b,c){function d(b,t,q){if(q===c&&1===b.nodeType)if(q="data-"+t.replace(sc,"-$1").toLowerCase(),q=b.getAttribute(q),"string"==typeof q){try{q="true"===q?!0:"false"===q?!1:"null"===q?null:+q+""===q?+q:tc.test(q)?g.parseJSON(q):q}catch(e){}g.data(b,t,q)}else q=c;return q}function f(b){for(var c in b)if(!("data"===c&&g.isEmptyObject(b[c]))&&"toJSON"!==c)return!1;return!0}function j(){return!1}function m(){return!0}function p(b){return!b||!b.parentNode||11===b.parentNode.nodeType}function r(b, c){do b=b[c];while(b&&1!==b.nodeType);return b}function e(b,c,q){c=c||0;if(g.isFunction(c))return g.grep(b,function(b,v){return!!c.call(b,v,b)===q});if(c.nodeType)return g.grep(b,function(b){return b===c===q});if("string"==typeof c){var e=g.grep(b,function(b){return 1===b.nodeType});if(vc.test(c))return g.filter(c,e,!q);c=g.filter(c,e)}return g.grep(b,function(b){return 0<=g.inArray(b,c)===q})}function l(b){var c=wb.split("|");b=b.createDocumentFragment();if(b.createElement)for(;c.length;)b.createElement(c.pop()); return b}function n(b,c){if(1===c.nodeType&&g.hasData(b)){var q,e,d;e=g._data(b);var l=g._data(c,e),y=e.events;if(y)for(q in delete l.handle,l.events={},y){e=0;for(d=y[q].length;ec;c+=2)"margin"===q&&(d+=g.css(b,q+ba[c],!0)),e?("content"===q&&(d-=parseFloat(L(b,"padding"+ba[c]))||0),"margin"!==q&&(d-=parseFloat(L(b,"border"+ba[c]+"Width"))||0)):(d+= parseFloat(L(b,"padding"+ba[c]))||0,"padding"!==q&&(d+=parseFloat(L(b,"border"+ba[c]+"Width"))||0));return d}function ya(b,c,q){var e="width"===c?b.offsetWidth:b.offsetHeight,d=!0,l=g.support.boxSizing&&"border-box"===g.css(b,"boxSizing");if(0>=e||null==e){e=L(b,c);if(0>e||null==e)e=b.style[c];if(za.test(e))return e;d=l&&(g.support.boxSizingReliable||e===b.style[c]);e=parseFloat(e)||0}return e+ka(b,c,q||(l?"border":"content"),d)+"px"}function ra(b){if(Ya[b])return Ya[b];var c=g("<"+b+">").appendTo(z.body), q=c.css("display");c.remove();if("none"===q||""===q){la=z.body.appendChild(la||g.extend(z.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!ma||!la.createElement)ma=(la.contentWindow||la.contentDocument).document,ma.write(""),ma.close();c=ma.body.appendChild(ma.createElement(b));q=L(c,"display");z.body.removeChild(la)}return Ya[b]=q,q}function ca(b,c,q,e){var d;if(g.isArray(c))g.each(c,function(c,t){q||xc.test(b)?e(b,t):ca(b+"["+("object"==typeof t?c:"")+"]", t,q,e)});else if(!q&&"object"===g.type(c))for(d in c)ca(b+"["+d+"]",c[d],q,e);else e(b,c)}function D(b){return function(c,q){"string"!=typeof c&&(q=c,c="*");var e,d,l=c.toLowerCase().split(da),y=0,j=l.length;if(g.isFunction(q))for(;yt&&e?c:(y.resolveWith(b,[f]),!1)},f=y.promise({elem:b,props:g.extend({},c),opts:g.extend(!0,{specialEasing:{}},q),originalProperties:c,originalOptions:q,startTime:Aa||Ab(),duration:q.duration,tweens:[],createTween:function(c,t){var q=g.Tween(b,f.opts,c,t,f.opts.specialEasing[c]||f.opts.easing);return f.tweens.push(q),q},stop:function(c){for(var t=0,q=c?f.tweens.length:0;tg;g+=2-c)q=ba[g],e["margin"+q]=e["padding"+q]=b;return c&&(e.opacity=e.width=b),e}function Cb(b){return g.isWindow(b)?b:9===b.nodeType?b.defaultView||b.parentWindow:!1}var Db,Ea,z=b.document,zc=b.location, Ac=b.navigator,Bc=b.jQuery,Cc=b.$,Eb=Array.prototype.push,X=Array.prototype.slice,Fb=Array.prototype.indexOf,Dc=Object.prototype.toString,$a=Object.prototype.hasOwnProperty,ab=String.prototype.trim,g=function(b,c){return new g.fn.init(b,c,Db)},Fa=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,Ec=/\S/,da=/\s+/,Fc=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Gc=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Gb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Hc=/^[\],:{}\s]*$/,Ic=/(?:^|:|,)(?:\s*\[)+/g,Jc=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, Kc=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,Lc=/^-ms-/,Mc=/-([\da-z])/gi,Nc=function(b,c){return(c+"").toUpperCase()},Ga=function(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",Ga,!1),g.ready()):"complete"===z.readyState&&(z.detachEvent("onreadystatechange",Ga),g.ready())},Hb={};g.fn=g.prototype={constructor:g,init:function(b,t,q){var e,d;if(!b)return this;if(b.nodeType)return this.context=this[0]=b,this.length=1,this;if("string"==typeof b){"<"===b.charAt(0)&& ">"===b.charAt(b.length-1)&&3<=b.length?e=[null,b,null]:e=Gc.exec(b);if(e&&(e[1]||!t)){if(e[1])return t=t instanceof g?t[0]:t,d=t&&t.nodeType?t.ownerDocument||t:z,b=g.parseHTML(e[1],d,!0),Gb.test(e[1])&&g.isPlainObject(t)&&this.attr.call(b,t,!0),g.merge(this,b);if((t=z.getElementById(e[2]))&&t.parentNode){if(t.id!==e[2])return q.find(b);this.length=1;this[0]=t}return this.context=z,this.selector=b,this}return!t||t.jquery?(t||q).find(b):this.constructor(t).find(b)}return g.isFunction(b)?q.ready(b): (b.selector!==c&&(this.selector=b.selector,this.context=b.context),g.makeArray(b,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return X.call(this)},get:function(b){return null==b?this.toArray():0>b?this[this.length+b]:this[b]},pushStack:function(b,c,q){b=g.merge(this.constructor(),b);return b.prevObject=this,b.context=this.context,"find"===c?b.selector=this.selector+(this.selector?" ":"")+q:c&&(b.selector=this.selector+"."+c+"("+q+")"),b},each:function(b, c){return g.each(this,b,c)},ready:function(b){return g.ready.promise().done(b),this},eq:function(b){return b=+b,-1===b?this.slice(b):this.slice(b,b+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(X.apply(this,arguments),"slice",X.call(arguments).join(","))},map:function(b){return this.pushStack(g.map(this,function(c,q){return b.call(c,q,c)}))},end:function(){return this.prevObject||this.constructor(null)},push:Eb,sort:[].sort,splice:[].splice}; g.fn.init.prototype=g.fn;g.extend=g.fn.extend=function(){var b,t,q,e,d,l,y=arguments[0]||{},f=1,j=arguments.length,n=!1;"boolean"==typeof y&&(n=y,y=arguments[1]||{},f=2);"object"!=typeof y&&!g.isFunction(y)&&(y={});for(j===f&&(y=this,--f);fq?Math.max(0,e+q):q:0;q
a";Ha=H.getElementsByTagName("*");fa=H.getElementsByTagName("a")[0];fa.style.cssText="top:1px;float:left;opacity:.5";if(!Ha||!Ha.length)bb={};else{Ia=z.createElement("select");Ja=Ia.appendChild(z.createElement("option"));Q=H.getElementsByTagName("input")[0];K={leadingWhitespace:3===H.firstChild.nodeType,tbody:!H.getElementsByTagName("tbody").length,htmlSerialize:!!H.getElementsByTagName("link").length, style:/top/.test(fa.getAttribute("style")),hrefNormalized:"/a"===fa.getAttribute("href"),opacity:/^0.5/.test(fa.style.opacity),cssFloat:!!fa.style.cssFloat,checkOn:"on"===Q.value,optSelected:Ja.selected,getSetAttribute:"t"!==H.className,enctype:!!z.createElement("form").enctype,html5Clone:"<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===z.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1, shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};Q.checked=!0;K.noCloneChecked=Q.cloneNode(!0).checked;Ia.disabled=!0;K.optDisabled=!Ja.disabled;try{delete H.test}catch(Qd){K.deleteExpando=!1}!H.addEventListener&&H.attachEvent&&H.fireEvent&&(H.attachEvent("onclick",Jb=function(){K.noCloneEvent=!1}),H.cloneNode(!0).fireEvent("onclick"),H.detachEvent("onclick",Jb));Q=z.createElement("input");Q.value="t";Q.setAttribute("type","radio");K.radioValue="t"===Q.value;Q.setAttribute("checked", "checked");Q.setAttribute("name","t");H.appendChild(Q);ga=z.createDocumentFragment();ga.appendChild(H.lastChild);K.checkClone=ga.cloneNode(!0).cloneNode(!0).lastChild.checked;K.appendChecked=Q.checked;ga.removeChild(Q);ga.appendChild(H);if(H.attachEvent)for(cb in{submit:!0,change:!0,focusin:!0})Ka="on"+cb,(ua=Ka in H)||(H.setAttribute(Ka,"return;"),ua="function"==typeof H[Ka]),K[cb+"Bubbles"]=ua;bb=(g(function(){var c,t,q,e,d=z.getElementsByTagName("body")[0];d&&(c=z.createElement("div"),c.style.cssText= "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",d.insertBefore(c,d.firstChild),t=z.createElement("div"),c.appendChild(t),t.innerHTML="
t
",q=t.getElementsByTagName("td"),q[0].style.cssText="padding:0;margin:0;border:0;display:none",ua=0===q[0].offsetHeight,q[0].style.display="",q[1].style.display="none",K.reliableHiddenOffsets=ua&&0===q[0].offsetHeight,t.innerHTML="",t.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", K.boxSizing=4===t.offsetWidth,K.doesNotIncludeMarginInBodyOffset=1!==d.offsetTop,b.getComputedStyle&&(K.pixelPosition="1%"!==(b.getComputedStyle(t,null)||{}).top,K.boxSizingReliable="4px"===(b.getComputedStyle(t,null)||{width:"4px"}).width,e=z.createElement("div"),e.style.cssText=t.style.cssText="padding:0;margin:0;border:0;display:block;overflow:hidden;",e.style.marginRight=e.style.width="0",t.style.width="1px",t.appendChild(e),K.reliableMarginRight=!parseFloat((b.getComputedStyle(e,null)||{}).marginRight)), "undefined"!=typeof t.style.zoom&&(t.innerHTML="",t.style.cssText="padding:0;margin:0;border:0;display:block;overflow:hidden;width:1px;padding:1px;display:inline;zoom:1",K.inlineBlockNeedsLayout=3===t.offsetWidth,t.style.display="block",t.style.overflow="visible",t.innerHTML="
",t.firstChild.style.width="5px",K.shrinkWrapBlocks=3!==t.offsetWidth,c.style.zoom=1),d.removeChild(c))}),ga.removeChild(H),Ha=fa=Ia=Ja=Q=ga=H=null,K)}Oc.support=bb;var tc=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,sc=/([A-Z])/g; g.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(g.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(b){return b=b.nodeType?g.cache[b[g.expando]]:b[g.expando],!!b&&!f(b)},data:function(b,t,q,e){if(g.acceptData(b)){var d,l,f=g.expando,j="string"==typeof t,n=b.nodeType,m=n?g.cache:b,s=n?b[f]:b[f]&&f;if(s&&m[s]&&(e||m[s].data)||!(j&&q===c)){s||(n?b[f]=s=g.deletedIds.pop()||g.guid++:s=f);m[s]||(m[s]={}, n||(m[s].toJSON=g.noop));if("object"==typeof t||"function"==typeof t)e?m[s]=g.extend(m[s],t):m[s].data=g.extend(m[s].data,t);return d=m[s],e||(d.data||(d.data={}),d=d.data),q!==c&&(d[g.camelCase(t)]=q),j?(l=d[t],null==l&&(l=d[g.camelCase(t)])):l=d,l}}},removeData:function(b,c,q){if(g.acceptData(b)){var e,d,l,j=b.nodeType,n=j?g.cache:b,m=j?b[g.expando]:g.expando;if(n[m]){if(c&&(e=q?n[m]:n[m].data)){g.isArray(c)||(c in e?c=[c]:(c=g.camelCase(c),c in e?c=[c]:c=c.split(" ")));d=0;for(l=c.length;df.indexOf(" "+c[j]+" ")&&(f+=c[j]+" ");l.className=g.trim(f)}}return this},removeClass:function(b){var t, e,d,l,f,j,n;if(g.isFunction(b))return this.each(function(c){g(this).removeClass(b.call(this,c,this.className))});if(b&&"string"==typeof b||b===c){t=(b||"").split(da);j=0;for(n=this.length;jd)return null;b=j?d:0;for(e=j?d+1:f.length;bp.indexOf(":")?"on"+p:"",d){if(v.result=c,v.target||(v.target=d),e=null!=e?g.makeArray(e):[],e.unshift(v),s=g.event.special[p]||{},!(s.trigger&&!1===s.trigger.apply(d,e))){r=[[d,s.bindType||p]];if(!l&&!s.noBubble&&!g.isWindow(d)){j=s.delegateType||p;f=Qb.test(j+p)?d:d.parentNode;for(n=d;f;f=f.parentNode)r.push([f,j]), n=f;n===(d.ownerDocument||z)&&r.push([n.defaultView||n.parentWindow||b,j])}for(j=0;js&&x.push({elem:this,matches:m.slice(s)});for(e=0;eJ.cacheLength&&delete b[c.shift()],b[e]=d},b)},$b=ob(),Vb=ob(),ac=ob(),bc="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[-\\w]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+".replace("w","w#")+")|)|)[\\x20\\t\\r\\n\\f]*\\]",pb=":((?:\\\\.|[-\\w]|[^\\x00-\\xa0])+)(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+bc+")|[^:]|\\\\.)*|.*))\\)|)",Ma=/^[\x20\t\r\n\f]+|((?:^|[^\\])(?:\\.)*)[\x20\t\r\n\f]+$/g,Yc=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,Zc=/^[\x20\t\r\n\f]*([\x20\t\r\n\f>+~])[\x20\t\r\n\f]*/,bd=RegExp(pb),Xc=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,kb=/[\x20\t\r\n\f]*[+~]/,cd=/h\d/i,dd=/input|select|textarea|button/i,ia=/\\(?!\\)/g, Oa={ID:/^#((?:\\.|[-\w]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[-\w]|[^\x00-\xa0])+)/,NAME:/^\[name=['"]?((?:\\.|[-\w]|[^\x00-\xa0])+)['"]?\]/,TAG:RegExp("^("+"(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:RegExp("^"+bc),PSEUDO:RegExp("^"+pb),POS:/:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i,CHILD:RegExp("^:(only|nth|first|last)-child(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)", "i"),needsContext:RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Z=function(b){var c=U.createElement("div");try{return b(c)}catch(e){return!1}finally{}},ed=Z(function(b){return b.appendChild(U.createComment("")),!b.getElementsByTagName("*").length}),fd=Z(function(b){return b.innerHTML="",b.firstChild&&"undefined"!==typeof b.firstChild.getAttribute&&"#"===b.firstChild.getAttribute("href")}), gd=Z(function(b){b.innerHTML="";b=typeof b.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),Tb=Z(function(b){return b.innerHTML="",!b.getElementsByClassName||!b.getElementsByClassName("e").length?!1:(b.lastChild.className="e",2===b.getElementsByClassName("e").length)}),hd=Z(function(b){b.id=I+0;b.innerHTML="
";T.insertBefore(b,T.firstChild);var c=U.getElementsByName&& U.getElementsByName(I).length===2+U.getElementsByName(I+0).length;return mb=!U.getElementById(I),T.removeChild(b),c});try{oa.call(T.childNodes,0)[0].nodeType}catch(Rd){oa=function(b){for(var c,e=[];c=this[b];b++)e.push(c);return e}}C.matches=function(b,c){return C(b,null,null,c)};C.matchesSelector=function(b,c){return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(b){return b[1]=b[1].replace(ia,""),b[3]=(b[4]||b[5]||"").replace(ia,""),"~="===b[2]&&(b[3]=" "+b[3]+" "),b.slice(0,4)},CHILD:function(b){return b[1]=b[1].toLowerCase(),"nth"===b[1]?(b[2]||C.error(b[0]),b[3]=+(b[3]?b[4]+(b[5]||1): 2*("even"===b[2]||"odd"===b[2])),b[4]=+(b[6]+b[7]||"odd"===b[2])):b[2]&&C.error(b[0]),b},PSEUDO:function(b){var c,e;if(Oa.CHILD.test(b[0]))return null;if(b[3])b[2]=b[3];else if(c=b[4])bd.test(c)&&(e=Pa(c,!0))&&(e=c.indexOf(")",c.length-e)-c.length)&&(c=c.slice(0,e),b[0]=b[0].slice(0,e)),b[2]=c;return b.slice(0,3)}},filter:{ID:mb?function(b){return b=b.replace(ia,""),function(c){return c.getAttribute("id")===b}}:function(b){return b=b.replace(ia,""),function(c){return(c="undefined"!==typeof c.getAttributeNode&& c.getAttributeNode("id"))&&c.value===b}},TAG:function(b){return"*"===b?function(){return!0}:(b=b.replace(ia,"").toLowerCase(),function(c){return c.nodeName&&c.nodeName.toLowerCase()===b})},CLASS:function(b){var c=$b[I][b];return c||(c=$b(b,RegExp("(^|[\\x20\\t\\r\\n\\f])"+b+"([\\x20\\t\\r\\n\\f]|$)"))),function(b){return c.test(b.className||"undefined"!==typeof b.getAttribute&&b.getAttribute("class")||"")}},ATTR:function(b,c,e){return function(d){d=C.attr(d,b);return null==d?"!="===c:c?(d+="","="=== c?d===e:"!="===c?d!==e:"^="===c?e&&0===d.indexOf(e):"*="===c?e&&-1e?e+c:e]}),even:ha(function(b,c){for(var e=0;ee?e+c:e;0<=--c;)b.push(c);return b}),gt:ha(function(b,c,e){for(e=0>e?e+c:e;++e";b.querySelectorAll(":enabled").length||W.push(":enabled", ":disabled")});W=RegExp(W.join("|"));eb=function(b,c,e,d,g){if(!d&&!g&&(!W||!W.test(b))){var l,f,j=!0,n=I;f=c;l=9===c.nodeType&&b;if(1===c.nodeType&&"object"!==c.nodeName.toLowerCase()){l=Pa(b);(j=c.getAttribute("id"))?n=j.replace(jd,"\\$&"):c.setAttribute("id",n);n="[id='"+n+"'] ";for(f=l.length;f--;)l[f]=n+l[f].join("");f=kb.test(b)&&c.parentNode||c;l=l.join(",")}if(l)try{return na.apply(e,oa.call(f.querySelectorAll(l),0)),e}catch(m){}finally{j||c.removeAttribute("id")}}return id(b,c,e,d,g)};Ua&& (Z(function(b){cc=Ua.call(b,"div");try{Ua.call(b,"[test!='']:sizzle"),Ta.push("!=",pb)}catch(c){}}),Ta=RegExp(Ta.join("|")),C.matchesSelector=function(b,c){c=c.replace(kd,"='$1']");if(!La(b)&&!Ta.test(c)&&(!W||!W.test(c)))try{var e=Ua.call(b,c);if(e||cc||b.document&&11!==b.document.nodeType)return e}catch(d){}return 0]*)\/>/gi,fc=/<([\w:]+)/,pd=/]","i"),xb=/^(?:checkbox|radio)$/, gc=/checked\s*(?:[^=]|=\s*.checked.)/i,td=/\/(java|ecma)script/i,ud=/^\s*\s*$/g,S={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},hc=l(z),sb=hc.appendChild(z.createElement("div"));S.optgroup= S.option;S.tbody=S.tfoot=S.colgroup=S.caption=S.thead;S.th=S.td;g.support.htmlSerialize||(S._default=[1,"X
","
"]);g.fn.extend({text:function(b){return g.access(this,function(b){return b===c?g.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(b))},null,b,arguments.length)},wrapAll:function(b){if(g.isFunction(b))return this.each(function(c){g(this).wrapAll(b.call(this,c))});if(this[0]){var c=g(b,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&c.insertBefore(this[0]); c.map(function(){for(var b=this;b.firstChild&&1===b.firstChild.nodeType;)b=b.firstChild;return b}).append(this)}return this},wrapInner:function(b){return g.isFunction(b)?this.each(function(c){g(this).wrapInner(b.call(this,c))}):this.each(function(){var c=g(this),e=c.contents();e.length?e.wrapAll(b):c.append(b)})},wrap:function(b){var c=g.isFunction(b);return this.each(function(e){g(this).wrapAll(c?b.call(this,e):b)})},unwrap:function(){return this.parent().each(function(){g.nodeName(this,"body")|| g(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(b){(1===this.nodeType||11===this.nodeType)&&this.appendChild(b)})},prepend:function(){return this.domManip(arguments,!0,function(b){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(b,this.firstChild)})},before:function(){if(!p(this[0]))return this.domManip(arguments,!1,function(b){this.parentNode.insertBefore(b,this)});if(arguments.length){var b=g.clean(arguments);return this.pushStack(g.merge(b, this),"before",this.selector)}},after:function(){if(!p(this[0]))return this.domManip(arguments,!1,function(b){this.parentNode.insertBefore(b,this.nextSibling)});if(arguments.length){var b=g.clean(arguments);return this.pushStack(g.merge(this,b),"after",this.selector)}},remove:function(b,c){for(var e,d=0;null!=(e=this[d]);d++)if(!b||g.filter(b,[e]).length)!c&&1===e.nodeType&&(g.cleanData(e.getElementsByTagName("*")),g.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var b, c=0;null!=(b=this[c]);c++)for(1===b.nodeType&&g.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(b,c){return b=null==b?!1:b,c=null==c?b:c,this.map(function(){return g.clone(this,b,c)})},html:function(b){return g.access(this,function(b){var e=this[0]||{},d=0,l=this.length;if(b===c)return 1===e.nodeType?e.innerHTML.replace(od,""):c;if("string"==typeof b&&!rd.test(b)&&(g.support.htmlSerialize||!rb.test(b))&&(g.support.leadingWhitespace||!qb.test(b))&& !S[(fc.exec(b)||["",""])[1].toLowerCase()]){b=b.replace(ec,"<$1>");try{for(;dn.length&&e===z&&"<"===n.charAt(0)&&!sd.test(n)&&(g.support.checkClone||!gc.test(n))&&(g.support.html5Clone||!rb.test(n))&&(f=!0,l=g.fragments[n],j=l!==c),l||(l=e.createDocumentFragment(),g.clean(b,e,l,d),f&&(g.fragments[n]=j&&l)),{fragment:l,cacheable:f}};g.fragments={};g.each({appendTo:"append", prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,c){g.fn[b]=function(e){var d,l=0,f=[];e=g(e);var j=e.length;d=1===this.length&&this[0].parentNode;if((null==d||d&&11===d.nodeType&&1===d.childNodes.length)&&1===j)return e[c](this[0]),this;for(;l")?j=b.cloneNode(!0):(sb.innerHTML=b.outerHTML,sb.removeChild(j=sb.firstChild));if((!g.support.noCloneEvent||!g.support.noCloneChecked)&&(1===b.nodeType||11===b.nodeType)&&!g.isXMLDoc(b)){s(b,j);d=u(b);l=u(j);for(f=0;d[f];++f)l[f]&&s(d[f],l[f])}if(c&&(n(b,j),e)){d=u(b);l=u(j);for(f=0;d[f];++f)n(d[f],l[f])}return j},clean:function(b,c,e,d){var f,j,n,m,s,u,r,p=c===z&&hc,A=[];if(!c||"undefined"==typeof c.createDocumentFragment)c=z;for(f=0;null!=(n=b[f]);f++)if("number"==typeof n&&(n+=""),n){if("string"== typeof n)if(qd.test(n)){p=p||l(c);u=c.createElement("div");p.appendChild(u);n=n.replace(ec,"<$1>");j=(fc.exec(n)||["",""])[1].toLowerCase();m=S[j]||S._default;s=m[0];for(u.innerHTML=m[1]+n+m[2];s--;)u=u.lastChild;if(!g.support.tbody){s=pd.test(n);m="table"===j&&!s?u.firstChild&&u.firstChild.childNodes:""===m[1]&&!s?u.childNodes:[];for(j=m.length-1;0<=j;--j)g.nodeName(m[j],"tbody")&&!m[j].childNodes.length&&m[j].parentNode.removeChild(m[j])}!g.support.leadingWhitespace&&qb.test(n)&&u.insertBefore(c.createTextNode(qb.exec(n)[0]), u.firstChild);n=u.childNodes;u.parentNode.removeChild(u)}else n=c.createTextNode(n);n.nodeType?A.push(n):g.merge(A,n)}u&&(n=u=p=null);if(!g.support.appendChecked)for(f=0;null!=(n=A[f]);f++)g.nodeName(n,"input")?x(n):"undefined"!=typeof n.getElementsByTagName&&g.grep(n.getElementsByTagName("input"),x);if(e){b=function(b){if(!b.type||td.test(b.type))return d?d.push(b.parentNode?b.parentNode.removeChild(b):b):e.appendChild(b)};for(f=0;null!=(n=A[f]);f++)if(!g.nodeName(n,"script")||!b(n))e.appendChild(n), "undefined"!=typeof n.getElementsByTagName&&(r=g.grep(g.merge([],n.getElementsByTagName("script")),b),A.splice.apply(A,[f+1,0].concat(r)),f+=r.length)}return A},cleanData:function(b,c){for(var e,d,l,f,j=0,n=g.expando,m=g.cache,s=g.support.deleteExpando,u=g.event.special;null!=(l=b[j]);j++)if(c||g.acceptData(l))if(e=(d=l[n])&&m[d]){if(e.events)for(f in e.events)u[f]?g.event.remove(l,f):g.removeEvent(l,f,e.handle);m[d]&&(delete m[d],s?delete l[n]:l.removeAttribute?l.removeAttribute(n):l[n]=null,g.deletedIds.push(d))}}}); var Va,aa;g.uaMatch=function(b){b=b.toLowerCase();b=/(chrome)[ \/]([\w.]+)/.exec(b)||/(webkit)[ \/]([\w.]+)/.exec(b)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||0>b.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(b)||[];return{browser:b[1]||"",version:b[2]||"0"}};Va=g.uaMatch(Ac.userAgent);aa={};Va.browser&&(aa[Va.browser]=!0,aa.version=Va.version);aa.chrome?aa.webkit=!0:aa.webkit&&(aa.safari=!0);g.browser=aa;g.sub=function(){function b(c,e){return new b.fn.init(c, e)}g.extend(!0,b,this);b.superclass=this;b.fn=b.prototype=this();b.fn.constructor=b;b.sub=this.sub;b.fn.init=function(e,d){return d&&d instanceof g&&!(d instanceof b)&&(d=b(d)),g.fn.init.call(this,e,d,c)};b.fn.init.prototype=b.fn;var c=b(z);return b};var L,la,ma,tb=/alpha\([^)]*\)/i,vd=/opacity=([^)]*)/,wd=/^(top|right|bottom|left)$/,xd=/^(none|table(?!-c[ea]).+)/,ic=/^margin/,wc=RegExp("^("+Fa+")(.*)$","i"),za=RegExp("^("+Fa+")(?!px)[a-z%]+$","i"),yd=RegExp("^([-+])=("+Fa+")","i"),Ya={},zd={position:"absolute", visibility:"hidden",display:"block"},jc={letterSpacing:0,fontWeight:400},ba=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"],Ad=g.fn.toggle;g.fn.extend({css:function(b,e){return g.access(this,function(b,e,d){return d!==c?g.style(b,e,d):g.css(b,e)},b,e,1e;e++)g[b+ba[e]+c]=d[e]||d[e-2]||d[0];return g}};ic.test(b)||(g.cssHooks[b+c].set=E)});var Bd=/%20/g,xc=/\[\]$/,kc=/\r?\n/g,Cd=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, Dd=/^(?:select|textarea)/i;g.fn.extend({serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?g.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Dd.test(this.nodeName)||Cd.test(this.type))}).map(function(b,c){var e=g(this).val();return null==e?null:g.isArray(e)?g.map(e,function(b){return{name:c.name,value:b.replace(kc,"\r\n")}}):{name:c.name,value:e.replace(kc,"\r\n")}}).get()}}); g.param=function(b,e){var d,l=[],f=function(b,c){c=g.isFunction(c)?c():null==c?"":c;l[l.length]=encodeURIComponent(b)+"="+encodeURIComponent(c)};e===c&&(e=g.ajaxSettings&&g.ajaxSettings.traditional);if(g.isArray(b)||b.jquery&&!g.isPlainObject(b))g.each(b,function(){f(this.name,this.value)});else for(d in b)ca(d,b[d],e,f);return l.join("&").replace(Bd,"+")};var pa,ja,Ed=/#.*$/,Fd=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Gd=/^(?:GET|HEAD)$/,Hd=/^\/\//,lc=/\?/,Id=/)<[^<]*)*<\/script>/gi, Jd=/([?&])_=[^&]*/,mc=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,nc=g.fn.load,Za={},oc={},pc=["*/"]+["*"];try{ja=zc.href}catch(Sd){ja=z.createElement("a"),ja.href="",ja=ja.href}pa=mc.exec(ja.toLowerCase())||[];g.fn.load=function(b,e,d){if("string"!=typeof b&&nc)return nc.apply(this,arguments);if(!this.length)return this;var l,f,j,n=this,m=b.indexOf(" ");return 0<=m&&(l=b.slice(m,b.length),b=b.slice(0,m)),g.isFunction(e)?(d=e,e=c):e&&"object"==typeof e&&(f="POST"),g.ajax({url:b,type:f,dataType:"html", data:e,complete:function(b,c){d&&n.each(d,j||[b.responseText,c,b])}}).done(function(b){j=arguments;n.html(l?g("
").append(b.replace(Id,"")).find(l):b)}),this};g.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(b,c){g.fn[c]=function(b){return this.on(c,b)}});g.each(["get","post"],function(b,e){g[e]=function(b,d,l,f){return g.isFunction(d)&&(f=f||l,l=d,d=c),g.ajax({type:e,url:b,data:d,success:l,dataType:f})}});g.extend({getScript:function(b,e){return g.get(b, c,e,"script")},getJSON:function(b,c,e){return g.get(b,c,e,"json")},ajaxSetup:function(b,c){return c?sa(b,g.ajaxSettings):(c=b,b=g.ajaxSettings),sa(b,c),b},ajaxSettings:{url:ja,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(pa[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":pc},contents:{xml:/xml/, html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":b.String,"text html":!0,"text json":g.parseJSON,"text xml":g.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:D(Za),ajaxTransport:D(oc),ajax:function(b,e){function d(b,e,j,s){var v,q,t,r,M,P=e;if(2!==E){E=2;m&&clearTimeout(m);n=c;f=s||"";F.readyState=0b||304===b)if(p.ifModified&&(M=F.getResponseHeader("Last-Modified"),M&&(g.lastModified[l]=M),M=F.getResponseHeader("Etag"),M&&(g.etag[l]=M)),304===b)P="notmodified",v=!0;else{var O;a:{v=p;q=r;var L,P=v.dataTypes.slice();j=P[0];R= {};C=0;v.dataFilter&&(q=v.dataFilter(q,v.dataType));if(P[1])for(O in v.converters)R[O.toLowerCase()]=v.converters[O];for(;t=P[++C];)if("*"!==t){if("*"!==j&&j!==t){O=R[j+" "+t]||R["* "+t];if(!O)for(L in R)if(M=L.split(" "),M[1]===t&&(O=R[j+" "+M[0]]||R["* "+M[0]])){!0===O?O=R[L]:!0!==R[L]&&(t=M[0],P.splice(C--,0,t));break}if(!0!==O)if(O&&v["throws"])q=O(q);else try{q=O(q)}catch(N){O={state:"parsererror",error:O?N:"No conversion from "+j+" to "+t};break a}}j=t}O={state:"success",data:q}}v=O;P=v.state; q=v.data;t=v.error;v=!t}else if(t=P,!P||b)P="error",0>b&&(b=0);F.status=b;F.statusText=(e||P)+"";v?B.resolveWith(x,[q,P,F]):B.rejectWith(x,[F,P,t]);F.statusCode(G);G=c;u&&A.trigger("ajax"+(v?"Success":"Error"),[F,p,v?q:t]);z.fireWith(x,[F,P]);u&&(A.trigger("ajaxComplete",[F,p]),--g.active||g.event.trigger("ajaxStop"))}}"object"==typeof b&&(e=b,b=c);e=e||{};var l,f,j,n,m,s,u,r,p=g.ajaxSetup({},e),x=p.context||p,A=x!==p&&(x.nodeType||x instanceof g)?g(x):g.event,B=g.Deferred(),z=g.Callbacks("once memory"), G=p.statusCode||{},C={},D={},E=0,H="canceled",F={readyState:0,setRequestHeader:function(b,c){if(!E){var e=b.toLowerCase();b=D[e]=D[e]||b;C[b]=c}return this},getAllResponseHeaders:function(){return 2===E?f:null},getResponseHeader:function(b){var e;if(2===E){if(!j)for(j={};e=Fd.exec(f);)j[e[1].toLowerCase()]=e[2];e=j[b.toLowerCase()]}return e===c?null:e},overrideMimeType:function(b){return E||(p.mimeType=b),this},abort:function(b){return b=b||H,n&&n.abort(b),d(0,b),this}};B.promise(F);F.success=F.done; F.error=F.fail;F.complete=z.add;F.statusCode=function(b){if(b){var c;if(2>E)for(c in b)G[c]=[G[c],b[c]];else c=b[F.status],F.always(c)}return this};p.url=((b||p.url)+"").replace(Ed,"").replace(Hd,pa[1]+"//");p.dataTypes=g.trim(p.dataType||"*").toLowerCase().split(da);null==p.crossDomain&&(s=mc.exec(p.url.toLowerCase())||!1,p.crossDomain=s&&s.join(":")+(s[3]?"":"http:"===s[1]?80:443)!==pa.join(":")+(pa[3]?"":"http:"===pa[1]?80:443));p.data&&p.processData&&"string"!=typeof p.data&&(p.data=g.param(p.data, p.traditional));ea(Za,p,e,F);if(2===E)return F;u=p.global;p.type=p.type.toUpperCase();p.hasContent=!Gd.test(p.type);u&&0===g.active++&&g.event.trigger("ajaxStart");if(!p.hasContent&&(p.data&&(p.url+=(lc.test(p.url)?"&":"?")+p.data,delete p.data),l=p.url,!1===p.cache)){s=g.now();var J=p.url.replace(Jd,"$1_="+s);p.url=J+(J===p.url?(lc.test(p.url)?"&":"?")+"_="+s:"")}(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&F.setRequestHeader("Content-Type",p.contentType);p.ifModified&&(l=l||p.url, g.lastModified[l]&&F.setRequestHeader("If-Modified-Since",g.lastModified[l]),g.etag[l]&&F.setRequestHeader("If-None-Match",g.etag[l]));F.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+pc+"; q=0.01":""):p.accepts["*"]);for(r in p.headers)F.setRequestHeader(r,p.headers[r]);if(!p.beforeSend||!1!==p.beforeSend.call(x,F,p)&&2!==E){H="abort";for(r in{success:1,error:1,complete:1})F[r](p[r]);if(n=ea(oc,p,e,F)){F.readyState=1;u&&A.trigger("ajaxSend", [F,p]);p.async&&0E)d(-1,I);else throw I;}}else d(-1,"No Transport");return F}return F.abort()},active:0,lastModified:{},etag:{}});var qc=[],Kd=/\?/,Wa=/(=)\?(?=&|$)|\?\?/,Ld=g.now();g.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var b=qc.pop()||g.expando+"_"+Ld++;return this[b]=!0,b}});g.ajaxPrefilter("json jsonp",function(e,d,l){var f,j,n,m=e.data,s=e.url,u=!1!==e.jsonp,p=u&&Wa.test(s), r=u&&!p&&"string"==typeof m&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Wa.test(m);if("jsonp"===e.dataTypes[0]||p||r)return f=e.jsonpCallback=g.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,j=b[f],p?e.url=s.replace(Wa,"$1"+f):r?e.data=m.replace(Wa,"$1"+f):u&&(e.url+=(Kd.test(s)?"&":"?")+e.jsonp+"="+f),e.converters["script json"]=function(){return n||g.error(f+" was not called"),n[0]},e.dataTypes[0]="json",b[f]=function(){n=arguments},l.always(function(){b[f]= j;e[f]&&(e.jsonpCallback=d.jsonpCallback,qc.push(f));n&&g.isFunction(j)&&j(n[0]);n=j=c}),"script"});g.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(b){return g.globalEval(b),b}}});g.ajaxPrefilter("script",function(b){b.cache===c&&(b.cache=!1);b.crossDomain&&(b.type="GET",b.global=!1)});g.ajaxTransport("script",function(b){if(b.crossDomain){var e,d= z.head||z.getElementsByTagName("head")[0]||z.documentElement;return{send:function(g,l){e=z.createElement("script");e.async="async";b.scriptCharset&&(e.charset=b.scriptCharset);e.src=b.url;e.onload=e.onreadystatechange=function(b,g){if(g||!e.readyState||/loaded|complete/.test(e.readyState))e.onload=e.onreadystatechange=null,d&&e.parentNode&&d.removeChild(e),e=c,g||l(200,"success")};d.insertBefore(e,d.firstChild)},abort:function(){e&&e.onload(0,1)}}}});var qa,ub=b.ActiveXObject?function(){for(var b in qa)qa[b](0, 1)}:!1,Md=0;g.ajaxSettings.xhr=b.ActiveXObject?function(){var c;if(!(c=!this.isLocal&&zb()))a:{try{c=new b.ActiveXObject("Microsoft.XMLHTTP");break a}catch(e){}c=void 0}return c}:zb;var vb=g.ajaxSettings.xhr();g.extend(g.support,{ajax:!!vb,cors:!!vb&&"withCredentials"in vb});g.support.ajax&&g.ajaxTransport(function(e){if(!e.crossDomain||g.support.cors){var d;return{send:function(l,f){var j,n,m=e.xhr();e.username?m.open(e.type,e.url,e.async,e.username,e.password):m.open(e.type,e.url,e.async);if(e.xhrFields)for(n in e.xhrFields)m[n]= e.xhrFields[n];e.mimeType&&m.overrideMimeType&&m.overrideMimeType(e.mimeType);!e.crossDomain&&!l["X-Requested-With"]&&(l["X-Requested-With"]="XMLHttpRequest");try{for(n in l)m.setRequestHeader(n,l[n])}catch(s){}m.send(e.hasContent&&e.data||null);d=function(b,l){var n,s,u,q,p;try{if(d&&(l||4===m.readyState))if(d=c,j&&(m.onreadystatechange=g.noop,ub&&delete qa[j]),l)4!==m.readyState&&m.abort();else{n=m.status;u=m.getAllResponseHeaders();q={};(p=m.responseXML)&&p.documentElement&&(q.xml=p);try{q.text= m.responseText}catch(r){}try{s=m.statusText}catch(x){s=""}!n&&e.isLocal&&!e.crossDomain?n=q.text?200:404:1223===n&&(n=204)}}catch(A){l||f(-1,A)}q&&f(n,s,q,u)};e.async?4===m.readyState?setTimeout(d,0):(j=++Md,ub&&(qa||(qa={},g(b).unload(ub)),qa[j]=d),m.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var Aa,Xa,Nd=/^(?:toggle|show|hide)$/,Od=RegExp("^(?:([-+])=|)("+Fa+")([a-z%]*)$","i"),Pd=/queueHooks$/,Ba=[function(b,c,e){var d,l,f,j,n,m,s=this,u=b.style,p={},r=[],x=b.nodeType&&B(b);e.queue|| (n=g._queueHooks(b,"fx"),null==n.unqueued&&(n.unqueued=0,m=n.empty.fire,n.empty.fire=function(){n.unqueued||m()}),n.unqueued++,s.always(function(){s.always(function(){n.unqueued--;g.queue(b,"fx").length||n.empty.fire()})}));1===b.nodeType&&("height"in c||"width"in c)&&(e.overflow=[u.overflow,u.overflowX,u.overflowY],"inline"===g.css(b,"display")&&"none"===g.css(b,"float")&&(!g.support.inlineBlockNeedsLayout||"inline"===ra(b.nodeName)?u.display="inline-block":u.zoom=1));e.overflow&&(u.overflow="hidden", g.support.shrinkWrapBlocks||s.done(function(){u.overflow=e.overflow[0];u.overflowX=e.overflow[1];u.overflowY=e.overflow[2]}));for(d in c)l=c[d],Nd.exec(l)&&(delete c[d],l!==(x?"hide":"show")&&r.push(d));if(l=r.length){f=g._data(b,"fxshow")||g._data(b,"fxshow",{});x?g(b).show():s.done(function(){g(b).hide()});s.done(function(){var c;g.removeData(b,"fxshow",!0);for(c in p)g.style(b,c,p[c])});for(d=0;dwindow.innerWidth)?($("#orientate").show(),$("#game").hide()):($("#orientate").hide(),$("#game").show()));sizeHandler()} function fixSamsungHandler(){ig.ua.android&&!(4.2>parseFloat(navigator.userAgent.slice(navigator.userAgent.indexOf("Android")+8,navigator.userAgent.indexOf("Android")+11)))&&(!(0>navigator.userAgent.indexOf("GT"))&&!(0=d[j].start&&f<= d[j].end){b=j;break}}void 0!==f&&"[object Object]"===Object.prototype.toString.call(d[b])&&(this.isPlaying=this.settings.spritemap[b],this.context.play&&this.context.play(),this.wasReady=this.setCurrentTime(f))}},stop:function(){this.__lastPosition=0;this.isPlaying=null;this.backgroundMusic?this.backgroundHackForiOS():this.context.pause();return!0},pause:function(){this.isPlaying=null;this.__lastPosition=this.getCurrentTime();this.context.pause();return this.__lastPosition},resume:function(b){b="number"=== typeof b?b:this.__lastPosition;if(null!==b)return this.play(b),this.__lastPosition=null,!0;this.context.play();return!1},HTML5API:{getVolume:function(){return this.context.volume||1},setVolume:function(b){this.context.volume=b;return 1E-4>Math.abs(this.context.volume-b)?!0:!1},getCurrentTime:function(){return this.context.currentTime||0},setCurrentTime:function(b){try{return this.context.currentTime=b,!0}catch(c){return!1}}},FLASHAPI:{getVolume:function(){return this.context&&"function"===typeof this.context.getVolume? this.context.getVolume():1},setVolume:function(b){return this.context&&"function"===typeof this.context.setVolume?(this.context.setVolume(b),!0):!1},getCurrentTime:function(){return this.context&&"function"===typeof this.context.getCurrentTime?this.context.getCurrentTime():0},setCurrentTime:function(b){return this.context&&"function"===typeof this.context.setCurrentTime?this.context.setCurrentTime(b):!1}}}; (function(){var b=function(){this.init()};b.prototype={init:function(){var b=this||c;b._counter=1E3;b._html5AudioPool=[];b.html5PoolSize=10;b._codecs={};b._howls=[];b._muted=!1;b._volume=1;b._canPlayEvent="canplaythrough";b._navigator="undefined"!==typeof window&&window.navigator?window.navigator:null;b.masterGain=null;b.noAudio=!1;b.usingWebAudio=!0;b.autoSuspend=!1;b.ctx=null;b.autoUnlock=!0;b._setup();return b},volume:function(b){var d=this||c;b=parseFloat(b);d.ctx||r();if("undefined"!==typeof b&& 0<=b&&1>=b){d._volume=b;if(d._muted)return d;d.usingWebAudio&&d.masterGain.gain.setValueAtTime(b,c.ctx.currentTime);for(var f=0;fparseInt(m[0].split("/")[1],10);b._codecs={mp3:!(m||!j&&!d.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!j,opus:!!d.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!d.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!d.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""), aac:!!d.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!d.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(d.canPlayType("audio/x-m4a;")||d.canPlayType("audio/m4a;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(d.canPlayType("audio/x-m4b;")||d.canPlayType("audio/m4b;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(d.canPlayType("audio/x-mp4;")||d.canPlayType("audio/mp4;")||d.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, ""),webm:!!d.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!d.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(d.canPlayType("audio/x-flac;")||d.canPlayType("audio/flac;")).replace(/^no$/,"")};return b},_unlockAudio:function(){var b=this||c;if(!b._audioUnlocked&&b.ctx){b._audioUnlocked=!1;b.autoUnlock=!1;!b._mobileUnloaded&&44100!==b.ctx.sampleRate&&(b._mobileUnloaded=!0,b.unload());b._scratchBuffer=b.ctx.createBuffer(1,1,22050);var d=function(){for(;b._html5AudioPool.length< b.html5PoolSize;)try{var c=new Audio;c._unlocked=!0;b._releaseHtml5Audio(c)}catch(f){b.noAudio=!0;break}for(c=0;c=ra)f._ended(r);else{var D=r._node;if(f._webAudio)j= function(){f._playLock=!1;ca();f._refreshBuffer(r);D.gain.setValueAtTime(r._muted||f._muted?0:r._volume,c.ctx.currentTime);r._playStart=c.ctx.currentTime;"undefined"===typeof D.bufferSource.start?r._loop?D.bufferSource.noteGrainOn(0,G,86400):D.bufferSource.noteGrainOn(0,G,E):r._loop?D.bufferSource.start(0,G,86400):D.bufferSource.start(0,G,E);Infinity!==ka&&(f._endTimers[r._id]=setTimeout(f._ended.bind(f,r),ka));d||setTimeout(function(){f._emit("play",r._id);f._loadQueue()},0)},"running"===c.state&& "interrupted"!==c.ctx.state?j():(f._playLock=!0,f.once("resume",j),f._clearTimer(r._id));else{var ea=function(){D.currentTime=G;D.muted=r._muted||f._muted||c._muted||D.muted;D.volume=r._volume*c.volume();D.playbackRate=r._rate;try{var j=D.play();j&&"undefined"!==typeof Promise&&(j instanceof Promise||"function"===typeof j.then)?(f._playLock=!0,ca(),j.then(function(){f._playLock=!1;D._unlocked=!0;d||(f._emit("play",r._id),f._loadQueue())}).catch(function(){f._playLock=!1;f._emit("playerror",r._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");r._ended=!0;r._paused=!0})):d||(f._playLock=!1,ca(),f._emit("play",r._id),f._loadQueue());D.playbackRate=r._rate;D.paused?f._emit("playerror",r._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."):"__default"!==b||r._loop?f._endTimers[r._id]=setTimeout(f._ended.bind(f, r),ka):(f._endTimers[r._id]=function(){f._ended(r);D.removeEventListener("ended",f._endTimers[r._id],!1)},D.addEventListener("ended",f._endTimers[r._id],!1))}catch(m){f._emit("playerror",r._id,m)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===D.src&&(D.src=f._src,D.load());j=window&&window.ejecta||!D.readyState&&c._navigator.isCocoonJS;if(3<=D.readyState||j)ea();else{f._playLock=!0;var sa=function(){ea();D.removeEventListener(c._canPlayEvent,sa,!1)};D.addEventListener(c._canPlayEvent, sa,!1);f._clearTimer(r._id)}}return r._id}},pause:function(b,c){var d=this;if("loaded"!==d._state||d._playLock)return d._queue.push({event:"pause",action:function(){d.pause(b)}}),d;for(var f=d._getSoundIds(b),j=0;j=f){if("loaded"!==b._state||b._playLock)return b._queue.push({event:"volume",action:function(){b.volume.apply(b,d)}}),b;"undefined"===typeof j&&(b._volume=f);j=b._getSoundIds(j);for(var r=0;rG?Math.max(d,p):Math.min(d,p);p=Math.round(100*p)/100;r._webAudio?b._volume=p:r.volume(p,b._id,!0);m&&(r._volume=p);if(dc&&p>=d)clearInterval(b._interval),b._interval=null,b._fadeTo=null,r.volume(d,b._id),r._emit("fade",b._id)},j)},_stopFade:function(b){var d=this._soundById(b);d&&d._interval&&(this._webAudio&&d._node.gain.cancelScheduledValues(c.ctx.currentTime),clearInterval(d._interval),d._interval=null,this.volume(d._fadeTo,b),d._fadeTo=null,this._emit("fade",b));return this},loop:function(){var b=arguments,c,d;if(0===b.length)return this._loop;if(1===b.length)if("boolean"===typeof b[0])this._loop=c=b[0]; else return(b=this._soundById(parseInt(b[0],10)))?b._loop:!1;else 2===b.length&&(c=b[0],d=parseInt(b[1],10));d=this._getSoundIds(d);for(var f=0;ff&&(d=/safari/.test(c._navigator&&c._navigator.userAgent.toLowerCase()),c._navigator&&!d&&(c.usingWebAudio=!1));c.usingWebAudio&&(c.masterGain="undefined"===typeof c.ctx.createGain?c.ctx.createGainNode():c.ctx.createGain(),c.masterGain.gain.setValueAtTime(c._muted?0:c._volume,c.ctx.currentTime),c.masterGain.connect(c.ctx.destination));c._setup()}};"function"===typeof define&&define.amd&&define([],function(){return{Howler:c,Howl:d}});"undefined"!==typeof exports&& (exports.Howler=c,exports.Howl=d);"undefined"!==typeof global?(global.HowlerGlobal=b,global.Howler=c,global.Howl=d,global.Sound=f):"undefined"!==typeof window&&(window.HowlerGlobal=b,window.Howler=c,window.Howl=d,window.Sound=f)})(); (function(){HowlerGlobal.prototype._pos=[0,0,0];HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0];HowlerGlobal.prototype.stereo=function(b){if(!this.ctx||!this.ctx.listener)return this;for(var c=this._howls.length-1;0<=c;c--)this._howls[c].stereo(b);return this};HowlerGlobal.prototype.pos=function(b,c,d){if(!this.ctx||!this.ctx.listener)return this;c="number"!==typeof c?this._pos[1]:c;d="number"!==typeof d?this._pos[2]:d;if("number"===typeof b)this._pos=[b,c,d],"undefined"!==typeof this.ctx.listener.positionX? (this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,0.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,0.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,0.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]);else return this._pos;return this};HowlerGlobal.prototype.orientation=function(b,c,d,f,e,l){if(!this.ctx||!this.ctx.listener)return this;var n=this._orientation;c="number"!== typeof c?n[1]:c;d="number"!==typeof d?n[2]:d;f="number"!==typeof f?n[3]:f;e="number"!==typeof e?n[4]:e;l="number"!==typeof l?n[5]:l;if("number"===typeof b)this._orientation=[b,c,d,f,e,l],"undefined"!==typeof this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(b,Howler.ctx.currentTime,0.1),this.ctx.listener.forwardY.setTargetAtTime(c,Howler.ctx.currentTime,0.1),this.ctx.listener.forwardZ.setTargetAtTime(d,Howler.ctx.currentTime,0.1),this.ctx.listener.upX.setTargetAtTime(f,Howler.ctx.currentTime, 0.1),this.ctx.listener.upY.setTargetAtTime(e,Howler.ctx.currentTime,0.1),this.ctx.listener.upZ.setTargetAtTime(l,Howler.ctx.currentTime,0.1)):this.ctx.listener.setOrientation(b,c,d,f,e,l);else return n;return this};var b=Howl.prototype.init;Howl.prototype.init=function(c){this._orientation=c.orientation||[1,0,0];this._stereo=c.stereo||null;this._pos=c.pos||null;this._pannerAttr={coneInnerAngle:"undefined"!==typeof c.coneInnerAngle?c.coneInnerAngle:360,coneOuterAngle:"undefined"!==typeof c.coneOuterAngle? c.coneOuterAngle:360,coneOuterGain:"undefined"!==typeof c.coneOuterGain?c.coneOuterGain:0,distanceModel:"undefined"!==typeof c.distanceModel?c.distanceModel:"inverse",maxDistance:"undefined"!==typeof c.maxDistance?c.maxDistance:1E4,panningModel:"undefined"!==typeof c.panningModel?c.panningModel:"HRTF",refDistance:"undefined"!==typeof c.refDistance?c.refDistance:1,rolloffFactor:"undefined"!==typeof c.rolloffFactor?c.rolloffFactor:1};this._onstereo=c.onstereo?[{fn:c.onstereo}]:[];this._onpos=c.onpos? [{fn:c.onpos}]:[];this._onorientation=c.onorientation?[{fn:c.onorientation}]:[];return b.call(this,c)};Howl.prototype.stereo=function(b,c){var d=this;if(!d._webAudio)return d;if("loaded"!==d._state)return d._queue.push({event:"stereo",action:function(){d.stereo(b,c)}}),d;var r="undefined"===typeof Howler.ctx.createStereoPanner?"spatial":"stereo";if("undefined"===typeof c)if("number"===typeof b)d._stereo=b,d._pos=[b,0,0];else return d._stereo;for(var e=d._getSoundIds(c),l=0;lthis.width||j>this.height)){var r=ig.system.scale,e=Math.floor(f*r),l=Math.floor(j*r),n=m?-1:1,s=p?-1:1;if(m||p)ig.system.context.save(),ig.system.context.scale(n,s);ig.system.context.drawImage(this.data,Math.floor(d*f)%this.width*r,Math.floor(d*f/this.width)*j*r,e,l,ig.system.getDrawPos(b)*n-(m?e:0),ig.system.getDrawPos(c)*s-(p?l:0),e,l);(m|| p)&&ig.system.context.restore();ig.Image.drawCount++}}});ig.Image.drawCount=0;ig.Image.cache={};ig.Image.reloadCache=function(){for(var b in ig.Image.cache)ig.Image.cache[b].reload()}});ig.baked=!0; ig.module("impact.font").requires("impact.image").defines(function(){ig.Font=ig.Image.extend({widthMap:[],indices:[],firstChar:32,alpha:1,letterSpacing:1,lineSpacing:0,onload:function(b){this._loadMetrics(this.data);this.parent(b)},widthForString:function(b){if(-1!==b.indexOf("\n")){b=b.split("\n");for(var c=0,d=0;db||b>=this.indices.length)return 0;var f=ig.system.scale,j=this.widthMap[b]*f,m=(this.height-2)*f;ig.system.context.drawImage(this.data,this.indices[b]*f,0,j,m,ig.system.getDrawPos(c),ig.system.getDrawPos(d),j,m);return this.widthMap[b]+this.letterSpacing},_loadMetrics:function(b){this.height=b.height-1;this.widthMap=[];this.indices= [];for(var c=ig.getImagePixels(b,0,b.height-1,b.width,1),d=0,f=0,j=0;jc.data[m]&&f&&(this.widthMap.push(f),this.indices.push(j-f),d++,f=0)}this.widthMap.push(f);this.indices.push(j-f)}});ig.Font.ALIGN={LEFT:0,RIGHT:1,CENTER:2}});ig.baked=!0; ig.module("impact.sound").defines(function(){ig.SoundManager=ig.Class.extend({clips:{},volume:1,format:null,init:function(){if(!ig.Sound.enabled||!window.Audio)ig.Sound.enabled=!1;else{for(var b=new Audio,c=0;c=b?(this.stop(),this.currentTrack.volume=this._volume,clearInterval(this._fadeInterval)):this.currentTrack.volume=b},_endedCallback:function(){this._loop?this.play():this.next()}});ig.Sound=ig.Class.extend({path:"",volume:1,currentClip:null,multiChannel:!0,init:function(b,c){this.path=b;this.multiChannel=!1!==c;this.load()},load:function(b){ig.Sound.enabled?ig.ready?ig.soundManager.load(this.path, this.multiChannel,b):ig.addResource(this):b&&b(this.path,!0)},play:function(){ig.Sound.enabled&&(this.currentClip=ig.soundManager.get(this.path),this.currentClip.volume=ig.soundManager.volume*this.volume,this.currentClip.play())},stop:function(){this.currentClip&&(this.currentClip.pause(),this.currentClip.currentTime=0)}});ig.Sound.FORMAT={MP3:{ext:"mp3",mime:"audio/mpeg"},M4A:{ext:"m4a",mime:"audio/mp4; codecs=mp4a"},OGG:{ext:"ogg",mime:"audio/ogg; codecs=vorbis"},WEBM:{ext:"webm",mime:"audio/webm; codecs=vorbis"}, CAF:{ext:"caf",mime:"audio/x-caf"}};ig.Sound.use=[ig.Sound.FORMAT.OGG,ig.Sound.FORMAT.MP3];ig.Sound.channels=4;ig.Sound.enabled=!0});ig.baked=!0; ig.module("impact.loader").requires("impact.image","impact.font","impact.sound").defines(function(){ig.Loader=ig.Class.extend({resources:[],gameClass:null,status:0,done:!1,_unloaded:[],_drawStatus:0,_intervalId:0,_loadCallbackBound:null,init:function(b,c){this.gameClass=b;this.resources=c;this._loadCallbackBound=this._loadCallback.bind(this);for(var d=0;db.deltaY?ig.KEY.MWHEEL_UP:ig.KEY.MWHEEL_DOWN];c&&(this.actions[c]=!0,this.presses[c]=!0,this.delayedKeyup[c]=!0,b.stopPropagation(),b.preventDefault())}, mousemove:function(b){var c=ig.system.scale*((ig.system.canvas.offsetWidth||ig.system.realWidth)/ig.system.realWidth),d={left:0,top:0};ig.system.canvas.getBoundingClientRect&&(d=ig.system.canvas.getBoundingClientRect());b=b.touches?b.touches[0]:b;this.mouse.x=(b.clientX-d.left)/c;this.mouse.y=(b.clientY-d.top)/c},contextmenu:function(b){this.bindings[ig.KEY.MOUSE2]&&(b.stopPropagation(),b.preventDefault())},keydown:function(b){var c=b.target.tagName;if(!("INPUT"==c||"TEXTAREA"==c))if(c="keydown"== b.type?b.keyCode:2==b.button?ig.KEY.MOUSE2:ig.KEY.MOUSE1,0>c&&!ig.ua.mobile&&window.focus(),("touchstart"==b.type||"mousedown"==b.type)&&this.mousemove(b),c=this.bindings[c])this.actions[c]=!0,this.locks[c]||(this.presses[c]=!0,this.locks[c]=!0),b.preventDefault()},keyup:function(b){var c=b.target.tagName;if(!("INPUT"==c||"TEXTAREA"==c))if(c=this.bindings["keyup"==b.type?b.keyCode:2==b.button?ig.KEY.MOUSE2:ig.KEY.MOUSE1])this.delayedKeyup[c]=!0,b.preventDefault()},devicemotion:function(b){this.accel= b.accelerationIncludingGravity},bind:function(b,c){0>b?this.initMouse():0ig.system.width||c>ig.system.height||(0>b+d||0>c+d)||(1!=this.alpha&&(ig.system.context.globalAlpha=this.alpha),0==this.angle?this.sheet.image.drawTile(b,c,this.tile,this.sheet.width,this.sheet.height,this.flip.x,this.flip.y):(ig.system.context.save(),ig.system.context.translate(ig.system.getDrawPos(b+this.pivot.x),ig.system.getDrawPos(c+this.pivot.y)),ig.system.context.rotate(this.angle), this.sheet.image.drawTile(-this.pivot.x,-this.pivot.y,this.tile,this.sheet.width,this.sheet.height,this.flip.x,this.flip.y),ig.system.context.restore()),1!=this.alpha&&(ig.system.context.globalAlpha=1))}})});ig.baked=!0; ig.module("impact.entity").requires("impact.animation","impact.impact").defines(function(){ig.Entity=ig.Class.extend({id:0,settings:{},size:{x:16,y:16},offset:{x:0,y:0},pos:{x:0,y:0},last:{x:0,y:0},vel:{x:0,y:0},accel:{x:0,y:0},friction:{x:0,y:0},maxVel:{x:100,y:100},zIndex:0,gravityFactor:1,standing:!1,bounciness:0,minBounceVelocity:40,anims:{},animSheet:null,currentAnim:null,health:10,type:0,checkAgainst:0,collides:0,_killed:!1,slopeStanding:{min:(44).toRad(),max:(136).toRad()},init:function(b, c,d){this.id=++ig.Entity._lastId;this.pos.x=this.last.x=b;this.pos.y=this.last.y=c;ig.merge(this,d)},reset:function(b,c,d){var f=this.constructor.prototype;this.pos.x=b;this.pos.y=c;this.last.x=b;this.last.y=c;this.vel.x=f.vel.x;this.vel.y=f.vel.y;this.accel.x=f.accel.x;this.accel.y=f.accel.y;this.health=f.health;this._killed=f._killed;this.standing=f.standing;this.type=f.type;this.checkAgainst=f.checkAgainst;this.collides=f.collides;ig.merge(this,d)},addAnim:function(b,c,d,f){if(!this.animSheet)throw"No animSheet to add the animation "+ b+" to.";c=new ig.Animation(this.animSheet,c,d,f);this.anims[b]=c;this.currentAnim||(this.currentAnim=c);return c},update:function(){this.last.x=this.pos.x;this.last.y=this.pos.y;this.vel.y+=ig.game.gravity*ig.system.tick*this.gravityFactor;this.vel.x=this.getNewVelocity(this.vel.x,this.accel.x,this.friction.x,this.maxVel.x);this.vel.y=this.getNewVelocity(this.vel.y,this.accel.y,this.friction.y,this.maxVel.y);var b=ig.game.collisionMap.trace(this.pos.x,this.pos.y,this.vel.x*ig.system.tick,this.vel.y* ig.system.tick,this.size.x,this.size.y);this.handleMovementTrace(b);this.currentAnim&&this.currentAnim.update()},getNewVelocity:function(b,c,d,f){return c?(b+c*ig.system.tick).limit(-f,f):d?(c=d*ig.system.tick,0b+c?b+c:0):b.limit(-f,f)},handleMovementTrace:function(b){this.standing=!1;b.collision.y&&(0this.minBounceVelocity?this.vel.y*=-this.bounciness:(0 this.minBounceVelocity?this.vel.x*-this.bounciness:0);if(b.collision.slope){var c=b.collision.slope;if(0this.slopeStanding.min&&c=this.health&&this.kill()},touches:function(b){return!(this.pos.x>=b.pos.x+b.size.x||this.pos.x+this.size.x<=b.pos.x||this.pos.y>=b.pos.y+b.size.y||this.pos.y+this.size.y<=b.pos.y)},distanceTo:function(b){var c=this.pos.x+this.size.x/2-(b.pos.x+b.size.x/2);b=this.pos.y+this.size.y/2-(b.pos.y+b.size.y/2);return Math.sqrt(c*c+b*b)},angleTo:function(b){return Math.atan2(b.pos.y+ b.size.y/2-(this.pos.y+this.size.y/2),b.pos.x+b.size.x/2-(this.pos.x+this.size.x/2))},check:function(){},collideWith:function(){},ready:function(){},erase:function(){}});ig.Entity._lastId=0;ig.Entity.COLLIDES={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8};ig.Entity.TYPE={NONE:0,A:1,B:2,BOTH:3};ig.Entity.checkPair=function(b,c){b.checkAgainst&c.type&&b.check(c);c.checkAgainst&b.type&&c.check(b);b.collides&&c.collides&&b.collides+c.collides>ig.Entity.COLLIDES.ACTIVE&&ig.Entity.solveCollision(b,c)};ig.Entity.solveCollision= function(b,c){var d=null;if(b.collides==ig.Entity.COLLIDES.LITE||c.collides==ig.Entity.COLLIDES.FIXED)d=b;else if(c.collides==ig.Entity.COLLIDES.LITE||b.collides==ig.Entity.COLLIDES.FIXED)d=c;b.last.x+b.size.x>c.last.x&&b.last.xc.last.y&&b.last.yb.minBounceVelocity?b.vel.y*=-b.bounciness:(b.standing=!0,b.vel.y=0)):(d=(b.vel.y-c.vel.y)/2,b.vel.y=-d,c.vel.y=d,j=c.vel.x*ig.system.tick,d=ig.game.collisionMap.trace(b.pos.x,b.pos.y,j,-f/2,b.size.x,b.size.y),b.pos.y=d.pos.y,b=ig.game.collisionMap.trace(c.pos.x,c.pos.y,0,f/2,c.size.x,c.size.y),c.pos.y=b.pos.y)}});ig.baked=!0; ig.module("impact.map").defines(function(){ig.Map=ig.Class.extend({tilesize:8,width:1,height:1,data:[[]],name:null,init:function(b,c){this.tilesize=b;this.data=c;this.height=c.length;this.width=c[0].length;this.pxWidth=this.width*this.tilesize;this.pxHeight=this.height*this.tilesize},getTile:function(b,c){var d=Math.floor(b/this.tilesize),f=Math.floor(c/this.tilesize);return 0<=d&&dthis.lastSlope&&(this.lastSlope=m|0)},trace:function(b,c,j,m,p,r){var e={collision:{x:!1,y:!1,slope:!1},pos:{x:b,y:c},tile:{x:0,y:0}},l=Math.ceil(Math.max(Math.abs(j),Math.abs(m))/this.tilesize);if(1m?this.tilesize:0,u=Math.max(Math.floor(j/this.tilesize),0),B=Math.min(Math.ceil((j+e)/this.tilesize),this.height);m=Math.floor((b.pos.x+x)/this.tilesize);var G=Math.floor((c+x)/this.tilesize);if(0G||G>=this.width)G=-1;if(0<=m&&mthis.lastSlope||1p?this.tilesize:0;u=Math.max(Math.floor(b.pos.x/this.tilesize),0);A=Math.min(Math.ceil((b.pos.x+r)/this.tilesize),this.width);E=Math.floor((b.pos.y+x)/this.tilesize); B=Math.floor((j+x)/this.tilesize);if(0B||B>=this.height)B=-1;if(0<=E&&Ethis.lastSlope||1x?e:0)-(n+u[0])*this.tilesize;l=m+r+(0p*-x+r*c)return A;n=Math.sqrt(c*c+x*x);s=x/n;n=-c/n;var B=e*s+l*n,u=s*B,B=n*B;if(u*u+B*B>=p*p+r*r)return A||0.5>c*(l-r)-x*(e-p);b.pos.x=j+p-u;b.pos.y=m+r-B;b.collision.slope={x:c,y:x,nx:s,ny:n};return!0}return!1}});var b=1/3,c=2/3;ig.CollisionMap.defaultTileDef={5:[0,1,1,c,!0],6:[0,c,1,b,!0],7:[0,b,1,0,!0],3:[0,1,1,0.5,!0],4:[0,0.5,1,0,!0],2:[0, 1,1,0,!0],10:[0.5,1,1,0,!0],21:[0,1,0.5,0,!0],32:[c,1,1,0,!0],43:[b,1,c,0,!0],54:[0,1,b,0,!0],27:[0,0,1,b,!0],28:[0,b,1,c,!0],29:[0,c,1,1,!0],25:[0,0,1,0.5,!0],26:[0,0.5,1,1,!0],24:[0,0,1,1,!0],11:[0,0,0.5,1,!0],22:[0.5,0,1,1,!0],33:[0,0,b,1,!0],44:[b,0,c,1,!0],55:[c,0,1,1,!0],16:[1,b,0,0,!0],17:[1,c,0,b,!0],18:[1,1,0,c,!0],14:[1,0.5,0,0,!0],15:[1,1,0,0.5,!0],13:[1,1,0,0,!0],8:[0.5,1,0,0,!0],19:[1,1,0.5,0,!0],30:[b,1,0,0,!0],41:[c,1,b,0,!0],52:[1,1,c,0,!0],38:[1,c,0,1,!0],39:[1,b,0,c,!0],40:[1,0, 0,b,!0],36:[1,0.5,0,1,!0],37:[1,0,0,0.5,!0],35:[1,0,0,1,!0],9:[1,0,0.5,1,!0],20:[0.5,0,0,1,!0],31:[1,0,c,1,!0],42:[c,0,b,1,!0],53:[b,0,0,1,!0],12:[0,0,1,0,!1],23:[1,1,0,1,!1],34:[1,0,1,1,!1],45:[0,1,0,0,!1]};ig.CollisionMap.staticNoCollision={trace:function(b,c,j,m){return{collision:{x:!1,y:!1,slope:!1},pos:{x:b+j,y:c+m},tile:{x:0,y:0}}}}});ig.baked=!0; ig.module("impact.background-map").requires("impact.map","impact.image").defines(function(){ig.BackgroundMap=ig.Map.extend({tiles:null,scroll:{x:0,y:0},distance:1,repeat:!1,tilesetName:"",foreground:!1,enabled:!0,preRender:!1,preRenderedChunks:null,chunkSize:512,debugChunks:!1,anims:{},init:function(b,c,d){this.parent(b,c);this.setTileset(d)},setTileset:function(b){this.tilesetName=b instanceof ig.Image?b.path:b;this.tiles=new ig.Image(this.tilesetName);this.preRenderedChunks=null},setScreenPos:function(b, c){this.scroll.x=b/this.distance;this.scroll.y=c/this.distance},preRenderMapToChunks:function(){var b=this.width*this.tilesize*ig.system.scale,c=this.height*this.tilesize*ig.system.scale;this.chunkSize=Math.min(Math.max(b,c),this.chunkSize);var d=Math.ceil(b/this.chunkSize),f=Math.ceil(c/this.chunkSize);this.preRenderedChunks=[];for(var j=0;j=this.height||0>l){if(!this.repeat)continue;l=(l%this.height+this.height)%this.height}for(var n=-1,s=p;s=this.width||0>b){if(!this.repeat)continue;b=(b%this.width+this.width)%this.width}if(b=this.data[l][b])(c=this.anims[b- 1])?c.draw(s,m):this.tiles.drawTile(s,m,b-1,this.tilesize)}}}})});ig.baked=!0; ig.module("impact.game").requires("impact.impact","impact.entity","impact.collision-map","impact.background-map").defines(function(){ig.Game=ig.Class.extend({clearColor:"#000000",gravity:0,screen:{x:0,y:0},_rscreen:{x:0,y:0},entities:[],namedEntities:{},collisionMap:ig.CollisionMap.staticNoCollision,backgroundMaps:[],backgroundAnims:{},autoSort:!1,sortBy:null,cellSize:64,_deferredKill:[],_levelToLoad:null,_doSortEntities:!1,staticInstantiate:function(){this.sortBy=this.sortBy||ig.Game.SORT.Z_INDEX; ig.game=this;return null},loadLevel:function(b){this.screen={x:0,y:0};this.entities=[];this.namedEntities={};for(var c=0;c
";(document.getElementById("play").parentNode||document.getElementById("ajaxbar")).appendChild(this.desktopCoverDIV);try{"undefined"!==typeof ig.sizeHandler?"undefined"!==typeof ig.sizeHandler.coreDivsToResize&&ig.sizeHandler.coreDivsToResize.push("#"+this.tapToStartDivId):"undefined"!==typeof coreDivsToResize&&(coreDivsToResize.push(this.tapToStartDivId),"function"===typeof sizeHandler&&console.log("sizeHandler"))}catch(c){console.log(c)}this.desktopCoverDIV.addEventListener("click", function(){ig.soundHandler.unlockWebAudio();this.desktopCoverDIV.setAttribute("style","visibility: hidden;");"function"===typeof b&&b()}.bind(this))}},setupCustomAnimation:function(){this.customAnim=new ig.Animation(this.customAnim,0.05,[0,1,2,3,4,5]);this.customAnim.currentFrame=0;ig.loadingScreen=this;ig.loadingScreen.animationTimer=window.setInterval("ig.loadingScreen.animate()",100)},animate:function(){this.customAnim.currentFrame(b*=2)?0.5*b*b:-0.5*(--b*(b-2)-1)};ig.Tween.Easing.Cubic.EaseIn=function(b){return b*b*b};ig.Tween.Easing.Cubic.EaseOut=function(b){return--b*b*b+1};ig.Tween.Easing.Cubic.EaseInOut=function(b){return 1>(b*=2)?0.5*b*b*b:0.5*((b-=2)*b*b+2)};ig.Tween.Easing.Quartic.EaseIn=function(b){return b*b*b*b};ig.Tween.Easing.Quartic.EaseOut=function(b){return-(--b*b*b*b-1)};ig.Tween.Easing.Quartic.EaseInOut=function(b){return 1>(b*=2)?0.5*b*b*b*b:-0.5*((b-=2)*b*b*b-2)};ig.Tween.Easing.Quintic.EaseIn= function(b){return b*b*b*b*b};ig.Tween.Easing.Quintic.EaseOut=function(b){return(b-=1)*b*b*b*b+1};ig.Tween.Easing.Quintic.EaseInOut=function(b){return 1>(b*=2)?0.5*b*b*b*b*b:0.5*((b-=2)*b*b*b*b+2)};ig.Tween.Easing.Sinusoidal.EaseIn=function(b){return-Math.cos(b*Math.PI/2)+1};ig.Tween.Easing.Sinusoidal.EaseOut=function(b){return Math.sin(b*Math.PI/2)};ig.Tween.Easing.Sinusoidal.EaseInOut=function(b){return-0.5*(Math.cos(Math.PI*b)-1)};ig.Tween.Easing.Exponential.EaseIn=function(b){return 0==b?0:Math.pow(2, 10*(b-1))};ig.Tween.Easing.Exponential.EaseOut=function(b){return 1==b?1:-Math.pow(2,-10*b)+1};ig.Tween.Easing.Exponential.EaseInOut=function(b){return 0==b?0:1==b?1:1>(b*=2)?0.5*Math.pow(2,10*(b-1)):0.5*(-Math.pow(2,-10*(b-1))+2)};ig.Tween.Easing.Circular.EaseIn=function(b){return-(Math.sqrt(1-b*b)-1)};ig.Tween.Easing.Circular.EaseOut=function(b){return Math.sqrt(1- --b*b)};ig.Tween.Easing.Circular.EaseInOut=function(b){return 1>(b/=0.5)?-0.5*(Math.sqrt(1-b*b)-1):0.5*(Math.sqrt(1-(b-=2)*b)+1)};ig.Tween.Easing.Elastic.EaseIn= function(b){var c,d=0.1,f=0.4;if(0==b)return 0;if(1==b)return 1;f||(f=0.3);!d||1>d?(d=1,c=f/4):c=f/(2*Math.PI)*Math.asin(1/d);return-(d*Math.pow(2,10*(b-=1))*Math.sin(2*(b-c)*Math.PI/f))};ig.Tween.Easing.Elastic.EaseOut=function(b){var c,d=0.1,f=0.4;if(0==b)return 0;if(1==b)return 1;f||(f=0.3);!d||1>d?(d=1,c=f/4):c=f/(2*Math.PI)*Math.asin(1/d);return d*Math.pow(2,-10*b)*Math.sin(2*(b-c)*Math.PI/f)+1};ig.Tween.Easing.Elastic.EaseInOut=function(b){var c,d=0.1,f=0.4;if(0==b)return 0;if(1==b)return 1; f||(f=0.3);!d||1>d?(d=1,c=f/4):c=f/(2*Math.PI)*Math.asin(1/d);return 1>(b*=2)?-0.5*d*Math.pow(2,10*(b-=1))*Math.sin(2*(b-c)*Math.PI/f):0.5*d*Math.pow(2,-10*(b-=1))*Math.sin(2*(b-c)*Math.PI/f)+1};ig.Tween.Easing.Back.EaseIn=function(b){return b*b*(2.70158*b-1.70158)};ig.Tween.Easing.Back.EaseOut=function(b){return(b-=1)*b*(2.70158*b+1.70158)+1};ig.Tween.Easing.Back.EaseInOut=function(b){return 1>(b*=2)?0.5*b*b*(3.5949095*b-2.5949095):0.5*((b-=2)*b*(3.5949095*b+2.5949095)+2)};ig.Tween.Easing.Bounce.EaseIn= function(b){return 1-ig.Tween.Easing.Bounce.EaseOut(1-b)};ig.Tween.Easing.Bounce.EaseOut=function(b){return(b/=1)<1/2.75?7.5625*b*b:b<2/2.75?7.5625*(b-=1.5/2.75)*b+0.75:b<2.5/2.75?7.5625*(b-=2.25/2.75)*b+0.9375:7.5625*(b-=2.625/2.75)*b+0.984375};ig.Tween.Easing.Bounce.EaseInOut=function(b){return 0.5>b?0.5*ig.Tween.Easing.Bounce.EaseIn(2*b):0.5*ig.Tween.Easing.Bounce.EaseOut(2*b-1)+0.5}});ig.baked=!0; ig.module("plugins.url-parameters").defines(function(){ig.UrlParameters=ig.Class.extend({init:function(){switch(getQueryVariable("iphone")){case "true":ig.ua.iPhone=!0,console.log("iPhone mode")}var b=getQueryVariable("webview");if(b)switch(b){case "true":ig.ua.is_uiwebview=!0,console.log("webview mode")}if(b=getQueryVariable("debug"))switch(b){case "true":ig.game.showDebugMenu(),console.log("debug mode")}switch(getQueryVariable("view")){case "stats":ig.game.resetPlayerStats(),ig.game.endGame()}getQueryVariable("ad")}})}); ig.baked=!0;ig.module("plugins.jukebox").defines(function(){ig.Jukebox=ig.Class.extend({init:function(){this.player=new jukebox.Player({resources:["media/audio/music5.ogg","media/audio/music5.mp3"],autoplay:!1,spritemap:{music:{start:0,end:11.934,loop:!0}},timeout:1E3})}})});ig.baked=!0; ig.module("plugins.director").requires("impact.impact").defines(function(){ig.Director=ig.Class.extend({init:function(b,c){this.game=b;this.levels=[];this.currentLevel=0;this.append(c)},loadLevel:function(b){for(key in dynamicClickableEntityDivs)ig.game.hideOverlay([key]);this.currentLevel=b;this.game.loadLevel(this.levels[b]);return!0},loadLevelWithoutEntities:function(b){this.currentLevel=b;this.game.loadLevelWithoutEntities(this.levels[b]);return!0},append:function(b){newLevels=[];return"object"=== typeof b?(b.constructor===[].constructor?newLevels=b:newLevels[0]=b,this.levels=this.levels.concat(newLevels),!0):!1},nextLevel:function(){return this.currentLevel+1this.getFloat(b)&&this.set(b,c)},remove:function(b){if(!this.isCapable())return null;window.localStorage.removeItem(b)},clear:function(){if(!this.isCapable())return null; window.localStorage.clear()}})});ig.baked=!0; ig.module("plugins.scale").requires("impact.entity").defines(function(){ig.Entity.inject({scale:{x:1,y:1},_offset:{x:0,y:0},_scale:{x:1,y:1},_size:{x:0,y:0},init:function(b,c,d){this.parent(b,c,d);this._offset.x=this.offset.x;this._offset.y=this.offset.y;this._size.x=this.size.x;this._size.y=this.size.y;this.setScale(this.scale.x,this.scale.y)},draw:function(){var b=ig.system.context;b.save();b.translate(ig.system.getDrawPos(this.pos.x.round()-this.offset.x-ig.game.screen.x),ig.system.getDrawPos(this.pos.y.round()- this.offset.y-ig.game.screen.y));b.scale(this._scale.x,this._scale.y);this.currentAnim&&this.currentAnim.draw(0,0);b.restore()},setScale:function(b,c){var d=this.size.x,f=this.size.y;this.scale.x=b||this.scale.x;this.scale.y=c||this.scale.y;this._scale.x=this.scale.x/ig.system.scale;this._scale.y=this.scale.y/ig.system.scale;this.offset.x=this._offset.x*this._scale.x;this.offset.y=this._offset.y*this._scale.y;this.size.x=this._size.x*this._scale.x;this.size.y=this._size.y*this._scale.y;this.pos.x+= (d-this.size.x)/2;this.pos.y+=(f-this.size.y)/2}})});ig.baked=!0;ig.module("plugins.animation-scaling").requires("impact.animation").defines(function(){ig.Animation.inject({scale:{x:1,y:1},draw:function(b,c){var d=ig.system.scale;ig.system.context.save();var f=b+this.sheet.width/2,j=c+this.sheet.height/2;ig.system.context.translate(f*d,j*d);ig.system.context.scale(this.scale.x,this.scale.y);ig.system.context.translate(-f*d,-j*d);this.parent(b,c);ig.system.context.restore()}})});ig.baked=!0; ig.module("plugins.data.vector").defines(function(){Vector2=ig.Class.extend({x:null,y:null,valType:"number",init:function(b,c){typeof b===this.valType&&typeof c===this.valType&&(this.x=b,this.y=c)},row:function(b){typeof b===this.valType&&(this.y=b);return this.y},col:function(b){typeof b===this.valType&&(this.x=b);return this.x}})});ig.baked=!0; ig.module("plugins.handlers.size-handler").requires("plugins.data.vector").defines(function(){ig.SizeHandler=ig.Class.extend({portraitMode:!1,desktop:{actualSize:new Vector2(window.innerWidth,window.innerHeight),actualResolution:new Vector2(640,480)},mobile:{actualSize:new Vector2(window.innerWidth,window.innerHeight),actualResolution:new Vector2(640,480)},windowSize:new Vector2(window.innerWidth,window.innerHeight),scaleRatioMultiplier:new Vector2(1,1),sizeRatio:new Vector2(1,1),scale:1,domHandler:null, dynamicClickableEntityDivs:{},coreDivsToResize:["#canvas","#play","#orientate"],adsToResize:{MobileAdInGamePreroll:{"box-width":_SETTINGS.Ad.Mobile.Preroll.Width+2,"box-height":_SETTINGS.Ad.Mobile.Preroll.Height+20},MobileAdInGameEnd:{"box-width":_SETTINGS.Ad.Mobile.End.Width+2,"box-height":_SETTINGS.Ad.Mobile.End.Height+20},MobileAdInGamePreroll2:{"box-width":_SETTINGS.Ad.Mobile.Preroll.Width+2,"box-height":_SETTINGS.Ad.Mobile.Preroll.Height+20},MobileAdInGameEnd2:{"box-width":_SETTINGS.Ad.Mobile.End.Width+ 2,"box-height":_SETTINGS.Ad.Mobile.End.Height+20},MobileAdInGamePreroll3:{"box-width":_SETTINGS.Ad.Mobile.Preroll.Width+2,"box-height":_SETTINGS.Ad.Mobile.Preroll.Height+20},MobileAdInGameEnd3:{"box-width":_SETTINGS.Ad.Mobile.End.Width+2,"box-height":_SETTINGS.Ad.Mobile.End.Height+20}},init:function(b){this.domHandler=b;if("undefined"===typeof b)throw"undefined Dom Handler for Size Handler";this.sizeCalcs();this.eventListenerSetup();this.samsungFix()},sizeCalcs:function(){this.windowSize=new Vector2(window.innerWidth, window.innerHeight);if(ig.ua.mobile){this.mobile.actualSize=new Vector2(window.innerWidth,window.innerHeight);var b=new Vector2(this.mobile.actualResolution.x,this.mobile.actualResolution.y);this.scaleRatioMultiplier=new Vector2(this.mobile.actualSize.x/b.x,this.mobile.actualSize.y/b.y);var c=Math.min(this.scaleRatioMultiplier.x,this.scaleRatioMultiplier.y);this.mobile.actualSize.x=b.x*this.scaleRatioMultiplier.x;this.mobile.actualSize.y=b.y*this.scaleRatioMultiplier.y}else this.desktop.actualSize= new Vector2(window.innerWidth,window.innerHeight),b=new Vector2(this.desktop.actualResolution.x,this.desktop.actualResolution.y),this.scaleRatioMultiplier=new Vector2(this.desktop.actualSize.x/b.x,this.desktop.actualSize.y/b.y),c=Math.min(this.scaleRatioMultiplier.x,this.scaleRatioMultiplier.y),this.desktop.actualSize.x=b.x*c,this.desktop.actualSize.y=b.y*c;this.sizeRatio.x=window.innerWidth/this.mobile.actualResolution.x;this.sizeRatio.y=window.innerHeight/this.mobile.actualResolution.y},resizeLayers:function(){console.log(this.coreDivsToResize.length); for(var b=0;bwindow.innerWidth,c=this.domHandler.getElementById("#orientate"),d=this.domHandler.getElementById("#game");b?(this.domHandler.show(c),this.domHandler.hide(d)):(this.domHandler.show(d),this.domHandler.hide(c))}ig.ua.mobile?(this.resize(),this.resizeAds()):this.resize()},resizeAds:function(){for(var b in this.adsToResize){var c=ig.domHandler.getElementById("#"+b),d=ig.domHandler.getElementById("#"+b+"-Box"),f=(window.innerWidth-this.adsToResize[b]["box-width"])/2+"px",j=(window.innerHeight- this.adsToResize[b]["box-height"])/2+"px";c&&ig.domHandler.css(c,{width:window.innerWidth,height:window.innerHeight});d&&ig.domHandler.css(d,{left:f,top:j})}},samsungFix:function(){ig.ua.android&&!(4.2>parseFloat(navigator.userAgent.slice(navigator.userAgent.indexOf("Android")+8,navigator.userAgent.indexOf("Android")+11)))&&(!(0>navigator.userAgent.indexOf("GT"))&&!(0"):ig.$new(b)},getElementByClass:function(b){return this.JQUERYAVAILABLE?$("."+b):document.getElementsByClassName(b)}, getElementById:function(b){return this.JQUERYAVAILABLE?0<$(b).length?$(b):null:ig.$(b)},appendChild:function(b,c){this.JQUERYAVAILABLE?b.append(c):b.appendChild(c)},appendToBody:function(b){this.JQUERYAVAILABLE?$("body").append(b):document.body.appendChild(b)},resize:function(b,c,d){if(this.JQUERYAVAILABLE)b.width(c.toFixed(2)),b.height(d.toFixed(2));else{var f=b.style.visibility;c="width:"+c.toFixed(2)+"px; height:"+d.toFixed(2)+"px;";this.attr(b,"style",c);b.style.visibility=f}},resizeOffsetLeft:function(b, c,d,f){if(this.JQUERYAVAILABLE)b.width(c.toFixed(2)),b.height(d.toFixed(2)),b.css("left",f);else{var j=b.style.visibility;c="width:"+c.toFixed(2)+"px; height:"+d.toFixed(2)+"px; left: "+f.toFixed(2)+"px;";this.attr(b,"style",c);b.style.visibility=j}},css:function(b,c){if(this.JQUERYAVAILABLE)b.css(c);else{var d="",f;for(f in c)d+=f+":"+c[f]+";";this.attr(b,"style",d)}},getOffsets:function(b){return this.JQUERYAVAILABLE?(b=b.offset(),{left:b.left,top:b.top}):{left:b.offsetLeft,top:b.offsetTop}},attr:function(b, c,d){if("undefined"===typeof d)return this.JQUERYAVAILABLE?b.attr(c):b.getAttribute(c);this.JQUERYAVAILABLE?b.attr(c,d):b.setAttribute(c,d)},show:function(b){this.JQUERYAVAILABLE?(b.show(),b.css("visibility","visible")):b&&(b.style?b.style.visibility="visible":b[0]&&(b[0].style.visibility="visible"))},hide:function(b){this.JQUERYAVAILABLE?(b.hide(),b.css("visibility","hidden")):b&&(b.style?b.style.visibility="hidden":b[0]&&(b[0].style.visibility="hidden"))},getQueryVariable:function(b){for(var c= window.location.search.substring(1).split("&"),d=0;d
';document.getElementById("ajaxbar").appendChild(b)},hideLoadingSpinner:function(){var b=document.getElementById("mjs-loading-overlay"); "undefined"!==typeof b&&null!==b&&b.remove()},startAdRequestTimeout:function(b,c,d){b=this.getAdTypeByName(b)||"interstitial";d=1E3*(d||this.settings.adRequestTimeout[b]);this.getAdRequestStatus(b)?this.log("Already requesting ads",b):(this.adFlags.adRequestTimeoutId[b]=window.setTimeout(function(){this.stopAdRequestTimeout(b,c);null!==c&&"function"===typeof c&&c()}.bind(this,b,c),d),this.log("Ad request timeout started",b))},stopAdRequestTimeout:function(b){b=this.getAdTypeByName(b)||"interstitial"; this.getAdRequestStatus(b)&&(window.clearInterval(this.adFlags.adRequestTimeoutId[b]),this.adFlags.adRequestTimeoutId[b]=null,this.log("Ad request timeout stopped",b))},startAdProcessTimeout:function(b,c,d){b=this.getAdTypeByName(b)||"interstitial";d=1E3*(d||this.settings.adProcessTimeout[b]);this.getAdProcessStatus(b)?this.log("Already processing ads",b):(this.adFlags.adProcessTimeoutId[b]=window.setTimeout(function(){this.stopAdProcessTimeout(b,c);null!==c&&"function"===typeof c&&c()}.bind(this, b,c),d),this.log("Ad process timeout started",b))},stopAdProcessTimeout:function(b){b=this.getAdTypeByName(b)||"interstitial";this.getAdProcessStatus(b)&&(window.clearInterval(this.adFlags.adProcessTimeoutId[b]),this.adFlags.adProcessTimeoutId[b]=null,this.log("Ad process timeout stopped",b))},startAdCooldown:function(b,c,d){b=this.getAdTypeByName(b)||"interstitial";d=1E3*(d||this.settings.adCooldownTimeout[b]);this.getAdCooldownStatus(b)?this.log("Already cooling down ads",b):(this.adFlags.adCooldownTimeoutId[b]= window.setTimeout(function(){this.stopAdCooldown(b);null!==c&&"function"===typeof c&&c()}.bind(this,b,c),d),this.log("Started cooling down ads",b))},stopAdCooldown:function(b){b=this.getAdTypeByName(b)||"interstitial";this.getAdCooldownStatus(b)&&(window.clearTimeout(this.adFlags.adCooldownTimeoutId[b]),this.adFlags.adCooldownTimeoutId[b]=null,this.log("Stopped cooling down ads",b))},onAdRequest:function(b,c){b=this.getAdTypeByName(b)||"interstitial";this.getAdRequestStatus(b)?this.log("Ad has been requested", b):(this.log("Requesting ad",b),this.onSystemPause(),this.startAdRequestTimeout(b,function(){this.onSystemResume();"function"===typeof c&&c()}.bind(this,c)))},onAdProcess:function(b,c){b=this.getAdTypeByName(b)||"interstitial";this.getAdProcessStatus(b)?this.log("It's already processing an ad",b):(this.log("Processing ad",b),this.onSystemPause(),this.startAdProcessTimeout(b,function(){this.onSystemResume();"function"===typeof c&&c()}.bind(this,c)))},onAdShown:function(b){b=this.getAdTypeByName(b)|| "interstitial";this.adFlags.adShowing=b;this.log("Showing ad",b);this.onSystemPause();this.stopAdProcessTimeout(b);this.stopAdRequestTimeout(b);this.startAdCooldown(b);this.updateAdContainerCSS()},onAdHide:function(b){b=this.getAdTypeByName(b)||"interstitial";this.googleAfg.adSlots[b]=null;this.adFlags.adShowing=null;this.stopAdProcessTimeout(b);this.stopAdRequestTimeout(b);this.onSystemResume()},onAdError:function(b,c){b=this.getAdTypeByName(b)||"interstitial";this.log("Ad error",b,c,JSON.stringify(c)); this.onAdHide(b)},whitelabel:function(){_SETTINGS&&"undefined"!==typeof _SETTINGS&&(_SETTINGS.Branding&&"undefined"!==typeof _SETTINGS.Branding&&(_SETTINGS.Branding.Splash.Enabled=!1,_SETTINGS.Branding.Logo.Enabled=!1),_SETTINGS.DeveloperBranding&&"undefined"!==typeof _SETTINGS.DeveloperBranding&&(_SETTINGS.DeveloperBranding.Splash.Enabled=!1),_SETTINGS.MoreGames&&"undefined"!==typeof _SETTINGS.MoreGames&&(_SETTINGS.MoreGames.Enabled=!1,_SETTINGS.MoreGames.Link=""),_SETTINGS.TapToStartAudioUnlock&& "undefined"!==typeof _SETTINGS.TapToStartAudioUnlock&&(_SETTINGS.TapToStartAudioUnlock.Enabled=!1));MyGame&&"undefined"!==typeof MyGame&&(MyGame.prototype.dctf=function(){});ig&&"undefined"!==typeof ig.Fullscreen&&(ig.Fullscreen.enableFullscreenButton=!1)},log:function(b){var c=Array.prototype.slice.call(arguments,1),d=this.parameters.verbose;"string"===typeof this.parameters.verbose&&(d=d.toLowerCase());switch(d){case "false":case "off":case "no":case "0":case "":case 0:case null:case !1:case void 0:break; default:case "true":case "yes":case "on":case "1":case 1:case !0:if(window.console&&"function"===typeof window.console.log){for(var f="%c["+this.NAME+(" v"+this.VERSION+"] ").toString()+b+" ",d=0;db?0:isNaN(b)?1:1b?0:isNaN(b)?1:1b){this.soundList[c].volume(0);break}isNaN(b)?this.soundList[c].volume(1):1b){this.soundList[c].volume(0);break}isNaN(b)?this.soundList[c].volume(1):1=b?this.jukeboxPlayer.setVolume(this.minVolume):isNaN(b)?this.jukeboxPlayer.setVolume(1): 1=c.indexOf("chrome")&&(m=b));var p=new XMLHttpRequest;p.open("GET",m,!0);p.responseType="arraybuffer";p.onload=function(){this.webaudio.context.decodeAudioData(p.response,function(b){this.webaudio.buffer=b;this.webaudio.source_loop={};this.bgmPlaying?this.play():this.stop()}.bind(this),function(){console.log('Error decoding audio "'+m+'".')})}.bind(this);p.send();break}},initIOSWebAudioUnlock:function(){if(this.webaudio){webaudio= this.webaudio;var b=function(){var c=webaudio.context,d=c.createBuffer(1,1,22050),f=c.createBufferSource();f.buffer=d;f.connect(c.destination);"undefined"===typeof f.start?f.noteOn(0):f.start(0);setTimeout(function(){(f.playbackState===f.PLAYING_STATE||f.playbackState===f.FINISHED_STATE)&&window.removeEventListener("touchend",b,!1)},0)};window.addEventListener("touchend",b,!1)}},initHTML5Audio:function(b){if(this.useHTML5Audio&&this.audio){var c=this.audio;this.codecs={};this.codecs={mp3:!!c.canPlayType("audio/mpeg;").replace(/^no$/, ""),opus:!!c.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!c.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!c.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!c.canPlayType("audio/aac;").replace(/^no$/,""),m4a:!!(c.canPlayType("audio/x-m4a;")||c.canPlayType("audio/m4a;")||c.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(c.canPlayType("audio/x-mp4;")||c.canPlayType("audio/mp4;")||c.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!c.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "")};this.is={ff:Boolean(null!=window.mozInnerScreenX&&/firefox/.test(navigator.userAgent.toLowerCase())),ie:Boolean(document.all&&!window.opera),opera:Boolean(window.opera),chrome:Boolean(window.chrome),safari:Boolean(!window.chrome&&/safari/.test(navigator.userAgent.toLowerCase())&&window.getComputedStyle&&!window.globalStorage&&!window.opera)};this.playDelay=-60;this.stopDelay=30;this.is.chrome&&(this.playDelay=-25);this.is.chrome&&(this.stopDelay=25);this.is.ff&&(this.playDelay=-25);this.is.ff&& (this.stopDelay=85);this.is.opera&&(this.playDelay=5);this.is.opera&&(this.stopDelay=0);for(var d in b){this.soundList[d]=d;var f=b[d].path,c=f+"."+ig.Sound.FORMAT.OGG.ext,f=f+"."+ig.Sound.FORMAT.MP3.ext,j=null;this.codecs[ig.Sound.FORMAT.OGG.ext.toLowerCase()]?j=c:this.codecs[ig.Sound.FORMAT.MP3.ext.toLowerCase()]&&(j=f);if(j){ig.ua.mobile?ig.ua.iOS&&(j=f):(b=navigator.userAgent.toLowerCase(),-1!=b.indexOf("safari")&&-1>=b.indexOf("chrome")&&(j=f));this.audio.addEventListener("error",function(){this.audio.error&& 4===this.audio.error.code&&(this.isSupported=!1)},!1);this.audio.src=j;this.audio._pos=0;this.audio.preload="auto";this.audio.volume=this._volume;this.inactiveAudio=new Audio;this.inactiveAudio.src=j;this.inactiveAudio._pos=0;this.inactiveAudio.preload="auto";this.inactiveAudio.volume=this._volume;this.inactiveAudio.load();var m=function(){this._duration=this.audio.duration;this._loaded||(this._loaded=!0);this.bgmPlaying?this.play():this.stop();this.audio.removeEventListener("canplaythrough",m,!1)}.bind(this); this.audio.addEventListener("canplaythrough",m,!1);this.audio.load();break}}}},play:function(b){if(this.isSupported)if(this.bgmPlaying=!0,this.webaudio)if(this.webaudio.buffer){if(!this.muteFlag&&(this.bgmPlaying=!0,!this.webaudio.source_loop._playing)){this.webaudio.source_loop=this.webaudio.context.createBufferSource();this.webaudio.source_loop.buffer=this.webaudio.buffer;this.webaudio.source_loop.loop=!0;this.webaudio.source_loop.connect(this.webaudio.gainNode);isNaN(b)&&(b=0,this.pausedTime&& (b=this.pausedTime));this.webaudio.source_loop._startTime=this.webaudio.context.currentTime;if("noteOn"===this.webaudio.compatibility.start)this.webaudio.source_once=this.webaudio.context.createBufferSource(),this.webaudio.source_once.buffer=this.webaudio.buffer,this.webaudio.source_once.connect(this.webaudio.gainNode),this.webaudio.source_once.noteGrainOn(0,b,this.webaudio.buffer.duration-b),this.webaudio.source_loop[this.webaudio.compatibility.start](this.webaudio.context.currentTime+(this.webaudio.buffer.duration- b));else this.webaudio.source_loop[this.webaudio.compatibility.start](0,b);this.webaudio.source_loop._playing=!0}}else this.bgmPlaying=!0;else if(this.audio){var c=this.audio;if(!this.muteFlag){this.bgmPlaying=!0;isNaN(b)&&(b=0,this.pausedTime&&(b=this.pausedTime));var d=this._duration-b;this._onEndTimer&&(clearTimeout(this._onEndTimer),this._onEndTimer=null);this._onEndTimer=setTimeout(function(){this.audio.currentTime=0;this.audio.pause();this.pausedTime=0;if(this.inactiveAudio){var b=this.audio; this.audio=this.inactiveAudio;this.inactiveAudio=b}this.play()}.bind(this),1E3*d+this.playDelay);4===c.readyState||!c.readyState&&navigator.isCocoonJS?(c.readyState=4,c.currentTime=b,c.muted=this.muteFlag||c.muted,c.volume=this._volume,setTimeout(function(){c.play()},0)):(clearTimeout(this._onEndTimer),this._onEndTimer=null,function(){var b=function(){this.play();c.removeEventListener("canplaythrough",b,!1)}.bind(this);c.addEventListener("canplaythrough",b,!1)}())}}},stop:function(){this.bgmPlaying= !1;if(this.isSupported)if(this.webaudio){if(this.webaudio.source_loop._playing&&(this.webaudio.source_loop[this.webaudio.compatibility.stop](0),this.webaudio.source_loop._playing=!1,this.pausedTime+=this.webaudio.context.currentTime-this.webaudio.source_loop._startTime,this.pausedTime%=this.webaudio.source_loop.buffer.duration,this.webaudio.source_loop._startTime=0,"noteOn"===this.webaudio.compatibility.start))this.webaudio.source_once[this.webaudio.compatibility.stop](0)}else if(this.audio){var b= this.audio;this.pausedTime=b.currentTime;b.currentTime=0;b.pause();clearTimeout(this._onEndTimer);this._onEndTimer=null}},volume:function(b){this.isSupported&&(this._volume=b,0>this._volume?this._volume=0:1=b&&(b=c.settings.spritemap.music.start,ig.ua.android?this.forcelooped||(c.play(b,!0),this.forcelooped=!0,setTimeout(function(){ig.soundHandler.forcelooped=!1},d)):c.setCurrentTime(b)))}else"ImpactMusicPlayer"== this.bgmPlayer.tagName&&(null!=window.mozInnerScreenX&&/firefox/.test(navigator.userAgent.toLowerCase()),b=Boolean(window.chrome),!window.chrome&&/safari/.test(navigator.userAgent.toLowerCase()),d=0.1,ig.ua.mobile&&(d=0.115,ig.ua.android&&(d=0.45,b&&(d=0.3))),c=0,"mp3"==ig.soundManager.format.ext&&(c=0.05),ig.music.currentTrack&&(b=ig.music.currentTrack.duration-d,ig.music.currentTrack.currentTime>=b&&(ig.ua.android?this.forcelooped||(ig.music.currentTrack.pause(),ig.music.currentTrack.currentTime= c,ig.music.currentTrack.play(),this.forcelooped=!0,setTimeout(function(){ig.soundHandler.forcelooped=!1},d)):ig.music.currentTrack.currentTime=c)))}}})});this.START_BRANDING_SPLASH;ig.baked=!0; ig.module("plugins.branding.splash").requires("impact.impact","impact.entity").defines(function(){ig.BrandingSplash=ig.Class.extend({init:function(){ig.game.spawnEntity(EntityBranding,0,0)}});EntityBranding=ig.Entity.extend({gravityFactor:0,size:{x:32,y:32},splash:new ig.Image("branding/splash1.png"),init:function(b,c,d){this.parent(b,c,d);320>=ig.system.width?(this.size.x=320,this.size.y=200):(this.size.x=480,this.size.y=240);this.pos.x=(ig.system.width-this.size.x)/2;this.pos.y=-this.size.y-200; this.endPosY=(ig.system.height-this.size.y)/2;b=this.tween({pos:{y:this.endPosY}},0.5,{easing:ig.Tween.Easing.Bounce.EaseIn});c=this.tween({},2.5,{onComplete:function(){ig.game.director.loadLevel(ig.game.director.currentLevel)}});b.chain(c);b.start();this.currentAnim=this.anims.idle},createClickableLayer:function(){console.log("Build clickable layer");this.checkClickableLayer("branding-splash",_SETTINGS.Branding.Logo.Link,_SETTINGS.Branding.Logo.NewWindow)},doesClickableLayerExist:function(b){for(k in dynamicClickableEntityDivs)if(k== b)return!0;return!1},checkClickableLayer:function(b,c,d){"undefined"==typeof wm&&(this.doesClickableLayerExist(b)?(ig.game.showOverlay([b]),$("#"+b).find("[href]").attr("href",c)):this.createClickableOutboundLayer(b,c,"media/graphics/misc/invisible.png",d))},createClickableOutboundLayer:function(b,c,d,f){var j=ig.$new("div");j.id=b;document.body.appendChild(j);$("#"+j.id).css("float","left");$("#"+j.id).css("position","absolute");if(ig.ua.mobile){var m=window.innerHeight/mobileHeight,p=window.innerWidth/ mobileWidth;$("#"+j.id).css("left",this.pos.x*p);$("#"+j.id).css("top",this.pos.y*m);$("#"+j.id).css("width",this.size.x*p);$("#"+j.id).css("height",this.size.y*m)}else m=w/2-destW/2,p=h/2-destH/2,console.log(m,p),$("#"+j.id).css("left",m+this.pos.x*multiplier),$("#"+j.id).css("top",p+this.pos.y*multiplier),$("#"+j.id).css("width",this.size.x*multiplier),$("#"+j.id).css("height",this.size.y*multiplier);f?$("#"+j.id).html(""):$("#"+j.id).html("");dynamicClickableEntityDivs[b]={};dynamicClickableEntityDivs[b].width=this.size.x*multiplier;dynamicClickableEntityDivs[b].height=this.size.y*multiplier;dynamicClickableEntityDivs[b].entity_pos_x=this.pos.x;dynamicClickableEntityDivs[b].entity_pos_y=this.pos.y},draw:function(){ig.system.context.fillStyle="#ffffff";ig.system.context.fillRect(0,0,ig.system.width,ig.system.height);ig.system.context.fillStyle= "#000";ig.system.context.font="12px Arial";320>=ig.system.width?ig.system.context.fillText("powered by MarketJS.com",ig.system.width-150,ig.system.height-15):ig.system.context.fillText("powered by MarketJS.com",ig.system.width-160,ig.system.height-15);this.parent();this.splash&&ig.system.context.drawImage(this.splash.data,0,0,this.splash.data.width,this.splash.data.height,this.pos.x,this.pos.y,this.size.x,this.size.y)}})});this.END_BRANDING_SPLASH;ig.baked=!0; ig.module("game.entities.branding-logo-placeholder").requires("impact.entity").defines(function(){EntityBrandingLogoPlaceholder=ig.Entity.extend({gravityFactor:0,size:{x:32,y:32},_wmDrawBox:!0,_wmBoxColor:"rgba(0, 0, 255, 0.7)",init:function(b,c,d){this.parent(b,c,d);if(d)switch(console.log("settings found ... using that div layer name"),b=d.div_layer_name,console.log("settings.centralize:",d.centralize),d.centralize){case "true":console.log("centralize true");centralize=!0;break;case "false":console.log("centralize false"); centralize=!1;break;default:console.log("default ... centralize false"),centralize=!1}else b="branding-logo",centralize=!1;if("undefined"==typeof wm){if(_SETTINGS.Branding.Logo.Enabled)try{ig.game.spawnEntity(EntityBrandingLogo,this.pos.x,this.pos.y,{div_layer_name:b,centralize:centralize})}catch(f){console.log(f)}this.kill()}}})});this.START_BRANDING_LOGO;ig.baked=!0; ig.module("game.entities.branding-logo").requires("impact.entity").defines(function(){EntityBrandingLogo=ig.Entity.extend({gravityFactor:0,logo:new ig.AnimationSheet("branding/logo.png",_SETTINGS.Branding.Logo.Width,_SETTINGS.Branding.Logo.Height),size:{x:32,y:32},zIndex:10001,init:function(b,c,d){this.parent(b,c,d);"undefined"==typeof wm&&(_SETTINGS.Branding.Logo.Enabled?(this.size.x=_SETTINGS.Branding.Logo.Width,this.size.y=_SETTINGS.Branding.Logo.Height,d&&d.centralize&&(this.pos.x=ig.system.width/ 2-this.size.x/2,console.log("centralize true ... centering branded logo ..."))):this.kill());this.anims.idle=new ig.Animation(this.logo,0,[0],!0);this.currentAnim=this.anims.idle;d?(console.log("branding settings found ... using that div layer name"),b=d.div_layer_name):b="branding-logo";_SETTINGS.Branding.Logo.LinkEnabled&&(console.log("logo link enabled"),this.checkClickableLayer(b,_SETTINGS.Branding.Logo.Link,_SETTINGS.Branding.Logo.NewWindow));console.log("branding logo spawed ...")},doesClickableLayerExist:function(b){for(k in dynamicClickableEntityDivs)if(k== b)return!0;return!1},checkClickableLayer:function(b,c,d){"undefined"==typeof wm&&(this.doesClickableLayerExist(b)?(ig.game.showOverlay([b]),$("#"+b).find("[href]").attr("href",c)):this.createClickableOutboundLayer(b,c,"media/graphics/misc/invisible.png",d))},createClickableOutboundLayer:function(b,c,d,f){var j=ig.$new("div");j.id=b;document.body.appendChild(j);$("#"+j.id).css("float","left");$("#"+j.id).css("position","absolute");if(ig.ua.mobile){var m=window.innerHeight/mobileHeight,p=window.innerWidth/ mobileWidth;$("#"+j.id).css("left",this.pos.x*p);$("#"+j.id).css("top",this.pos.y*m);$("#"+j.id).css("width",this.size.x*p);$("#"+j.id).css("height",this.size.y*m)}else m=w/2-destW/2,p=h/2-destH/2,console.log(m,p),$("#"+j.id).css("left",m+this.pos.x*multiplier),$("#"+j.id).css("top",p+this.pos.y*multiplier),$("#"+j.id).css("width",this.size.x*multiplier),$("#"+j.id).css("height",this.size.y*multiplier);f?$("#"+j.id).html(""):$("#"+j.id).html("");dynamicClickableEntityDivs[b]={};dynamicClickableEntityDivs[b].width=this.size.x*multiplier;dynamicClickableEntityDivs[b].height=this.size.y*multiplier;dynamicClickableEntityDivs[b].entity_pos_x=this.pos.x;dynamicClickableEntityDivs[b].entity_pos_y=this.pos.y}})});this.END_BRANDING_LOGO;ig.baked=!0; ig.module("game.entities.button-more-games").requires("impact.entity").defines(function(){EntityButtonMoreGames=ig.Entity.extend({gravityFactor:0,animSheet:new ig.AnimationSheet("media/graphics/layout/menugame/button-moregames.png",97,97),size:{x:97,y:97},zIndex:1001,type:ig.Entity.TYPE.B,small:!1,big:!1,link:"",init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.pos.x=3*Math.floor(ig.system.width/4)-45;this.pos.y=280;"undefined"==typeof wm&&(_SETTINGS.MoreGames.Enabled? (d.div_layer_name?(console.log("settings found ... using that div layer name"),b=d.div_layer_name):b="more-games",console.log("div_layer_name:",b),this.checkClickableLayer(b,_SETTINGS.MoreGames.Link,_SETTINGS.MoreGames.NewWindow)):this.kill())},doesClickableLayerExist:function(b){for(k in dynamicClickableEntityDivs)if(k==b)return console.log("clickable layer already exists ..."),!0;console.log("doesnt exist yet ...");return!1},checkClickableLayer:function(b,c,d){"undefined"==typeof wm&&(this.doesClickableLayerExist(b)? (ig.game.showOverlay([b]),$("#"+b).find("[href]").attr("href",c)):this.createClickableOutboundLayer(b,c,"media/graphics/misc/invisible.png",d))},createClickableOutboundLayer:function(b,c,d,f){var j=ig.$new("div");j.id=b;document.body.appendChild(j);$("#"+j.id).css("float","left");$("#"+j.id).css("position","absolute");if(ig.ua.mobile){var m=window.innerHeight/mobileHeight,p=window.innerWidth/mobileWidth;$("#"+j.id).css("left",this.pos.x*p);$("#"+j.id).css("top",this.pos.y*m);$("#"+j.id).css("width", this.size.x*p);$("#"+j.id).css("height",this.size.y*m)}else m=document.getElementById("game").offsetLeft,p=document.getElementById("game").offsetTop,$("#"+j.id).css("left",m+this.pos.x*multiplier),$("#"+j.id).css("top",p+this.pos.y*multiplier),$("#"+j.id).css("width",this.size.x*multiplier),$("#"+j.id).css("height",this.size.y*multiplier);f?$("#"+j.id).html(""):$("#"+j.id).html("");dynamicClickableEntityDivs[b]={};dynamicClickableEntityDivs[b].width=this.size.x*multiplier;dynamicClickableEntityDivs[b].height=this.size.y*multiplier;dynamicClickableEntityDivs[b].entity_pos_x=this.pos.x;dynamicClickableEntityDivs[b].entity_pos_y=this.pos.y}})});ig.baked=!0; ig.module("game.entities.opening-shield").requires("impact.entity").defines(function(){EntityOpeningShield=ig.Entity.extend({size:{x:48,y:48},move:0,mIconAnim:0,shieldAnim:0,titleAnim:0,shieldImage:new ig.Image("media/graphics/opening/shield.png"),mIconImage:new ig.Image("media/graphics/opening/m_icon.png"),titleImage:new ig.Image("media/graphics/opening/title.png"),init:function(b,c,d){this.parent(b,c,d)},ready:function(){if(!ig.wm)if(_SETTINGS.DeveloperBranding.Splash.Enabled){this.initTimer=new ig.Timer(0.1); try{ig.soundHandler.sfxPlayer.play("openingSound")}catch(b){console.log(b)}}else ig.game.director.nextLevel(),ig.system.context.globalAlpha=1,this.kill()},update:function(){this.parent();this.updateOriginalShieldOpening()},draw:function(){this.parent();ig.global.wm||(this.nextLevelTimer&&0>this.nextLevelTimer.delta()&&(ig.system.context.globalAlpha=-this.nextLevelTimer.delta()),this.drawOriginalShieldOpening())},updateOriginalShieldOpening:function(){this.initTimer&&0this.shieldAnim?(this.shieldAnim++,this.sheildTimer.reset()):(this.sheildTimer=null,this.moveTimer=new ig.Timer(0.001),this.mIconTimer=new ig.Timer(0.05),this.titleTimer=new ig.Timer(0.15)));this.moveTimer&&0this.mIconAnim?(this.mIconAnim++,this.moveTimer.reset()):this.mIconTimer=null);this.titleTimer&& 0this.titleAnim?(this.titleAnim++,this.titleTimer.reset()):(this.titleTimer=null,this.nextLevelTimer=new ig.Timer(1)));this.nextLevelTimer&&0=j;j+=1)b.lineTo(0+800*Math.cos(2*j*Math.PI/48),0+800*Math.sin(2*j*Math.PI/48)),f++,2==f&&(f=0,b.lineTo(0,0));b.translate(-c,-d);c=b.createRadialGradient(c,d,100,c,d,250);c.addColorStop(0,"rgba(255,255,255,0.1)");c.addColorStop(1,"rgba(0,0,0,0)");b.fillStyle=c;b.fill();b.restore()}this.shieldImage.drawTile(ig.system.width/2-91,0-(768-ig.system.height)/2,this.shieldAnim,182,768);this.moveTimer&&(this.mIconImage.drawTile(ig.system.width/2-96,ig.system.height/2-70,this.mIconAnim,166, 160),this.titleImage.drawTile(ig.system.width/2-204,ig.system.height/2+100,this.titleAnim,409,76));ig.system.context.globalAlpha=1}})});ig.baked=!0; ig.module("game.entities.opening-kitty").requires("impact.entity").defines(function(){EntityOpeningKitty=ig.Entity.extend({size:{x:48,y:48},kittyAnim:-1,kittyImage:new ig.Image("media/graphics/opening/kitty.png"),kittyTitleImage:new ig.Image("media/graphics/opening/kittytitle.png"),init:function(b,c,d){this.parent(b,c,d)},ready:function(){ig.wm||(_SETTINGS.DeveloperBranding.Splash.Enabled?this.initTimer=new ig.Timer(0.1):(ig.game.director.nextLevel(),ig.system.context.globalAlpha=1,this.kill()))}, update:function(){this.parent();this.updateKittyOpening();this.unlockWebAudio()},unlockWebAudio:function(){if(ig.input.released("click"))try{ig.soundHandler.unlockWebAudio()}catch(b){}},draw:function(){this.parent();ig.global.wm||(this.nextLevelTimer&&0>this.nextLevelTimer.delta()&&(ig.system.context.globalAlpha=-this.nextLevelTimer.delta()),this.drawKittyOpening())},updateKittyOpening:function(){if(!ig.wm)if(_SETTINGS.DeveloperBranding.Splash.Enabled){if(this.initTimer&&0this.kittyAnim?(this.kittyAnim++,this.kittyTimer.reset()):(this.kittyTimer=null,this.nextLevelTimer=new ig.Timer(2)));this.nextLevelTimer&&0c&&(c=this.objectArray[a].zIndex, b=this.objectArray[a]);null!=b?("close"==b.name&&null!=this.hoveringItem&&"function"==typeof this.hoveringItem.idle&&this.hoveringItem!=b&&this.hoveringItem.idle(),this.hoveringItem=b,this.clickObject(b),this.objectArray=[]):(null!=this.hoveringItem&&"function"==typeof this.hoveringItem.idle&&(this.hoveringItem.idle(),this.hoveringItem=null),this.firstClick&&this.isReleased&&(this.firstClick=!1));this.isClicking=ig.input.pressed("click");this.isReleased=ig.input.released("click")}})});ig.baked=!0; ig.module("game.entities.pointer-selector").requires("game.entities.pointer").defines(function(){EntityPointerSelector=EntityPointer.extend({zIndex:1E3,_wmDrawBox:!0,_wmBoxColor:"rgba(0, 0, 255, 0.7)",size:{x:20,y:20},init:function(b,c,d){this.parent(b,c,d)}})});ig.baked=!0; ig.module("game.entities.select").requires("impact.entity").defines(function(){EntitySelect=ig.Entity.extend({type:ig.Entity.TYPE.B,checkAgainst:ig.Entity.TYPE.A,collides:ig.Entity.COLLIDES.NEVER,canSelect:!1,canSelectTimerDuration:0.35,zIndex:99999,isHovering:!1,isSelected:!1,init:function(b,c,d){this.parent(b,c,d);this.canSelectTimer=new ig.Timer(this.canSelectTimerDuration)},doesClickableLayerExist:function(b){for(k in dynamicClickableEntityDivs)if(k==b)return!0;return!1},checkClickableLayer:function(b, c,d){"undefined"==typeof wm&&(this.doesClickableLayerExist(b)?(ig.game.showOverlay([b]),$("#"+b).find("[href]").attr("href",c)):this.createClickableOutboundLayer(b,c,"media/graphics/misc/invisible.png",d))},createClickableOutboundLayer:function(b,c,d,f){var j=ig.$new("div");j.id=b;document.body.appendChild(j);$("#"+j.id).css("float","left");$("#"+j.id).css("width",this.size.x*multiplier);$("#"+j.id).css("height",this.size.y*multiplier);$("#"+j.id).css("position","absolute");var m=w/2-destW/2,p=h/ 2-destH/2;w==mobileWidth?($("#"+j.id).css("left",this.pos.x),$("#"+j.id).css("top",this.pos.y)):($("#"+j.id).css("left",m+this.pos.x*multiplier),$("#"+j.id).css("top",p+this.pos.y*multiplier));f?$("#"+j.id).html(""):$("#"+j.id).html("");dynamicClickableEntityDivs[b]={};dynamicClickableEntityDivs[b].width=$("#"+j.id).width();dynamicClickableEntityDivs[b].height= $("#"+j.id).height();dynamicClickableEntityDivs[b].entity_pos_x=this.pos.x;dynamicClickableEntityDivs[b].entity_pos_y=this.pos.y},hovered:function(){this.isHovering=!0;this.dehoverOthers()},dehoverOthers:function(){var b=ig.game.getEntitiesByType(EntitySelect);for(i=0;i=b&&(this.small=!1,this.big=!0)}else this.big&&1.2>this.scale.x&&(b=this.scale.x,b+=0.03,this.setScale(b,b),1<=b&&(this.big=this.small=!1,this.currentAnim!=this.anims.lock&&(ig.game.popupOpen="",ig.game.levelSelected=this.levelSelector+1+12*this.rowLevel,"function"==typeof this.fade.callFade&&this.fade.callFade(2))))}, draw:function(){this.parent();this.currentAnim!=this.anims.lock&&(this.context=ig.system.context,this.context.font="20pt happyhell",this.context.textAlign="center",this.context.fillStyle="#000000",this.context.fillText(this.levelSelector+1+12*this.rowLevel,this.pos.x+16,this.pos.y+20),this.context.fillStyle="#FFFFFF",this.context.fillText(this.levelSelector+1+12*this.rowLevel,this.pos.x+14,this.pos.y+18))}})});ig.baked=!0; ig.module("game.entities.button-close").requires("impact.entity").defines(function(){EntityButtonClose=ig.Entity.extend({size:{x:47,y:47},zIndex:1004,type:ig.Entity.TYPE.B,animSheet:new ig.AnimationSheet("media/graphics/layout/popup/button_xit.png",47,47),closeFor:"",timeChange:0,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.name="closebtn";this.closeFor=d.createBy;this.timer=new ig.Timer},update:function(){this.parent()},clicked:function(){if("option"== this.closeFor){var b=ig.game.getEntityByName("popupoption");"function"==typeof b.closeOption&&b.closeOption()}else b=ig.game.getEntityByName("levelselector"),"function"==typeof b.closeSelect&&b.closeSelect();ig.soundHandler.sfxPlayer.play("click")},released:function(){},draw:function(){this.parent()}})});ig.baked=!0; ig.module("game.entities.button-level-row").requires("impact.entity").defines(function(){EntityButtonLevelRow=ig.Entity.extend({size:{x:16,y:16},animSheet:new ig.AnimationSheet("media/graphics/game/level-row.png",16,16),type:ig.Entity.TYPE.B,zIndex:1004,levelrow:0,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.addAnim("select",1,[1]);this.currentAnim=this.anims.idle;this.levelrow=d.levelrow},ready:function(){this.popSelect=ig.game.getEntityByName("levelselector")},update:function(){this.currentAnim= this.levelrow==this.popSelect.levelRowSelect?this.anims.select:this.anims.idle},clicked:function(){"function"==typeof this.popSelect.changeLeveRow&&this.popSelect.changeLeveRow(this.levelrow);ig.soundHandler.sfxPlayer.play("click")},released:function(){}})});ig.baked=!0; ig.module("game.entities.popup-select-level").requires("impact.entity","game.entities.button-level-select","game.entities.button-close","game.entities.button-level-row").defines(function(){EntityPopupSelectLevel=ig.Entity.extend({zIndex:1002,size:{x:180,y:80},offset:{x:58,y:-50},animSheet:new ig.AnimationSheet("media/graphics/layout/popup/board_popup.png",299,247),levelBtn:[],levelRowBtn:[],levelRowSelect:0,barControl:new ig.Image("media/graphics/layout/popup/board_tittle_gameover.png"),barTitleLevel:new ig.Image("media/graphics/layout/popup/selectlevel.png"), init:function(b,c,d){this.parent(b,c,d);this.name="levelselector";this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;for(c=b=0;3>c;c++)for(d=0;4>d;d++)this.levelBtn.push(ig.game.spawnEntity(EntityButtonLevelSelect,this.pos.x-12+57*c,this.pos.y+91+56*d,{levelSelector:b})),b++;for(c=0;2>c;c++)this.levelRowBtn.push(ig.game.spawnEntity(EntityButtonLevelRow,this.pos.x-12+84,this.pos.y+250,{levelrow:c}))},draw:function(){this.parent();this.currentAnim=this.anims.idle;this.barControl.draw(this.pos.x, this.pos.y+30,0,0);this.barTitleLevel.draw(this.pos.x+10,this.pos.y+43,0,0)},update:function(){this.parent();for(var b=0,c=0;3>c;c++)for(var d=0;4>d;d++){var f=this.levelBtn[b];f.pos.x=this.pos.x-12+57*d;f.pos.y=this.pos.y+91+56*c;b++}c=ig.game.getEntityByName("closebtn");"select"==c.closeFor&&(c.pos.x=this.pos.x+200,c.pos.y=this.pos.y+34);for(c=0;cc;c++)for(var d=0;4>d;d++){var f=this.levelBtn[b];f.pos.x=this.pos.x-12+57*d;f.pos.y=this.pos.y+91+56*c;b++}b=ig.game.getEntityByName("closebtn");b.pos.x=this.pos.x+200;b.pos.y=this.pos.y+24;ig.game.popupOpen="";this.tween({pos:{x:230,y:600}},0.4,{easing:ig.Tween.Easing.Quadratic.EaseOut}).start()}, changeLeveRow:function(b){this.levelRowSelect=b;1==this.levelRowSelect?(this.levelRowBtn[1].selected=!0,this.levelRowBtn[0].selected=!1):(this.levelRowBtn[0].selected=!0,this.levelRowBtn[1].selected=!1);for(var c=0;12>c;c++){var d=this.levelBtn[c];d.rowLevel=b;"function"==typeof d.checkStar&&d.checkStar()}}})});ig.baked=!0; ig.module("game.entities.button-start").requires("impact.entity","game.entities.popup-select-level").defines(function(){EntityButtonStart=ig.Entity.extend({size:{x:97,y:97},zIndex:1001,type:ig.Entity.TYPE.B,animSheet:new ig.AnimationSheet("media/graphics/layout/menugame/button-pause.png",97,97),small:!1,big:!1,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.pos.x=2*Math.floor(ig.system.width/4)-45;this.pos.y=280},clicked:function(){""==ig.game.popupOpen&& (this.small=!0,ig.soundHandler.sfxPlayer.play("click"))},bigAgain:function(){},endUp:function(){var b=ig.game.getEntityByName("levelselector");"function"==typeof b.posChange&&""==ig.game.popupOpen&&b.posChange()},released:function(){},update:function(){this.parent();if(this.small&&0.8=b&&(this.small=!1,this.big=!0)}else this.big&&1.2>this.scale.x&&(b=this.scale.x,b+=0.03,this.setScale(b,b),1<=b&&(this.big=this.small=!1,b=ig.game.getEntityByName("levelselector"), "function"==typeof b.posChange&&""==ig.game.popupOpen&&b.posChange()))},draw:function(){this.parent()}})});ig.baked=!0; ig.module("game.entities.button-option").requires("impact.entity").defines(function(){EntityButtonOption=ig.Entity.extend({zIndex:1001,type:ig.Entity.TYPE.B,size:{x:97,y:97},animSheet:new ig.AnimationSheet("media/graphics/layout/menugame/button_setting.png",97,97),small:!1,big:!1,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.pos.x=Math.floor(ig.system.width/4)-45;this.pos.y=280},clicked:function(){""==ig.game.popupOpen&&(this.small=!0,ig.soundHandler.sfxPlayer.play("click"))}, released:function(){},update:function(){this.parent();if(this.small&&0.8=b&&(this.small=!1,this.big=!0)}else this.big&&1.2>this.scale.x&&(b=this.scale.x,b+=0.03,this.setScale(b,b),1<=b&&(this.big=this.small=!1,b=ig.game.getEntityByName("popupoption"),"function"==typeof b.callOption&&""==ig.game.popupOpen&&b.callOption()))},draw:function(){this.parent()}})});ig.baked=!0; ig.module("game.entities.button-control").requires("impact.entity").defines(function(){EntityButtonControl=ig.Entity.extend({zIndex:1005,size:{x:150,y:24},offset:{x:-50,y:0},animSheet:new ig.AnimationSheet("media/graphics/layout/popup/control.png",58,30),type:ig.Entity.TYPE.B,useFor:"",firstPosX:0,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.useFor=d.useFor;this.firstPosX=b},checkImageSound:function(){this.pos.x="music"==this.useFor?ig.game.music? this.firstPosX+54:this.firstPosX:ig.game.sound?this.firstPosX+54:this.firstPosX},checkMusicSound:function(){"music"==this.useFor?ig.game.music?(this.pos.x=this.firstPosX+54,ig.soundHandler.unmuteBGM(),ig.soundHandler.bgmPlayer.play(ig.soundHandler.bgmPlayer.soundList.background)):(this.pos.x=this.firstPosX,ig.soundHandler.muteBGM()):ig.game.sound?(this.pos.x=this.firstPosX+54,ig.soundHandler.unmuteSFX()):(this.pos.x=this.firstPosX,ig.soundHandler.muteSFX())},clicked:function(){ig.game.animPlay||("music"== this.useFor&&"option"==ig.game.popupOpen?ig.game.music=!ig.game.music:"sound"==this.useFor&&"option"==ig.game.popupOpen&&(ig.game.sound=!ig.game.sound),this.checkMusicSound(),ig.soundHandler.sfxPlayer.play("click"),ig.game.savePlayerSetting())},released:function(){}})});ig.baked=!0; ig.module("game.entities.button-pink").requires("impact.entity").defines(function(){EntityButtonPink=ig.Entity.extend({size:{x:100,y:45},animSheet:new ig.AnimationSheet("media/graphics/game/button-pink.png",100,45),zIndex:1004,type:ig.Entity.TYPE.B,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.name=d.nameBtn},update:function(){this.parent();if(this.small&&0.8=b&&(this.small= !1,this.big=!0)}else this.big&&1.2>this.scale.x&&(b=this.scale.x,b+=0.05,this.setScale(b,b),1<=b&&(this.big=this.small=!1,console.log("finish"),"ok"==this.name?(b=ig.game.getEntityByName("popupoption"),"function"==typeof b.closeOption&&b.closeOption()):"home"==this.name?(b=ig.game.getEntityByName("fade"),"function"==typeof b.callFade&&(ig.game.popupOpen="",b.callFade(1))):(b=ig.game.getEntityByName("popupcomplete"),"function"==typeof b.closePopup&&b.closePopup(1))))},clicked:function(){ig.game.animPlay|| (this.small=!0,ig.soundHandler.sfxPlayer.play("click"))},draw:function(){this.parent();this.context=ig.system.context;var b=this.name.toUpperCase();this.context.font="18pt happyhell";this.context.textAlign="center";this.context.fillStyle="#5b0f1f";this.context.fillText(b,this.pos.x+50,this.pos.y+30);this.context.fillStyle="#ffffd8";this.context.fillText(b,this.pos.x+48,this.pos.y+28)}})});ig.baked=!0; ig.module("game.entities.button-ok").requires("impact.entity").defines(function(){EntityButtonOk=ig.Entity.extend({size:{x:71,y:71},animSheet:new ig.AnimationSheet("media/graphics/layout/popup/button-ok.png",71,71),zIndex:1005,type:ig.Entity.TYPE.B,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.name=d.nameOk},update:function(){this.parent();if(this.small&&0.8=b&&(this.small= !1,this.big=!0)}else this.big&&1.2>this.scale.x&&(b=this.scale.x,b+=0.05,this.setScale(b,b),1<=b&&(this.big=this.small=!1,"ok"==this.name?(b=ig.game.getEntityByName("popupoption"),"function"==typeof b.closeOption&&b.closeOption()):(b=ig.game.getEntityByName("popupcomplete"),"function"==typeof b.closePopup&&b.closePopup(1))))},clicked:function(){this.small=!0;ig.soundHandler.sfxPlayer.play("click")},released:function(){}})});ig.baked=!0; ig.module("game.entities.popup-option").requires("impact.entity","game.entities.button-control","game.entities.button-pink","game.entities.button-ok").defines(function(){EntityPopupOption=ig.Entity.extend({zIndex:1002,size:{x:180,y:80},offset:{x:58,y:-20},animSheet:new ig.AnimationSheet("media/graphics/layout/popup/board_popup.png",299,247),buttonControl:[],barControl:new ig.Image("media/graphics/layout/popup/board_tittle_gameover.png"),barTitleOption:new ig.Image("media/graphics/layout/popup/options.png"), optMusic:new ig.Image("media/graphics/layout/popup/music.png"),optSound:new ig.Image("media/graphics/layout/popup/sound.png"),optBarControl:new ig.Image("media/graphics/layout/popup/bar_control.png"),optOn:new ig.Image("media/graphics/layout/popup/on.png"),optOff:new ig.Image("media/graphics/layout/popup/off.png"),init:function(b,c,d){this.parent(b,c,d);this.name="popupoption";this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.buttonControl.push(ig.game.spawnEntity(EntityButtonControl, this.pos.x+32,this.pos.y+(67*i+27),{useFor:"music"}));this.buttonControl.push(ig.game.spawnEntity(EntityButtonControl,this.pos.x+32,this.pos.y+(67*i+117),{useFor:"sound"}));ig.game.spawnEntity(EntityButtonOk,this.pos.x+200,this.pos.y+44,{nameOk:"ok"});ig.game.spawnEntity(EntityButtonClose,this.pos.x,this.pos.y+44,{createBy:"option"})},draw:function(){this.parent();this.currentAnim=this.anims.idle;this.barControl.draw(this.pos.x,this.pos.y+10,0,0);this.barTitleOption.draw(this.pos.x+35,this.pos.y+ 23,0,0);this.optMusic.draw(this.pos.x-20,this.pos.y+95,0,0);this.optBarControl.draw(this.pos.x+85,this.pos.y+92,0,0);this.optOn.draw(this.pos.x+100,this.pos.y+100,0,0);this.optOff.draw(this.pos.x+150,this.pos.y+100,0,0);this.optSound.draw(this.pos.x-20,this.pos.y+145,0,0);this.optBarControl.draw(this.pos.x+85,this.pos.y+142,0,0);this.optOn.draw(this.pos.x+100,this.pos.y+150,0,0);this.optOff.draw(this.pos.x+150,this.pos.y+150,0,0)},update:function(){this.parent();var b=ig.game.getEntityByName("closebtn"); "option"==b.closeFor&&(b.pos.x=this.pos.x+200,b.pos.y=this.pos.y+4);for(b=0;bthis.limitMove.right?this.pos.x=this.limitMove.right:220>this.pos.x&&(this.pos.x=220);else if(!ig.input.state("click")&&ig.game.blockCatch==this){ig.game.blockCatch= null;var b=ig.game.getEntityByName("boardcandy");"function"==typeof b.checkEveryBoardArray&&b.checkEveryBoardArray();this.gridPos.before!=this.gridPos.after&&(this.board.movement++,ig.soundHandler.sfxPlayer.play("swipe"))}},checkBlokPos:function(){for(var b=this.pos.x-220,c=0;64c;){f=b.arrayBoard[c][2];if(1==f){this.limitMove.right=64*(c-2)+220;break}c++}}},completeMoveMain:function(){var b=ig.game.getEntityByName("popupcomplete");"function"==typeof b.callPopup&&b.callPopup()},goingOutSide:function(){this.tween({pos:{x:660,y:176}},0.2,{easing:ig.Tween.Easing.Quadratic.EaseOut,onComplete:function(){this.completeMoveMain()}.bind(this)}).start()},clicking:function(){},released:function(){}})}); ig.baked=!0; ig.module("game.entities.blok-vertical").requires("impact.entity").defines(function(){EntityBlokVertical=ig.Entity.extend({size:{x:64,y:128},offset:{x:-2,y:-2},zIndex:150,type:ig.Entity.TYPE.B,firstThisY:0,movementPosY:0,limitMove:{up:48,down:432},gridPos:{x:0,y:0},animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/blok-v.png",65,130),init:function(b,c,d){this.parent(b,c,d);this.addAnim("blue",1,[0]);this.addAnim("orange",1,[1]);this.currentAnim=this.anims.blue;this.limitMove.down=304; this.name=d.nameblok},ready:function(){this.pointer=ig.game.getEntitiesByType(EntityPointer)[0]},update:function(){this.parent();if(ig.input.state("click")&&ig.game.blockCatch==this)this.pos.y=this.firstThisY+(this.pointer.pos.y-this.movementPosY),this.pos.ythis.limitMove.down&&(this.pos.y=this.limitMove.down);else if(!ig.input.state("click")&&ig.game.blockCatch==this){ig.game.blockCatch=null;var b=ig.game.getEntityByName("boardcandy"); "function"==typeof b.checkEveryBoardArray&&b.checkEveryBoardArray();this.gridPos.before!=this.gridPos.after&&(b.movement++,ig.soundHandler.sfxPlayer.play("swipe"))}},checkBlokPos:function(){for(var b=this.pos.x-220,c=this.pos.y-48,d=0,f=0;64f;){c=b.arrayBoard[d][f];if(1==c){this.limitMove.down=64*(f-2)+48;break}f++}}},clicking:function(){},released:function(){}})});ig.baked=!0; ig.module("game.entities.blok-vertical-long").requires("impact.entity").defines(function(){EntityBlokVerticalLong=ig.Entity.extend({size:{x:64,y:192},zIndex:150,type:ig.Entity.TYPE.B,movementPosY:0,firstThisY:0,limitMove:{up:48,down:432},gridPos:{before:0,after:0},animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/blok-v-l.png",64,197),init:function(b,c,d){this.parent(b,c,d);this.addAnim("blue",1,[0]);this.addAnim("orange",1,[1]);this.currentAnim=this.anims.blue;this.limitMove.down=240; this.name=d.nameblok},ready:function(){this.pointer=ig.game.getEntitiesByType(EntityPointer)[0]},update:function(){this.parent();if(ig.input.state("click")&&ig.game.blockCatch==this)this.pos.y=this.firstThisY+(this.pointer.pos.y-this.movementPosY),this.pos.ythis.limitMove.down&&(this.pos.y=this.limitMove.down);else if(!ig.input.state("click")&&ig.game.blockCatch==this){ig.game.blockCatch=null;var b=ig.game.getEntityByName("boardcandy"); "function"==typeof b.checkEveryBoardArray&&b.checkEveryBoardArray();this.gridPos.before!=this.gridPos.after&&(b.movement++,ig.soundHandler.sfxPlayer.play("swipe"))}},checkBlokPos:function(){for(var b=this.pos.x-220,c=this.pos.y-48,d=0,f=0;64f;){c=b.arrayBoard[d][f];if(1==c){this.limitMove.down=64*(f-3)+48;break}f++}}},clicking:function(){},released:function(){}})});ig.baked=!0; ig.module("game.entities.blok-horizontal").requires("impact.entity","game.entities.pointer").defines(function(){EntityBlokHorizontal=ig.Entity.extend({size:{x:128,y:64},offset:{x:2,y:4},zIndex:150,type:ig.Entity.TYPE.B,movementPosX:0,firstThisX:0,limitMove:{left:220,right:604},gridPos:{before:0,after:0},tweenActive:!1,animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/blok-h.png",129,73),init:function(b,c,d){this.parent(b,c,d);this.addAnim("blue",1,[1]);this.addAnim("orange",1,[0]);this.currentAnim= this.anims.blue;this.limitMove.right=476;this.name=d.nameblok},ready:function(){this.pointer=ig.game.getEntitiesByType(EntityPointer)[0];this.board=ig.game.getEntityByName("boardcandy")},update:function(){this.parent();if(ig.input.state("click")&&ig.game.blockCatch==this)this.pos.x=this.firstThisX+(this.pointer.pos.x-this.movementPosX),this.pos.xthis.limitMove.right?this.pos.x=this.limitMove.right:220>this.pos.x&&(this.pos.x=220);else if(!ig.input.state("click")&& ig.game.blockCatch==this){ig.game.blockCatch=null;var b=ig.game.getEntityByName("boardcandy");"function"==typeof b.checkEveryBoardArray&&b.checkEveryBoardArray();this.gridPos.before!=this.gridPos.after&&(this.board.movement++,ig.soundHandler.sfxPlayer.play("swipe"))}},checkBlokPos:function(){for(var b=this.pos.x-220,c=this.pos.y-48,d=0,f=0;64d;){c=b.arrayBoard[d][f];if(1==c){this.limitMove.right=64*(d-2)+220;break}d++}}},clicking:function(){},released:function(){}})});ig.baked=!0; ig.module("game.entities.blok-horizontal-long").requires("impact.entity","game.entities.pointer").defines(function(){EntityBlokHorizontalLong=ig.Entity.extend({size:{x:192,y:64},zIndex:150,type:ig.Entity.TYPE.B,firstThisX:0,movementPosX:0,limitMove:{left:220,right:604},gridPos:{before:0,after:0},animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/blok-h-l.png",194,68),init:function(b,c,d){this.parent(b,c,d);this.addAnim("blue",1,[1]);this.addAnim("orange",1,[0]);this.currentAnim=this.anims.blue; this.limitMove.right=412;this.name=d.nameblok},ready:function(){this.pointer=ig.game.getEntitiesByType(EntityPointer)[0];this.board=ig.game.getEntityByName("boardcandy")},update:function(){this.parent();if(ig.input.state("click")&&ig.game.blockCatch==this)this.pos.x=this.firstThisX+(this.pointer.pos.x-this.movementPosX),this.pos.xthis.limitMove.right?this.pos.x=this.limitMove.right:220>this.pos.x&&(this.pos.x=220);else if(!ig.input.state("click")&& ig.game.blockCatch==this){ig.game.blockCatch=null;var b=ig.game.getEntityByName("boardcandy");"function"==typeof b.checkEveryBoardArray&&b.checkEveryBoardArray();this.gridPos.before!=this.gridPos.after&&(this.board.movement++,ig.soundHandler.sfxPlayer.play("swipe"))}},checkBlokPos:function(){for(var b=this.pos.x-220,c=this.pos.y-48,d=0,f=0;64d;){c=b.arrayBoard[d][f];if(1==c){this.limitMove.right=64*(d-3)+220;break}d++}}},clicking:function(){},released:function(){}})});ig.baked=!0; ig.module("game.entities.blok-hint").requires("impact.entity").defines(function(){EntityBlokHint=ig.Entity.extend({size:{x:1,y:1},imgV:new ig.Image("media/graphics/layout/uigame/blok-v-t.png"),imgVL:new ig.Image("media/graphics/layout/uigame/blok-vl-t.png"),imgH:new ig.Image("media/graphics/layout/uigame/blok-h-t.png"),imgHL:new ig.Image("media/graphics/layout/uigame/blok-hl-t.png"),imgM:new ig.Image("media/graphics/layout/uigame/blok-m-t.png"),zIndex:110,vertical:!1,verticalLong:!1,horizontal:!1, horizontalLong:!1,mainblok:!1,posDraw:{x:0,y:0},init:function(b,c,d){this.parent(b,c,d)},clearDraw:function(){this.posDraw.x=0;this.posDraw.y=0;this.mainblok=this.horizontal=this.verticalLong=this.horizontalLong=this.vertical=!1},drawing:function(b,c,d){this.clearDraw();this.posDraw.x=b;this.posDraw.y=c;1==d?this.vertical=!0:2==d?this.verticalLong=!0:3==d?this.horizontal=!0:4==d?this.horizontalLong=!0:this.mainblok=!0},draw:function(){this.parent();this.vertical?this.imgV.draw(this.posDraw.x,this.posDraw.y): this.verticalLong?this.imgVL.draw(this.posDraw.x,this.posDraw.y):this.horizontal?this.imgH.draw(this.posDraw.x,this.posDraw.y):this.horizontalLong?this.imgHL.draw(this.posDraw.x,this.posDraw.y):this.mainblok&&this.imgM.draw(this.posDraw.x,this.posDraw.y)}})});ig.baked=!0; ig.module("game.entities.navigation").requires("impact.entity").defines(function(){EntityNavigation=ig.Entity.extend({size:{x:1,y:1},animSheet:new ig.AnimationSheet("media/graphics/game/navigation.png",40,40),offset:{x:20,y:20},zIndex:160,lockTarget:null,init:function(b,c,d){this.parent(b,c,d);this.addAnim("left",0.5,[1,4]);this.addAnim("right",0.5,[3,4]);this.addAnim("up",0.5,[0,4]);this.addAnim("down",0.5,[2,4]);this.addAnim("idle",0.5,[4]);this.currentAnim=this.anims.idle;this.name="navigation"}, changePos:function(b,c){this.lockTarget=c;null!=this.lockTarget&&(this.pos.x=this.lockTarget.pos.x+this.lockTarget.size.x/2,this.pos.y=this.lockTarget.pos.y+this.lockTarget.size.y/2);this.currentAnim=1==b?this.anims.left:2==b?this.anims.right:3==b?this.anims.up:4==b?this.anims.down:this.anims.idle},update:function(){this.parent();null!=this.lockTarget&&(this.pos.x=this.lockTarget.pos.x+this.lockTarget.size.x/2,this.pos.y=this.lockTarget.pos.y+this.lockTarget.size.y/2)}})});ig.baked=!0; ig.module("game.entities.button-replay").requires("impact.entity").defines(function(){EntityButtonReplay=ig.Entity.extend({size:{x:71,y:71},animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/button-replay.png",71,71),zIndex:1005,type:ig.Entity.TYPE.B,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle},update:function(){this.parent();if(this.small&&0.8=b&&(this.small=!1,this.big= !0)}else this.big&&1.2>this.scale.x&&(b=this.scale.x,b+=0.04,this.setScale(b,b),1<=b&&(this.big=this.small=!1,console.log("finish"),b=ig.game.getEntityByName("popupcomplete"),"function"==typeof b.closePopup&&b.closePopup(0)))},clicked:function(){this.small=!0;ig.soundHandler.sfxPlayer.play("click")},released:function(){}})});ig.baked=!0; ig.module("game.entities.level-complete").requires("impact.entity","game.entities.button-replay","game.entities.button-ok").defines(function(){EntityLevelComplete=ig.Entity.extend({size:{x:304,y:10},animSheet:new ig.AnimationSheet("media/graphics/layout/popup/level-complete.png",304,251),zIndex:1004,btnFollow:[],init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle;this.btnFollow.push(ig.game.spawnEntity(EntityButtonReplay,this.pos.x-100,this.pos.y+165)); this.btnFollow.push(ig.game.spawnEntity(EntityButtonOk,this.pos.x+100,this.pos.y+165));this.name="popupcomplete"},backFirstPos:function(){ig.game.popupOpen="";this.pos.x=-400;ig.game.director.reloadLevel()},closePopup:function(b){1==b&&(ig.game.levelSelected++,24b;b++)for(var c=0;6>c;c++)this.arrayBoard[b][c]=0},addingBoardArray:function(){for(var b=0;bthis.movement+1)ig.game.movementCount[ig.game.levelSelected-1]=this.movement+1;ig.game.savePlayerStats();b=ig.game.getEntityByName("mainblok"); "function"==typeof b.goingOutSide&&b.goingOutSide()}},hint:function(){ig.game.hintActive=!0;var b=ig.game.getEntityByName("fade");"function"==typeof b.callFade&&b.callFade(2)},hintGive:function(){if(1==ig.game.levelSelected){for(var b=0;b=b&&(this.small=!1,this.big=!0)}else this.big&& 1.2>this.scale.x&&(b=this.scale.x,b+=0.03,this.setScale(b,b),1<=b&&(this.big=this.small=!1,b=ig.game.getEntityByName("levelselector"),"function"==typeof b.posChange&&""==ig.game.popupOpen&&b.posChange()))},clicked:function(){ig.game.animPlay||""!=ig.game.popupOpen||(this.small=!0,ig.soundHandler.sfxPlayer.play("click"))},released:function(){}})});ig.baked=!0; ig.module("game.entities.hud-level").requires("impact.entity").defines(function(){EntityHudLevel=ig.Entity.extend({size:{x:177,y:123},animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/hud_level.png",177,123),stars:0,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle},ready:function(){this.levelSelect=ig.game.levelSelected-1;var b=ig.game.movementCount[this.levelSelect],c=ig.game.idealMove[this.levelSelect];0!=b&&b<=c?this.stars=3:0!=b&& b<=c+3?this.stars=2:0!=b&&(this.stars=1)},draw:function(){this.parent();this.context=ig.system.context;this.context.font="36pt happyhell";this.context.textAlign="center";this.context.fillStyle="#000000";this.context.fillText(this.levelSelect+1,this.pos.x+88,this.pos.y+74);this.context.fillStyle="#FFFFFF";this.context.fillText(this.levelSelect+1,this.pos.x+86,this.pos.y+72);for(var b=0;b=b&&(this.small=!1,this.big=!0)}else this.big&& 1.2>this.scale.x&&(b=this.scale.x,b+=0.03,this.setScale(b,b),1<=b&&(this.big=this.small=!1,b=ig.game.getEntityByName("popupoption"),"function"==typeof b.callOption&&""==ig.game.popupOpen&&b.callOption()))},clicked:function(){""!=ig.game.popupOpen||ig.game.animPlay||(this.small=!0,ig.soundHandler.sfxPlayer.play("click"))},released:function(){}})});ig.baked=!0; ig.module("game.entities.hud-moves").requires("impact.entity").defines(function(){EntityHudMoves=ig.Entity.extend({size:{x:177,y:123},animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/hud_moves.png",177,123),init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle},ready:function(){this.board=ig.game.getEntityByName("boardcandy");this.moveBefore=ig.game.movementCount[ig.game.levelSelected-1]},draw:function(){this.parent();this.context=ig.system.context; this.context.font="36pt happyhell";this.context.textAlign="center";this.context.fillStyle="#000000";this.context.fillText(this.board.movement,this.pos.x+88,this.pos.y+76);this.context.fillStyle="#FFFFFF";this.context.fillText(this.board.movement,this.pos.x+86,this.pos.y+74);0==this.moveBefore?(this.context.font="20pt happyhell",this.context.textAlign="center",this.context.fillStyle="#000000",this.context.fillText("Record : - ",this.pos.x+90,this.pos.y+100),this.context.fillStyle="#FFFFFF",this.context.fillText("Record : - ", this.pos.x+88,this.pos.y+98)):(this.context.font="20pt happyhell",this.context.textAlign="center",this.context.fillStyle="#000000",this.context.fillText("Record : "+this.moveBefore,this.pos.x+90,this.pos.y+100),this.context.fillStyle="#FFFFFF",this.context.fillText("Record : "+this.moveBefore,this.pos.x+88,this.pos.y+98))}})});ig.baked=!0; ig.module("game.entities.button-retry").requires("impact.entity").defines(function(){EntityButtonRetry=ig.Entity.extend({size:{x:71,y:71},animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/button-replay.png",71,71),type:ig.Entity.TYPE.B,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle},ready:function(){this.fade=ig.game.getEntityByName("fade")},update:function(){this.parent();if(this.small&&0.8=b&&(this.small=!1,this.big=!0)}else this.big&&1.2>this.scale.x&&(b=this.scale.x,b+=0.03,this.setScale(b,b),1<=b&&(this.big=this.small=!1,""==ig.game.popupOpen&&"function"==typeof this.fade.callFade&&this.fade.callFade(2)))},clicked:function(){ig.game.animPlay||""!=ig.game.popupOpen||(this.small=!0,ig.soundHandler.sfxPlayer.play("click"))},released:function(){}})});ig.baked=!0; ig.module("game.entities.button-hint").requires("impact.entity").defines(function(){EntityButtonHint=ig.Entity.extend({size:{x:71,y:71},animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/button-support.png",71,71),type:ig.Entity.TYPE.B,init:function(b,c,d){this.parent(b,c,d);this.addAnim("idle",1,[0]);this.currentAnim=this.anims.idle},update:function(){this.parent();if(this.small&&0.8=b&&(this.small=!1,this.big=!0)}else this.big&& 1.2>this.scale.x&&(b=this.scale.x,b+=0.03,this.setScale(b,b),1<=b&&(this.big=this.small=!1,b=ig.game.getEntityByName("boardcandy"),"function"==typeof b.hint&&b.hint()))},clicked:function(){ig.game.animPlay||""!=ig.game.popupOpen||(this.small=!0,ig.soundHandler.sfxPlayer.play("click"))},released:function(){}})});ig.baked=!0; ig.module("game.entities.button-arrow").requires("impact.entity").defines(function(){EntityButtonArrow=ig.Entity.extend({size:{x:22,y:44},type:ig.Entity.TYPE.B,animSheet:new ig.AnimationSheet("media/graphics/layout/uigame/arrow.png",22,44),small:!1,big:!1,init:function(b,c,d){this.parent(b,c,d);this.addAnim("left",1,[0]);this.addAnim("right",1,[1]);this.timer=new ig.Timer;this.currentAnim="left"==d.anim?this.anims.left:this.anims.right;this.timer=new ig.Timer},update:function(){this.parent();if(this.small&& 0.8=b&&(this.small=!1,this.big=!0)}else this.big&&1.2>this.scale.x&&(b=this.scale.x,b+=0.03,this.setScale(b,b),1<=b&&(this.big=this.small=!1,this.currentAnim==this.anims.left?1ig.game.levelSelected&&ig.game.levelSelected++,"function"==typeof this.fade.callFade&&this.fade.callFade(2)))},ready:function(){this.fade=ig.game.getEntityByName("fade")},clicked:function(){ig.game.animPlay|| ""!=ig.game.popupOpen||(this.small=!0,ig.soundHandler.sfxPlayer.play("click"))},clicking:function(){},released:function(){}})});ig.baked=!0; ig.module("game.levels.level-easy").requires("impact.image","game.entities.background","game.entities.board","game.entities.button-pause","game.entities.hud-level","game.entities.button-settings","game.entities.hud-moves","game.entities.button-retry","game.entities.button-hint","game.entities.pointer","game.entities.button-arrow","game.entities.fade-screen").defines(function(){LevelLevelEasy={entities:[{type:"EntityBackground",x:0,y:0,settings:{zIndex:10}},{type:"EntityBoard",x:195,y:26,settings:{zIndex:100}}, {type:"EntityButtonPause",x:12,y:290,settings:{zIndex:200}},{type:"EntityHudLevel",x:12,y:26,settings:{zIndex:200}},{type:"EntityButtonSettings",x:112,y:380,settings:{zIndex:200}},{type:"EntityHudMoves",x:12,y:158,settings:{zIndex:200}},{type:"EntityButtonRetry",x:12,y:380,settings:{zIndex:200}},{type:"EntityButtonHint",x:112,y:290,settings:{zIndex:300}},{type:"EntityPointer",x:0,y:0},{type:"EntityButtonArrow",x:35,y:65,settings:{zIndex:300,anim:"left"}},{type:"EntityButtonArrow",x:145,y:65,settings:{zIndex:300}}, {type:"EntityFadeScreen",x:0,y:0,settings:{zIndex:1200}}],layer:[]}});ig.baked=!0; ig.module("game.main").requires("impact.game","plugins.splash-loader","plugins.tween","plugins.url-parameters","plugins.jukebox","plugins.director","plugins.impact-storage","plugins.scale","plugins.animation-scaling","plugins.fullscreen","plugins.handlers.dom-handler","plugins.handlers.size-handler","plugins.handlers.api-handler","plugins.safesites","plugins.audio.sound-handler","plugins.branding.splash","game.entities.branding-logo-placeholder","game.entities.branding-logo","game.entities.button-more-games", "game.entities.opening-shield","game.entities.opening-kitty","game.entities.pointer","game.entities.pointer-selector","game.entities.select","game.levels.opening","game.levels.test-desktop","game.levels.test-mobile","game.levels.gameplay","game.levels.level-easy").defines(function(){this.START_OBFUSCATION;this.FRAMEBREAKER;MyGame=ig.Game.extend({blockCatch:null,hintCatch:null,winLevel:!1,levelSelected:1,popupOpen:"",lockLevel:[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],movementCount:[0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],idealMove:[5,7,9,9,7,10,10,11,12,12,12,13,16,17,15,15,21,21,21,22,24,24,25,25],music:!0,sound:!0,hintActive:!1,animPlay:!1,firstClick:!1,init:function(){ig.ua.mobile?document.body.addEventListener("touchstart",this.onclickDocument):document.body.addEventListener("click",this.onclickDocument);this.setupMarketJsGameCenter();this.setupControls();this.setupLocalStorage();this.removeLoadingWheel();this.injectMobileLink();this.setupURLParameters();this.finalize()}, onclickDocument:function(){!1==ig.game.firstClick&&(ig.game.webaudioPlugin&&ig.game.webaudioPlugin.webaudio&&ig.game.webaudioPlugin.webaudio.context&&ig.game.webaudioPlugin.webaudio.context.state&&"running"!==ig.game.webaudioPlugin.webaudio.context.state&&ig.game.webaudioPlugin.webaudio.context.resume(),ig.game.firstClick=!0,ig.ua.mobile?document.removeEventListener("touchstart",this.onclickDocument):document.removeEventListener("click",this.onclickDocument),window.setTimeout(function(){ig.game.webaudioPlugin&& ig.game.webaudioPlugin.webaudio&&ig.game.webaudioPlugin.webaudio.context&&ig.game.webaudioPlugin.webaudio.context.state&&"running"!==ig.game.webaudioPlugin.webaudio.context.state&&ig.game.webaudioPlugin.webaudio.context.resume()},200))},setupMarketJsGameCenter:function(){_SETTINGS&&(_SETTINGS.MarketJSGameCenter?(_SETTINGS.MarketJSGameCenter.Activator.Enabled&&_SETTINGS.MarketJSGameCenter.Activator.Position&&(console.log("MarketJSGameCenter activator settings present ...."),$(".gamecenter-activator").css("top", _SETTINGS.MarketJSGameCenter.Activator.Position.Top),$(".gamecenter-activator").css("left",_SETTINGS.MarketJSGameCenter.Activator.Position.Left)),$(".gamecenter-activator").show()):console.log("MarketJSGameCenter settings not defined in game settings"))},initSfx:function(){},finalize:function(){ig.game.startGame();sizeHandler()},injectMobileLink:function(){$("#play").attr("onclick","ig.game.pressPlay();ig.soundHandler.staticSound.play();")},removeLoadingWheel:function(){try{$("#ajaxbar").css("background", "none")}catch(b){console.log(b)}},showDebugMenu:function(){console.log("showing debug menu ...");ig.Entity._debugShowBoxes=!0;$(".ig_debug").show()},setupLocalStorage:function(){this.storage=new ig.Storage;this.getPlayerStats();this.getPlayerSetting()},savePlayerSetting:function(){null!=this.storage&&(this.storage.set("car-park-puzzle-soundActive",this.sound),this.storage.set("car-park-puzzle-musicActive",this.music))},getPlayerSetting:function(){null!=this.storage&&(null!=this.storage.get("car-park-puzzle-soundActive")&& (this.sound=this.storage.get("car-park-puzzle-soundActive")),null!=this.storage.get("car-park-puzzle-musicActive")&&(this.music=this.storage.get("car-park-puzzle-musicActive")))},savePlayerStats:function(){null!=this.storage&&(this.storage.set("levelStatsCpp",this.lockLevel),this.storage.set("movementStatsCpp",this.movementCount))},getPlayerStats:function(){if(null!=this.storage){var b=this.storage.get("levelStatsCpp");null!=b&&(this.lockLevel=b);b=this.storage.get("movementStatsCpp");null!=b&&(this.movementCount= b)}},startGame:function(){this.resetPlayerStats();this.director=new ig.Director(this,[LevelOpening,LevelGameplay,LevelLevelEasy]);if(_SETTINGS.Branding.Splash.Enabled)try{this.branding=new ig.BrandingSplash}catch(b){console.log(b),console.log("Loading original levels ..."),this.director.loadLevel(this.director.currentLevel)}else this.director.loadLevel(this.director.currentLevel);ig.ua.mobile?this.music?ig.soundHandler.bgmPlayer.play(ig.soundHandler.bgmPlayer.soundList.background):(ig.soundHandler.bgmPlayer.play(ig.soundHandler.bgmPlayer.soundList.background), ig.soundHandler.muteBGM()):this.music?ig.soundHandler.bgmPlayer.play(ig.soundHandler.bgmPlayer.soundList.background):ig.soundHandler.muteBGM();this.sound?ig.soundHandler.unmuteSFX():ig.soundHandler.muteSFX()},fpsCount:function(){this.fpsTimer||(this.fpsTimer=new ig.Timer(1));this.fpsTimer&&0>this.fpsTimer.delta()?null!=this.fpsCounter?this.fpsCounter++:this.fpsCounter=0:(ig.game.fps=this.fpsCounter,this.fpsCounter=0,this.fpsTimer.reset())},endGame:function(){console.log("End game");ig.soundHandler.stopBackgroundMusic(); ig.ua.mobile&&_SETTINGS.Ad.Mobile.End.Enabled&&MobileAdInGameEnd.Initialize();ig.apiHandler.run("MJSEnd")},resetPlayerStats:function(){ig.log("resetting player stats ...");this.playerStats={id:this.playerStats?this.playerStats.id:null}},setupControls:function(){ig.input.unbindAll();ig.input.initMouse();ig.input.bind(ig.KEY.MOUSE1,"click")},setupURLParameters:function(){this.setupURLParameters=new ig.UrlParameters},pressPlay:function(){this.hideOverlay(["play"]);this.startGame();ig.ua.mobile&&_SETTINGS.Ad.Mobile.Footer.Enabled&& MobileAdInGameFooter.Initialize();ig.ua.mobile&&_SETTINGS.Ad.Mobile.Header.Enabled&&MobileAdInGameHeader.Initialize()},pauseGame:function(){ig.system.stopRunLoop.call(ig.system);console.log("Game Paused")},resumeGame:function(){ig.system.startRunLoop.call(ig.system);console.log("Game Resumed")},showOverlay:function(b){for(i=0;ithis.debug.length||this.debug.splice(0,1),this.debug.push(b), this.debugLine++):(this.debug=[],this.debugLine=1,this.debug.push(b));console.log(b)},debugEnable:function(){ig.input.pressed("click")&&(this.debugEnableTimer=new ig.Timer(2));this.debugEnableTimer&&0>this.debugEnableTimer.delta()?ig.input.released("click")&&(this.debugEnableTimer=null):this.debugEnableTimer&&0