extend(YouAreReady, createjs.Container);

function YouAreReady()
{	
	this.initialize();
//--------------------------------//

	var _par = null
	var _parret = null

	var t = new createjs.Sprite(jsons["JSON2"]);
	t.gotoAndStop("window")
	t.x = WIDTHGAME/2 - t.getBounds().width/2
	t.y = HEIGHTGAME/2 - t.getBounds().height/2

	var title1 = new createjs.Sprite(jsons["JSON1"]);			/// Заголовок
	title1.gotoAndStop("text_green_are_you_sure");
	setCoor(title1, 133, 196)
	title1.x = WIDTHGAME/2 - title1.getBounds().width/2

	var tit = new createjs.Sprite(jsons["JSON1"]);
	tit.gotoAndStop("text_red_leave")
	setCoor(tit, 257, 6)
	// dragAndDrop(tit)

	// dragAndDrop(btn_back)

	var crown = new createjs.Sprite(jsons["JSON2"]);
	crown.gotoAndStop("window_crown")
	setCoor(crown, 19, 600)

	// dragAndDrop(crown)
	var yes = new Button({pod: "btn_loop", i: "icon_ok", iconX:-.4, iconY:-1})
	setCoor(yes, 402, 485)
	yes.addEventListener("click", function(){
		v_choiseLocation("menu")
	})
	var no = new Button({pod: "btn_loop", i: "icon_cancel", iconX: -.4, iconY:-1})
	setCoor(no, 127, 485)
	no.addEventListener("click", function(){
		v_choiseLocation(_par, _parret)
	})

	var frame = new FloatFrame()
	frame.addToTopPlatform(title1, 0)
	frame.addToTopPlatform(t, 0)
	frame.addToTopPlatform(crown)
	frame.addToTopPlatform(tit)
	frame.addToTopPlatform(yes)
	frame.addToTopPlatform(no)

	this.addChild(frame)

	// dragAndDrop(title1)
	// dragAndDrop(txt)
	// dragAndDrop(yes)
	// dragAndDrop(no)

	this.update = function(p) {
		if(p && p.par)
			_par = p.par
		if(p && p.par_ret)
			_parret = p.par_ret
	}
}