Game1.Preload = function(game){};
Game1.Preload.prototype = {
  preload: function() {
  
var xmlplain = '<font><info face="Segment7" size="100" bold="0" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/><common lineHeight="100" base="80" scaleW="256" scaleH="256" pages="1" packed="0" alphaChnl="1" redChnl="0" greenChnl="0" blueChnl="0"/><pages><page id="0" file="font_0_0.png" /></pages><chars count="11"><char id="32" x="250" y="0" width="1" height="100" xoffset="0" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="48" x="0" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="49" x="192" y="101" width="12" height="100" xoffset="41" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="50" x="50" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="51" x="100" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="52" x="98" y="101" width="47" height="100" xoffset="6" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="53" x="0" y="101" width="48" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="54" x="49" y="101" width="48" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="55" x="146" y="101" width="45" height="100" xoffset="8" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="56" x="150" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="57" x="200" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /></chars></font>';
    //show loading screen
   this.preloadBar = this.add.sprite(this.game.world.centerX, this.game.world.centerY, 'preloadbar');
    this.preloadBar.anchor.setTo(0.5);
    this.load.setPreloadSprite(this.preloadBar);
    //var cacheKey = Phaser.Plugin.Tiled.utils.cacheKey;
    this.load.image('bg', 'img/OB_main_background.jpg');
    this.load.image('bg_ingame', 'img/OB_main_background.jpg');  
    this.load.image('sponsors', 'img/sponsorzy.png');  
    this.load.image('title', 'img/OB_main_tytul.png');
    this.load.image('pomocnik', 'img/OB_main_przewodnik.png');
    this.load.spritesheet('play_button', 'img/OB_main_button_play.png',215,215,3); 
   // this.load.spritesheet('speaker', 'img/speaker1.png',115,115);
    this.load.spritesheet('help', 'img/OB_memory_button_info.png', 133,133);  
    //this.load.spritesheet('arrow','img/strzalki.png', 75,73);
    this.load.image('guiPomocnik_good', 'img/OB_sklepy_przewodnik1.png');
    this.load.image('guiPomocnik_bad', 'img/OB_sklepy_przewodnik2.png');  
    this.load.image('Finish', 'img/OB_sklepy_dymek.png');
    this.load.image('book', 'img/OB_book.png');
    this.load.spritesheet('definicja', 'img/OB_I_1_definicja.png', (590/2),120);
    
    this.load.image('0_0', 'img/OB_I_1_01_0.png',255,255);  
    this.load.image('1_0', 'img/OB_I_1_02_0.png', 225,225);
    this.load.image('2_0', 'img/OB_I_1_03_0.png', 225,225);
    this.load.image('3_0', 'img/OB_I_1_04_0.png', 225,225);
    this.load.image('4_0', 'img/OB_I_1_05_0.png', 225,225);
    this.load.image('5_0', 'img/OB_I_1_06_0.png', 225,225);
    this.load.image('6_0', 'img/OB_I_1_07_0.png', 225,225);
    this.load.image('7_0', 'img/OB_I_1_08_0.png', 225,225);
    this.load.image('8_0', 'img/OB_I_1_09_0.png', 225,225);
    this.load.image('9_0', 'img/OB_I_1_10_0.png', 225,225);
    this.load.image('10_0', 'img/OB_I_1_11_0.png', 225,225);
    this.load.image('11_0', 'img/OB_I_1_12_0.png', 225,225);
    this.load.image('12_0', 'img/OB_I_1_13_0.png', 225,225);
    this.load.image('13_0', 'img/OB_I_1_14_0.png', 225,225);
    this.load.image('14_0', 'img/OB_I_1_15_0.png', 225,225);
    this.load.image('15_0', 'img/OB_I_1_16_0.png', 225,225);
    this.load.image('16_0', 'img/OB_I_1_17_0.png', 225,225);
    this.load.image('17_0', 'img/OB_I_1_18_0.png', 225,225);
    this.load.image('18_0', 'img/OB_I_1_19_0.png', 225,225);
    this.load.image('19_0', 'img/OB_I_1_20_0.png', 225,225);
    
    
      
    this.load.image('0_1', 'img/OB_I_1_01_1.png',255,255);  
    this.load.image('1_1', 'img/OB_I_1_02_1.png', 225,225);
    this.load.image('2_1', 'img/OB_I_1_03_1.png', 225,225);
    this.load.image('3_1', 'img/OB_I_1_04_1.png', 225,225);
    this.load.image('4_1', 'img/OB_I_1_05_1.png', 225,225);
    this.load.image('5_1', 'img/OB_I_1_06_1.png', 225,225);
    this.load.image('6_1', 'img/OB_I_1_07_1.png', 225,225);
    this.load.image('7_1', 'img/OB_I_1_08_1.png', 225,225);
    this.load.image('8_1', 'img/OB_I_1_09_1.png', 225,225);
    this.load.image('9_1', 'img/OB_I_1_10_1.png', 225,225);
    this.load.image('10_1', 'img/OB_I_1_11_1.png', 225,225);
    this.load.image('11_1', 'img/OB_I_1_12_1.png', 225,225);
    this.load.image('12_1', 'img/OB_I_1_13_1.png', 225,225);
    this.load.image('13_1', 'img/OB_I_1_14_1.png', 225,225);
    this.load.image('14_1', 'img/OB_I_1_15_1.png', 225,225);
    this.load.image('15_1', 'img/OB_I_1_16_1.png', 225,225);
    this.load.image('16_1', 'img/OB_I_1_17_1.png', 225,225);
    this.load.image('17_1', 'img/OB_I_1_18_1.png', 225,225);
    this.load.image('18_1', 'img/OB_I_1_19_1.png', 225,225);
    this.load.image('19_1', 'img/OB_I_1_20_1.png', 225,225);  
 
      
      
   /*
    this.load.image('OB_sklepy_o_2_01', 'img/OB_sklepy_o_1_01.png', 225,225);
    this.load.image('OB_sklepy_o_2_02', 'img/OB_sklepy_o_2_02.png', 225,225);
    this.load.image('OB_sklepy_o_2_03', 'img/OB_sklepy_o_2_03.png', 225,225);
    this.load.image('OB_sklepy_o_2_04', 'img/OB_sklepy_o_2_04.png', 225,225);
    this.load.image('OB_sklepy_o_2_05', 'img/OB_sklepy_o_2_05.png', 225,225);
    this.load.image('OB_sklepy_o_2_06', 'img/OB_sklepy_o_2_06.png', 225,225);
    this.load.image('OB_sklepy_o_2_07', 'img/OB_sklepy_o_2_07.png', 225,225);
    this.load.image('OB_sklepy_o_2_08', 'img/OB_sklepy_o_2_08.png', 225,225);
    this.load.image('OB_sklepy_o_2_09', 'img/OB_sklepy_o_2_09.png', 225,225);
    this.load.image('OB_sklepy_o_2_10', 'img/OB_sklepy_o_2_10.png', 225,225);
    this.load.image('OB_sklepy_o_2_11', 'img/OB_sklepy_o_2_11.png', 225,225);
    this.load.image('OB_sklepy_o_2_12', 'img/OB_sklepy_o_2_12.png', 225,225);*/
      
/*    this.load.spritesheet('backButton', 'img/OB_sklepy_button_previous.png',120,120);
    this.load.spritesheet('GoButton', 'img/OB_sklepy_button_next.png',120,120);  */  
/*    this.load.image('calc_', 'img/OS_puzzle_calc_C.png');
    this.load.image('lista', 'img/OB_sklepy_lista.png');*/
    this.load.image('koszyt1', 'img/OB_I_1_koszyk1.png');
    this.load.image('koszyt2', 'img/OB_I_1_koszyk2.png');  
    this.load.image('regal', 'img/OB_I_1_regal.png');
    //this.load.image('regal1', 'img/OB_sklepy_o_2_regal.png');  
    this.load.image('counter', 'img/OB_sklepy_kasa.png');  
   
    this.load.bitmapFont('font_0', 'font/font_0_0.png',null,xmlplain);  
  },    
  create: function() {
    this.state.start('Menu');
  },

};