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", More:"More Games",BestTime:"Best Time",Play:"Play",Instructions:"Find all the words in the list; as quickly as possible !;; What is your best score?;; HINT: Words can be found; horizontally, vertically; and backwards".split(";"),PuzzleSolvedIn:["Puzzle Solved","in"],Unplayed:"Unplayed",Instruction:"Instructions",Settings:"Settings",Easy:"Easy",Medium:"Medium",Hard:"Hard",NewGame:"New Game",MainMenu:"Main Menu",Sound:"Sound",Music:"Music",title:"Pirates;Navigation;Treasures;Ruins;Dangerous Animals;Legendary Creatures;Deities;Explorers;Countries;Gemstones;Snakes".split(";"), Pirates:"Pirates",Navigation:"Navigation",Treasures:"Treasures",Ruins:"Ruins","Dangerous Animals":"Dangerous Animals","Legendary Creatures":"Legendary Creatures",Deities:"Deities",Explorers:"Explorers",Countries:"Countries",Gemstones:"Gemstones",Snakes:"Snakes",Difficulty:[null,"(Easy)","(Medium)","(Hard)"],letterData:"abcdefghijklmnopqrstuvwxyz",dictionary:{Artists:[null,"homer kahlo munch picasso raphael renoir rubens titan vermeer warhol".split(" "),"blake cassatt cezanne davinci dali degas durer eakins hopper klmit leger mondrian rembrandt velazquez vermeer".split(" "), "angelico arcimboldo arp bernini blake cassatt cezanne courbet dali donatello durer eyck fragonard gauguin kandinsky klee klmit magritte manet mondrian moore okeeffe renoir rivera rubens titan vangogh velazquez vermeer warhol".split(" ")],Pirates:[null,"adventure ahoy aye booty buccaneer cannon captain chanty crew crossbones eyepatch gold island jollyroger mutiny parrot pegleg plank privateer rum sail ship treasure".split(" "),"adventure ahoy aye booty buccaneer cannon captain chanty crew crossbones eyepatch gold island jollyroger mutiny parrot pegleg plank privateer rum sail ship treasure".split(" "), "adventure ahoy aye booty buccaneer cannon captain chanty crew crossbones eyepatch gold island jollyroger mutiny parrot pegleg plank privateer rum sail ship treasure".split(" ")],Navigation:[null,"beacon cartography chart compass direction east latitude longitude map maritime nautical navigator north pilot quadrant radar radio sextant sonar south stars west".split(" "),"beacon cartography chart compass direction east latitude longitude map maritime nautical navigator north pilot quadrant radar radio sextant sonar south stars west".split(" "), "beacon cartography chart compass direction east latitude longitude map maritime nautical navigator north pilot quadrant radar radio sextant sonar south stars west".split(" ")],Treasures:[null,"amulet brooch chalice chest circlet coin crown crystal gem gold jewel mask medallion necklace painting relic ring scroll shield signet sword tiara tome".split(" "),"amulet brooch chalice chest circlet coin crown crystal gem gold jewel mask medallion necklace painting relic ring scroll shield signet sword tiara tome".split(" "), "amulet brooch chalice chest circlet coin crown crystal gem gold jewel mask medallion necklace painting relic ring scroll shield signet sword tiara tome".split(" ")],Ruins:[null,"angkor ayutthaya baalbek bagan borobudur cappadocia colosseum copan giza jerash longmen luxor moai mycenae nanmadol palenque palmyra parthenon petra pompeii stonehenge taprohm tikal tiwanaku tulum volubilis".split(" "),"angkor ayutthaya baalbek bagan borobudur cappadocia colosseum copan giza jerash longmen luxor moai mycenae nanmadol palenque palmyra parthenon petra pompeii stonehenge taprohm tikal tiwanaku tulum volubilis".split(" "), "angkor ayutthaya baalbek bagan borobudur cappadocia colosseum copan giza jerash longmen luxor moai mycenae nanmadol palenque palmyra parthenon petra pompeii stonehenge taprohm tikal tiwanaku tulum volubilis".split(" ")],"Dangerous Animals":[null,"alligator bear coyote crocodile elephant hyena jackal jaguar jellyfish leopard lion piranha pufferfish scorpion shark snake spider tiger wildboar wilddog wolf wolverine".split(" "),"alligator bear coyote crocodile elephant hyena jackal jaguar jellyfish leopard lion piranha pufferfish scorpion shark snake spider tiger wildboar wilddog wolf wolverine".split(" "), "alligator bear coyote crocodile elephant hyena jackal jaguar jellyfish leopard lion piranha pufferfish scorpion shark snake spider tiger wildboar wilddog wolf wolverine".split(" ")],"Legendary Creatures":[null,"barghest basilisk centaur chimera cockatrice cyclops dragon fairy ghoul gorgon griffin harpy hippogriff hydra jackalope kirin kraken lamassu leprechaun manticore minotaur naga pegasus pheonix roc satyr siren sphinx strigoi troll unicorn vampire werewolf wyvern yeti".split(" "),"barghest basilisk centaur chimera cockatrice cyclops dragon fairy ghoul gorgon griffin harpy hippogriff hydra jackalope kirin kraken lamassu leprechaun manticore minotaur naga pegasus pheonix roc satyr siren sphinx strigoi troll unicorn vampire werewolf wyvern yeti".split(" "), "barghest basilisk centaur chimera cockatrice cyclops dragon fairy ghoul gorgon griffin harpy hippogriff hydra jackalope kirin kraken lamassu leprechaun manticore minotaur naga pegasus pheonix roc satyr siren sphinx strigoi troll unicorn vampire werewolf wyvern yeti".split(" ")],Deities:[null,"anubis bast hathor amun isis maat osiris ptah ra thoth vishnu shiva brahma ganesha kali thor odin baldr freyja loki zeus poseidon hades apollo artemis aphrodite ares athena hermes hera".split(" "),"anubis bast hathor amun isis maat osiris ptah ra thoth vishnu shiva brahma ganesha kali thor odin baldr freyja loki zeus poseidon hades apollo artemis aphrodite ares athena hermes hera".split(" "), "anubis bast hathor amun isis maat osiris ptah ra thoth vishnu shiva brahma ganesha kali thor odin baldr freyja loki zeus poseidon hades apollo artemis aphrodite ares athena hermes hera".split(" ")],Explorers:[null,"alvares amundsen cabot cartier cavendish clark columbus cook cortes cousteau dagama dias drake ericksson faxian hillary hudson ibnbattuta lewis magellan messner peary pizarro polo raleigh sacagawea smith vespucci zhenghe".split(" "),"alvares amundsen cabot cartier cavendish clark columbus cook cortes cousteau dagama dias drake ericksson faxian hillary hudson ibnbattuta lewis magellan messner peary pizarro polo raleigh sacagawea smith vespucci zhenghe".split(" "), "alvares amundsen cabot cartier cavendish clark columbus cook cortes cousteau dagama dias drake ericksson faxian hillary hudson ibnbattuta lewis magellan messner peary pizarro polo raleigh sacagawea smith vespucci zhenghe".split(" ")],Countries:[null,"albania algeria bulgaria cambodia chile china cyprus denmark egypt england france greece guatemala india iran ireland italy jordan malta mexico pakistan peru romania scotland serbia spain syria thailand turkey".split(" "),"albania algeria bulgaria cambodia chile china cyprus denmark egypt england france greece guatemala india iran ireland italy jordan malta mexico pakistan peru romania scotland serbia spain syria thailand turkey".split(" "), "albania algeria bulgaria cambodia chile china cyprus denmark egypt england france greece guatemala india iran ireland italy jordan malta mexico pakistan peru romania scotland serbia spain syria thailand turkey".split(" ")],Gemstones:[null,"agate amethyst aquamarine beryl bloodstone carnelian chrysolite cinnabar citrine diamond emerald feldspar garnet hyacinth jade jasper moonstone onyx opal pearl pearl peridot quartz ruby sapphire sardonyx spinel sunstone topaz tourmaline turquoise zircon".split(" "), "agate amethyst aquamarine beryl bloodstone carnelian chrysolite cinnabar citrine diamond emerald feldspar garnet hyacinth jade jasper moonstone onyx opal pearl pearl peridot quartz ruby sapphire sardonyx spinel sunstone topaz tourmaline turquoise zircon".split(" "),"agate amethyst aquamarine beryl bloodstone carnelian chrysolite cinnabar citrine diamond emerald feldspar garnet hyacinth jade jasper moonstone onyx opal pearl pearl peridot quartz ruby sapphire sardonyx spinel sunstone topaz tourmaline turquoise zircon".split(" ")], Snakes:[null,"adder anaconda asp boa boiga boomslang bushmaster cantil cobra copperhead habu keelback krait lancehead mamba mamushi python racer rinkhals sidewinder taipan urutu viper yarara".split(" "),"adder anaconda asp boa boiga boomslang bushmaster cantil cobra copperhead habu keelback krait lancehead mamba mamushi python racer rinkhals sidewinder taipan urutu viper yarara".split(" "),"adder anaconda asp boa boiga boomslang bushmaster cantil cobra copperhead habu keelback krait lancehead mamba mamushi python racer rinkhals sidewinder taipan urutu viper yarara".split(" ")]}}, Results:{Title:"High score"}};var _SETTINGS={MarketJSGameCenter:{Activator:{Enabled:!1,Position:{Top:"15%",Left:"0"}},API:{Enabled:!1,Log:{Events:{InitializeGame:!0,EndGame:!0,Level:{Begin:!0,End:!0,Win:!0,Lose:!0,Draw:!0}}}}},API:{Enabled:!1,Log:{Events:{InitializeGame:!0,EndGame:!0,Level:{Begin:!0,End:!0,Win:!0,Lose:!0,Draw:!0}}}},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:!0, 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:!0,Width:166,Height:61}},MoreGames:{Enabled:!0,Link:"http://www.marketjs.com/game/links/mobile",NewWindow:!0},Gamecenter:{Enabled:!1},TapToStartAudioUnlock:{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,q,x){if(x===c&&1===b.nodeType)if(x="data-"+q.replace(sc,"-$1").toLowerCase(),x=b.getAttribute(x),"string"==typeof x){try{x="true"===x?!0:"false"===x?!1:"null"===x?null:+x+""===x?+x:tc.test(x)?l.parseJSON(x):x}catch(e){}l.data(b,q,x)}else x=c;return x}function f(b){for(var q in b)if(!("data"===q&&l.isEmptyObject(b[q]))&&"toJSON"!==q)return!1;return!0}function g(){return!1}function m(){return!0}function r(b){return!b||!b.parentNode||11===b.parentNode.nodeType}function t(b, q){do b=b[q];while(b&&1!==b.nodeType);return b}function e(b,q,c){q=q||0;if(l.isFunction(q))return l.grep(b,function(b,v){return!!q.call(b,v,b)===c});if(q.nodeType)return l.grep(b,function(b){return b===q===c});if("string"==typeof q){var e=l.grep(b,function(b){return 1===b.nodeType});if(vc.test(q))return l.filter(q,e,!c);q=l.filter(q,e)}return l.grep(b,function(b){return 0<=l.inArray(b,q)===c})}function n(b){var q=wb.split("|");b=b.createDocumentFragment();if(b.createElement)for(;q.length;)b.createElement(q.pop()); return b}function p(b,q){if(1===q.nodeType&&l.hasData(b)){var c,e,d;e=l._data(b);var g=l._data(q,e),B=e.events;if(B)for(c in delete g.handle,g.events={},B){e=0;for(d=B[c].length;eq;q+=2)"margin"===c&&(d+=l.css(b,c+ca[q],!0)),e?("content"===c&&(d-=parseFloat(N(b,"padding"+ca[q]))||0),"margin"!==c&&(d-=parseFloat(N(b,"border"+ca[q]+"Width"))||0)):(d+= parseFloat(N(b,"padding"+ca[q]))||0,"padding"!==c&&(d+=parseFloat(N(b,"border"+ca[q]+"Width"))||0));return d}function za(b,q,c){var e="width"===q?b.offsetWidth:b.offsetHeight,d=!0,g=l.support.boxSizing&&"border-box"===l.css(b,"boxSizing");if(0>=e||null==e){e=N(b,q);if(0>e||null==e)e=b.style[q];if(Aa.test(e))return e;d=g&&(l.support.boxSizingReliable||e===b.style[q]);e=parseFloat(e)||0}return e+la(b,q,c||(g?"border":"content"),d)+"px"}function sa(b){if(Ya[b])return Ya[b];var q=l("<"+b+">").appendTo(z.body), c=q.css("display");q.remove();if("none"===c||""===c){ma=z.body.appendChild(ma||l.extend(z.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!na||!ma.createElement)na=(ma.contentWindow||ma.contentDocument).document,na.write(""),na.close();q=na.body.appendChild(na.createElement(b));c=N(q,"display");z.body.removeChild(ma)}return Ya[b]=c,c}function da(b,q,c,e){var d;if(l.isArray(q))l.each(q,function(q,l){c||xc.test(b)?e(b,l):da(b+"["+("object"==typeof l?q:"")+"]", l,c,e)});else if(!c&&"object"===l.type(q))for(d in q)da(b+"["+d+"]",q[d],c,e);else e(b,q)}function E(b){return function(q,c){"string"!=typeof q&&(c=q,q="*");var e,d,g=q.toLowerCase().split(ea),B=0,n=g.length;if(l.isFunction(c))for(;Bc&&e?q:(B.resolveWith(b,[f]),!1)},f=B.promise({elem:b,props:l.extend({},q),opts:l.extend(!0,{specialEasing:{}},c),originalProperties:q,originalOptions:c,startTime:Ba||Ab(),duration:c.duration,tweens:[],createTween:function(q,c){var x=l.Tween(b,f.opts,q,c,f.opts.specialEasing[q]||f.opts.easing);return f.tweens.push(x),x},stop:function(q){for(var c=0,x=q?f.tweens.length:0;cl;l+=2-q)c=ca[l],e["margin"+c]=e["padding"+c]=b;return q&&(e.opacity=e.width=b),e}function Cb(b){return l.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,Y=Array.prototype.slice,Fb=Array.prototype.indexOf,Dc=Object.prototype.toString,$a=Object.prototype.hasOwnProperty,ab=String.prototype.trim,l=function(b,q){return new l.fn.init(b,q,Db)},Fa=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,Ec=/\S/,ea=/\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,q){return(q+"").toUpperCase()},Ga=function(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",Ga,!1),l.ready()):"complete"===z.readyState&&(z.detachEvent("onreadystatechange",Ga),l.ready())},Hb={};l.fn=l.prototype={constructor:l,init:function(b,q,x){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]||!q)){if(e[1])return q=q instanceof l?q[0]:q,d=q&&q.nodeType?q.ownerDocument||q:z,b=l.parseHTML(e[1],d,!0),Gb.test(e[1])&&l.isPlainObject(q)&&this.attr.call(b,q,!0),l.merge(this,b);if((q=z.getElementById(e[2]))&&q.parentNode){if(q.id!==e[2])return x.find(b);this.length=1;this[0]=q}return this.context=z,this.selector=b,this}return!q||q.jquery?(q||x).find(b):this.constructor(q).find(b)}return l.isFunction(b)?x.ready(b): (b.selector!==c&&(this.selector=b.selector,this.context=b.context),l.makeArray(b,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return Y.call(this)},get:function(b){return null==b?this.toArray():0>b?this[this.length+b]:this[b]},pushStack:function(b,q,c){b=l.merge(this.constructor(),b);return b.prevObject=this,b.context=this.context,"find"===q?b.selector=this.selector+(this.selector?" ":"")+c:q&&(b.selector=this.selector+"."+q+"("+c+")"),b},each:function(b, q){return l.each(this,b,q)},ready:function(b){return l.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(Y.apply(this,arguments),"slice",Y.call(arguments).join(","))},map:function(b){return this.pushStack(l.map(this,function(q,c){return b.call(q,c,q)}))},end:function(){return this.prevObject||this.constructor(null)},push:Eb,sort:[].sort,splice:[].splice}; l.fn.init.prototype=l.fn;l.extend=l.fn.extend=function(){var b,q,x,e,d,g,B=arguments[0]||{},f=1,n=arguments.length,p=!1;"boolean"==typeof B&&(p=B,B=arguments[1]||{},f=2);"object"!=typeof B&&!l.isFunction(B)&&(B={});for(n===f&&(B=this,--f);fe?Math.max(0,l+e):e:0;e
a";Ha=I.getElementsByTagName("*");ga=I.getElementsByTagName("a")[0];ga.style.cssText="top:1px;float:left;opacity:.5";if(!Ha||!Ha.length)bb={};else{Ia=z.createElement("select");Ja=Ia.appendChild(z.createElement("option"));R=I.getElementsByTagName("input")[0];L={leadingWhitespace:3===I.firstChild.nodeType,tbody:!I.getElementsByTagName("tbody").length,htmlSerialize:!!I.getElementsByTagName("link").length, style:/top/.test(ga.getAttribute("style")),hrefNormalized:"/a"===ga.getAttribute("href"),opacity:/^0.5/.test(ga.style.opacity),cssFloat:!!ga.style.cssFloat,checkOn:"on"===R.value,optSelected:Ja.selected,getSetAttribute:"t"!==I.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};R.checked=!0;L.noCloneChecked=R.cloneNode(!0).checked;Ia.disabled=!0;L.optDisabled=!Ja.disabled;try{delete I.test}catch(Qd){L.deleteExpando=!1}!I.addEventListener&&I.attachEvent&&I.fireEvent&&(I.attachEvent("onclick",Jb=function(){L.noCloneEvent=!1}),I.cloneNode(!0).fireEvent("onclick"),I.detachEvent("onclick",Jb));R=z.createElement("input");R.value="t";R.setAttribute("type","radio");L.radioValue="t"===R.value;R.setAttribute("checked", "checked");R.setAttribute("name","t");I.appendChild(R);ha=z.createDocumentFragment();ha.appendChild(I.lastChild);L.checkClone=ha.cloneNode(!0).cloneNode(!0).lastChild.checked;L.appendChecked=R.checked;ha.removeChild(R);ha.appendChild(I);if(I.attachEvent)for(cb in{submit:!0,change:!0,focusin:!0})Ka="on"+cb,(va=Ka in I)||(I.setAttribute(Ka,"return;"),va="function"==typeof I[Ka]),L[cb+"Bubbles"]=va;bb=(l(function(){var v,c,e,l,d=z.getElementsByTagName("body")[0];d&&(v=z.createElement("div"),v.style.cssText= "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",d.insertBefore(v,d.firstChild),c=z.createElement("div"),v.appendChild(c),c.innerHTML="
t
",e=c.getElementsByTagName("td"),e[0].style.cssText="padding:0;margin:0;border:0;display:none",va=0===e[0].offsetHeight,e[0].style.display="",e[1].style.display="none",L.reliableHiddenOffsets=va&&0===e[0].offsetHeight,c.innerHTML="",c.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%;", L.boxSizing=4===c.offsetWidth,L.doesNotIncludeMarginInBodyOffset=1!==d.offsetTop,b.getComputedStyle&&(L.pixelPosition="1%"!==(b.getComputedStyle(c,null)||{}).top,L.boxSizingReliable="4px"===(b.getComputedStyle(c,null)||{width:"4px"}).width,l=z.createElement("div"),l.style.cssText=c.style.cssText="padding:0;margin:0;border:0;display:block;overflow:hidden;",l.style.marginRight=l.style.width="0",c.style.width="1px",c.appendChild(l),L.reliableMarginRight=!parseFloat((b.getComputedStyle(l,null)||{}).marginRight)), "undefined"!=typeof c.style.zoom&&(c.innerHTML="",c.style.cssText="padding:0;margin:0;border:0;display:block;overflow:hidden;width:1px;padding:1px;display:inline;zoom:1",L.inlineBlockNeedsLayout=3===c.offsetWidth,c.style.display="block",c.style.overflow="visible",c.innerHTML="
",c.firstChild.style.width="5px",L.shrinkWrapBlocks=3!==c.offsetWidth,v.style.zoom=1),d.removeChild(v))}),ha.removeChild(I),Ha=ga=Ia=Ja=R=ha=I=null,L)}Oc.support=bb;var tc=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,sc=/([A-Z])/g; l.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(l.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?l.cache[b[l.expando]]:b[l.expando],!!b&&!f(b)},data:function(b,q,e,d){if(l.acceptData(b)){var g,f,n=l.expando,p="string"==typeof q,s=b.nodeType,m=s?l.cache:b,u=s?b[n]:b[n]&&n;if(u&&m[u]&&(d||m[u].data)||!(p&&e===c)){u||(s?b[n]=u=l.deletedIds.pop()||l.guid++:u=n);m[u]||(m[u]={}, s||(m[u].toJSON=l.noop));if("object"==typeof q||"function"==typeof q)d?m[u]=l.extend(m[u],q):m[u].data=l.extend(m[u].data,q);return g=m[u],d||(g.data||(g.data={}),g=g.data),e!==c&&(g[l.camelCase(q)]=e),p?(f=g[q],null==f&&(f=g[l.camelCase(q)])):f=g,f}}},removeData:function(b,c,e){if(l.acceptData(b)){var d,g,n,B=b.nodeType,p=B?l.cache:b,s=B?b[l.expando]:l.expando;if(p[s]){if(c&&(d=e?p[s]:p[s].data)){l.isArray(c)||(c in d?c=[c]:(c=l.camelCase(c),c in d?c=[c]:c=c.split(" ")));g=0;for(n=c.length;gf.indexOf(" "+c[n]+" ")&&(f+=c[n]+" ");g.className=l.trim(f)}}return this},removeClass:function(b){var q, e,d,g,f,n,p;if(l.isFunction(b))return this.each(function(c){l(this).removeClass(b.call(this,c,this.className))});if(b&&"string"==typeof b||b===c){q=(b||"").split(ea);n=0;for(p=this.length;nd)return null;b=n?d:0;for(e=n?d+1:f.length;br.indexOf(":")?"on"+r:"",d){if(v.result=c,v.target||(v.target=d),e=null!=e?l.makeArray(e):[],e.unshift(v),m=l.event.special[r]||{},!(m.trigger&&!1===m.trigger.apply(d,e))){t=[[d,m.bindType||r]];if(!g&&!m.noBubble&&!l.isWindow(d)){n=m.delegateType||r;f=Qb.test(n+r)?d:d.parentNode;for(p=d;f;f=f.parentNode)t.push([f,n]), p=f;p===(d.ownerDocument||z)&&t.push([p.defaultView||p.parentWindow||b,n])}for(n=0;nm&&y.push({elem:this,matches:s.slice(m)});for(e=0;eK.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,ja=/\\(?!\\)/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")},aa=function(b){var c=V.createElement("div");try{return b(c)}catch(e){return!1}finally{}},ed=aa(function(b){return b.appendChild(V.createComment("")),!b.getElementsByTagName("*").length}),fd=aa(function(b){return b.innerHTML="",b.firstChild&&"undefined"!==typeof b.firstChild.getAttribute&&"#"===b.firstChild.getAttribute("href")}), gd=aa(function(b){b.innerHTML="";b=typeof b.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),Tb=aa(function(b){return b.innerHTML="",!b.getElementsByClassName||!b.getElementsByClassName("e").length?!1:(b.lastChild.className="e",2===b.getElementsByClassName("e").length)}),hd=aa(function(b){b.id=J+0;b.innerHTML="
";U.insertBefore(b,U.firstChild);var c=V.getElementsByName&& V.getElementsByName(J).length===2+V.getElementsByName(J+0).length;return mb=!V.getElementById(J),U.removeChild(b),c});try{pa.call(U.childNodes,0)[0].nodeType}catch(Rd){pa=function(b){for(var c,e=[];c=this[b];b++)e.push(c);return e}}D.matches=function(b,c){return D(b,null,null,c)};D.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(ja,""),b[3]=(b[4]||b[5]||"").replace(ja,""),"~="===b[2]&&(b[3]=" "+b[3]+" "),b.slice(0,4)},CHILD:function(b){return b[1]=b[1].toLowerCase(),"nth"===b[1]?(b[2]||D.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]&&D.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(ja,""),function(c){return c.getAttribute("id")===b}}:function(b){return b=b.replace(ja,""),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(ja,"").toLowerCase(),function(c){return c.nodeName&&c.nodeName.toLowerCase()===b})},CLASS:function(b){var c=$b[J][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=D.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:ia(function(b,c){for(var e=0;ee?e+c:e;0<=--c;)b.push(c);return b}),gt:ia(function(b,c,e){for(e=0>e?e+c:e;++e";b.querySelectorAll(":enabled").length||X.push(":enabled", ":disabled")});X=RegExp(X.join("|"));eb=function(b,c,e,d,l){if(!d&&!l&&(!X||!X.test(b))){var g,f,n=!0,p=J;f=c;g=9===c.nodeType&&b;if(1===c.nodeType&&"object"!==c.nodeName.toLowerCase()){g=Pa(b);(n=c.getAttribute("id"))?p=n.replace(jd,"\\$&"):c.setAttribute("id",p);p="[id='"+p+"'] ";for(f=g.length;f--;)g[f]=p+g[f].join("");f=kb.test(b)&&c.parentNode||c;g=g.join(",")}if(g)try{return oa.apply(e,pa.call(f.querySelectorAll(g),0)),e}catch(s){}finally{n||c.removeAttribute("id")}}return id(b,c,e,d,l)};Ua&& (aa(function(b){cc=Ua.call(b,"div");try{Ua.call(b,"[test!='']:sizzle"),Ta.push("!=",pb)}catch(c){}}),Ta=RegExp(Ta.join("|")),D.matchesSelector=function(b,c){c=c.replace(kd,"='$1']");if(!La(b)&&!Ta.test(c)&&(!X||!X.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,T={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},hc=n(z),sb=hc.appendChild(z.createElement("div"));T.optgroup= T.option;T.tbody=T.tfoot=T.colgroup=T.caption=T.thead;T.th=T.td;l.support.htmlSerialize||(T._default=[1,"X
","
"]);l.fn.extend({text:function(b){return l.access(this,function(b){return b===c?l.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(b))},null,b,arguments.length)},wrapAll:function(b){if(l.isFunction(b))return this.each(function(c){l(this).wrapAll(b.call(this,c))});if(this[0]){var c=l(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 l.isFunction(b)?this.each(function(c){l(this).wrapInner(b.call(this,c))}):this.each(function(){var c=l(this),e=c.contents();e.length?e.wrapAll(b):c.append(b)})},wrap:function(b){var c=l.isFunction(b);return this.each(function(e){l(this).wrapAll(c?b.call(this,e):b)})},unwrap:function(){return this.parent().each(function(){l.nodeName(this,"body")|| l(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(!r(this[0]))return this.domManip(arguments,!1,function(b){this.parentNode.insertBefore(b,this)});if(arguments.length){var b=l.clean(arguments);return this.pushStack(l.merge(b, this),"before",this.selector)}},after:function(){if(!r(this[0]))return this.domManip(arguments,!1,function(b){this.parentNode.insertBefore(b,this.nextSibling)});if(arguments.length){var b=l.clean(arguments);return this.pushStack(l.merge(this,b),"after",this.selector)}},remove:function(b,c){for(var e,d=0;null!=(e=this[d]);d++)if(!b||l.filter(b,[e]).length)!c&&1===e.nodeType&&(l.cleanData(e.getElementsByTagName("*")),l.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&&l.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 l.clone(this,b,c)})},html:function(b){return l.access(this,function(b){var e=this[0]||{},d=0,g=this.length;if(b===c)return 1===e.nodeType?e.innerHTML.replace(od,""):c;if("string"==typeof b&&!rd.test(b)&&(l.support.htmlSerialize||!rb.test(b))&&(l.support.leadingWhitespace||!qb.test(b))&& !T[(fc.exec(b)||["",""])[1].toLowerCase()]){b=b.replace(ec,"<$1>");try{for(;dp.length&&e===z&&"<"===p.charAt(0)&&!sd.test(p)&&(l.support.checkClone||!gc.test(p))&&(l.support.html5Clone||!rb.test(p))&&(f=!0,g=l.fragments[p],n=g!==c),g||(g=e.createDocumentFragment(),l.clean(b,e,g,d),f&&(l.fragments[p]=n&&g)),{fragment:g,cacheable:f}};l.fragments={};l.each({appendTo:"append", prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,c){l.fn[b]=function(e){var d,g=0,f=[];e=l(e);var n=e.length;d=1===this.length&&this[0].parentNode;if((null==d||d&&11===d.nodeType&&1===d.childNodes.length)&&1===n)return e[c](this[0]),this;for(;g")?n=b.cloneNode(!0):(sb.innerHTML=b.outerHTML,sb.removeChild(n=sb.firstChild));if((!l.support.noCloneEvent||!l.support.noCloneChecked)&&(1===b.nodeType||11===b.nodeType)&&!l.isXMLDoc(b)){s(b,n);d=u(b);g=u(n);for(f=0;d[f];++f)g[f]&&s(d[f],g[f])}if(c&&(p(b,n),e)){d=u(b);g=u(n);for(f=0;d[f];++f)p(d[f],g[f])}return n},clean:function(b,c,e,d){var g,f,p,s,m,u,t,r=c===z&&hc,A=[];if(!c||"undefined"==typeof c.createDocumentFragment)c=z;for(g=0;null!=(p=b[g]);g++)if("number"==typeof p&&(p+=""),p){if("string"== typeof p)if(qd.test(p)){r=r||n(c);u=c.createElement("div");r.appendChild(u);p=p.replace(ec,"<$1>");f=(fc.exec(p)||["",""])[1].toLowerCase();s=T[f]||T._default;m=s[0];for(u.innerHTML=s[1]+p+s[2];m--;)u=u.lastChild;if(!l.support.tbody){m=pd.test(p);s="table"===f&&!m?u.firstChild&&u.firstChild.childNodes:""===s[1]&&!m?u.childNodes:[];for(f=s.length-1;0<=f;--f)l.nodeName(s[f],"tbody")&&!s[f].childNodes.length&&s[f].parentNode.removeChild(s[f])}!l.support.leadingWhitespace&&qb.test(p)&&u.insertBefore(c.createTextNode(qb.exec(p)[0]), u.firstChild);p=u.childNodes;u.parentNode.removeChild(u)}else p=c.createTextNode(p);p.nodeType?A.push(p):l.merge(A,p)}u&&(p=u=r=null);if(!l.support.appendChecked)for(g=0;null!=(p=A[g]);g++)l.nodeName(p,"input")?y(p):"undefined"!=typeof p.getElementsByTagName&&l.grep(p.getElementsByTagName("input"),y);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(g=0;null!=(p=A[g]);g++)if(!l.nodeName(p,"script")||!b(p))e.appendChild(p), "undefined"!=typeof p.getElementsByTagName&&(t=l.grep(l.merge([],p.getElementsByTagName("script")),b),A.splice.apply(A,[g+1,0].concat(t)),g+=t.length)}return A},cleanData:function(b,c){for(var e,d,g,f,n=0,p=l.expando,s=l.cache,m=l.support.deleteExpando,u=l.event.special;null!=(g=b[n]);n++)if(c||l.acceptData(g))if(e=(d=g[p])&&s[d]){if(e.events)for(f in e.events)u[f]?l.event.remove(g,f):l.removeEvent(g,f,e.handle);s[d]&&(delete s[d],m?delete g[p]:g.removeAttribute?g.removeAttribute(p):g[p]=null,l.deletedIds.push(d))}}}); var Va,ba;l.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=l.uaMatch(Ac.userAgent);ba={};Va.browser&&(ba[Va.browser]=!0,ba.version=Va.version);ba.chrome?ba.webkit=!0:ba.webkit&&(ba.safari=!0);l.browser=ba;l.sub=function(){function b(c,e){return new b.fn.init(c, e)}l.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 l&&!(d instanceof b)&&(d=b(d)),l.fn.init.call(this,e,d,c)};b.fn.init.prototype=b.fn;var c=b(z);return b};var N,ma,na,tb=/alpha\([^)]*\)/i,vd=/opacity=([^)]*)/,wd=/^(top|right|bottom|left)$/,xd=/^(none|table(?!-c[ea]).+)/,ic=/^margin/,wc=RegExp("^("+Fa+")(.*)$","i"),Aa=RegExp("^("+Fa+")(?!px)[a-z%]+$","i"),yd=RegExp("^([-+])=("+Fa+")","i"),Ya={},zd={position:"absolute", visibility:"hidden",display:"block"},jc={letterSpacing:0,fontWeight:400},ca=["Top","Right","Bottom","Left"],yb=["Webkit","O","Moz","ms"],Ad=l.fn.toggle;l.fn.extend({css:function(b,e){return l.access(this,function(b,e,d){return d!==c?l.style(b,e,d):l.css(b,e)},b,e,1e;e++)l[b+ca[e]+c]=d[e]||d[e-2]||d[0];return l}};ic.test(b)||(l.cssHooks[b+c].set=F)});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;l.fn.extend({serialize:function(){return l.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?l.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=l(this).val();return null==e?null:l.isArray(e)?l.map(e,function(b){return{name:c.name,value:b.replace(kc,"\r\n")}}):{name:c.name,value:e.replace(kc,"\r\n")}}).get()}}); l.param=function(b,e){var d,g=[],f=function(b,c){c=l.isFunction(c)?c():null==c?"":c;g[g.length]=encodeURIComponent(b)+"="+encodeURIComponent(c)};e===c&&(e=l.ajaxSettings&&l.ajaxSettings.traditional);if(l.isArray(b)||b.jquery&&!l.isPlainObject(b))l.each(b,function(){f(this.name,this.value)});else for(d in b)da(d,b[d],e,f);return g.join("&").replace(Bd,"+")};var qa,ka,Ed=/#.*$/,Fd=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Gd=/^(?:GET|HEAD)$/,Hd=/^\/\//,lc=/\?/,Id=/)<[^<]*)*<\/script>/gi, Jd=/([?&])_=[^&]*/,mc=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,nc=l.fn.load,Za={},oc={},pc=["*/"]+["*"];try{ka=zc.href}catch(Sd){ka=z.createElement("a"),ka.href="",ka=ka.href}qa=mc.exec(ka.toLowerCase())||[];l.fn.load=function(b,e,d){if("string"!=typeof b&&nc)return nc.apply(this,arguments);if(!this.length)return this;var g,f,n,p=this,s=b.indexOf(" ");return 0<=s&&(g=b.slice(s,b.length),b=b.slice(0,s)),l.isFunction(e)?(d=e,e=c):e&&"object"==typeof e&&(f="POST"),l.ajax({url:b,type:f,dataType:"html", data:e,complete:function(b,c){d&&p.each(d,n||[b.responseText,c,b])}}).done(function(b){n=arguments;p.html(g?l("
").append(b.replace(Id,"")).find(g):b)}),this};l.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(b,c){l.fn[c]=function(b){return this.on(c,b)}});l.each(["get","post"],function(b,e){l[e]=function(b,d,g,f){return l.isFunction(d)&&(f=f||g,g=d,d=c),l.ajax({type:e,url:b,data:d,success:g,dataType:f})}});l.extend({getScript:function(b,e){return l.get(b, c,e,"script")},getJSON:function(b,c,e){return l.get(b,c,e,"json")},ajaxSetup:function(b,c){return c?ta(b,l.ajaxSettings):(c=b,b=l.ajaxSettings),ta(b,c),b},ajaxSettings:{url:ka,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(qa[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":l.parseJSON,"text xml":l.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:E(Za),ajaxTransport:E(oc),ajax:function(b,e){function d(b,e,n,q){var m,v,t,x,M,Q=e;if(2!==F){F=2;s&&clearTimeout(s);p=c;f=q||"";G.readyState=0b||304===b)if(r.ifModified&&(M=G.getResponseHeader("Last-Modified"),M&&(l.lastModified[g]=M),M=G.getResponseHeader("Etag"),M&&(l.etag[g]=M)),304===b)Q="notmodified",m=!0;else{var P;a:{m=r;v=x;var N,Q=m.dataTypes.slice();n=Q[0];S= {};D=0;m.dataFilter&&(v=m.dataFilter(v,m.dataType));if(Q[1])for(P in m.converters)S[P.toLowerCase()]=m.converters[P];for(;t=Q[++D];)if("*"!==t){if("*"!==n&&n!==t){P=S[n+" "+t]||S["* "+t];if(!P)for(N in S)if(M=N.split(" "),M[1]===t&&(P=S[n+" "+M[0]]||S["* "+M[0]])){!0===P?P=S[N]:!0!==S[N]&&(t=M[0],Q.splice(D--,0,t));break}if(!0!==P)if(P&&m["throws"])v=P(v);else try{v=P(v)}catch(O){P={state:"parsererror",error:P?O:"No conversion from "+n+" to "+t};break a}}n=t}P={state:"success",data:v}}m=P;Q=m.state; v=m.data;t=m.error;m=!t}else if(t=Q,!Q||b)Q="error",0>b&&(b=0);G.status=b;G.statusText=(e||Q)+"";m?C.resolveWith(y,[v,Q,G]):C.rejectWith(y,[G,Q,t]);G.statusCode(H);H=c;u&&A.trigger("ajax"+(m?"Success":"Error"),[G,r,m?v:t]);z.fireWith(y,[G,Q]);u&&(A.trigger("ajaxComplete",[G,r]),--l.active||l.event.trigger("ajaxStop"))}}"object"==typeof b&&(e=b,b=c);e=e||{};var g,f,n,p,s,m,u,t,r=l.ajaxSetup({},e),y=r.context||r,A=y!==r&&(y.nodeType||y instanceof l)?l(y):l.event,C=l.Deferred(),z=l.Callbacks("once memory"), H=r.statusCode||{},D={},E={},F=0,I="canceled",G={readyState:0,setRequestHeader:function(b,c){if(!F){var e=b.toLowerCase();b=E[e]=E[e]||b;D[b]=c}return this},getAllResponseHeaders:function(){return 2===F?f:null},getResponseHeader:function(b){var e;if(2===F){if(!n)for(n={};e=Fd.exec(f);)n[e[1].toLowerCase()]=e[2];e=n[b.toLowerCase()]}return e===c?null:e},overrideMimeType:function(b){return F||(r.mimeType=b),this},abort:function(b){return b=b||I,p&&p.abort(b),d(0,b),this}};C.promise(G);G.success=G.done; G.error=G.fail;G.complete=z.add;G.statusCode=function(b){if(b){var c;if(2>F)for(c in b)H[c]=[H[c],b[c]];else c=b[G.status],G.always(c)}return this};r.url=((b||r.url)+"").replace(Ed,"").replace(Hd,qa[1]+"//");r.dataTypes=l.trim(r.dataType||"*").toLowerCase().split(ea);null==r.crossDomain&&(m=mc.exec(r.url.toLowerCase())||!1,r.crossDomain=m&&m.join(":")+(m[3]?"":"http:"===m[1]?80:443)!==qa.join(":")+(qa[3]?"":"http:"===qa[1]?80:443));r.data&&r.processData&&"string"!=typeof r.data&&(r.data=l.param(r.data, r.traditional));fa(Za,r,e,G);if(2===F)return G;u=r.global;r.type=r.type.toUpperCase();r.hasContent=!Gd.test(r.type);u&&0===l.active++&&l.event.trigger("ajaxStart");if(!r.hasContent&&(r.data&&(r.url+=(lc.test(r.url)?"&":"?")+r.data,delete r.data),g=r.url,!1===r.cache)){m=l.now();var K=r.url.replace(Jd,"$1_="+m);r.url=K+(K===r.url?(lc.test(r.url)?"&":"?")+"_="+m:"")}(r.data&&r.hasContent&&!1!==r.contentType||e.contentType)&&G.setRequestHeader("Content-Type",r.contentType);r.ifModified&&(g=g||r.url, l.lastModified[g]&&G.setRequestHeader("If-Modified-Since",l.lastModified[g]),l.etag[g]&&G.setRequestHeader("If-None-Match",l.etag[g]));G.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+pc+"; q=0.01":""):r.accepts["*"]);for(t in r.headers)G.setRequestHeader(t,r.headers[t]);if(!r.beforeSend||!1!==r.beforeSend.call(y,G,r)&&2!==F){I="abort";for(t in{success:1,error:1,complete:1})G[t](r[t]);if(p=fa(oc,r,e,G)){G.readyState=1;u&&A.trigger("ajaxSend", [G,r]);r.async&&0F)d(-1,J);else throw J;}}else d(-1,"No Transport");return G}return G.abort()},active:0,lastModified:{},etag:{}});var qc=[],Kd=/\?/,Wa=/(=)\?(?=&|$)|\?\?/,Ld=l.now();l.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var b=qc.pop()||l.expando+"_"+Ld++;return this[b]=!0,b}});l.ajaxPrefilter("json jsonp",function(e,d,g){var f,n,p,s=e.data,m=e.url,u=!1!==e.jsonp,r=u&&Wa.test(m), t=u&&!r&&"string"==typeof s&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Wa.test(s);if("jsonp"===e.dataTypes[0]||r||t)return f=e.jsonpCallback=l.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,n=b[f],r?e.url=m.replace(Wa,"$1"+f):t?e.data=s.replace(Wa,"$1"+f):u&&(e.url+=(Kd.test(m)?"&":"?")+e.jsonp+"="+f),e.converters["script json"]=function(){return p||l.error(f+" was not called"),p[0]},e.dataTypes[0]="json",b[f]=function(){p=arguments},g.always(function(){b[f]= n;e[f]&&(e.jsonpCallback=d.jsonpCallback,qc.push(f));p&&l.isFunction(n)&&n(p[0]);p=n=c}),"script"});l.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(b){return l.globalEval(b),b}}});l.ajaxPrefilter("script",function(b){b.cache===c&&(b.cache=!1);b.crossDomain&&(b.type="GET",b.global=!1)});l.ajaxTransport("script",function(b){if(b.crossDomain){var e,d= z.head||z.getElementsByTagName("head")[0]||z.documentElement;return{send:function(l,g){e=z.createElement("script");e.async="async";b.scriptCharset&&(e.charset=b.scriptCharset);e.src=b.url;e.onload=e.onreadystatechange=function(b,l){if(l||!e.readyState||/loaded|complete/.test(e.readyState))e.onload=e.onreadystatechange=null,d&&e.parentNode&&d.removeChild(e),e=c,l||g(200,"success")};d.insertBefore(e,d.firstChild)},abort:function(){e&&e.onload(0,1)}}}});var ra,ub=b.ActiveXObject?function(){for(var b in ra)ra[b](0, 1)}:!1,Md=0;l.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=l.ajaxSettings.xhr();l.extend(l.support,{ajax:!!vb,cors:!!vb&&"withCredentials"in vb});l.support.ajax&&l.ajaxTransport(function(e){if(!e.crossDomain||l.support.cors){var d;return{send:function(g,f){var n,p,s=e.xhr();e.username?s.open(e.type,e.url,e.async,e.username,e.password):s.open(e.type,e.url,e.async);if(e.xhrFields)for(p in e.xhrFields)s[p]= e.xhrFields[p];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType);!e.crossDomain&&!g["X-Requested-With"]&&(g["X-Requested-With"]="XMLHttpRequest");try{for(p in g)s.setRequestHeader(p,g[p])}catch(m){}s.send(e.hasContent&&e.data||null);d=function(b,g){var p,m,u,r,t;try{if(d&&(g||4===s.readyState))if(d=c,n&&(s.onreadystatechange=l.noop,ub&&delete ra[n]),g)4!==s.readyState&&s.abort();else{p=s.status;u=s.getAllResponseHeaders();r={};(t=s.responseXML)&&t.documentElement&&(r.xml=t);try{r.text= s.responseText}catch(y){}try{m=s.statusText}catch(x){m=""}!p&&e.isLocal&&!e.crossDomain?p=r.text?200:404:1223===p&&(p=204)}}catch(A){g||f(-1,A)}r&&f(p,m,r,u)};e.async?4===s.readyState?setTimeout(d,0):(n=++Md,ub&&(ra||(ra={},l(b).unload(ub)),ra[n]=d),s.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var Ba,Xa,Nd=/^(?:toggle|show|hide)$/,Od=RegExp("^(?:([-+])=|)("+Fa+")([a-z%]*)$","i"),Pd=/queueHooks$/,Ca=[function(b,c,e){var d,g,f,n,p,s,m=this,u=b.style,r={},t=[],y=b.nodeType&&C(b);e.queue|| (p=l._queueHooks(b,"fx"),null==p.unqueued&&(p.unqueued=0,s=p.empty.fire,p.empty.fire=function(){p.unqueued||s()}),p.unqueued++,m.always(function(){m.always(function(){p.unqueued--;l.queue(b,"fx").length||p.empty.fire()})}));1===b.nodeType&&("height"in c||"width"in c)&&(e.overflow=[u.overflow,u.overflowX,u.overflowY],"inline"===l.css(b,"display")&&"none"===l.css(b,"float")&&(!l.support.inlineBlockNeedsLayout||"inline"===sa(b.nodeName)?u.display="inline-block":u.zoom=1));e.overflow&&(u.overflow="hidden", l.support.shrinkWrapBlocks||m.done(function(){u.overflow=e.overflow[0];u.overflowX=e.overflow[1];u.overflowY=e.overflow[2]}));for(d in c)g=c[d],Nd.exec(g)&&(delete c[d],g!==(y?"hide":"show")&&t.push(d));if(g=t.length){f=l._data(b,"fxshow")||l._data(b,"fxshow",{});y?l(b).show():m.done(function(){l(b).hide()});m.done(function(){var c;l.removeData(b,"fxshow",!0);for(c in r)l.style(b,c,r[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[g].start&&f<= d[g].end){b=g;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}}}; if(void 0===this.jukebox)throw"jukebox.Manager requires jukebox.Player (Player.js) to run properly."; jukebox.Manager=function(b){this.features={};this.codecs={};this.__players={};this.__playersLength=0;this.__clones={};this.__queue=[];this.settings={};for(var c in this.defaults)this.settings[c]=this.defaults[c];if("[object Object]"===Object.prototype.toString.call(b))for(var d in b)this.settings[d]=b[d];this.__detectFeatures();jukebox.Manager.__initialized=!1===this.settings.useGameLoop?window.setInterval(function(){jukebox.Manager.loop()},20):!0}; jukebox.Manager.prototype={defaults:{useFlash:!1,useGameLoop:!1},__detectFeatures:function(){var b=window.Audio&&new Audio;if(b&&b.canPlayType&&!1===this.settings.useFlash){for(var c=[{e:"3gp",m:["audio/3gpp","audio/amr"]},{e:"aac",m:["audio/aac","audio/aacp"]},{e:"amr",m:["audio/amr","audio/3gpp"]},{e:"caf",m:["audio/IMA-ADPCM","audio/x-adpcm",'audio/x-aiff; codecs="IMA-ADPCM, ADPCM"']},{e:"m4a",m:'audio/mp4{audio/mp4; codecs="mp4a.40.2,avc1.42E01E"{audio/mpeg4{audio/mpeg4-generic{audio/mp4a-latm{audio/MP4A-LATM{audio/x-m4a'.split("{")}, {e:"mp3",m:["audio/mp3","audio/mpeg",'audio/mpeg; codecs="mp3"',"audio/MPA","audio/mpa-robust"]},{e:"mpga",m:["audio/MPA","audio/mpa-robust","audio/mpeg","video/mpeg"]},{e:"mp4",m:["audio/mp4","video/mp4"]},{e:"ogg",m:["application/ogg","audio/ogg",'audio/ogg; codecs="theora, vorbis"',"video/ogg",'video/ogg; codecs="theora, vorbis"']},{e:"wav",m:["audio/wave","audio/wav",'audio/wav; codecs="1"',"audio/x-wav","audio/x-pn-wav"]},{e:"webm",m:["audio/webm",'audio/webm; codecs="vorbis"',"video/webm"]}], d,f,g=0,m=c.length;gMath.abs(b.volume-0.1337));navigator.userAgent.match(/iPhone|iPod|iPad/i)&&(this.features.channels=1)}this.features.flashaudio= !!navigator.mimeTypes["application/x-shockwave-flash"]||!!navigator.plugins["Shockwave Flash"]||!1;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.10"),this.features.flashaudio=!0}catch(e){}!0===this.settings.useFlash&&(this.features.flashaudio=!0);!0===this.features.flashaudio&&!this.features.html5audio&&(this.codecs.mp3="audio/mp3",this.codecs.mpga="audio/mpeg",this.codecs.mp4="audio/mp4",this.codecs.m4a="audio/mp4",this.codecs["3gp"]="audio/3gpp",this.codecs.amr="audio/amr", this.features.volume=!0,this.features.channels=1)},__getPlayerById:function(b){return this.__players&&void 0!==this.__players[b]?this.__players[b]:null},__getClone:function(b,c){for(var d in this.__clones){var f=this.__clones[d];if(null===f.isPlaying&&f.origin===b)return f}if("[object Object]"===Object.prototype.toString.call(c)){d={};for(var g in c)d[g]=c[g];d.autoplay=!1;g=new jukebox.Player(d,b);g.isClone=!0;g.wasReady=!1;return this.__clones[g.id]=g}return null},loop:function(){if(0!==this.__playersLength)if(this.__queue.length&& this.__playersLengthb.isPlaying.end&&(!0===b.isPlaying.loop?b.play(b.isPlaying.start,!0):b.stop()):b.isClone&&null===b.isPlaying?this.remove(b):void 0!==b.backgroundMusic&&null===b.isPlaying&&c>b.backgroundMusic.end&&b.backgroundHackForiOS()},getPlayableResource:function(b){"[object Array]"!==Object.prototype.toString.call(b)&&(b=[b]);for(var c=0,d=b.length;cMath.abs(b.volume-0.1337));navigator.userAgent.match(/iPhone|iPod|iPad/i)&&(this.features.channels=1)}this.features.flashaudio= !!navigator.mimeTypes["application/x-shockwave-flash"]||!!navigator.plugins["Shockwave Flash"]||!1;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.10"),this.features.flashaudio=!0}catch(e){}!0===this.settings.useFlash&&(this.features.flashaudio=!0);!0===this.features.flashaudio&&!this.features.html5audio&&(this.codecs.mp3="audio/mp3",this.codecs.mpga="audio/mpeg",this.codecs.mp4="audio/mp4",this.codecs.m4a="audio/mp4",this.codecs["3gp"]="audio/3gpp",this.codecs.amr="audio/amr", this.features.volume=!0,this.features.channels=1)},__getPlayerById:function(b){return this.__players&&void 0!==this.__players[b]?this.__players[b]:null},__getClone:function(b,c){for(var d in this.__clones){var f=this.__clones[d];if(null===f.isPlaying&&f.origin===b)return f}if("[object Object]"===Object.prototype.toString.call(c)){d={};for(var g in c)d[g]=c[g];d.autoplay=!1;g=new jukebox.Player(d,b);g.isClone=!0;g.wasReady=!1;return this.__clones[g.id]=g}return null},loop:function(){if(0!==this.__playersLength)if(this.__queue.length&& this.__playersLengthb.isPlaying.end&&(!0===b.isPlaying.loop?b.play(b.isPlaying.start,!0):b.stop()):b.isClone&&null===b.isPlaying?this.remove(b):void 0!==b.backgroundMusic&&null===b.isPlaying&&c>b.backgroundMusic.end&&b.backgroundHackForiOS()},getPlayableResource:function(b){"[object Array]"!==Object.prototype.toString.call(b)&&(b=[b]);for(var c=0,d=b.length;c=b){d._volume=b;if(d._muted)return d;d.usingWebAudio&&d.masterGain.gain.setValueAtTime(b,c.ctx.currentTime);for(var g=0;gparseInt(m[0].split("/")[1],10);b._codecs={mp3:!(m||!f&&!d.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!f,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(g){b.noAudio=!0;break}for(c=0;c=sa)g._ended(t);else{var E=t._node;if(g._webAudio)f= function(){g._playLock=!1;da();g._refreshBuffer(t);E.gain.setValueAtTime(t._muted||g._muted?0:t._volume,c.ctx.currentTime);t._playStart=c.ctx.currentTime;"undefined"===typeof E.bufferSource.start?t._loop?E.bufferSource.noteGrainOn(0,H,86400):E.bufferSource.noteGrainOn(0,H,F):t._loop?E.bufferSource.start(0,H,86400):E.bufferSource.start(0,H,F);Infinity!==la&&(g._endTimers[t._id]=setTimeout(g._ended.bind(g,t),la));d||setTimeout(function(){g._emit("play",t._id);g._loadQueue()},0)},"running"===c.state&& "interrupted"!==c.ctx.state?f():(g._playLock=!0,g.once("resume",f),g._clearTimer(t._id));else{var fa=function(){E.currentTime=H;E.muted=t._muted||g._muted||c._muted||E.muted;E.volume=t._volume*c.volume();E.playbackRate=t._rate;try{var f=E.play();f&&"undefined"!==typeof Promise&&(f instanceof Promise||"function"===typeof f.then)?(g._playLock=!0,da(),f.then(function(){g._playLock=!1;E._unlocked=!0;d||(g._emit("play",t._id),g._loadQueue())}).catch(function(){g._playLock=!1;g._emit("playerror",t._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.");t._ended=!0;t._paused=!0})):d||(g._playLock=!1,da(),g._emit("play",t._id),g._loadQueue());E.playbackRate=t._rate;E.paused?g._emit("playerror",t._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||t._loop?g._endTimers[t._id]=setTimeout(g._ended.bind(g, t),la):(g._endTimers[t._id]=function(){g._ended(t);E.removeEventListener("ended",g._endTimers[t._id],!1)},E.addEventListener("ended",g._endTimers[t._id],!1))}catch(s){g._emit("playerror",t._id,s)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===E.src&&(E.src=g._src,E.load());f=window&&window.ejecta||!E.readyState&&c._navigator.isCocoonJS;if(3<=E.readyState||f)fa();else{g._playLock=!0;var ta=function(){fa();E.removeEventListener(c._canPlayEvent,ta,!1)};E.addEventListener(c._canPlayEvent, ta,!1);g._clearTimer(t._id)}}return t._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 g=d._getSoundIds(b),f=0;f=g){if("loaded"!==b._state||b._playLock)return b._queue.push({event:"volume",action:function(){b.volume.apply(b,d)}}),b;"undefined"===typeof f&&(b._volume=g);f=b._getSoundIds(f);for(var t=0;tH?Math.max(d,r):Math.min(d,r);r=Math.round(100*r)/100;t._webAudio?b._volume=r:t.volume(r,b._id,!0);m&&(t._volume=r);if(dc&&r>=d)clearInterval(b._interval),b._interval=null,b._fadeTo=null,t.volume(d,b._id),t._emit("fade",b._id)},f)},_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 g=0;gg&&(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,n){if(!this.ctx||!this.ctx.listener)return this;var p=this._orientation;c="number"!== typeof c?p[1]:c;d="number"!==typeof d?p[2]:d;f="number"!==typeof f?p[3]:f;e="number"!==typeof e?p[4]:e;n="number"!==typeof n?p[5]:n;if("number"===typeof b)this._orientation=[b,c,d,f,e,n],"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(n,Howler.ctx.currentTime,0.1)):this.ctx.listener.setOrientation(b,c,d,f,e,n);else return p;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 t="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),n=0;nthis.width||g>this.height)){var t=ig.system.scale,e=Math.floor(f*t),n=Math.floor(g*t),p=m?-1:1,s=r?-1:1;if(m||r)ig.system.context.save(),ig.system.context.scale(p,s);ig.system.context.drawImage(this.data,Math.floor(d*f)%this.width*t,Math.floor(d*f/this.width)*g*t,e,n,ig.system.getDrawPos(b)*p-(m?e:0),ig.system.getDrawPos(c)*s-(r?n:0),e,n);(m|| r)&&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);this.height-=2},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,g=this.widthMap[b]*f,m=this.height*f;ig.system.context.drawImage(this.data,this.indices[b]*f,0,g,m,ig.system.getDrawPos(c),ig.system.getDrawPos(d),g,m);return this.widthMap[b]+this.letterSpacing},_loadMetrics:function(b){this.widthMap= [];this.indices=[];for(var c=ig.getImagePixels(b,0,b.height-1,b.width,1),d=0,f=0;fc.data[g]&&d&&(this.widthMap.push(d),this.indices.push(f-d),d=0)}this.widthMap.push(d);this.indices.push(f-d)}});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,_loop:!1,init:function(b,c){this.path=b;this.multiChannel=!1!==c;Object.defineProperty(this,"loop",{get:this.getLooping.bind(this),set:this.setLooping.bind(this)});this.load()},getLooping:function(){return this._loop},setLooping:function(b){this._loop=b;this.currentClip&&(this.currentClip.loop=b)},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.loop=this._loop,this.currentClip.volume=ig.soundManager.volume*this.volume,this.currentClip.play())},stop:function(){this.currentClip&&(this.currentClip.pause(),this.currentClip.currentTime=0)}});ig.Sound.WebAudioSource=ig.Class.extend({sources:[],gain:null,buffer:null,_loop:!1,init:function(){this.gain= ig.soundManager.audioContext.createGain();this.gain.connect(ig.soundManager.audioContext.destination);Object.defineProperty(this,"loop",{get:this.getLooping.bind(this),set:this.setLooping.bind(this)});Object.defineProperty(this,"volume",{get:this.getVolume.bind(this),set:this.setVolume.bind(this)})},play:function(){if(this.buffer){var b=ig.soundManager.audioContext.createBufferSource();b.buffer=this.buffer;b.connect(this.gain);b.loop=this._loop;var c=this;this.sources.push(b);b.onended=function(){c.sources.erase(b)}; b.start(0)}},pause:function(){for(var b=0;bb.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){for(var c=ig.system.canvas,d=0,f=0;null!=c;)d+=c.offsetLeft,f+=c.offsetTop,c=c.offsetParent;var c=b.pageX,g=b.pageY;b.touches&&(c=b.touches[0].clientX,g=b.touches[0].clientY);this.mouse.x=(c-d)/ig.system.scale;this.mouse.y=(g-f)/ig.system.scale},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,g=c.vel.x*ig.system.tick,d=ig.game.collisionMap.trace(b.pos.x,b.pos.y,g,-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,pxWidth:1,pxHeight: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,g,m,r,t){var e={collision:{x:!1,y:!1,slope:!1},pos:{x:b,y:c},tile:{x:0,y:0}},n=Math.ceil((Math.max(Math.abs(g),Math.abs(m))+0.1)/this.tilesize);if(1m?this.tilesize:0,u=Math.max(Math.floor(g/this.tilesize),0),C=Math.min(Math.ceil((g+e)/this.tilesize),this.height);m=Math.floor((b.pos.x+y)/this.tilesize);var H=Math.floor((c+y)/this.tilesize);if(0H||H>=this.width)H=-1;if(0<=m&&mthis.lastSlope||1r?this.tilesize:0;u=Math.max(Math.floor(b.pos.x/this.tilesize),0);A=Math.min(Math.ceil((b.pos.x+t)/this.tilesize),this.width);F=Math.floor((b.pos.y+y)/this.tilesize); C=Math.floor((g+y)/this.tilesize);if(0C||C>=this.height)C=-1;if(0<=F&&Fthis.lastSlope||1y?e:0)-(p+u[0])*this.tilesize;n=m+t+(0r*-y+t*c)return A;p=Math.sqrt(c*c+y*y);s=y/p;p=-c/p;var C=e*s+n*p,u=s*C,C=p*C;if(u*u+C*C>=r*r+t*t)return A||0.5>c*(n-t)-y*(e-r);b.pos.x=g+r-u;b.pos.y=m+t-C;b.collision.slope={x:c,y:y,nx:s,ny:p};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,g,m){return{collision:{x:!1,y:!1,slope:!1},pos:{x:b+g,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 g=0;g=this.height||0>n){if(!this.repeat)continue;n=(n%this.height+this.height)%this.height}for(var p=-1,s=r;s=this.width||0>b){if(!this.repeat)continue;b=(b%this.width+ this.width)%this.width}if(b=this.data[n][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("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=d.indexOf("chrome")&&(m=c),d.indexOf("win64")&&(m=c));var r=new XMLHttpRequest;r.open("GET", m,!0);r.responseType="arraybuffer";r.onload=function(){this.webaudio.context.decodeAudioData(r.response,function(b){this.webaudio.buffer=b;this.webaudio.source_loop={};this.bgmPlaying?this.play(null,!0):this.stop()}.bind(this),function(){console.log('Error decoding audio "'+m+'".')})}.bind(this);r.send();if(4==r.readyState&&"undefined"!==typeof Audio){this.useHTML5Audio=!0;try{new Audio}catch(t){this.useHTML5Audio=!1}this.useHTML5Audio&&(console.log("Using HTML5 Audio"),this.webaudio=null,this.audio= new Audio,this.isSupported=!0,this.initHTML5Audio(b))}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)}.bind(this),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,g=null;this.codecs[ig.Sound.FORMAT.OGG.ext.toLowerCase()]?g=c:this.codecs[ig.Sound.FORMAT.MP3.ext.toLowerCase()]&&(g=f);if(g){ig.ua.mobile? ig.ua.iOS&&(g=f):(b=navigator.userAgent.toLowerCase(),-1!=b.indexOf("safari")&&-1>=b.indexOf("chrome")&&(g=f));this.audio.addEventListener("error",function(){this.audio.error&&4===this.audio.error.code&&(this.isSupported=!1)},!1);this.audio.src=g;this.audio._pos=0;this.audio.preload="auto";this.audio.volume=this._volume;this.inactiveAudio=new Audio;this.inactiveAudio.src=g;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(null,!0):this.stop();this.audio.removeEventListener("canplaythrough",m,!1)}.bind(this);this.audio.addEventListener("canplaythrough",m,!1);this.audio.load();break}}}},play:function(b,c){if(this.isSupported)if(this.bgmPlaying=!0,this.webaudio){if(!c&&this.reinitOnPlay&&this.webaudio.source_loop.buffer==this.webaudio.buffer){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);try{this.webaudio.context.close();this.webaudio.context=new this.AudioContext;this.webaudio.gainNode=this.webaudio.context.createGain();this.webaudio.gainNode.connect(this.webaudio.context.destination); this.webaudio.gainNode.gain.value=this._volume;var d="start",f="stop",g=this.webaudio.context.createBufferSource();"function"!==typeof g.start&&(d="noteOn");this.webaudio.compatibility.start=d;"function"!==typeof g.stop&&(f="noteOff");this.webaudio.compatibility.stop=f;this.webaudio.source_loop={};this.play(null,!0)}catch(m){}}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);if(null==b||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 r=this.audio;if(!this.muteFlag)if(this.bgmPlaying=!0,isNaN(b)&&(b=0,this.pausedTime&&(b=this.pausedTime)),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===r.readyState||!r.readyState&&navigator.isCocoonJS)r.readyState=4,r.currentTime=b,r.muted=this.muteFlag||r.muted,r.volume=this._volume,setTimeout(function(){r.play()},0);else{clearTimeout(this._onEndTimer);this._onEndTimer=null;var t=function(){typeof("function"== this.play)&&(this.play(),r.removeEventListener("canplaythrough",t,!1))}.bind(this);r.addEventListener("canplaythrough",t,!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;4==b.readyState&&(this.pausedTime=b.currentTime,b.currentTime=0,b.pause(),clearTimeout(this._onEndTimer),this._onEndTimer=null)}},volume:function(b){if(isNaN(b)||null==b)return this.getVolume();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)))}}})}); ig.baked=!0; ig.module("plugins.handlers.visibility-handler").requires("plugins.audio.sound-handler").defines(function(){ig.VisibilityHandler=ig.Class.extend({version:"1.2.1",config:{muteOnBlur:!0,pauseOnBlur:!0,clearInputStateOnBlur:!0,allowResumeWithoutFocus:{desktop:!0,mobile:{kaios:!1,"default":!0}},handlerDelay:{desktop:0,mobile:{kaios:0,"default":0}},autoFocusOnResume:{desktop:!0,mobile:{kaios:!1,"default":!0}},autoFocusAfterResume:{desktop:!0,mobile:{kaios:!1,"default":!0}}},browserPrefixes:["o","ms","moz", "webkit"],activeOverlays:[],browserPrefix:null,hiddenPropertyName:null,visibilityEventName:null,visibilityStateName:null,isShowingOverlay:!1,isFocused:!1,isPaused:!1,init:function(){this.initVisibilityHandler();this.initFocusHandler();this.initPageTransitionHandler();ig.visibilityHandler=this},pauseHandler:function(){!0===this.config.clearInputStateOnBlur&&"undefined"!==typeof ig.input&&null!==ig.input&&"function"===typeof ig.input.clearAllState&&ig.input.clearAllState();!0===this.config.pauseOnBlur&& ("undefined"!==typeof wgl&&null!==wgl&&null!==wgl.system&&"undefined"!==typeof wgl.system&&"function"===typeof wgl.system.stopRender&&wgl.system.stopRender(),"undefined"!==typeof ig.game&&null!==ig.game&&"undefined"!==typeof ig.game.pauseGame&&ig.game.pauseGame());!0===this.config.muteOnBlur&&"undefined"!==typeof ig.soundHandler&&null!==ig.soundHandler&&"function"===typeof ig.soundHandler.forceMuteAll&&ig.soundHandler.forceMuteAll()},resumeHandler:function(){"undefined"!==typeof ig.input&&null!== ig.input&&"function"===typeof ig.input.clearAllState&&ig.input.clearAllState();"undefined"!==typeof ig.game&&null!==ig.game&&("undefined"!==typeof ig.game.resumeGame&&ig.game.resumeGame(),"undefined"!==typeof wgl&&null!==wgl&&null!==wgl.system&&"undefined"!==typeof wgl.system&&"function"===typeof wgl.system.startRender&&wgl.system.startRender());"undefined"!==typeof ig.soundHandler&&null!==ig.soundHandler&&"function"===typeof ig.soundHandler.forceUnMuteAll&&ig.soundHandler.forceUnMuteAll()},initVisibilityHandler:function(){this.browserPrefix= this.getBrowserPrefix();this.hiddenPropertyName=this.getHiddenPropertyName(this.browserPrefix);this.visibilityEventName=this.getVisibilityEventName(this.browserPrefix);this.visibilityStateName=this.getVisibilityStateName(this.browserPrefix);this.visibilityEventName&&document.addEventListener(this.visibilityEventName,this.onChange.bind(this),!0)},initFocusHandler:function(){window.addEventListener("blur",this.onChange.bind(this),!0);document.addEventListener("blur",this.onChange.bind(this),!0);document.addEventListener("focusout", this.onChange.bind(this),!0);window.addEventListener("focus",this.onChange.bind(this),!0);document.addEventListener("focus",this.onChange.bind(this),!0);document.addEventListener("focusin",this.onChange.bind(this),!0)},initPageTransitionHandler:function(){window.addEventListener("pagehide",this.onChange.bind(this),!0);window.addEventListener("pageshow",this.onChange.bind(this),!0)},getBrowserPrefix:function(){var b=null;this.browserPrefixes.forEach(function(c){if(this.getHiddenPropertyName(c)in document)return b= c}.bind(this));return b},getHiddenPropertyName:function(b){return b?b+"Hidden":"hidden"},getVisibilityEventName:function(b){return(b?b:"")+"visibilitychange"},getVisibilityStateName:function(b){return b?b+"VisibilityState":"visibilityState"},hasView:function(){return!(document[this.hiddenPropertyName]||"visible"!==document[this.visibilityStateName])},hasFocus:function(){return document.hasFocus()||this.isFocused},addActiveOverlay:function(b){if(null===this.activeOverlays||"undefined"===typeof this.activeOverlays)this.activeOverlays= [];null===b||"undefined"===typeof b||!0!==this.activeOverlays.includes(b)&&this.activeOverlays.push(b)},removeActiveOverlay:function(b){if(null===this.activeOverlays||"undefined"===typeof this.activeOverlays)this.activeOverlays=[];0>=this.activeOverlays.length||null===b||"undefined"===typeof b||!0===this.activeOverlays.includes(b)&&this.activeOverlays.splice(this.activeOverlays.indexOf(b),1)},onOverlayShow:function(b){null!==b&&"undefined"!==typeof b&&this.addActiveOverlay(b);0=this.activeOverlays.length&&(this.isShowingOverlay=!1,this.systemResumed())},systemPaused:function(){if(this.isPaused)return!1;this.pauseHandler();return this.isPaused=!0},systemResumed:function(){if(!this.isPaused||!this.hasView()||this.isShowingOverlay)return!1;if(!this.hasFocus())if(ig.ua.mobile)if(this.isKaiOS()){if(!this.config.allowResumeWithoutFocus.mobile.kaios)return!1}else{if(!this.config.allowResumeWithoutFocus.mobile.default)return!1}else if(!this.config.allowResumeWithoutFocus.desktop)return!1; this.focusOnResume();this.resumeHandler();this.focusAfterResume();this.isPaused=!1;return!0},isKaiOS:function(){return/KAIOS/.test(navigator.userAgent)||!1},focusOnResume:function(){return ig.ua.mobile?this.isKaiOS()?this.config.autoFocusOnResume.mobile.kaios:this.config.autoFocusOnResume.mobile.default:this.config.autoFocusOnResume.desktop},focusAfterResume:function(){return ig.ua.mobile?this.isKaiOS()?this.config.autoFocusAfterResume.mobile.kaios:this.config.autoFocusAfterResume.mobile.default: this.config.autoFocusAfterResume.desktop},focus:function(b){window.focus&&b&&(document.activeElement&&"function"===typeof document.activeElement.blur&&document.activeElement.blur(),window.focus())},handleDelayedEvent:function(b){if(!this.hasView()||"pause"===b.type||"pageHide"===b.type||"blur"===b.type||"focusout"===b.type){if("blur"===b.type||"focusout"===b.type){var c=b.path||b.composedPath&&b.composedPath();if(c&&2";(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),"function"===typeof ig.sizeHandler.reorient&&ig.sizeHandler.reorient()):"undefined"!==typeof coreDivsToResize&&(coreDivsToResize.push(this.tapToStartDivId),"function"===typeof sizeHandler&& sizeHandler())}catch(c){console.log(c)}this.desktopCoverDIV.addEventListener("click",function(){ig.soundHandler.unlockWebAudio();this.setAttribute("style","visibility: hidden;");"function"===typeof b&&b()})}},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/bgm.mp3","media/audio/bgm.ogg"],autoplay:!1,spritemap:{music:{start:0,end:14.864,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.fake-storage").requires("impact.impact","plugins.impact-storage").defines(function(){FakeStorage=ig.Class.extend({data:{},supported:!1,convert:function(){try{return localStorage.setItem("testStorage","testStorage"),localStorage.removeItem("testStorage"),localStorageSupport="localStorage"in window&&null!==window.localStorage,new ig.Storage}catch(b){return this}},isSet:function(){return this.data.field?!0:!1},set:function(b,c){this.data[b]=c},get:function(b){return this.data[b]}, getInt:function(b){return this.data[b]?parseInt(this.data[b]):0}})});ig.baked=!0; ig.module("plugins.webaudio-music-player").defines(function(){WebaudioMusicPlayer=ig.Class.extend({bgmPlaying:!1,isSupported:!1,muteFlag:!1,pausedTime:0,webaudio:null,useHTML5Audio:!1,audio:null,inactiveAudio:null,codecs:null,_volume:1,soundList:{},init:function(b){this.webaudio={compatibility:{},gainNode:null,buffer:null,source_loop:{},source_once:{}};try{this.AudioContext=window.AudioContext||window.webkitAudioContext,this.webaudio.context=new this.AudioContext,this.isSupported=!0}catch(c){console.log("Web Audio API not supported in this browser."), this.webaudio=null,this.useHTML5Audio=!0}if(this.useHTML5Audio)if("undefined"!==typeof Audio)try{new Audio}catch(d){this.useHTML5Audio=!1}else this.useHTML5Audio=!1;this.useHTML5Audio&&(this.audio=new Audio,this.isSupported=!0,this.initHTML5Audio(b));if(!this.isSupported)return null;this.webaudio&&this.initWebAudio(b)},initWebAudio:function(b){ig.ua.iOS&&this.initIOSWebAudioUnlock();this.webaudio.gainNode=this.webaudio.context.createGain();this.webaudio.gainNode.connect(this.webaudio.context.destination); this.webaudio.gainNode.gain.value=this._volume;var c="start",d="stop",f=this.webaudio.context.createBufferSource();"function"!==typeof f.start&&(c="noteOn");this.webaudio.compatibility.start=c;"function"!==typeof f.stop&&(d="noteOff");this.webaudio.compatibility.stop=d;for(var g in b){this.soundList[g]=g;c=b[g].path;b=c+"."+ig.Sound.FORMAT.MP3.ext;var m=c+"."+ig.Sound.FORMAT.OGG.ext;ig.ua.mobile?ig.ua.iOS&&(m=b):(c=navigator.userAgent.toLowerCase(),-1!=c.indexOf("safari")&&-1>=c.indexOf("chrome")&& (m=b));var r=new XMLHttpRequest;r.open("GET",m,!0);r.responseType="arraybuffer";r.onload=function(){this.webaudio.context.decodeAudioData(r.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);r.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,g=null;this.codecs[ig.Sound.FORMAT.OGG.ext.toLowerCase()]?g=c:this.codecs[ig.Sound.FORMAT.MP3.ext.toLowerCase()]&&(g=f);if(g){ig.ua.mobile?ig.ua.iOS&&(g=f):(b=navigator.userAgent.toLowerCase(),-1!=b.indexOf("safari")&&-1>=b.indexOf("chrome")&&(g=f));this.audio.addEventListener("error",function(){this.audio.error&&4===this.audio.error.code&& (this.isSupported=!1)},!1);this.audio.src=g;this.audio._pos=0;this.audio.preload="auto";this.audio.volume=this._volume;this.inactiveAudio=new Audio;this.inactiveAudio.src=g;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;b.currentTime&&(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=ig.system.width?(this.size.x=320,this.size.y=200, this.anims.idle=new ig.Animation(this.splash_320x480,0,[0],!0)):(this.size.x=480,this.size.y=240,this.anims.idle=new ig.Animation(this.splash_480x640,0,[0],!0));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,!0)},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 g=ig.$new("div");g.id=b;document.body.appendChild(g);$("#"+g.id).css("float","left");$("#"+g.id).css("position","absolute");if(ig.ua.mobile){var m=window.innerHeight/mobileHeight,r=window.innerWidth/mobileWidth;$("#"+g.id).css("left",this.pos.x*r);$("#"+g.id).css("top",this.pos.y*m);$("#"+g.id).css("width",this.size.x*r);$("#"+g.id).css("height",this.size.y*m)}else m=w/2-destW/2,r=h/2-destH/2,console.log(m,r),$("#"+g.id).css("left",m+this.pos.x*multiplier),$("#"+g.id).css("top",r+this.pos.y* multiplier),$("#"+g.id).css("width",this.size.x*multiplier),$("#"+g.id).css("height",this.size.y*multiplier);f?$("#"+g.id).html(""):$("#"+g.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.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,!0));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 g=ig.$new("div");g.id=b;document.body.appendChild(g);$("#"+g.id).css("float","left");$("#"+g.id).css("position","absolute");if(ig.ua.mobile){var m=window.innerHeight/mobileHeight,r=window.innerWidth/ mobileWidth;$("#"+g.id).css("left",this.pos.x*r);$("#"+g.id).css("top",this.pos.y*m);$("#"+g.id).css("width",this.size.x*r);$("#"+g.id).css("height",this.size.y*m)}else m=w/2-destW/2,r=h/2-destH/2,console.log(m,r),$("#"+g.id).css("left",m+this.pos.x*multiplier),$("#"+g.id).css("top",r+this.pos.y*multiplier),$("#"+g.id).css("width",this.size.x*multiplier),$("#"+g.id).css("height",this.size.y*multiplier);f?$("#"+g.id).html(""):$("#"+g.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,logo:new ig.AnimationSheet("media/graphics/sprites/button-gamemenu.png",147,60),size:{x:147,y:60},zIndex:750,init:function(b,c,d){this.parent(b,c,d);"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());this.anims.idle=new ig.Animation(this.logo,0,[0],!0);this.currentAnim=this.anims.idle},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},draw:function(){this.parent();var b=ig.system.context;b.fillStyle="rgba(6,59,97,1)";b.font="22px Signika";b.textAlign="center";b.fillText(_STRINGS.Game.More,this.pos.x+ this.size.x/2,this.pos.y+35)},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 g=ig.$new("div");g.id=b;document.body.appendChild(g);$("#"+g.id).css("float","left");$("#"+g.id).css("position","absolute");if(ig.ua.mobile){var m=window.innerHeight/mobileHeight,r=window.innerWidth/ mobileWidth;$("#"+g.id).css("left",this.pos.x*r);$("#"+g.id).css("top",this.pos.y*m);$("#"+g.id).css("width",this.size.x*r);$("#"+g.id).css("height",this.size.y*m)}else m=document.getElementById("game").offsetLeft,r=document.getElementById("game").offsetTop,$("#"+g.id).css("left",m+this.pos.x*multiplier),$("#"+g.id).css("top",r+this.pos.y*multiplier),$("#"+g.id).css("width",this.size.x*multiplier),$("#"+g.id).css("height",this.size.y*multiplier);f?$("#"+g.id).html(""):$("#"+g.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=g;g+=1)b.lineTo(0+800*Math.cos(2*g*Math.PI/48),0+800*Math.sin(2*g*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(){if(!ig.wm)if(_SETTINGS.DeveloperBranding.Splash.Enabled){this.initTimer=new ig.Timer(0.1);try{ig.soundHandler.sfxPlayer.play("kittyopeningSound")}catch(b){console.log(b)}}else ig.game.director.nextLevel(), ig.system.context.globalAlpha=1,this.kill()},update:function(){this.parent();this.updateKittyOpening()},draw:function(){this.parent();ig.global.wm||(this.nextLevelTimer&&0>this.nextLevelTimer.delta()&&(ig.system.context.globalAlpha=-this.nextLevelTimer.delta()),this.drawKittyOpening())},updateKittyOpening:function(){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&&console.log(b),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.isClicking=ig.input.pressed("click");if(this.isReleased=ig.input.released("click"))"function"== typeof this.firstClick.released&&this.firstClick.released(),this.firstClick=!1;this.clicking&&!this.firstClick&&(this.firstClick=!1)}})});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 g=ig.$new("div");g.id=b;document.body.appendChild(g);$("#"+g.id).css("float","left");$("#"+g.id).css("width",this.size.x*multiplier);$("#"+g.id).css("height",this.size.y*multiplier);$("#"+g.id).css("position","absolute");var m=w/2-destW/2,r=h/ 2-destH/2;w==mobileWidth?($("#"+g.id).css("left",this.pos.x),$("#"+g.id).css("top",this.pos.y)):($("#"+g.id).css("left",m+this.pos.x*multiplier),$("#"+g.id).css("top",r+this.pos.y*multiplier));f?$("#"+g.id).html(""):$("#"+g.id).html("");dynamicClickableEntityDivs[b]={};dynamicClickableEntityDivs[b].width=$("#"+g.id).width();dynamicClickableEntityDivs[b].height= $("#"+g.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;ithis.pos.x+this.size.x-0.5*b.size.x||b.pos.xthis.pos.y+this.size.y-0.5*b.size.y||b.pos.ythis.volume&&(this.volume=0),1this.pos.x+this.size.x-0.5*b.size.x||b.pos.xthis.pos.y+this.size.y-0.5*b.size.y||b.pos.ythis.volume&&(this.volume=0),1this.pos.x+this.size.x-0.5*b.size.x||b.pos.xthis.pos.y+this.size.y-0.5*b.size.y||b.pos.y=ig.game.difficulty&&this.mother.mother.startGame()},update:function(){this.parent();this.buttonClose&& (this.buttonClose.pos.x=this.pos.x+0.91*this.size.x,this.buttonClose.pos.y=this.pos.y+0.02*this.size.y);this.buttonEasy&&(this.buttonEasy.pos.x=this.pos.x+0.23*this.size.x,this.buttonEasy.pos.y=this.pos.y+0.18*this.size.y);this.buttonMedium&&(this.buttonMedium.pos.x=this.pos.x+0.23*this.size.x,this.buttonMedium.pos.y=this.pos.y+0.42*this.size.y);this.buttonHard&&(this.buttonHard.pos.x=this.pos.x+0.23*this.size.x,this.buttonHard.pos.y=this.pos.y+0.66*this.size.y)},draw:function(){0.01this.recordLimit&&!this.scrollBar&&(this.scrollBar=ig.game.spawnEntity(EntityDialogBestTimeScrollbar,0,0,{mother:this,zIndex:this.zIndex+100,ignorePause:this.ignorePause}))},close:function(){this.buttonClose&&(this.buttonClose.locked=!0);this.scrollBar&&(this.scrollBar.locked=!0);this.tween({pos:{y:-2*this.size.y},bgAlpha:0},0.25,{delay:0,easing:ig.Tween.Easing.Linear.EaseNone,onComplete:function(){this.kill()}.bind(this)}).start()},kill:function(){this.buttonClose&& this.buttonClose.kill();this.buttonClose=null;this.scrollBar&&this.scrollBar.kill();this.scrollBar=null;ig.game.paused=!1;this.mother.dialogBestTime=null;this.mother.mother instanceof EntityBrainGame&&this.mother.mother.resumeGame();this.parent()},update:function(){this.parent();this.buttonClose&&(this.buttonClose.pos.x=this.pos.x+0.925*this.size.x,this.buttonClose.pos.y=this.pos.y+0.025*this.size.y);this.scrollBar&&(this.scrollBar.pos.x=this.pos.x+this.size.x-this.scrollBar.size.x-20,this.scrollBar.pos.y= this.pos.y+this.size.y-this.scrollBar.size.y-70)},draw:function(){0.01=this.scrollBar.rate&&0<=b-this.scrollBar.rate*(this.sortedRecords.length-this.recordLimit)&&b-this.scrollBar.rate*(this.sortedRecords.length-this.recordLimit)b&&(b=0);0.92this.pos.x+this.size.x-0.5*b.size.x||b.pos.xthis.pos.y+this.size.y-0.5*b.size.y||b.pos.y this.tileNumber.x||this.trimText(this.answers[c]).length>this.tileNumber.y)&&this.answers.splice(c,1);for(;this.answers.length>this.MAX_QUESTION;)this.answers.splice(Math.floor(Math.random()*this.answers.length),1);this.answersChecked=[];this.answersChecked.length=this.answers.length;for(c=0;cf&&(d=!1);for(j=f;jf&&(d=!1);for(j=f;jMath.round(this.gameTimer.delta())||!ig.game.playerStats.bestTime[ig.game.difficulty][_STRINGS.Game.title[this.titleIndex]])ig.game.playerStats.bestTime[ig.game.difficulty][_STRINGS.Game.title[this.titleIndex]]=Math.round(this.gameTimer.delta()),ig.game.submitStats()},endGame:function(){this.gameTimer.pause();this.gameEnded= !0;this.submitBestTime();this.dialogWin||(this.dialogWin=ig.game.spawnEntity(EntityDialogWin,0,0,{mother:this,zIndex:this.zIndex+500,time:this.formatTimeTrimHour(Math.round(this.gameTimer.delta()))}));var b={level:ig.game.difficulty,title:_STRINGS.Game.title[this.titleIndex],score:Math.round(this.gameTimer.delta()),high:ig.game.playerStats.bestTime[ig.game.difficulty][_STRINGS.Game.title[this.titleIndex]]};ig.game.fnEndGameApi(b)},capitaliseFirstLetter:function(b){return b.charAt(0).toUpperCase()+ b.slice(1)},selectTiles:function(){this.startTile.highlighted=!0;this.endTile.highlighted=!0;var b,c;if(this.selectedTiles.length)for(b=this.selectedTiles.length-1;0<=b;b--)this.selectedTiles[b].highlighted=!1;this.selectedTiles=[];if(this.startTile.tileIndex.y===this.endTile.tileIndex.y){b=this.startTile.tileIndex.x;c=this.endTile.tileIndex.x;for(this.startTile.tileIndex.x>this.endTile.tileIndex.x&&(b=this.endTile.tileIndex.x,c=this.startTile.tileIndex.x);b<=c;)this.selectedTiles.push(this.tile[this.startTile.tileIndex.y][b]), b++}else if(this.startTile.tileIndex.x===this.endTile.tileIndex.x){b=this.startTile.tileIndex.y;c=this.endTile.tileIndex.y;for(this.startTile.tileIndex.y>this.endTile.tileIndex.y&&(b=this.endTile.tileIndex.y,c=this.startTile.tileIndex.y);b<=c;)this.selectedTiles.push(this.tile[b][this.startTile.tileIndex.x]),b++}if(this.selectedTiles.length)for(b=this.selectedTiles.length-1;0<=b;b--)this.selectedTiles[b].highlighted=!0},checkAnswer:function(){var b="",c=!1,d=0;if(this.selectedTiles.length)for(var f= 0;fc&&(c="0"+c);10>d&&(d="0"+d);10>f&&(f="0"+f);return 0c&&(c="0"+c);10>d&&(d="0"+d);10>b&&(b="0"+b);return c+":"+d+":"+b},draw:function(){this.parent();this.boardTime.draw(0.5*ig.system.width-0.5*this.boardTime.width,0.25*this.boardTime.height);ig.system.context.save();ig.system.context.font= "20px Signika";ig.system.context.textAlign="left";ig.system.context.fillStyle="#eae9cc";ig.system.context.fillText(this.formatTime(Math.round(this.gameTimer.delta())),0.5*ig.system.width-0.13*this.boardTime.width,0.95*this.boardTime.height);ig.system.context.restore();ig.system.context.save();ig.system.context.font="21px Signika";ig.system.context.textAlign="center";ig.system.context.fillStyle="#ffecb7";_STRINGS.Game[_STRINGS.Game.title[this.titleIndex]]?ig.system.context.fillText(_STRINGS.Game[_STRINGS.Game.title[this.titleIndex]], 510,130):ig.system.context.fillText(_STRINGS.Game.title[this.titleIndex],510,130);ig.system.context.fillText(_STRINGS.Game.Difficulty[ig.game.difficulty],510,150);ig.system.context.restore();ig.system.context.save();ig.system.context.font="18px Signika";ig.system.context.textAlign="left";ig.system.context.fillStyle="#3b2412";if(this.answers)for(var b=0;bthis.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.bgmPlayer.stop();ig.ua.mobile&&_SETTINGS.Ad.Mobile.End.Enabled&&MobileAdInGameEnd.Initialize()}, submitStats:function(){console.log("playerStats saved");var b=this.playerStats;try{this.storage.set("playerStats-wordhunter-marketjs",b)}catch(d){"QUOTA_EXCEEDED_ERR"==d.name.toUpperCase()&&console.log("localstorage is not available")}},resetPlayerStats:function(){ig.log("resetting player stats ...");var b=ig.game.storage.get("playerStats-wordhunter-marketjs"),d=[null,{},{},{}];this.playerStats={bestTime:b&&void 0!==b.bestTime?b.bestTime:d,musicVolume:b&&void 0!==b.musicVolume?b.musicVolume:1,soundsVolume:b&& void 0!==b.soundsVolume?b.soundsVolume:1};this.submitStats()},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