'use strict';
var play;
var title;
var helper;
var bg;
var sponsors;
Game1.Menu = function() {};
Game1.Menu.prototype = {
    create: function() {
		var style = { font: '70px Arial', fill: '#0080ca', align: 'center'};
		bg = this.game.add.sprite(0, 0, 'bg');
        sponsors = this.game.add.sprite(0,458*2,'sponsors');
		title = this.game.add.sprite(435, 158, 'title');
        helper = this.game.add.sprite(1254, 415, 'pomocnik');
		play = this.game.add.sprite(446,686,'play_button');
        play.inputEnabled =true;
        play.name = "play";
        play.events.onInputOver.add(this.over,this);
        play.events.onInputDown.add(this.down, this);
        play.events.onInputOut.add(this.out,this);
		play.inputEnabled = true;
		play.animations.add('off',[0], true);
		play.animations.add('on',[1], true);
    },
	onInputOver: function(sprite, pointer){   
	},
	down: function(sprite, pointer) {
		this.game.state.start('Game');
	},      
	over: function(sprite, pointer) {
		play.animations.play('on',1,true,false);
		if (!this.game.device.desktop)
			this.game.state.start('Game');
	},
	out: function(sprite, pointer) {
		play.animations.play('off',1,true,false);
	},
    udate: function() {
    },
	actionOnClick: function() {
		this.game.state.start('Game');
	}
};